6 Replies Latest reply: Aug 15, 2013 10:08 AM by LJ LongWing RSS

Two Mid-Tier instances running under one Tomcat

ToRaX

Hi all,

 

I'm trying to set up two Mid-Tier 7.5 instances running under one Tomcat 6 on Windows 2003. However, I'm having some problems. I was able to run the same setup with Mid-Tier 6.3. Anyone of you here who succeeded with a similar setup?

 

In Tomcat's server.xml, I have one <Context> element for each Mid-Tier:

<Context path="/arsys" reloadable="true" docBase="D:\Program Files\BMC Software\ARSystem\midtier" workDir="D:\Program Files\BMC Software\ARSystem\midtier" />
<Context path="/arsyspartner" reloadable="true" docBase="D:\Program Files\BMC Software\ARSystem Partner\midtier" workDir="D:\Program Files\BMC Software\ARSystem Partner\midtier" />

 

Having both enabled, I'm seeing the following issue:

Only one Mid-Tier instance is working. When I e.g. attempt to login to the config pages of the other one, I'm getting the following exception:

 

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Servlet execution threw an exception

root cause

java.lang.UnsatisfiedLinkError: com.bmc.arsys.util.ARUtilEgcp.CCPUtilApp(Ljava/lang/String;Ljava/lang/String;)Z
     com.bmc.arsys.util.ARUtilEgcp.CCPUtilApp(Native Method)
     com.remedy.arsys.config.Configuration.login(Unknown Source)
     com.remedy.arsys.config.ConfigServlet.login(Unknown Source)
     com.remedy.arsys.config.ConfigServlet.doLogin(Unknown Source)
     com.remedy.arsys.config.ConfigServlet.performOperation(Unknown Source)
     com.remedy.arsys.config.ConfigServlet.doRequest(Unknown Source)
     com.remedy.arsys.config.ConfigServlet.postInternal(Unknown Source)
     com.remedy.arsys.config.ConfigServlet.doPost(Unknown Source)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

note The full stack trace of the root cause is  available in the Apache Tomcat/6.0.18 logs.

 

In stdout.log of Tomcat, I see the following exception (seems to happen at Tomcat startup):

- Could not load native library
java.lang.UnsatisfiedLinkError: Native Library D:\Program Files\BMC Software\ARSystem\midtier\WEB-INF\lib\arutiljni75.dll already loaded in another classloader
    at java.lang.ClassLoader.loadLibrary0(Unknown Source)
    at java.lang.ClassLoader.loadLibrary(Unknown Source)
    at java.lang.Runtime.loadLibrary0(Unknown Source)
    at java.lang.System.loadLibrary(Unknown Source)
    at com.bmc.arsys.api.NativeLibraryLoader.load(Unknown Source)
    at com.bmc.arsys.util.ARUtilEgcp.<clinit>(Unknown Source)
    at com.remedy.arsys.config.Configuration.getARServerPassword(Unknown Source)
    at com.remedy.arsys.stubs.ServerLogin$AdminHost.getPassword(Unknown Source)
    at com.remedy.arsys.stubs.ServerLogin.<init>(Unknown Source)
    at com.remedy.arsys.stubs.ServerLogin.get(Unknown Source)
    at com.remedy.arsys.stubs.ServerLogin.getAdmin(Unknown Source)
    at com.remedy.arsys.stubs.ServerLogin.getAdmin(Unknown Source)
    at com.remedy.arsys.stubs.ResourceService.buildFiles(Unknown Source)
    at com.remedy.arsys.stubs.ResourceService.buildFileItemList(Unknown Source)
    at com.remedy.arsys.stubs.ResourceService.start(Unknown Source)
    at com.remedy.arsys.stubs.SetupServlet.init(Unknown Source)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1172)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:992)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4058)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4371)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
    at org.apache.catalina.core.StandardService.start(StandardService.java:516)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

 

 

I think I understand the problem:

A classloader of the first Mid-Tier instance has already loaded the native library arutiljni75.dll, so the second Mid-Tier can't initialize successfully.

 

However, no clue how I could solve this... I tried already several things but I think I really got stuck.

 

Does anyone have any hints?