on 10-31-2005 1:26 PM
I everybody,
I have a problem with the JCO. If I start the WAS6.4 and deploy my application, there ist no problem.But if I change the sourcecode und deploy it again i get the following mistake:
java.lang.ExceptionInInitializerError: JCO.classInitialize(): Could not load middleware layer 'com.sap.mw.jco.rfc.MiddlewareRFC'
JCO.nativeInit(): Could not initialize dynamic link library sapjcorfc [Native Library D:\usr\sap\J2E\JC00\j2ee\os_libs\sapjcorfc.dll already loaded in another classloader]. java.library.path [C:\j2sdk1.4.2_08\jre\bin\server;C:\j2sdk1.4.2_08\jre\bin;C:\j2sdk1.4.2_08\bin;D:\usr\sap\J2E\JC00\j2ee\os_libs;D:\ProgrammInst\miktex\bin;d:\sapdb\programs\bin;d:\sapdb\programs\pgm;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Programme\Xerox\DSClient;C:\WINNT\system32\sapjcorfc.dll;D:\usr\sap\J2E\SCS01\exe;D:\usr\sap\J2E\JC00\exe;D:\usr\sap\J2E\SYS\exe\run]
at com.sap.mw.jco.JCO.<clinit>(JCO.java:738)
...
After that I have to reboot the server. After the reboot i can start the application without any problems. But if I change the sourcecode and deploy it, I get the same mistake.
I use the JCO 2.1.6 and the WAS6.4 SP12.
Can anybody help me to solve this problem?
Kind regards
Axel
I have deleted the sapjcorfc.dll but it didn´t work.
Regard
Axel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Axel,
The reason you are getting the "loaded in another classloader" is because of the way that you attached the library to your application.
Are you using SAP NDS? If so, then you have two things, a project and an application. Within the project, you probably added the JCO library wrong. If you did this:
right clicked on project --> properties --> Java Build Path --> Libraries Tab --> Add External
then that would be wrong. Remove it from the build path, then do the following:
Right click on project --> Add/Remove Additional Libraries --> Expand sap.com --> put a check next to com.sap.mw.jco.
It will give you a message about your application. Just follow the next steps.
Expand Application -->double click on application-j2ee-engine.xml --> In the general tab, highlight references and click add --> Click select library/interface/service button --> Check the same box as above.
Build you project and then you application and redeploy. If you haven't already restarted your server since the last error that you got, I would do so before running the application again.
Hi Nathan,
thank you for your answer, but what should I do if I work with DC`s. With a normal J2EE Application it works fine, but in my application he didn´t find the library at the build of the .war file. Normaly I hava a Library DC with a public Part which I need as a used DC in my application. How does ist work in my case?
Kind regards
Axel
If you are talking about external JARs, then there are two ways to handle it. You can add them to your project using the "Add External JARs" like you were doing before. Of course you don't need to do this with SAP libraries. This adds the JAR in your EAR, which can become a pain, because of all the extra size when deploying it. I work remote, so I need to keep anything that I send to the server on a regular basis very small.
The second way would be to create a Library Archive. You place your jars within it and deploy that to the server and then you reference them, just like you did the SAP libraries.
I have created a step by step in another thread.
Try deleting the sapjcorfc.dll in C:\WINNT\system32\sapjcorfc.dll. It appears to be duplicated
hope it works,
Gonzalo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I didnt`t have a previous installation. I didnu00B4t understand why he didnu00B4t unload the classloader.
Native Library D:\usr\sap\J2E\JC00\j2ee\os_libs\sapjcorfc.dll already loaded in another classloader]
Kind regards Axel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Do you have a previous JCO installation??. Your problem seems that you have a previous JCO installation. Remove the path of your previous installation in the PATH environment variable. That should do it
Bye,
Gonzalo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There are two files that are distributed with the JCO package. They are OS specific libraries. You have to put them on the server in one of the directories that was mentioned in the java.library.path.
Since you are running on a MS box, the two files are librfc32.dll, sapjcorfc.dll.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
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.