File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat Classpath issue" Watch "Tomcat Classpath issue" New topic

Tomcat Classpath issue

Man duv

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
com.netegrity.smerrlog.SmLogException: Failed to load smerrlog
at com.netegrity.smerrlog.SmLogger.<init>(
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(
at org.apache.catalina.core.StandardWrapper.allocate(
at org.apache.catalina.core.StandardWrapperValve.invoke(
at org.apache.catalina.core.StandardContextValve.invoke(
at org.apache.catalina.core.StandardHostValve.invoke(
at org.apache.catalina.valves.ErrorReportValve.invoke(
at org.apache.catalina.core.StandardEngineValve.invoke(
at org.apache.catalina.connector.CoyoteAdapter.service(
at org.apache.coyote.http11.Http11AprProcessor.process(
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(
Caused by: java.lang.UnsatisfiedLinkError: Native Library E:\CA\Siteminder\webagent\bin\smerrlog.dll already loaded in another classloader
at java.lang.ClassLoader.loadLibrary0(
at java.lang.ClassLoader.loadLibrary(
at java.lang.Runtime.loadLibrary0(
at java.lang.System.loadLibrary(
at com.netegrity.smerrlog.SmLogger.<init>(
... 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

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

Joined: Oct 27, 2005
Posts: 20274

PatienceIsAVirtue. And welcome to the Ranch!

How To Ask Questions How To Answer Questions
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17417

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.

An IDE is no substitute for an Intelligent Developer.
Man duv

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.

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:
subject: Tomcat Classpath issue
It's not a secret anymore!