1 Reply Latest reply on May 20, 2002 4:44 PM by noam

    Calling an EJB client from a C program

    noam Newbie

      Hello,
      I wrote a C program which invokes a java class (through JNI) which is an EJB client. when running the program the following exception occurs during lookup:
      javax.naming.CommunicationException. Root exception is java.lang.ClassNotFoundException: com.package.SGLogicHome
      at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:195)
      at sun.rmi.server.MarshalInputStream.resolveProxyClass(MarshalInputStrea
      m.java:183)
      at java.io.ObjectInputStream.inputProxyClassDescriptor(ObjectInputStream
      .java:982)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
      at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1186)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
      at java.rmi.MarshalledObject.get(MarshalledObject.java:138)
      at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePair.java:3
      0)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:372)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:352)
      at javax.naming.InitialContext.lookup(InitialContext.java:350)

      When running the same client from java it works fine. I added all the jar in the JBOSS_HOME/client directory to the class path. It seems to be some kind of a security problem. I tried running with -Djava.security.policy but it didn't help.