1
votes

I'm porting an application over to tomcat, and I suspect the following classloading may be an issue...

If I have a class in WEB-INF/classes that requires a class that is in WEB-INF/lib, they can not find it.

If I have a class in WEB-INF/classes and copy that class over to WEB-INF/classes directly, no issues, works fine.

If I take an example class and move it to WEB-INF/lib, where it depends on another WEB-INF/lib, no issues, works fine.

Is there a classloader trick/visibility thing around getting certain WEB-INF/lib's 'loaded' appropriately to be visible to WEB-INF/classes?

tomcat6 (possibly tomcat7 if someone has answer there), oracle jdk6.

Additional information: The is moving from an EAR (jboss) to a WAR (tomcat). The particular libraries that are the symptom of the issues used to be in the EAR as a jarModule, not part of WEB-INF/lib. Moving them to WEB-INF/lib does not seem to be working.

The original .class file(s) that can not see (classnotfoundexception) items in the /lib/*.jar's are also configured with load-on-startup of 1

1
RESOLVED: stupid packaging problem, was excluding certain classes & jars included in WAR (related to prior EAR assembly in the maven war plugin configuration). No user could have found this, question was unanswerable otherwise.dhartford

1 Answers

0
votes

in lib folder you have to place your jars files, not compiled class, all your compiled code is placed in classes folder