springhibernatemule-esb

MULE 3.8.1 Hibernate 4.3.11 - org.hibernate.jpa.boot.archive.spi.ArchiveException: Could not build ClassFile


I am developing an application for MULE ESB CommunityEdition (3.8.1 version).

I have included (provided by MULE) SPRING 4.1.6.RELEASE in project.

For persistence layer I set up Hibernate 4.3.11.FINAL.

My code is based on this idea (https://www.ricston.com/blog/jpa-mule/).

So basically i have included in the project (besides MULE dependencies):

And everything was working perfectly fine until i started to use Java 8 API...

Whatever I do: any lambda, stream or anything I am still getting error:

org.hibernate.jpa.boot.archive.spi.ArchiveException: Could not build ClassFile

What I did until now:

I spent on this about 5 hours I am really close to give it up... I really need hibernate cause this project will include many db operations

What else Can i Try to do?


Solution

  • Problem solved!! I was using mvn dependency:tree to check if there are any org.javassist dependencies in project. And there weren't...

    Then I checked the folder: {mule_home}/lib/opt and there was an old version of org.javassist library!

    So: I downloaded latest org.javassist jar and I put it in the {mule_home}/lib/user folder. Now it works like a charm :)