-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 
Author Message
 Post subject: Unable to instantiate default tuplizer
PostPosted: Tue Nov 16, 2010 5:35 am 
Newbie

Joined: Tue Nov 16, 2010 5:08 am
Posts: 3
Hi all,

I am using Hibernate 3.6.0 final with maven and everything works fine under a normal java6 environment. However, i am trying to execute my module as a Java agent in IBMs Lotus Domino 8.5.1fp3 environment (server side agent). Domino 8.5.1fp3 uses an IBM built jre6 based on Apache's Harmony. The hibernate.cfg.xml is in the classpath and correctly found and all dependecies are there (as i said this executes just fine under a normal java6 environment). However whenever i attempt to do so i get the following error:

Unable to instantiate default tuplizer [org.hibernate.tuple.entity.DynamicMapEntityTuplizer]
org.hibernate.tuple.entity.EntityTuplizerFactory.constructTuplizer(EntityTuplizerFactory.java:108)
org.hibernate.tuple.entity.EntityTuplizerFactory.constructDefaultTuplizer(EntityTuplizerFactory.java:133)
org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.<init>(EntityEntityModeToTuplizerMapping.java:69)
org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:322)
org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:473)
org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:133)
org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:84)
org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:284)
org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1842)
my.package.agent.buildSessionFactory(MyAgent.java:537)
... 3 more
Caused by:
java.lang.NullPointerException
org.hibernate.tuple.entity.EntityTuplizerFactory.constructTuplizer(EntityTuplizerFactory.java:105)

I suspect some kind of jar hell(???) since i have given full admin rights to the java module i am trying to execute and it can read/write files and open sockets on the server side. Any ideas?


Top
 Profile  
 
 Post subject: Re: Unable to instantiate default tuplizer
PostPosted: Tue Nov 16, 2010 5:40 am 
Newbie

Joined: Tue Nov 16, 2010 5:08 am
Posts: 3
it definitely seems like problems with the classloader.
Hmm...


Top
 Profile  
 
 Post subject: Re: Unable to instantiate default tuplizer
PostPosted: Wed Nov 17, 2010 9:12 am 
Newbie

Joined: Tue Nov 16, 2010 5:08 am
Posts: 3
Someone, any ideas? Sorry about the bump but i am really stuck here and starting to feel desperate...


Top
 Profile  
 
 Post subject: Re: Unable to instantiate default tuplizer
PostPosted: Fri Dec 17, 2010 11:22 am 
Newbie

Joined: Fri Dec 17, 2010 10:53 am
Posts: 8
I got the same exception but my case the problem was in not having the getter and the setter for some properties in my pojo and especially inside the inner class of a composite key. However I was induced in error because I took a sample/view from the code related to the project caveatemptor-native-061211 (related to the hold book Hibernate in Action). And, inside the class CategorizedItem.java, there is no getter() and setter() for the attributes categoryId and itemId of the inner class Id.

So, to be able to find where the problem comes from with a such esoteric message, I traced the code to get the first exception. The message from this exception was very clear.

Break point was set on : Session session = HibernateUtil.getSessionFactory().getCurrentSession(); and when you got the exception, dig into it with the watches Window (NetBeans)
-> Inherited
->detailMessage : "Unable to instantiate default tuplizer [org.hibernate.tuple.component.PojoComponentTuplizer]"
->cause : InvocationTargetException
->target : PropertyNotFoundException
->Inherited
-> detailMessage : "Could not find a getter for groupId in class com.yyyy.zzzzz.model.net.Group$Id"

Here to download caveatemptor : http://downloads.jboss.org/hibernate/caveatemptor/

When thing, I've not tested, is to tell to hibernate to access directly to the field if it is possible.

Regards,


Top
 Profile  
 
 Post subject: Re: Unable to instantiate default tuplizer
PostPosted: Tue Apr 26, 2011 9:13 pm 
Newbie

Joined: Tue Apr 26, 2011 9:11 pm
Posts: 2
Hi,

Did you find a solution? I'm having the same problem :(


Top
 Profile  
 
 Post subject: Re: Unable to instantiate default tuplizer solved
PostPosted: Wed Apr 27, 2011 12:14 pm 
Newbie

Joined: Tue Apr 26, 2011 9:11 pm
Posts: 2
Problem solved,

It looks like the problem is a security issue that does not let the Domino JVM instantiate some classes.
I just granted permission for execution to all classes on the "jvm\lib\security\java.policy" file and that did the trick (development environment).

Here is my java.policy file for reference:

// Standard extensions get all permissions by default
grant codeBase "file:${java.home}/lib/ext/*" {
permission java.security.AllPermission;
};

// default permissions granted to all domains
grant {
// Allows any thread to stop itself using the java.lang.Thread.stop()
// method that takes no argument.
// Note that this permission is granted by default only to remain
// backwards compatible.
// It is strongly recommended that you either remove this permission
// from this policy file or further restrict it to code sources
// that you specify, because Thread.stop() is potentially unsafe.
// See "http://java.sun.com/notes" for more information.
permission java.lang.RuntimePermission "stopThread";

// allows anyone to listen on un-privileged ports
permission java.net.SocketPermission "localhost:1024-", "listen";

// "standard" properies that can be read by anyone

permission java.util.PropertyPermission "java.version", "read";
permission java.util.PropertyPermission "java.vendor", "read";
permission java.util.PropertyPermission "java.vendor.url", "read";
permission java.util.PropertyPermission "java.class.version", "read";
permission java.util.PropertyPermission "os.name", "read";
permission java.util.PropertyPermission "os.version", "read";
permission java.util.PropertyPermission "os.arch", "read";
permission java.util.PropertyPermission "file.separator", "read";
permission java.util.PropertyPermission "path.separator", "read";
permission java.util.PropertyPermission "line.separator", "read";

permission java.util.PropertyPermission "java.specification.version", "read";
permission java.util.PropertyPermission "java.specification.vendor", "read";
permission java.util.PropertyPermission "java.specification.name", "read";

permission java.util.PropertyPermission "java.vm.specification.version", "read";
permission java.util.PropertyPermission "java.vm.specification.vendor", "read";
permission java.util.PropertyPermission "java.vm.specification.name", "read";
permission java.util.PropertyPermission "java.vm.version", "read";
permission java.util.PropertyPermission "java.vm.vendor", "read";
permission java.util.PropertyPermission "java.vm.name", "read";

permission java.util.PropertyPermission "javax.realtime.version", "read";
permission java.security.AllPermission;

};

// Notes java code gets all permissions

grant codeBase "file:${notes.binary}/*" {
permission java.security.AllPermission;
};

grant codeBase "file:${notes.binary}/rjext/*" {
permission java.security.AllPermission;
};

grant codeBase "file:${notes.binary}/ndext/*" {
permission java.security.AllPermission;
};

grant codeBase "file:${notes.binary}/xsp/-" {
permission java.security.AllPermission;
};

grant codeBase "file:${notes.binary}/osgi/-" {
permission java.security.AllPermission;
};


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.