-
1. Re: Could not create an instance of PersistenceCapable: java
jjarkko Sep 2, 2003 8:00 AM (in response to jjarkko)Ah, managed to solve the previous one. Had to give a real key name for "target-foreign-key-column". But i'm now facing a next problem;
6:39:52,399 DEBUG [StoreManagerImpl] load command: SELECT user_jdoField_User_roles.JOID FROM user user LEFT JOIN roles user_jdoField_User_roles ON (user.OID = user_jdoField_User_roles.USER_UID) WHERE user.OID = '1'
16:43:59,294 ERROR [Engine] StandardWrapperValve[action]: Servlet.service() for servlet action threw exception
java.lang.NullPointerException
at javax.jdo.spi.JDOImplHelper.newObjectIdInstance(JDOImplHelper.java:112)
at org.jboss.persistence.jbossdo.schema.JDOIdentity.postLoadList(JDOIdentity.java:143)
at org.jboss.persistence.jbossdo.schema.JDO1ToXAssociation.postLoad(JDO1ToXAssociation.java:95)
at org.jboss.persistence.jbossdo.schema.JDOAssociationEndField.postLoad(JDOAssociationEndField.java:311)
at org.jboss.persistence.jbossdo.schema.JDOClass.postLoad(JDOClass.java:113)
at org.jboss.persistence.jbossdo.store.StoreManagerImpl.load(StoreManagerImpl.java:137)
at org.jboss.persistence.jbossdo.JBossPersistenceManagerInternal.load(JBossPersistenceManagerInternal.java:193)
at org.jboss.persistence.jbossdo.JBossStateManagerImpl.load(JBossStateManagerImpl.java:271)
at org.jboss.persistence.jbossdo.JBossStateManagerImpl.getObjectField(JBossStateManagerImpl.java:363)
at fi.jab.poc.User.getRoles(User.java:97)
From what i can see is that in javax.jdo.spi.JDOImplHelper.newObjectIdInstance() getMetaByClass(...) the metaByClass-map doesn't have a value for the Role-class, there's only one class in the map, the User Class. I tried to follow the example in the JBossJDO-project example page but somehow the thing doesn't seem to work..