|
[
Permalink
| « Hide
]
Emmanuel Bernard added a comment - 12/Feb/07 08:31 AM
Answered on the forum post. I need to fix the NPE though
happens even witht he described workaround apparently, need to have a look at it
I personally still experience the issue -- but only with the mappedBy OneToOne, not if I remove it --, and was not able to locate the fix you committed by looking at http://anonsvn.jboss.org/repos/hibernate/trunk/HibernateExt nor in http://anonsvn.jboss.org/repos/hibernate/trunk/Hibernate3; could you point me to the fix?
Thanks! Something probably related to this bug. I'm quite sure I have misconfigured something, but I get the following error when using OneToOne mappings. Failing more gracefully would be nice.
Caused by: javax.persistence.PersistenceException: java.lang.NullPointerException at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:258) at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:120) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:51) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:33) ... 39 more Caused by: java.lang.NullPointerException at org.hibernate.cfg.OneToOneSecondPass.doSecondPass(OneToOneSecondPass.java:135) at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1130) at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:316) at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1115) at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1265) at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:150) at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:884) at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:186) at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:246) ... 43 more I have the same exception when I have a "mapped by" not correct.
Had a similar error. I made a few changes to entities without one-to-one mappings. During attempting to solve this I commented all the one-to-one mappings from OTHER entities - this then gave a different error.
The error is discussed here: https://svn.cargo.codehaus.org/browse/GRAILS-4215?focusedCommentId=169191&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel My problem: I had the jbossall-client.jar on the classpath which references similar classes in similar packages. Just mentioning this here in case someone with similar issues stumbles upon this page. |
||||||||||||||||||||||||||||||||||||||||||||||||