on 10-14-2008 1:16 PM
I have 3 applications running on tomcat,with
UserId = TestId
All the 3 applications are designed in JSp,Struts to use JCO Connection for connecting to SAP.
During application startup time connection pool of 50 connections were created.
At any point of time Connection pool is created for ONLY ONE applycation.
For other applications i get following error.
Caused by: java.lang.ExceptionInInitializerError: JCO.classInitialize(): Could not load middleware layer 'com.sap.mw.jco.rfc.MiddlewareRFC'
Native Library /usr/local/sapjco/libsapjcorfc.so already loaded in another classloader
Do every application should have separate user?
What to be done to use any number of applications for same User Id.
Hello,
you only can have one JCO Instance per JVM Instance
on tomcat you can achive this by removing the jco jar files from your web applications and put in to the servers lib dir - so they only get loaded once
for tomcat this should be $TOMCAT_HOME/common/lib
regards franz
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, that is in fact causing the problem
remove the jar from your WEB-INF/lib
put the jar in comm/lib directory of tomcat and nowhere else and the problem should disappear
to add the jar for compilation in eclipse put the jar somewhere on your filesystem
then in Eclipse: Project -> Properties -> Java Build path -> ... add external jar ... and select the jar on the filesystem
regards franz
...close thread if problem is solved
Frez,
This is resolved the problem.
But when i deliver the application ,i make jar and provide to customer.
Customer may deploy it on linuc or on windows.
during development i keep all jars in common folder line d:
eclispse_lib
This will be used for compilation.
There is no provision for compilation at customer site,so can i make jar and deploy directly at customer site and advice to place the jar in the common directory..<tomcat_dir_path>\common\lib
Is this correct way ?.
This is working on windows system..
This is not working if the same application is moved to linuxsystem..
All JCO Related Jars were added in
/usr/local/catalina/common/lib/ folder.
librfccm.so
libsapjcorfc.so
sapjco.jar
were added in /usr/local/catalina/common/lib/ folder..
Since my struts application creates connection pool through struts plugin class during application startup time.I get following error.
I get below error since i did not get reference to sapjco.jar during application startup time and i get java.lang.NoClassDefFoundError: .
look at struts.log
2008-10-16 13:19:55,478ERRORorg.apache.struts.action.ActionServlet~ Unable to initialize Struts ActionServlet due to an unexpected exception or error thrown, so marking the servlet as unavailable. Most likely, this is due to an incorrect or missing library dependency.
java.lang.NoClassDefFoundError: com/sap/mw/jco/JCO$Exception
Any thoughts ?
Edited by: Raghu v on Oct 16, 2008 2:14 PM
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.