Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 84347 invoked from network); 26 Sep 2005 20:20:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 26 Sep 2005 20:20:34 -0000 Received: (qmail 91095 invoked by uid 500); 26 Sep 2005 20:20:32 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 91082 invoked by uid 500); 26 Sep 2005 20:20:32 -0000 Mailing-List: contact user-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@geronimo.apache.org List-Id: Delivered-To: mailing list user@geronimo.apache.org Received: (qmail 91052 invoked by uid 99); 26 Sep 2005 20:20:32 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Sep 2005 13:20:32 -0700 X-ASF-Spam-Status: No, hits=0.4 required=10.0 tests=DNS_FROM_RFC_ABUSE X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [68.142.207.212] (HELO web32502.mail.mud.yahoo.com) (68.142.207.212) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 26 Sep 2005 13:20:38 -0700 Received: (qmail 4081 invoked by uid 60001); 26 Sep 2005 20:20:09 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=TnDnFBi0qK7aOsyh1cmHs25HEWNMK8/3uiT3YN5mDAxex3J3AMamKyaBC8oChEjyhSQANNtpzniXDcNYKzxVAh2rEcU0VyR1MGGHcIOmF7TfQXnw/Nad2aom8wl1SWhVdGZGxKUp0snQ3JAlhSPeOJwJI3P5BrthRzCZHVRs5Ik= ; Message-ID: <20050926202009.4079.qmail@web32502.mail.mud.yahoo.com> Received: from [129.33.49.251] by web32502.mail.mud.yahoo.com via HTTP; Mon, 26 Sep 2005 13:20:09 PDT Date: Mon, 26 Sep 2005 13:20:09 -0700 (PDT) From: lin sun Subject: Re: org.omg.CosNaming.NamingCntextPackage.NotFound To: user@geronimo.apache.org In-Reply-To: <20050926190645.73585.qmail@web32508.mail.mud.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --- 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/Control > > corbaloc::: > service port>/NameService > > targetEjbName > > SSLClientCert > > > > (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. On > the client machine, I tried to deploy magicGball-client.jar with the following geronimo > application deployment plan: > > xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-client" > configId="client" > clientConfigId="org/acme/MagicGBall/Client" > clientParentId="org/apache/geronimo/ClientCorba"> > > mGBall This turned out to be a typo. This should be: mGball Also add the "" tag under the openejb portion of the geronimo application plan xml file as below: magicGball-ejb.jar org/apache/geronimo/ServerCORBA MagicGBall MagicGBall SSLClientPassword Now I am getting the following exception when I ran the client: 16:00:16,169 INFO [LocalAttributeManager] Started LocalAttributeManager with data on 10 configurations 16:00:16,239 INFO [LocalConfigStore:config-store] Loaded Configuration geronimo.config:name="org/acme/MagicGBall/Client" 16:00:16,249 INFO [LocalConfigStore:config-store] Loaded Configuration geronimo.config:name="org/apache/geronimo/ClientCorba" 16:00:16,249 INFO [LocalConfigStore:config-store] Loaded Configuration geronimo.config:name="org/apache/geronimo/ClientSecurity" 16:00:16,269 INFO [LocalConfigStore:config-store] Loaded Configuration geronimo.config:name="org/apache/geronimo/Client" 16:00:16,439 INFO [Configuration] Started configuration org/apache/geronimo/Client 16:00:16,620 INFO [Configuration] Started configuration org/apache/geronimo/ClientSecurity 16:00:16,760 INFO [GeronimoLoginConfiguration] Added Application Configuration Entry JMX 16:00:16,760 INFO [GeronimoLoginConfiguration] Added Application Configuration Entry geronimo-properties-realm 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$1.run(AppClientContainer.java:146) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:320) at org.apache.geronimo.client.AppClientContainer.main(AppClientContainer.java:139) at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38) at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:118) at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:795) at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:180) at org.apache.geronimo.system.main.CommandLine.invokeMainGBean(CommandLine.java:88) at org.apache.geronimo.system.main.ClientCommandLine.(ClientCommandLine.java:50) at org.apache.geronimo.system.main.ClientCommandLine.main(ClientCommandLine.java:37) Caused by: java.lang.reflect.InvocationTargetException at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.geronimo.client.AppClientContainer$1.run(AppClientContainer.java:142) ... 10 more Caused by: java.lang.ClassCastException at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:293) at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:134) at org.acme.MagicGBallClient.ask(MagicGBallClient.java:47) at org.acme.MagicGBallClient.main(MagicGBallClient.java:38) ... 12 more And the exception is from the following cast of MagicGBallClient.java: Context myEnv = (Context) ctx.lookup("java:comp/env"); Object objref = myEnv.lookup("mGball"); MagicGBallHome ejbHome = (MagicGBallHome) PortableRemoteObject.narrow(objref, MagicGBallHome.class); Any help is appreciated! Thanks, Lin __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com