wood burning stoves 2.0*
The moose likes Tomcat and the fly likes Tomcat Classpath issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat Classpath issue" Watch "Tomcat Classpath issue" New topic
Author

Tomcat Classpath issue

Man duv
Greenhorn

Joined: Mar 13, 2012
Posts: 3
Hi ,

I am using Tomcat 6.0 and trying to load an application twice as i need to do. I changed the war files to app1 and app2. Both are loading properly but when i access the applications, consider i access app1 it working fine, but when i access app2 its complaining some Classloaders already loaded. Same as vice versa. Below is the error that i am seeing. Can some one help me on it.

I tried several opotions by editing catalina properties file as to add shared.classloader but didnot work for me.

2012-03-13 08:59:51 Commons Daemon procrun stdout initializedError initializing AgentLogger
Message: Failed to load smerrlog
Exception:
com.netegrity.smerrlog.SmLogException: Failed to load smerrlog
at com.netegrity.smerrlog.SmLogger.<init>(SmLogger.java:104)
at com.netegrity.affiliateminder.webservices.utils.y.<init>(DashoA10*..:66)
at com.netegrity.affiliateminder.webservices.utils.x.<init>(DashoA10*..:58)
at com.netegrity.affiliateminder.webservices.admin.aa.r(DashoA10*..:119)
at com.netegrity.affiliateminder.webservices.admin.c.g(DashoA10*..:261)
at com.netegrity.siteminder.agentcommon.framework.d.<init>(DashoA10*..:69)
at com.netegrity.affiliateminder.webservices.admin.c.<init>(DashoA10*..:58)
at com.netegrity.affiliateminder.webservices.admin.c.a(DashoA10*..:75)
at com.netegrity.affiliateminder.webservices.admin.c.b(DashoA10*..:104)
at com.netegrity.affiliateminder.webservices.b.init(DashoA10*..:201)
at com.netegrity.affiliateminder.webservices.AssertionRetriever.init(DashoA10*..:609)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1173)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:809)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:864)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1665)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.UnsatisfiedLinkError: Native Library E:\CA\Siteminder\webagent\bin\smerrlog.dll already loaded in another classloader
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1768)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1728)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1028)
at com.netegrity.smerrlog.SmLogger.<init>(SmLogger.java:99)
... 22 more

Exception history:
java.lang.UnsatisfiedLinkError: Native Library E:\CA\Siteminder\webagent\bin\smerrlog.dll already loaded in another classloader
com.netegrity.smerrlog.SmLogException: Failed to load smerrlog


FATAL ERROR: Exception from System.loadLibrary java.lang.UnsatisfiedLinkError: Native Library E:\CA\Siteminder\webagent\bin\smcommonutil.dll already loaded in another classloader
FATAL ERROR: Exception from AgentAPI.initialize() java.lang.UnsatisfiedLinkError: netegrity.siteminder.javaagent.AgentAPI.initialize()V
Man duv
Greenhorn

Joined: Mar 13, 2012
Posts: 3
Can someone help me on this issue please???
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19654
    
  18

PatienceIsAVirtue. And welcome to the Ranch!


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15958
    
  19

This isn't a classpath issue. It's a Windows problem. You have CA Siteminder code in your webapp.

CA Siteminder is loading native Windows code (smerrlog.dll). Windows has file system interlocks that can limit the sharability of smerrlog.dll, even though dlls are (or at least were) normally expected the be sharable. Possibly because it's accessing non-shareable resources, possibly because they didn't design the DLL properly.

There isn't anything Tomcat can do. You'll need to contact CA. You're paying them for support, so they should give you an answer quickly and promptly.


Customer surveys are for companies who didn't pay proper attention to begin with.
Man duv
Greenhorn

Joined: Mar 13, 2012
Posts: 3
Thank you Tim...

Reading through the tomcat class loader documents. It appears that the jar files need to be copied into $JAVA_HOME/jre/lib/ext.
http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html

Once i copied to $JAVA_HOME/jre/lib/ext i dont see below error. Thanks again for looking into my issue.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tomcat Classpath issue
 
Similar Threads
Oracle-JDBC dll file
Unable to get Web Service running
Native lib is already loaded in another classloader
conflicting jar files and .dll
ClassNotFoundException