-->
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.  [ 4 posts ] 
Author Message
 Post subject: Hibernate NoSuchMethodError
PostPosted: Wed Jun 29, 2016 3:08 pm 
Newbie

Joined: Wed Jun 29, 2016 3:03 pm
Posts: 2
Good Morning.

I have a legacy Java + Hibernate 3.5 EJB aplication.

The application compile with maven with no problem, the hibernate-core-3.5.0-Final.jar is inside the EAR, but when i deploy and run the EJB in my Weblogic Server y have this error:

Code:
Caused by: java.lang.NoSuchMethodError: org.hibernate.Hibernate.createBlob([BLorg/hibernate/Session;)Ljava/sql/Blob;


Caused by this line:

Code:
ejbService.setResponseXml(Hibernate.createBlob(responseXML, session));


ResponseXML is byte[] and session is org.hibernate.Session

Any idea where is the error?


Top
 Profile  
 
 Post subject: Re: Hibernate NoSuchMethodError
PostPosted: Wed Jun 29, 2016 4:06 pm 
Hibernate Team
Hibernate Team

Joined: Thu Sep 11, 2014 2:50 am
Posts: 1638
Location: Romania
Check out this SO answer.

_________________
If you liked my answer, you are going to love my High-Performance Java Persistence book and my blog as well.


Top
 Profile  
 
 Post subject: Re: Hibernate NoSuchMethodError
PostPosted: Wed Jun 29, 2016 4:10 pm 
Newbie

Joined: Wed Jun 29, 2016 3:03 pm
Posts: 2
Thank for the reply.

My project compiles with no problem, the problem is in weblogic, when i call the EJB method, this error happens.

The hibernate-core is inside the jar, in "APP-INF/lib" and is present in the manifest.mf classpath


Top
 Profile  
 
 Post subject: Re: Hibernate NoSuchMethodError
PostPosted: Wed Jun 29, 2016 4:26 pm 
Hibernate Team
Hibernate Team

Joined: Thu Sep 11, 2014 2:50 am
Posts: 1638
Location: Romania
That's because your application comes with a version of Hibernate, while Weblogic comes with another version. Check the class path in debug.

_________________
If you liked my answer, you are going to love my High-Performance Java Persistence book and my blog as well.


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