Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I was given an "EAR" file and told to try to deploy it on an Oracle WebLogic server. I had successfully deployed it on a IBM WebSphere server. When I attempt to start it on WebLogic, however, I get the following error:

Could not load user defined listener: org.springframework.web.context.ContextLoaderListener java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:296) at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:269) at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:56) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:177) at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:37) at

I've checked that spring.war is in WEB-INF/lib in the appropriate war files.

What am I missing?

share|improve this question

1 Answer 1

If you want it to load libs from your WEB-INF/lib directory then you need to add something to your weblogic.xml file (this should be in WEB-INF).

<weblogic-web-app>
   <container-descriptor>
      <prefer-web-inf-classes>true</prefer-web-inf-classes>
   </container-descriptor>
</weblogic-web-app>

Hope that helps.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.