Hello,

 

We are using the Context in the server.xml to change the root application to
a different webapp. 

 

<Host name="localhost"  appBase="webapps" unpackWARs="true"
autoDeploy="true" deployOnStartup="true" >

        <Context path="/" docBase="iiq" />

        <Valve className="org.apache.catalina.valves.AccessLogValve"
directory="logs" prefix="localhost_access_log." suffix=".txt" pattern="%h %l
%u %t &quot;%r&quot; %s %b"  resolveHosts="false" />

</Host>

 

So that the webapp can be call from https://url:8443/ and
https://url:8443/iiq. 

The webapp is using the sapjco3.jar and the native library libsapjco3.so to
connect to SAP systems.

If the webapp is open from both URLs, it will result in the following error.

 

java.lang.ExceptionInInitializerError: JCo initialization failed with
java.lang.UnsatisfiedLinkError: Native Library
/appl/tomcat/apps/ap/figi/apache-tomcat-latest/webapps/iiq/WEB-INF/lib/libsa
pjco3.so already loaded in another classloader

 

The library only exists once in the tomcat structure.

It seems that the tomcat sees both URLs as different applications and tries
to load native library twice.

After removing the Context element it's working without any error.

 

Is this the normal behavior with the Context element ?

Is there an option to change this behavior, or does it look like a bug ?

 

Thanks

Tobias Pietag

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to