You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Raghu <ra...@infotechsw.com> on 2008/10/16 16:37:34 UTC

common jars for all applications in tomcat

I have different applications using spajco.jar

I have this jars in web-inf/lib folder of all the applications used like
struts, log4j,servlet,sapjco.jar.etc...

 

But I get this error sometimes.

 

SO to have one JCO instance for one JVM instance I need to moved them to
$CATALINA_BASE/common/lib

 

 

Exception: Exception in thread "main" java.lang.ExceptionInInitializerError:
Could not load middleware layer "com.sap.mw.jco.rfc.MiddlewareRFC"

Native library /usr/local/sapjco/libsapjcorfc.so already loaded in another
classloder.

 

My questions is where is the correct folder to have the common jar files
which are shared across multiple applications 

 

$CATALINA_BASE/shared/lib    or      $CATALINA_BASE/common/lib.

 


RE: common jars for all applications in tomcat

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Martin Gainty [mailto:mgainty@hotmail.com]
> Subject: RE: common jars for all applications in tomcat
>
> did you locate your sap.jars specifically sapco.jar to be
> located on CLASSPATH?

Don't ever, ever do that.  The CLASSPATH variable should never be used with Tomcat, and the only thing on the system classpath should be Tomcat's bootstrap.jar file.

> and set LD_LIBRARY_PATH environment variable to
> jcolib_install_path where the jcolib_install_path contains
> libsapjcorfc.so for OS AND specific processor (32bit or 64 bit)

Read the OP's message: the native library was loaded, the problem was the attempt to load it multiple times.  Ergo, the need to move the offending jar to a shared location.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: common jars for all applications in tomcat

Posted by Martin Gainty <mg...@hotmail.com>.
Good Afternoon  Paul

did you locate your sap.jars specifically sapco.jar to be located on CLASSPATH?
and set LD_LIBRARY_PATH environment variable to

jcolib_install_path where the jcolib_install_path contains libsapjcorfc.so for OS AND specific processor (32bit or 64 bit)

http://www.wmusers.com/forum/showthread.php?t=13403

?
Martin 
______________________________________________ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. 


> From: paul.ockleford@nhs.net
> To: users@tomcat.apache.org
> Subject: RE: common jars for all applications in tomcat
> Date: Thu, 16 Oct 2008 16:04:40 +0100
> 
> I use tomcat/shared/lib for this, but I don't know how appropriate that is. 
> 
> -----Original Message-----
> From: Raghu [mailto:raghuveerv@infotechsw.com] 
> Sent: 16 October 2008 15:38
> To: 'Tomcat Users List'
> Subject: common jars for all applications in tomcat
> 
> I have different applications using spajco.jar
> 
> I have this jars in web-inf/lib folder of all the applications used like
> struts, log4j,servlet,sapjco.jar.etc...
> 
>  
> 
> But I get this error sometimes.
> 
>  
> 
> SO to have one JCO instance for one JVM instance I need to moved them to
> $CATALINA_BASE/common/lib
> 
>  
> 
>  
> 
> Exception: Exception in thread "main" java.lang.ExceptionInInitializerError:
> Could not load middleware layer "com.sap.mw.jco.rfc.MiddlewareRFC"
> 
> Native library /usr/local/sapjco/libsapjcorfc.so already loaded in another
> classloder.
> 
>  
> 
> My questions is where is the correct folder to have the common jar files
> which are shared across multiple applications 
> 
>  
> 
> $CATALINA_BASE/shared/lib    or      $CATALINA_BASE/common/lib.
> 
>  
> 
> 
> 
> ***********************************************************************
> This  message  may  contain  confidential and  privileged  information.
> If you  are not the  intended recipient  you should not  disclose, copy
> or distribute information in this e-mail or take any action in reliance
> on its contents.  To do so is strictly  prohibited and may be unlawful.
> Please  inform  the  sender that  this  message has  gone astray before
> deleting it.  Thank you.
> 
> 2008 marks the 60th anniversary of the NHS.  It's an opportunity to pay
> tribute to the NHS staff and volunteers who help shape the service, and
> celebrate their achievements.
> 
> If you work for the NHS  and  would like  an NHSmail  email account, go
> to: www.connectingforhealth.nhs.uk/nhsmail
> ***********************************************************************
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 

_________________________________________________________________
When your life is on the go—take your life with you.
http://clk.atdmt.com/MRT/go/115298558/direct/01/

RE: common jars for all applications in tomcat

Posted by pa...@nhs.net.
I use tomcat/shared/lib for this, but I don't know how appropriate that is. 

-----Original Message-----
From: Raghu [mailto:raghuveerv@infotechsw.com] 
Sent: 16 October 2008 15:38
To: 'Tomcat Users List'
Subject: common jars for all applications in tomcat

I have different applications using spajco.jar

I have this jars in web-inf/lib folder of all the applications used like
struts, log4j,servlet,sapjco.jar.etc...

 

But I get this error sometimes.

 

SO to have one JCO instance for one JVM instance I need to moved them to
$CATALINA_BASE/common/lib

 

 

Exception: Exception in thread "main" java.lang.ExceptionInInitializerError:
Could not load middleware layer "com.sap.mw.jco.rfc.MiddlewareRFC"

Native library /usr/local/sapjco/libsapjcorfc.so already loaded in another
classloder.

 

My questions is where is the correct folder to have the common jar files
which are shared across multiple applications 

 

$CATALINA_BASE/shared/lib    or      $CATALINA_BASE/common/lib.

 



***********************************************************************
This  message  may  contain  confidential and  privileged  information.
If you  are not the  intended recipient  you should not  disclose, copy
or distribute information in this e-mail or take any action in reliance
on its contents.  To do so is strictly  prohibited and may be unlawful.
Please  inform  the  sender that  this  message has  gone astray before
deleting it.  Thank you.

2008 marks the 60th anniversary of the NHS.  It's an opportunity to pay
tribute to the NHS staff and volunteers who help shape the service, and
celebrate their achievements.

If you work for the NHS  and  would like  an NHSmail  email account, go
to: www.connectingforhealth.nhs.uk/nhsmail
***********************************************************************


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: common jars for all applications in tomcat

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Raghu [mailto:raghuveerv@infotechsw.com]
> Subject: common jars for all applications in tomcat
>
> My questions is where is the correct folder to have the
> common jar files which are shared across multiple applications
> $CATALINA_BASE/shared/lib    or      $CATALINA_BASE/common/lib.

Read the doc and make your decision based on your requirements:
http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html

Note that the question is moot in Tomcat 6 due to its simplified classloader structure.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org