You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Vamsavardhana Reddy <c1...@gmail.com> on 2007/08/02 19:10:18 UTC

Reference EJB Binding problem

Hi,

I have modified the Calculator sample to use an EJB binding for addService.
I have deployed an AddService bean in Geronimo 2.0-SNAPSHOT Tomcat server.
I am using an EmbeddedSCADomain to run the sample.  I am facing a strange
problem.  When I run the sample in J2SE environment (I actually modified the
testcase in sca/modules/binding-ejb to run this sample) everything runs
fine.  I see that the EJB is invoked for AddService.  But when I run this
sample inside Geronimo using the tuscany-plugin (see
http://cwiki.apache.org/confluence/display/TUSCANYWIKI/Tuscany+Geronimo+Integrationfor
details on the Geronimo Tuscany Integration details), I am getting "
java.rmi.MarshalException: Unable to create stub for class java.lang.Object;
nested exception is:
org.omg.CORBA.MARSHAL: Unable to create stub for class java.lang.Object:
vmcid: Apache minor code: 0x2e completed: No "

Here is the reference ejb binding xml-fragment from Calculator-new.composite

        <reference name="addService">
            <interface.java interface="calculator.AddService"/>
            <binding.ejb uri="corbaname:iiop:1.2@localhost
:1050#AddServiceBean"/>
        </reference>

Here is the session bean definition in ejb-jar.xml:
      <session>
         <description>AddService Bean</description>
         <display-name>AddServiceBean</display-name>
         <ejb-name>AddServiceBean</ejb-name>
         <home>calculator.AddServiceHome</home>
         <remote>calculator.AddService</remote>
         <local-home>calculator.AddServiceLocalHome</local-home>
         <local>calculator.AddServiceLocal</local>
         <ejb-class>calculator.AddServiceBean</ejb-class>
         <session-type>Stateless</session-type>
         <transaction-type>Container</transaction-type>
      </session>

And the binding in openejb-jar.xml:

        <session>
          <ejb-name>AddServiceBean</ejb-name>
          <jndi-name>AddServiceBean</jndi-name>
           ...
        </session>


Any ideas on what is making the difference in J2SE and J2EE enviroments in
this context?  Any help in resolving this problem is appreciated.

Thanks and best regards,
Vamsi

Re: Reference EJB Binding problem

Posted by Vamsavardhana Reddy <c1...@gmail.com>.
Thanks Raymond.  It works now.  I will report the issue to Yoko mailing
lists.

Vamsi

