Your client must have the home and remote interfaces available for
the EJBs it uses.  If you want the client to load the classes from the
server, you need to use a SecurityManager that supports that.  I
hypothesize that the RMISecurityManager (somewhere under java.rmi) should
work, but I haven't tried it recently.

Aaron

On Tue, 26 Sep 2000, Andrew wrote:
> Excuse me, all is with class files, it was dir instead class, but now client can't 
>locate interface classes:
> 
> Exception in thread "main" javax.naming.CommunicationException.  Root exception
> is java.lang.ClassNotFoundException: Reference.RefHome-------- my home iface.
>         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 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.NamingContext.lookup(NamingContext.java:284)
>         at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:265)
>         at javax.naming.InitialContext.lookup(InitialContext.java:350)
>         at a.main(a.java:15)
> 
> What's the matter.I've included jboss-client.jar and jnp-client.jar, j2ee.jar in 
>classpath on clientside.
>   ----- Original Message ----- 
>   From: Andrew 
>   To: jBoss 
>   Sent: Tuesday, September 26, 2000 6:12 PM
>   Subject: [jBoss-User] Truncated class file
> 
> 
>   Hi, when I tried my client without interface classes in classpath I've got 
>following exception:
> 
>   Exception in thread "main" java.lang.ClassFormatError: Reference/RefHome (Trunca
>   ted class file)
>           at java.lang.ClassLoader.defineClass0(Native Method)
>           at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
>           at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:11
>   1)
>           at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
>           at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
>           at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
>           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.NamingContext.lookup(NamingContext.java:284)
>           at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:265)
>           at javax.naming.InitialContext.lookup(InitialContext.java:350)
>           at a.main(a.java:13)
>    
>   something wrong?But client must be able to download these interface definitions...
> 
>   Regards.
> 
> 



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to