Thursday 26 November 2009

Hibernate / Spring WAR issues in Weblogic 10 - antlr

I had an issue today deploying a straightforward WAR file to WLS 10. The classloader hierarchy was preventing Hibernate from using the correct version of the antlr jar that was bundled in my webapp.

For my particular situation, the solution had to be simple. In the end, I created a new Eclipse project to bundle the WAR into an EAR, and then added a file called weblogic-application.xml in the META-INF folder of that EAR with the following content:


<weblogic-application>
<prefer-application-packages>
<package-name>antlr.*</package-name>
</prefer-application-packages>
</weblogic-application>


..which solves the problem.

No comments:

Post a Comment