I also added a few debug statement on the client to print out the objref & its
superclasses:
22:25:02,254 INFO [CommandLine] Server startup completed
User nameNameCallback returning system.
PasswordPasswordCallback returning [EMAIL PROTECTED]
in MagicGBallClient.ask(Hi):
java.lang.Throwable
at org.acme.MagicGBallClient.ask(MagicGBallClient.java:44)
at org.acme.MagicGBallClient.main(MagicGBallClient.java:38)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.apache.geronimo.client.AppClientContainer$1.run(AppClientContainer.java:179)
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:176)
at
org.apache.geronimo.client.AppClientContainer$$FastClassByCGLIB$$b5beae18.invoke(<generated>)
at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
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:84)
at
org.apache.geronimo.system.main.ClientCommandLine.<init>(ClientCommandLine.java:50)
at
org.apache.geronimo.system.main.ClientCommandLine.main(ClientCommandLine.java:37)
objref is of type com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1
objref =
com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1:IOR:000000000000002d524d493a6f72672e61636d652e4d616769634742616c6c486f6d653a3030303030303030303030303030303000000000000000010000000000000234000102000000000c392e34392e3232312e313700000000000000015fafabcb00000000209a19f6be0000000100000000000000020000001253534c436c69656e7450617373776f7264000000000000936765726f6e696d6f2e7365727665723a454a424d6f64756c653d6d616769634762616c6c2d656a622e6a61722c4a3245454170706c69636174696f6e3d6f72672f61636d652f4d616769634762616c6c2c4a3245455365727665723d6765726f6e696d6f2c6a326565547970653d53746174656c65737353657373696f6e4265616e2c6e616d653d4d616769634742616c6c0000000000926765726f6e696d6f2e7365727665723a454a424d6f64756c653d6d616769634762616c6c2d656a622e6a61722c4a3245454170706c69636174696f6e3d6f72672f61636d652f4d616769634762616c6c2c4a3245455365727665723d6765726f6e696d6f2c6a326565547970653d53746174656c65737353657373696f6e4265616e2c6e616d653d4d616769634742616c6c0a0000000004000000010000002000000000000100
01000000
0205010001000100200001010900000001000101000000002000000004000000010000001f0000000400000003000000210000006c000000000000000100460000000000240000001a00000026000600000000000100000008302e302e302e300007d1004000400000000000080606678102010101000000170401000806066781020101010000000764656661756c740000000000000000000000000000000000
objref = -RMI:org.acme.MagicGBallHome:0000000000000000 4
<ipAddressHere> _ SSLClientPassword
geronimo.server:EJBModule=magicGball-ejb.jar,J2EEApplication=org/acme/MagicGball,J2EEServer=geronimo,j2eeType=StatelessSessionBean,name=MagicGBall
geronimo.server:EJBModule=magicGball-ejb.jar,J2EEApplication=org/acme/MagicGball,J2EEServer=geronimo,j2eeType=StatelessSessionBean,name=MagicGBall
! l
F
$ & 0.0.0.0 @ @ g g default
Superclasses:
org.omg.CORBA_2_3.portable.ObjectImpl
org.omg.CORBA.portable.ObjectImpl
java.lang.Object
Interfaces:
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at
org.apache.geronimo.client.AppClientContainer$1.run(AppClientContainer.java:183)
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:176)
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:84)
at
org.apache.geronimo.system.main.ClientCommandLine.<init>(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:179)
... 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:56)
at org.acme.MagicGBallClient.main(MagicGBallClient.java:38)
... 12 more
--- lin sun <[EMAIL PROTECTED]> wrote:
> While I was waiting for help, I added some debug tracing into the client.log.
> Here's
> what I got in my client.log:
>
> 21:40:50,873 DEBUG [CORBAProxyReference] Obtaining home from
> corbaloc::localhost:1050/NameService, MagicGBall,
>
geronimo.client:J2EEApplication=null,J2EEModule=org/apache/geronimo/ClientCorba,J2EEServer=client,j2eeType=CORBACSS,name=SSLClientPassword,
> org.acme.MagicGBallHome
> 21:40:50,873 DEBUG [CSSBean] SSLClientPassword - Looking up home from
> corbaloc::localhost:1050/NameService at MagicGBall
> 21:40:50,893 DEBUG [OpenEJBSocketFactory] Created plain endpoint to
> localhost:1050
> 21:40:50,893 DEBUG [OpenEJBSocketFactory] Created plain socket to
> localhost:1050
> 21:40:50,903 DEBUG [OpenEJBSocketFactory] Created plain server socket on port > 0
> 21:40:51,003 DEBUG [ClientSecurityInterceptor] Checking if target _is_a has a
> security
> policy
> 21:40:51,003 DEBUG [ClientTransactionInterceptor] Checking if target _is_a
> has a
> transaction policy
> 21:40:51,003 DEBUG [ClientTransactionInterceptor] linsun: checking target
> has a
> transaction policy
> 21:40:51,003 DEBUG [ClientTransactionInterceptor] linsun: ri:
> [EMAIL PROTECTED] TAG_OTS_POLICY: 31
> 21:40:51,003 DEBUG [ClientTransactionInterceptor] linsun:
> org.omg.CORBA.BAD_PARAM:
> Could
> not find component with provided id. vmcid: OMG minor code: 28 completed:
> No
>
> By looking at the javadoc of ClientRequestInfoOperations
>
(http://download.java.net/jdk6/docs/api/org/omg/PortableInterceptor/ClientRequestInfoOperations.html)
>
> BAD_PARAM - thrown, with a standard minor code of 28, if no component exists
> for the
> given component ID.
>
> Any help is appreciated!
>
> Thanks, Lin
>
> --- lin sun <[EMAIL PROTECTED]> wrote:
>
> >
> > --- lin sun <[EMAIL PROTECTED]> wrote:
> >
> > > --- David Jencks <[EMAIL PROTECTED]> 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.
>
> > On
> > > the client machine, I tried to deploy magicGball-client.jar with the
> > > following
> > geronimo
> > > application deployment plan:
> > >
> > > <application-client
> > >
> > > xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-client"
> > > 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
> > plan
> > xml file as below:
> >
> > <module>
> > <ejb>magicGball-ejb.jar</ejb>
> > <openejb-jar xmlns="http://www.openejb.org/xml/ns/openejb-jar"
> configId="ejb"
> > parentId="org/apache/geronimo/Server">
> > <import>
> > <uri>org/apache/geronimo/ServerCORBA</uri>
> > </import>
> > <enterprise-beans>
> > <session>
> > <ejb-name>MagicGBall</ejb-name>
> > <jndi-name>MagicGBall</jndi-name>
> > <tss-link>SSLClientPassword</tss-link>
> > </session>
> > </enterprise-beans>
> > </openejb-jar>
> > </module>
> >
> > 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 [EMAIL PROTECTED]
> > 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.<init>(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
> >
>
>
>
>
> __________________________________
> Yahoo! Mail - PC Magazine Editors' Choice 2005
> http://mail.yahoo.com
>
thanks,
Lin
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com