On 8/3/07, Raymond Feng <en...@gmail.com> wrote:
>
> Hi,
>
> Thank you for the hint. I'm able to identify an issue in the Yoko ORB. The
> problem is in class:
>
> http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/CORBA/InputStream.java?revision=555715&view=markup
>
> Method "private String getIDLStubClassName(Class c)" doesn't support the
> variant of stub names (org.omg.stub.*) defined by
> http://www.omg.org/docs/formal/03-09-04.pdf (section 1.4.6).
>
> As a workaround/fix, I changed the ejb binding code (EJBObjectFactory) to
> use org.omg.stub.javax.rmi._Remote_Stub.class to read the CORBA object.
> With
> this, the samples are now working fine on Geronimo 2.0 branch. The code
> was
> checked in under http://svn.apache.org/viewvc?view=rev&rev=562382.
>
> Thanks,
> Raymond
>
> ----- Original Message -----
> From: "Vamsavardhana Reddy" <c1...@gmail.com>
> To: <tu...@ws.apache.org>; <an...@gmail.com>
> Sent: Friday, August 03, 2007 12:55 AM
> Subject: Re: Reference EJB Binding problem
>
>
> > We have done some further investigation and here are the findings:
> >
> > We have configured the J2SE enviroment to use Yoko ORB (the one used by
> > Geronimo) instead of the JVMs and running the testcase resulted in a
> > MarshalException.  We suspect it is an issue with Yoko ORB.
> >
> > Vamsi
> >
> > On 8/3/07, ant elder <an...@apache.org> wrote:
> >>
> >> I suspect a something somewhere is using the wrong class loader, but
> its
> >> hard to tell precisely where without being able to debug by stepping
> >> through
> >> the code. Any chance you could make your code available somewhere (a
> zip
> >> file in a jira or anywhere?) so we can try it?
> >>
> >>    ...ant
> >>
> >> On 8/2/07, Vamsavardhana Reddy <c1...@gmail.com> wrote:
> >> >
> >> > Hi,
> >> >
> >> > I have modified the Calculator sample to use an EJB binding for
> >> > addService.
> >> > I have deployed an AddService bean in Geronimo 2.0-SNAPSHOT Tomcat
> >> server.
> >> > I am using an EmbeddedSCADomain to run the sample.  I am facing a
> >> strange
> >> > problem.  When I run the sample in J2SE environment (I actually
> >> > modified
> >> > the
> >> > testcase in sca/modules/binding-ejb to run this sample) everything
> runs
> >> > fine.  I see that the EJB is invoked for AddService.  But when I run
> >> this
> >> > sample inside Geronimo using the tuscany-plugin (see
> >> >
> >> >
> >>
> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/Tuscany+Geronimo+Integrationfor
> >> > details on the Geronimo Tuscany Integration details), I am getting "
> >> > java.rmi.MarshalException: Unable to create stub for class
> >> > java.lang.Object;
> >> > nested exception is:
> >> > org.omg.CORBA.MARSHAL: Unable to create stub for class
> >> > java.lang.Object:
> >> > vmcid: Apache minor code: 0x2e completed: No "
> >> >
> >> > Here is the reference ejb binding xml-fragment from
> >> > Calculator-new.composite
> >> >
> >> >         <reference name="addService">
> >> >             <interface.java interface="calculator.AddService"/>
> >> >             <binding.ejb uri="corbaname:iiop:1.2@localhost
> >> > :1050#AddServiceBean"/>
> >> >         </reference>
> >> >
> >> > Here is the session bean definition in ejb-jar.xml:
> >> >       <session>
> >> >          <description>AddService Bean</description>
> >> >          <display-name>AddServiceBean</display-name>
> >> >          <ejb-name>AddServiceBean</ejb-name>
> >> >          <home>calculator.AddServiceHome</home>
> >> >          <remote>calculator.AddService</remote>
> >> >          <local-home>calculator.AddServiceLocalHome</local-home>
> >> >          <local>calculator.AddServiceLocal</local>
> >> >          <ejb-class>calculator.AddServiceBean</ejb-class>
> >> >          <session-type>Stateless</session-type>
> >> >          <transaction-type>Container</transaction-type>
> >> >       </session>
> >> >
> >> > And the binding in openejb-jar.xml:
> >> >
> >> >         <session>
> >> >           <ejb-name>AddServiceBean</ejb-name>
> >> >           <jndi-name>AddServiceBean</jndi-name>
> >> >            ...
> >> >         </session>
> >> >
> >> >
> >> > Any ideas on what is making the difference in J2SE and J2EE
> enviroments
> >> in
> >> > this context?  Any help in resolving this problem is appreciated.
> >> >
> >> > Thanks and best regards,
> >> > Vamsi
> >> >
> >>
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
>

Re: Reference EJB Binding problem

Posted by Raymond Feng <en...@gmail.com>.
Hi,

Thank you for the hint. I'm able to identify an issue in the Yoko ORB. The 
problem is in class: 
http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/CORBA/InputStream.java?revision=555715&view=markup

Method "private String getIDLStubClassName(Class c)" doesn't support the 
variant of stub names (org.omg.stub.*) defined by 
http://www.omg.org/docs/formal/03-09-04.pdf (section 1.4.6).

As a workaround/fix, I changed the ejb binding code (EJBObjectFactory) to 
use org.omg.stub.javax.rmi._Remote_Stub.class to read the CORBA object. With 
this, the samples are now working fine on Geronimo 2.0 branch. The code was 
checked in under http://svn.apache.org/viewvc?view=rev&rev=562382.

Thanks,
Raymond

----- Original Message ----- 
From: "Vamsavardhana Reddy" <c1...@gmail.com>
To: <tu...@ws.apache.org>; <an...@gmail.com>
Sent: Friday, August 03, 2007 12:55 AM
Subject: Re: Reference EJB Binding problem


