geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lin sun <>
Subject Re: org.omg.CosNaming.NamingCntextPackage.NotFound
Date Mon, 26 Sep 2005 20:20:09 GMT

--- lin sun <> wrote:

> --- David Jencks <> wrote:
> > Having 2 geronimo servers communicating by corba is definitely possible 
> > and you will be able to configure all the necessary parts using gbeans. 
> >   This would be the easiest to set up in my opinion.   In particular you 
> > should be able to do this now with the existing configurations and 
> > plans, without waiting for me to fix the ClientCORBA plan.   I was 
> > suggesting that you have ejbs deployed on a geronimo server and have 
> > the client be a j2ee application client, running in the geronimo 
> > application client container.  The geronimo app client container is a 
> > stripped down version of geronimo that includes the kernel, the gbean 
> > machinery, the transaction manager, and a few other pieces, but not 
> > ejbs or web apps.  Since it includes the kernel it is fairly easy to 
> > run components in it as gbeans.  This is what I was suggesting.
> > To use an ejb from a j2ee application (such as a j2ee app client, web 
> > app, or ejb) you need to include in the geronimo/openejb plan ejb-ref 
> > information like this:
> > 1. where the naming server is and the name
> > 2. a css-link to supply the security info for csiv2 negotiation with 
> > the server.  A typical element might look like this:
> > 
> >             <ejb-ref>
> >                  <ref-name>ejb/Control</ref-name>
> >                  <ns-corbaloc>corbaloc::<target name service host>:<name

> > service port>/NameService</ns-corbaloc>
> >                  <name>targetEjbName</name>
> >                  <css-link>SSLClientCert</css-link>
> >              </ejb-ref>
> > (fill in the correct values for the host and port)
> I tried to have the J2EE client and EJB on different machines, but it didn't work.  
> the client machine, I tried to deploy magicGball-client.jar with the following geronimo
> application deployment plan:
> <application-client
>             xmlns=""
>             configId="client"
>             clientConfigId="org/acme/MagicGBall/Client"
>             clientParentId="org/apache/geronimo/ClientCorba">
>             <ejb-ref>
>                 <ref-name>mGBall</ref-name>

This turned out to be a typo.  This should be:  <ref-name>mGball</ref-name> 

Also add the "<jndi-name>" tag under the openejb portion of the geronimo application
xml file as below:

         <openejb-jar xmlns="" configId="ejb"

Now I am getting the following exception when I ran the client:

16:00:16,169 INFO  [LocalAttributeManager] Started LocalAttributeManager with data on 10
16:00:16,239 INFO  [LocalConfigStore:config-store] Loaded Configuration
16:00:16,249 INFO  [LocalConfigStore:config-store] Loaded Configuration
16:00:16,249 INFO  [LocalConfigStore:config-store] Loaded Configuration
16:00:16,269 INFO  [LocalConfigStore:config-store] Loaded Configuration
16:00:16,439 INFO  [Configuration] Started configuration org/apache/geronimo/Client
16:00:16,620 INFO  [Configuration] Started configuration
16:00:16,760 INFO  [GeronimoLoginConfiguration] Added Application Configuration Entry JMX
16:00:16,760 INFO  [GeronimoLoginConfiguration] Added Application Configuration Entry
16:00:16,770 INFO  [GeronimoLoginConfiguration] Installed Geronimo login configuration
16:00:16,840 INFO  [Configuration] Started configuration org/apache/geronimo/ClientCorba
16:00:17,451 INFO  [CSSBean] Started CORBA Client Security Server - SSLClientCert
16:00:17,471 INFO  [CSSBean] Started CORBA Client Security Server - NoSecurity
16:00:17,481 INFO  [CSSBean] Started CORBA Client Security Server - SSLClientPassword
16:00:17,541 INFO  [Configuration] Started configuration org/acme/MagicGBall/Client
16:00:17,561 INFO  [CommandLine] Server startup completed
User nameNameCallback returning system.
PasswordPasswordCallback returning [C@f42160.
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
 at org.apache.geronimo.client.AppClientContainer$
 at Method)
 at org.apache.geronimo.client.AppClientContainer.main(
 at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(
 at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(
 at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(
 at org.apache.geronimo.kernel.basic.BasicKernel.invoke(
 at org.apache.geronimo.system.main.CommandLine.invokeMainGBean(
 at org.apache.geronimo.system.main.ClientCommandLine.<init>(
 at org.apache.geronimo.system.main.ClientCommandLine.main(
Caused by: java.lang.reflect.InvocationTargetException
 at java.lang.reflect.Method.invoke(
 at org.apache.geronimo.client.AppClientContainer$
 ... 10 more
Caused by: java.lang.ClassCastException
 at javax.rmi.PortableRemoteObject.narrow(
 at org.acme.MagicGBallClient.ask(
 at org.acme.MagicGBallClient.main(
 ... 12 more

And the exception is from the following cast of

Context myEnv = (Context) ctx.lookup("java:comp/env");
Object objref = myEnv.lookup("mGball");
MagicGBallHome ejbHome = (MagicGBallHome) PortableRemoteObject.narrow(objref,

Any help is appreciated!

Thanks, Lin

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

View raw message