Search code examples
hibernateweblogic

Hibernate NoSuchMethodError


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:

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

Caused by this line:

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

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

Any idea where is the error?


Solution

  • Solved. The Application has two different Hibernate versions in the lib (1.0 and 3.6, incredible jaja). I left only the 3.6 and change the imports to the old 1.0 and works fine now.