0 Replies Latest reply on Dec 3, 2001 1:22 PM by Jon Rose

    JNI Error

    Jon Rose Newbie

      I am trying to call a C method through JNI. Everything seems to work fine when I test the call at the command prompt. When I try and call it from my application running in jboss it throws the error below. I have also included my c function. Any ideas?

      JNIEXPORT jstring JNICALL Java_com_firstlink_security_UserAuth_getHashPassword
      (JNIEnv *env, jobject obj, jstring password, jstring epassword)



      Unexpected Signal : 11 occurred at PC=0xfe1dfd64
      Function name=JVM_CurrentThread
      Library=/usr/local/java/j2sdk1_3_1/jre/lib/sparc/server/libjvm.so

      Current Java thread:
      at com.firstlink.security.UserAuth.getHashPassword(Native Method)
      at com.firstlink.security.UserAuth.getTheHashOut(Unknown Source)
      at com.firstlink.security.auth.UnixLoginModule.validatePassword(Unknown Source)
      at com.firstlink.security.auth.UsernamePasswordLoginModule.login(Unknown Source)
      at java.lang.reflect.Method.invoke(Native Method)
      at javax.security.auth.login.LoginContext.invoke(LoginContext.java:595)
      at javax.security.auth.login.LoginContext.access$000(LoginContext.java:125)
      at javax.security.auth.login.LoginContext$3.run(LoginContext.java:531)
      at java.security.AccessController.doPrivileged(Native Method)
      at javax.security.auth.login.LoginContext.invokeModule(LoginContext.java:528)
      at javax.security.auth.login.LoginContext.login(LoginContext.java:449)
      at org.jboss.security.plugins.JaasSecurityManager.defaultLogin(JaasSecurityManager.java:396)
      at org.jboss.security.plugins.JaasSecurityManager.authenticate(JaasSecurityManager.java:363)
      at org.jboss.security.plugins.JaasSecurityManager.isValid(JaasSecurityManager.java:219)
      at org.jboss.tomcat.security.JBossSecurityMgrRealm.authenticate(JBossSecurityMgrRealm.java:129)
      at org.apache.tomcat.core.ContextManager.doAuthenticate(ContextManager.java:852)
      at org.apache.tomcat.core.RequestImpl.getRemoteUser(RequestImpl.java:341)
      at org.jboss.tomcat.security.JBossSecurityMgrRealm.authorize(JBossSecurityMgrRealm.java:174)
      at org.apache.tomcat.core.ContextManager.doAuthorize(ContextManager.java:870)
      at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:804)
      at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
      at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:166)
      at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
      at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
      at java.lang.Thread.run(Thread.java:484)

      Dynamic libraries:
      0x10000 /usr/local/java/1.3/bin/../bin/sparc/native_threads/java
      0xff360000 /usr/lib/libthread.so.1
      0xff3a0000 /usr/lib/libdl.so.1
      0xff280000 /usr/lib/libc.so.1
      0xff260000 /usr/platform/SUNW,Ultra-60/lib/libc_psr.so.1
      0xfe000000 /usr/local/java/j2sdk1_3_1/jre/lib/sparc/server/libjvm.so
      0xff210000 /usr/lib/libCrun.so.1
      0xff1f0000 /usr/lib/libsocket.so.1
      0xff100000 /usr/lib/libnsl.so.1
      0xff1c0000 /usr/lib/libm.so.1
      0xff240000 /usr/lib/libw.so.1
      0xff0e0000 /usr/lib/libmp.so.2
      0xff0a0000 /usr/local/java/j2sdk1_3_1/jre/lib/sparc/native_threads/libhpi.so
      0xff070000 /usr/local/java/j2sdk1_3_1/jre/lib/sparc/libverify.so
      0xff030000 /usr/local/java/j2sdk1_3_1/jre/lib/sparc/libjava.so
      0xfe7d0000 /usr/local/java/j2sdk1_3_1/jre/lib/sparc/libzip.so
      0xfe650000 /usr/lib/nss_files.so.1
      0xfddd0000 /usr/local/java/j2sdk1_3_1/jre/lib/sparc/libnet.so
      0xf1a60000 /usr/lib/nss_dns.so.1
      0xf1a20000 /usr/lib/libresolv.so.2
      0xf1810000 /usr/local/xnet/lib/libfirstlinkauth.so

      Local Time = Mon Dec 3 10:47:53 2001