on 11-29-2005 2:41 PM
Hi, I'm having the following error when using libraries which use JNI in Web Dynpro
java.lang.UnsatisfiedLinkError: Native Library C:\usr\sap\J2E\JC00\j2ee\os_libs\jniwrap.dll already loaded in another classloader
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1551)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1482)
at java.lang.Runtime.load0(Runtime.java:737)
at java.lang.System.load(System.java:811)
at com.jniwrapper.DefaultLibraryLoader.loadLibrary(SourceFile:209)
at com.jniwrapper.Library.loadNativeCode(SourceFile:44)
at com.jniwrapper.Library.loadNativeCode(SourceFile:69)
at com.jniwrapper.Library.ensureNativeCode(SourceFile:79)
at com.jniwrapper.PlatformContext.a(SourceFile:252)
at com.jniwrapper.PlatformContext.getDefaultStructureAlignment(SourceFile:189)
at com.jniwrapper.Structure.init(SourceFile:112)
at com.jniwrapper.win32.system.VersionInfo.<init>(SourceFile:48)
at com.jniwrapper.win32.system.Kernel32.isUnicode(SourceFile:66)
at com.jniwrapper.win32.FunctionName.<clinit>(SourceFile:24)
at com.jniwrapper.win32.system.Kernel32.<clinit>(SourceFile:28)
at com.jniwrapper.win32.WinFunctionCache.setupEncoding(SourceFile:39)
at com.jniwrapper.win32.WinFunctionCache.<init>(SourceFile:28)
at com.jniwrapper.win32.ole.OleFunctions.<init>(SourceFile:81)
at com.jniwrapper.win32.ole.OleFunctions.getInstance(SourceFile:89)
at com.jniwrapper.win32.ole.OleFunctions.oleUninitialize(SourceFile:1046)
at com.orbitel.comp.Conexion.wdDoInit(Conexion.java:120)
at com.orbitel.comp.wdp.InternalConexion.wdDoInit(InternalConexion.java:105)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingComponent.doInit(DelegatingComponent.java:95)
at com.sap.tc.webdynpro.progmodel.controller.Controller.initController(Controller.java:215)
at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.init(ClientComponent.java:346)
at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.init(ClientApplication.java:349)
at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.execute(WebDynproMainTask.java:599)
at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:59)
at com.sap.tc.webdynpro.clientserver.cal.ClientManager.doProcessing(ClientManager.java:251)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doWebDynproProcessing(DispatcherServlet.java:154)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:116)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:48)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:391)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:265)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:345)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:323)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:865)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:240)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)
at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162)
I think the problem is because that I have to put the library into J2EE Server and not in the lib aplication. Where do I have to store this JAR file in the webserver? I haver seen this thread which talk some thing like this.
Thanks.
I was interested in the case and i was testing and I saw it is that you can :
1) make a project that is shared, where you can put all your libraries classes and your factory class that, is like your bussiness tier.
2 )In your webdynpro application makes a reference to this proyect in Properties > Projects and check the other Reference project with the libraries.
3 )Changes to the navigator view and go to gen_wdp> application.xml and load it.
Go to Application and ADD new SharingReference to the project that contains your bussines tier(step 1).
this maintains the librarie class loader always above and you wouldn't have to restart the server always that you makes a deploy of your presentation tier.
and and it´s all, it´s work.
Josue Cruz
Message was edited by: Josue Cruz
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Pablo,
What kind of references do you have in your WD (sharing references and used DC`s)? And what code did cause this error?
Best regards, Maksim Rashchynski.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have no sharing references in the project, because I'm using JNIWrapper(no SAP library) and I thought the libraries wouldn't be in the server so no sharing reference would be found (is this okay), I 've store the .jar files into the the lib folder.
This is the code which cause the error.
OleFunctions.oleInitialize();
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.