Version 2, last updated by pbernet at May 13, 2011 11:51 UTC
WLS Deployment Issues
Lift apps with Lift 2.2 and Scala 2.8.1 run on WLS 10.3.3. However, you might come across these issues while deploying them.
Joda Time lib classpath conflict
WLS 10.3.3 seems to have an older version of the the Joda Time lib in it’s classpath.
If you encounter a Stacktrace like:
<Error> <HTTP> <BEA-101165> <Could not load user defined filter in web.xml: net.liftweb.http.LiftFilter.
java.lang.NoSuchMethodError:
org.joda.time.Duration.standardSeconds(J)Lorg/joda/time/Duration;
...
What works, is to add:
<container-descriptor>
<prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>
to the weblogic.xml, so that the newer joda time lib bundled with lift wins the classloader race :-)
JPA EntityManager conflict when using JPA Provider EclipseLink
WLS 10.3.3 comes with “prepackaged” EclipseLink 2.0.2 in the classpath. Packaging the newer EclipseLink 2.1 in .war File did not work for us since the EntityManager complains when two instances are active. If you don’t have the WLS 10.3.3 installation under control, it looks as if you have to make do with the prepackaged EclipseLink 2.0.2 version, which was what we did.
Re-Deployment via JMX when using EclipseLink
If you come across this upon Re-Deployment via JMX:
[ERROR net.liftweb.http.LiftRules] Exception being returned to browser when processing /index.html: Message:
java.lang.ClassCastException: my.package.model.MyModelClass cannot be cast to my.package.model.MyModelClass
...First access of a model class
The source of the problem seems to be the the JPA EntityManager, which for some reason cannot be shutdown properly. What worked for us was to add a ServletListener class:
<listener>
<listener-class>your.package.ServletListener</listener-class>
</listener>
to the web.xml and implement the method contextDestroyed:
def contextDestroyed(e: ServletContextEvent) {
println("Destroying EntityManagerFactory...");
Model.shutdownEMF
println("Application successfully undeployed");
}