[GE users] DRMAA vs. Tomcat

Daniel Templeton Dan.Templeton at Sun.COM
Mon Apr 10 23:08:55 BST 2006


Here's an answer I got internally:

>JNI has no way to unload a shared library, so
>a given library can only be loading once per VM.
>
>The workaround to this is to have a hierarchy
>or class loaders just like we have in Sun AS/
>GlassFish:
>http://docs.sun.com/app/docs/doc/819-2556/6n4rap8pv?a=view#beadf
>
>There's also an old 'will not fix' bug:
>http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4225434
>
>-Alexis
>
Daniel


Stefan Metzlaff wrote On 04/10/06 23:20,:

>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>Hi,
>
>I'm developing a drmaa application which should run on the tomcat
>application server with axis. The web front end accesses the application
>through web services (wsdl).
>The application works pretty fine, if it is started from command line.
>But if I'm using the web services the following error occurs frequently:
>
>java.lang.UnsatisfiedLinkError: Native Library
>/opt/SGE/lib/lx26-amd64/libdrmaa.so already loaded in another classloader
>java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1716)
>java.lang.ClassLoader.loadLibrary(ClassLoader.java:1676)
>java.lang.Runtime.loadLibrary0(Runtime.java:822)
>java.lang.System.loadLibrary(System.java:992)
>com.sun.grid.drmaa.SessionImpl$1.run(SessionImpl.java:58)
>java.security.AccessController.doPrivileged(Native Method)
>com.sun.grid.drmaa.SessionImpl.(SessionImpl.java:56)
>com.sun.grid.drmaa.SessionFactoryImpl.getSession(SessionFactoryImpl.java:59)
>cef.VirtualJob.startDRMAAJob(VirtualJob.java:591)
>cef.VirtualBlastJob.startJob(VirtualBlastJob.java:212)
>cef.ClusterMaster.startNewJob(ClusterMaster.java:91)
>cef.BlastAllWebService.startNewJob(BlastAllWebService.java:47)
>org.apache.jsp.sampleBlastAllWebService.Result_jsp._jspService(Result_jsp.java:81)
>org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
>javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
>org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
>org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
>javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>
>After this error every other drmaa web service call results the
>following error:
>
>java.lang.NoClassDefFoundError
>com.sun.grid.drmaa.SessionFactoryImpl.getSession(SessionFactoryImpl.java:59)
>cef.VirtualJob.startDRMAAJob(VirtualJob.java:591)
>cef.VirtualBlastJob.startJob(VirtualBlastJob.java:212)
>cef.ClusterMaster.startNewJob(ClusterMaster.java:91)
>cef.BlastAllWebService.startNewJob(BlastAllWebService.java:47)
>org.apache.jsp.sampleBlastAllWebService.Result_jsp._jspService(Result_jsp.java:81)
>org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
>javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
>org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
>org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
>javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>
>After restarting the tomcat and the grid engine the application is
>working for some web service calls, until the UnsatisfiedLinkError occurs.
>
>I'm using the following environment:
>Linux
>SGE 6.0u4
>6.0u4 DRMAA.JAR
>jdk1.5.0_06
>Tomcat 5.5
>Axis 1.3
>
>I think something is going wrong the the factory.getSession() call, but
>I dont't know why. All my sessions are closed (via session.exit()) on
>exit of the application. So there should be no conflict with the drmaa
>library.
>Is it possible that tomcat tries to load the libdrmaa.so more than once,
>if one user calls different methods of the web service or multiple users
>using the web services?
>
>
>Best regards
>Stefan Metzlaff
>-----BEGIN PGP SIGNATURE-----
>Version: GnuPG v1.4.1 (GNU/Linux)
>
>iD8DBQFEOswnmaoB5W5tYLoRAi9vAJ9Don+Bl5bGX2H1y8e8JMQ3Y87RowCgmnsH
>koNhpNla+1FSAWl9S1kf/+0=
>=7mD5
>-----END PGP SIGNATURE-----
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
>For additional commands, e-mail: users-help at gridengine.sunsource.net
>
>  
>

-- 
******************************************************
*         Daniel Templeton   UMPK18 x83749           *
*        Staff Engineer, Sun N1 Grid Engine          *
******************************************************
* "What's the sense in never thinkin' 'bout the tomb *
*  When you're much too busy returning to the womb?" *
*                  -They Might Be Giants             *
******************************************************


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
For additional commands, e-mail: users-help at gridengine.sunsource.net




More information about the gridengine-users mailing list