> We have done some further investigation and here are the findings:
>
> We have configured the J2SE enviroment to use Yoko ORB (the one used by
> Geronimo) instead of the JVMs and running the testcase resulted in a
> MarshalException.  We suspect it is an issue with Yoko ORB.
>
> Vamsi
>
> On 8/3/07, ant elder <an...@apache.org> wrote:
>>
>> I suspect a something somewhere is using the wrong class loader, but its
>> hard to tell precisely where without being able to debug by stepping
>> through
>> the code. Any chance you could make your code available somewhere (a zip
>> file in a jira or anywhere?) so we can try it?
>>
>>    ...ant
>>
>> On 8/2/07, Vamsavardhana Reddy <c1...@gmail.com> wrote:
>> >
>> > Hi,
>> >
>> > I have modified the Calculator sample to use an EJB binding for
>> > addService.
>> > I have deployed an AddService bean in Geronimo 2.0-SNAPSHOT Tomcat
>> server.
>> > I am using an EmbeddedSCADomain to run the sample.  I am facing a
>> strange
>> > problem.  When I run the sample in J2SE environment (I actually 
>> > modified
>> > the
>> > testcase in sca/modules/binding-ejb to run this sample) everything runs
>> > fine.  I see that the EJB is invoked for AddService.  But when I run
>> this
>> > sample inside Geronimo using the tuscany-plugin (see
>> >
>> >
>> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/Tuscany+Geronimo+Integrationfor
>> > details on the Geronimo Tuscany Integration details), I am getting "
>> > java.rmi.MarshalException: Unable to create stub for class
>> > java.lang.Object;
>> > nested exception is:
>> > org.omg.CORBA.MARSHAL: Unable to create stub for class 
>> > java.lang.Object:
>> > vmcid: Apache minor code: 0x2e completed: No "
>> >
>> > Here is the reference ejb binding xml-fragment from
>> > Calculator-new.composite
>> >
>> >         <reference name="addService">
>> >             <interface.java interface="calculator.AddService"/>
>> >             <binding.ejb uri="corbaname:iiop:1.2@localhost
>> > :1050#AddServiceBean"/>
>> >         </reference>
>> >
>> > Here is the session bean definition in ejb-jar.xml:
>> >       <session>
>> >          <description>AddService Bean</description>
>> >          <display-name>AddServiceBean</display-name>
>> >          <ejb-name>AddServiceBean</ejb-name>
>> >          <home>calculator.AddServiceHome</home>
>> >          <remote>calculator.AddService</remote>
>> >          <local-home>calculator.AddServiceLocalHome</local-home>
>> >          <local>calculator.AddServiceLocal</local>
>> >          <ejb-class>calculator.AddServiceBean</ejb-class>
>> >          <session-type>Stateless</session-type>
>> >          <transaction-type>Container</transaction-type>
>> >       </session>
>> >
>> > And the binding in openejb-jar.xml:
>> >
>> >         <session>
>> >           <ejb-name>AddServiceBean</ejb-name>
>> >           <jndi-name>AddServiceBean</jndi-name>
>> >            ...
>> >         </session>
>> >
>> >
>> > Any ideas on what is making the difference in J2SE and J2EE enviroments
>> in
>> > this context?  Any help in resolving this problem is appreciated.
>> >
>> > Thanks and best regards,
>> > Vamsi
>> >
>>
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: Reference EJB Binding problem

Posted by Vamsavardhana Reddy <c1...@gmail.com>.
We have done some further investigation and here are the findings:

We have configured the J2SE enviroment to use Yoko ORB (the one used by
Geronimo) instead of the JVMs and running the testcase resulted in a
MarshalException.  We suspect it is an issue with Yoko ORB.

Vamsi

