Did you try adding the SAP JCO jar in the JVM's bootclasspath?

Sanjiv

On Nov 15, 2007 2:13 PM, caius_swopes <[EMAIL PROTECTED]> wrote:

>
> I'm using the SAP JCO connector.  I have only one appfuse application
> running
> on one jetty server  There are two dll files that must be placed in the
> system32 folder for the JCO connector to work.  One of those dll files is
> named sapjcorfc.dll.
> My application works fine when I do mvn jetty:run.  The problem occurs
> when
> the maven-jetty-plugin redeploys the server due to a change to a file.
>  From
> what I gather from other forums including the sap forum (see this thread:
> https://www.sdn.sap.com/irj/sdn/thread?threadID=15622 ), sapjcorfc.dlldoes
> not like to be loaded more than once "per machine".  Since I can
> completely
> restart maven with everything working fine and only a hot redeploy causes
> problems, I assume that in an appfuse/jetty/maven context this would mean
> "per server startup".  Is there anyway for me to tell the class loader,
> upon
> hot redeploy, to not load the dll file?
>
> I'm not sure if this has anything to do with the problem but I found
> something odd in the error below.  If you look at the java.library.path
> there are extra entries that are not part of my path environment variable.
>
> Here are my system path environment variables (where
> system.root=C:\WINDOWS):
>
> %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;D:\IBM\CLIENT~1;D:\IBM\CLIENT~1\Shared;D:\IBM\CLIENT~1\Emulator;C:\Program
> Files\Common Files\Adaptec
>
> Shared\System;D:\QuickTime\QTSystem\;%JAVA6_HOME%\bin;%ANT_HOME%\bin;%CATALINA_HOME%\bin;%MYSQL_HOME%\bin;%JAVAEE_HOME%\bin;D:\md5sum.exe;%JAVA_HOME%\bin;%MAVEN_HOME%\bin;%JETTY_HOME%\bin;%JETTY_HOME%;%ANT_OPTS%;d:\Program
> Files\Subversion\bin
>
> Here is the error:
>
> 2007-11-15 11:28:50.995::WARN:  EXCEPTION
> java.lang.ExceptionInInitializerError: JCO.classInitialize(): Could not
> load
> mid
> dleware layer 'com.sap.mw.jco.rfc.MiddlewareRFC'
> JCO.nativeInit(): Could not initialize dynamic link library sapjcorfc
> [Native Li
> brary C:\WINDOWS\system32\sapjcorfc.dll already loaded in another
> classloader].
> java.library.path
> [C:\Java\jdk1.5.0\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\WIND
>
> OWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;D:\IBM\CLIENT~1;D:\IBM\CLIENT~1
> \Shared;D:\IBM\CLIENT~1\Emulator;C:\Program Files\Common Files\Adaptec
> Shared\Sy
> stem;D:\QuickTime\QTSystem\;C:\Java\jdk1.6.0\bin;D:\apache-ant-1.7.0\bin
> ;D:\wamp
>
> \tomcat\bin;D:\wamp\mysql\bin;C:\Sun\SDK\bin;D:\md5sum.exe;C:\Java\jdk1.5.0\bin;
> D:\maven-2.0.7\bin;D:\jetty-6.1.5\bin;D:\jetty-6.1.5;-Xmx1536M;d:\Program
> Files\
> Subversion\bin;C:\Sun\SDK\bin]
>        at com.sap.mw.jco.JCO.<clinit>(JCO.java:776)
>        at
> com.amersports.extranet.webapp.servlet.JCOConnectionServlet.init(JCOC
> onnectionServlet.java:37)
>        at javax.servlet.GenericServlet.init(GenericServlet.java:241)
>        at
> org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.jav
> a:433)
>        at
> org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:25
> 6)
>        at
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
> 40)
>        at
> org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.ja
> va:612)
>        at org.mortbay.jetty.servlet.Context.startContext(Context.java:139)
>        at
> org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.jav
> a:1218)
>        at
> org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:
> 500)
>        at
> org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448
> )
>        at
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
> 40)
>        at
> org.mortbay.jetty.plugin.Jetty6PluginWebApplication.start(Jetty6Plugi
> nWebApplication.java:144)
>        at
> org.mortbay.jetty.plugin.AbstractJettyRunMojo$1.filesChanged(Abstract
> JettyRunMojo.java:423)
>        at org.mortbay.util.Scanner.reportBulkChanges(Scanner.java:456)
>        at org.mortbay.util.Scanner.reportDifferences(Scanner.java:327)
>        at org.mortbay.util.Scanner.scan(Scanner.java:254)
>        at org.mortbay.util.Scanner$1.run(Scanner.java:225)
>        at java.util.TimerThread.mainLoop(Timer.java:512)
>        at java.util.TimerThread.run(Timer.java:462)
>
> Thanks
> Caius
>
> --
> View this message in context:
> http://www.nabble.com/Is-there-any-way-to-tell-the-ClassLoader-to-not-load-a-class-upon-redeploy--tf4816518s2369.html#a13779591
> Sent from the AppFuse - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to