JBoss Community

Native library already loaded in another classloader ?! (Axis2)

created by Igor JStarter in JBoss Web Services - View the full discussion

Hello!

 

I'm doing a web service which sends a file over SFTP.

I downloaded the chilkat jar files and send the file over FTP with no problem (as an application).

 

All scenarious when deploying with Axis2, but I think, only the 1. could be made to work:

 

  1. My app.java includes system.loadLibrary(chilkat) and when making the axis archiver .aar file, I add the chilkat.jar

      Native Library D:\KKISSWORK\jboss-5.1.0.GA-jdk6\bin\chilkat.dll already loaded in another classloader

 

2. My app.java doesn't include system.loadLibraty

 

If I include the jar when making .aar file:   ERROR: com.chilkatsoft.chilkatJNI.new_CkSFtp()J

If i don't include the jar when making .aar file: ERROR: new_CksFtp

 

 

 

Any idea how to solve that?

 

I know that the problem is that the classloader can't load a library twice, but how to solve that.

Somewhere i read that I should load the library (in my app) from the classloader....

 

 

Thanks in advance!

 

BR. Igor!

Reply to this message by going to Community

Start a new discussion in JBoss Web Services at Community