On 8/3/07, ant elder <an...@apache.org> wrote:
>
> I suspect a something somewhere is using the wrong class loader, but its
> hard to tell precisely where without being able to debug by stepping
> through
> the code. Any chance you could make your code available somewhere (a zip
> file in a jira or anywhere?) so we can try it?
>
>    ...ant
>
> On 8/2/07, Vamsavardhana Reddy <c1...@gmail.com> wrote:
> >
> > Hi,
> >
> > I have modified the Calculator sample to use an EJB binding for
> > addService.
> > I have deployed an AddService bean in Geronimo 2.0-SNAPSHOT Tomcat
> server.
> > I am using an EmbeddedSCADomain to run the sample.  I am facing a
> strange
> > problem.  When I run the sample in J2SE environment (I actually modified
> > the
> > testcase in sca/modules/binding-ejb to run this sample) everything runs
> > fine.  I see that the EJB is invoked for AddService.  But when I run
> this
> > sample inside Geronimo using the tuscany-plugin (see
> >
> >
> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/Tuscany+Geronimo+Integrationfor
> > details on the Geronimo Tuscany Integration details), I am getting "
> > java.rmi.MarshalException: Unable to create stub for class
> > java.lang.Object;
> > nested exception is:
> > org.omg.CORBA.MARSHAL: Unable to create stub for class java.lang.Object:
> > vmcid: Apache minor code: 0x2e completed: No "
> >
> > Here is the reference ejb binding xml-fragment from
> > Calculator-new.composite
> >
> >         <reference name="addService">
> >             <interface.java interface="calculator.AddService"/>
> >             <binding.ejb uri="corbaname:iiop:1.2@localhost
> > :1050#AddServiceBean"/>
> >         </reference>
> >
> > Here is the session bean definition in ejb-jar.xml:
> >       <session>
> >          <description>AddService Bean</description>
> >          <display-name>AddServiceBean</display-name>
> >          <ejb-name>AddServiceBean</ejb-name>
> >          <home>calculator.AddServiceHome</home>
> >          <remote>calculator.AddService</remote>
> >          <local-home>calculator.AddServiceLocalHome</local-home>
> >          <local>calculator.AddServiceLocal</local>
> >          <ejb-class>calculator.AddServiceBean</ejb-class>
> >          <session-type>Stateless</session-type>
> >          <transaction-type>Container</transaction-type>
> >       </session>
> >
> > And the binding in openejb-jar.xml:
> >
> >         <session>
> >           <ejb-name>AddServiceBean</ejb-name>
> >           <jndi-name>AddServiceBean</jndi-name>
> >            ...
> >         </session>
> >
> >
> > Any ideas on what is making the difference in J2SE and J2EE enviroments
> in
> > this context?  Any help in resolving this problem is appreciated.
> >
> > Thanks and best regards,
> > Vamsi
> >
>

Re: Reference EJB Binding problem

Posted by ant elder <an...@apache.org>.
I suspect a something somewhere is using the wrong class loader, but its
hard to tell precisely where without being able to debug by stepping through
the code. Any chance you could make your code available somewhere (a zip
file in a jira or anywhere?) so we can try it?

   ...ant

On 8/2/07, Vamsavardhana Reddy <c1...@gmail.com> wrote:
>
> Hi,
>
> I have modified the Calculator sample to use an EJB binding for
> addService.
> I have deployed an AddService bean in Geronimo 2.0-SNAPSHOT Tomcat server.
> I am using an EmbeddedSCADomain to run the sample.  I am facing a strange
> problem.  When I run the sample in J2SE environment (I actually modified
> the
> testcase in sca/modules/binding-ejb to run this sample) everything runs
> fine.  I see that the EJB is invoked for AddService.  But when I run this
> sample inside Geronimo using the tuscany-plugin (see
>
> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/Tuscany+Geronimo+Integrationfor
> details on the Geronimo Tuscany Integration details), I am getting "
> java.rmi.MarshalException: Unable to create stub for class
> java.lang.Object;
> nested exception is:
> org.omg.CORBA.MARSHAL: Unable to create stub for class java.lang.Object:
> vmcid: Apache minor code: 0x2e completed: No "
>
> Here is the reference ejb binding xml-fragment from
> Calculator-new.composite
>
>         <reference name="addService">
>             <interface.java interface="calculator.AddService"/>
>             <binding.ejb uri="corbaname:iiop:1.2@localhost
> :1050#AddServiceBean"/>
>         </reference>
>
> Here is the session bean definition in ejb-jar.xml:
>       <session>
>          <description>AddService Bean</description>
>          <display-name>AddServiceBean</display-name>
>          <ejb-name>AddServiceBean</ejb-name>
>          <home>calculator.AddServiceHome</home>
>          <remote>calculator.AddService</remote>
>          <local-home>calculator.AddServiceLocalHome</local-home>
>          <local>calculator.AddServiceLocal</local>
>          <ejb-class>calculator.AddServiceBean</ejb-class>
>          <session-type>Stateless</session-type>
>          <transaction-type>Container</transaction-type>
>       </session>
>
> And the binding in openejb-jar.xml:
>
>         <session>
>           <ejb-name>AddServiceBean</ejb-name>
>           <jndi-name>AddServiceBean</jndi-name>
>            ...
>         </session>
>
>
> Any ideas on what is making the difference in J2SE and J2EE enviroments in
> this context?  Any help in resolving this problem is appreciated.
>
> Thanks and best regards,
> Vamsi
>