You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Mete Kural <me...@touchtonecorp.com> on 2003/05/08 18:57:58 UTC

Weird Classloader Problem (cross-platform) ???

Hello all, 

I implemented the UserDatabase interface included in catalina.jar and put my implementation in server/classes directory. Since my webapp classloader needs access to this UserDatabase class, I had to set the privileged attribute of the Context element for this webapp in server.xml to "true". It worked fine on my Windows development PC. Then I tested this on our Linux development server and I get a NoClassDefFoundError when I try to create an instance of the UserDatabase class, although the webapp has the privileged attribute set to "true". I'm wondering why this works on my Windows desktop but not on the Linux server. The webapp on both machines are exactly the same. I also made sure that I copied my UserDatabase implementation into the server/classes directory of the Linux server. Both are Tomcat 4.1.24. Both use JDK 1.4.1. There are only two differences in the two environments that I can recognize. One is the operating system difference, henceforth the difference in the versions of the JVM, one for Windows, one for Linux. And the other difference is a slight difference in the Context element of this webapp. On the Windows machine, it's like this: 

<Context path="" docBase="C:\Documents and Settings\MeteK\My Documents\Projects\sofn" debug="0" privileged="true"> 

On the Linux server it's like this: 

<Context path="sofn" docBase="/usr/metek/tomcat/webapps/sofn" debug="0" privileged="true"> 

And here's the NoClassDefFoundError (root cause) that I get when I access the webapp via the browser: 

java.lang.NoClassDefFoundError: org/sofn/portal/wintouch/WintouchAccess 
at org.sofn.portal.util.ResourcesPlugIn.init(ResourcesPlugIn.java:49) 
at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:1156) 
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:472) 

Do you have any ideas why this could be occurring? Why would there be different behaviour between classloaders in Windows and in Linux? 

Thanks, 
Mete 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org