Andrew said:
The CNFE is occuring for the 'IMyFactory', I take it?
- State error output verbatim.
- Tell us what Jar the IMyFactory is supposed to reside in.
- Check it is in there.
- Show us your JNLP (or better still, link to it).
Andrew T.
Hi Andrew,
Sorry should have put extra details in the original email.
The last line of the code should have read :
niverse = (IMyFactory) registry.lookup("rmi:///MyFactory");
Tthe IMyFactory class is in a jar file know to the client via the jnlp
called IServer.jar however MyFactory and MyFactory_stub classes are in
a jar file called Server.jar and is not available to the client but is
to the server.
The jnlp is : (cut out some none relevant info)
<?xml version="1.0" encoding="UTF-8"?>
<jnlp href="xc.jnlp" spec="1.0+" codebase="
http://localhost:8079/xc">
<information>
<title>my app</title>
<vendor>me</vendor>
<homepage href="index.html">
</homepage>
<description>My Application</description>
<description kind="short">My application</description>
<offline-allowed>
</offline-allowed>
</information>
<security>
<all-permissions>
</all-permissions>
</security>
<resources>
<j2se version="1.4" max-heap-size="256m" initial-heap-size="32m">
</j2se>
<jar href="MyApp.jar">
</jar>
<jar href="IServer.jar">
</jar>
</resources>
<application-desc main-class="com.b8.ic2.as.agentsupport">
</application-desc>
The exception trace is
java.rmi.UnmarshalException: error unmarshalling return; nested
exception is:
java.lang.ClassNotFoundException: com.me.MyFactory_Stub
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at com.me.getMyServer(agentsupport.java:3597)
......
......
......
at com.me.main(agentsupport.java:6825)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.javaws.Launcher.executeApplication(Unknown Source)
at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at com.sun.javaws.Launcher.continueLaunch(Unknown Source)
at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: com.me.MyFactory_Stub
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at sun.rmi.server.LoaderHandler.loadClass(Unknown Source)
at sun.rmi.server.LoaderHandler.loadClass(Unknown Source)
at java.rmi.server.RMIClassLoader$2.loadClass(Unknown Source)
at java.rmi.server.RMIClassLoader.loadClass(Unknown Source)
at sun.rmi.server.MarshalInputStream.resolveClass(Unknown Source)
at java.i
bjectInputStream.readNonProxyDesc(Unknown Source)
at java.i
bjectInputStream.readClassDesc(Unknown Source)
at java.i
bjectInputStream.readOrdinaryObject(Unknown Source)
at java.i
bjectInputStream.readObject0(Unknown Source)
at java.i
bjectInputStream.readObject(Unknown Source)
... 21 more
I'm not sure if I need to setup a codebase or any other config for
webstart when using RMI that perhaps isn't required for a normal client
application.
Thanks
Steve