Hi,

When I try to look up an Entity Bean using RMI
(com.sun.jndi.rmi.registry.RegistryContextFactory) I get the error:

Exception in thread "main" java.lang.ExceptionInInitializerError:
org.objectweb.jonathan.apis.kernel.InternalException
        at
org.objectweb.jeremie.libs.stub_factories.std.RefImpl.<clinit>(RefImpl.java:
92)
        at java.io.ObjectInputStream.allocateNewObject(Native Method)
        at java.io.ObjectInputStream.inputObject(Unknown Source)
        at java.io.ObjectInputStream.readObject(Unknown Source)
        at java.io.ObjectInputStream.readObject(Unknown Source)
        at java.rmi.server.RemoteObject.readObject(Unknown Source)
        at java.lang.reflect.Method.invoke(Native Method)
        at java.io.ObjectInputStream.invokeObjectReader(Unknown Source)
        at java.io.ObjectInputStream.inputObject(Unknown Source)
        at java.io.ObjectInputStream.readObject(Unknown Source)
        at java.io.ObjectInputStream.readObject(Unknown Source)
        at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
        at com.sun.jndi.rmi.registry.RegistryContext.lookup(Unknown Source)
        at com.sun.jndi.rmi.registry.RegistryContext.lookup(Unknown Source)
        at javax.naming.InitialContext.lookup(Unknown Source)
        at
examples.ejb.basic.beanManaged.ClientBMP.lookupHome(ClientBMP.java:338)
        at
examples.ejb.basic.beanManaged.ClientBMP.<init>(ClientBMP.java:40)
        at examples.ejb.basic.beanManaged.ClientBMP.main(ClientBMP.java:89)

The line of code that seems to trigger this is (ClientBMP.java:338) -

...
337 - AccountHomeBMP homeRef = (AccountHomeBMP)
ctx.lookup("beanManaged.AccountHomeBMP");
338 - return (AccountHomeBMP) PortableRemoteObject.narrow(homeRef,
AccountHomeBMP.class);
...

If I try to run the client and lookup the bean using JRMI
(org.objectweb.jeremie.libs.services.registry.jndi.JRMIInitialContextFactory
) I get the error:

Exception in thread "main" java.lang.ExceptionInInitializerError:
java.lang.IllegalMonitorStateException
        at org.objectweb.jonathan.libs.resources.JS.unlock(Unknown Source)
        at org.objectweb.jeremie.libs.contexts.jiop.JIOP.init(JIOP.java:108)
        at
org.objectweb.jeremie.libs.services.registry.LocateRegistry.<clinit>(LocateR
egistry.java:65)
        at
org.objectweb.jeremie.libs.services.registry.jndi.JRMIRegistryContext.getReg
istry(JRMIRegistryContext.java:130)
        at
org.objectweb.jeremie.libs.services.registry.jndi.JRMIRegistryContext.<init>
(JRMIRegistryContext.java:106)
        at
org.objectweb.jeremie.libs.services.registry.jndi.jrmi.jrmiURLContext.getNam
eRegContextPair(jrmiURLContext.java:114)
        at
org.objectweb.jeremie.libs.services.registry.jndi.jrmi.jrmiURLContext.lookup
(jrmiURLContext.java:181)
        at
org.objectweb.jeremie.libs.services.registry.jndi.JRMIInitialContextFactory.
getInitialContext(JRMIInitialContextFactory.java:78)
        at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
        at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
        at javax.naming.InitialContext.init(Unknown Source)
        at javax.naming.InitialContext.<init>(Unknown Source)
        at
examples.ejb.basic.beanManaged.ClientBMP.getInitialContext(ClientBMP.java:39
0)
        at
examples.ejb.basic.beanManaged.ClientBMP.lookupHome(ClientBMP.java:333)
        at
examples.ejb.basic.beanManaged.ClientBMP.<init>(ClientBMP.java:40)
        at examples.ejb.basic.beanManaged.ClientBMP.main(ClientBMP.java:90)


Any ideas anyone?

Thanks.

Andy.

Andrew Gray
Senior Software Engineer
Velitar Ltd
(+44)131 623 2621
----
To unsubscribe, send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe jonas-users".
For general help, send email to [EMAIL PROTECTED] and
include in the body of the message "help".

Reply via email to