-->
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.  [ 10 posts ] 
Author Message
 Post subject: NPE in true OneToOne if classes processed out of order
PostPosted: Wed Sep 27, 2006 7:46 pm 
Newbie

Joined: Sat Mar 04, 2006 10:20 pm
Posts: 3
I'm getting an NPE if I have a true OneToOne bidirectional and the @PrimaryKeyJoinColumn class gets processed after the side with mappedBy=.

The error occurs on this line:
Code:
if ( otherSideProperty.getValue() instanceof OneToOne ) {

in OneToOneSecondPass.java because otherSideProperty is null.

Changing the order of the classes handed to AnnotationConfiguration works around the problem.

Should I submit a JIRA issue?


Hibernate version: 3.2.0.cr4
Hibernate Annotations version: 3.2.0.cr2
Partial stack trace:

Caused by: java.lang.NullPointerException
at org.hibernate.cfg.OneToOneSecondPass.doSecondPass(OneToOneSecondPass.java:135)
at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1054)
at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:296)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1210)
at com.anystream.acm.tx.impl.SessionCreatorFactory.buildSessionFactory(SessionCreatorFactory.java:117)
at com.anystream.acm.tx.impl.SessionCreatorFactory.buildSessionCreator(SessionCreatorFactory.java:84)
at com.anystream.acm.tx.impl.SessionCreatorFactory.createCoreServiceImplementation(SessionCreatorFactory.java:46)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 28, 2006 11:42 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
yes open a case, the ordering should have been taken care of

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 28, 2006 11:42 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
please attach a runnable test case

_________________
Emmanuel


Top
 Profile  
 
 Post subject: same problem
PostPosted: Fri Nov 24, 2006 11:30 am 
Newbie

Joined: Sat Jun 03, 2006 5:36 pm
Posts: 8
Hi, I've same problem and same exception. (and same workaround)
I'm using Spring & Hibernate. It looks like the property is not within class.
When this will be fixed? Is this in Jira?

I use Hibernate Annotations 3.2.0GA
Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 04, 2006 4:46 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
check the jira roadmap it might already be fixed in the user has provided a runnable testcase. Otherwise, open a jira issue with a runnable testcase

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 05, 2006 2:14 pm 
Newbie

Joined: Tue Dec 05, 2006 2:06 pm
Posts: 2
Hello.

I've got the same exception when tryin to deploy EJB3 beans in JBoss 4.0.4GA.
I couldn't find any issue in Jira related to this topic. So, is it already resolved?
I don't know if the JBoss guys plan to integrate a newer version of hibernate into their ejb3 implementation, so can anyone please give me a hint on how to use this workaround you mentioned?

Thanks in advance.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 07, 2006 1:19 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Put pressure on the EJB3 team

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 07, 2006 2:37 pm 
Newbie

Joined: Tue Dec 05, 2006 2:06 pm
Posts: 2
Quote:
Put pressure on the EJB3 team

Yeah, right. ;) So, I guess this issue is resolved in newer versions of hibernate?

Anyway, I had an error in my model, so now I don't get the exception anymore and everything seems to work for now.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 08, 2006 3:45 pm 
Newbie

Joined: Tue Apr 25, 2006 6:42 pm
Posts: 5
Location: Sao Paulo, Brazil
Hi All,

Any updates on this? I did not find any JIRA for this bug and I recompiled using the latest annotations sources and got the same problem.

[]s
Daniel


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 17, 2006 4:49 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
ah, can you open a JIRA issue with a runnable test case. I'll need to have a look at it.

_________________
Emmanuel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 10 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.