Andrew Gray wrote:
> 
> 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.
> 
It seems there is a mixing in your evironment between RMI and JEREMIE
If you want to work with JEREMIE
verify that:
OBJECTWEB_ORB=JEREMIE
in your CLASSPATH you can see an jndi.properties
that look likes:
java.naming.factory.initial
org.objectweb.jeremie.libs.services.registry.jndi.JRMIInitialContextFactory
java.naming.provider.url        jrmi://hostname:numport
java.naming.factory.url.pkgs    org.objectweb.jonas.naming

The corect registry will be launch via the command registry

regards,
-- 
        Philippe

Philippe Coq  Evidian   Phone: (33) 04 76 29 78 49
Bull S.A  - 1 rue de Provence - 38432 Echirolles Cedex France
Download our EJBServer at http://www.objectweb.org
----
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