You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by Milan Unger <mi...@siemens.com> on 2006/02/01 13:27:38 UTC

Re: deploying EJB with CMR

I have started Geronimo-1.0 under JRE 1.4 and recompiled my sources with
JDK1.4 and now it is working - the problem was due to JDK1.5.

Is there a way to run Geronimo-1.0 safely under JRE 1.5, e.g. without
CORBA as I have mentioned before?

---------------------------------------------------------------------
Hallo,

I localized that the error is caused by call



PortableRemoteObject.narrow(aReference, UnitLocalHome.class);


Anyway, UnitLocalHome.class executes without exception so it is somewhere
in PortableRemoteObject.narrow.

I got different exception on my page when accessed first time fter
server restart. It mentions CORBA Initialization - IMO,
the problem is that I use JRE 1.5 instead of 1.4 version. I will prefer
to stay with JDK1.5 and don't need CORBA.
Geronimo 1.0-M5 runs fine for me without it.

Is there a way to disable CORBA infrastructure - what modules should be
uninstalled for that? I can test to deploy there
afterwards.


Regards, Milan.

Aaron Mulder  wrote / napísal(a):
> I don't know a ton about Tapestry, but can you figure out what the
> actual problem is?  I see two possibilities:
>
> org.apache.hivemind.ApplicationRuntimeException
> Unable to read OGNL expression '<parsed OGNL expression>' of
> $OrganizationHome_3@1771ead[organization/OrganizationHome]: allUnits
> component:      $OrganizationHome_3@1771ead[organization/OrganizationHome]
> location:       context:/organization/OrganizationHome.html
>
> That's one -- I don't know what that means, what OGNL expression it
> might be trying to parse and so on.
>
> ognl.OgnlException
> allUnits
> java.lang.NoClassDefFoundError                  <-------------
>
> That's another -- what class is not found?  Is it ognl.OgnlException
> that is not found or is that part of the previous problem?  What JAR
> is the missing class in and how is it being loaded?
>
> Thanks,
>     Aaron
>
>
> On 1/30/06, Milan Unger <mi...@siemens.com> wrote:
>   
>> I broke all my <ejb-relation> so that it contains just single
>> <ejb-relationship-role> (except for many-to-many relationship) and now
>> it deploys, thanks.
>>
>> Anyway, when I access tapestry page that references ejb local interface
>> there is an exception -- see below -- which does not occur on M5
>> release. I retried to deploy new openejb-jar.xml on M5 but that has no
>> effect - it still run fine there.
>>
>> Both war and EJB jar are part of the same ear application.
>>
>> The exception is reported by tapestry - I was not able to configure
>> logging on geronimo to get more detailed info:
>>
>> org.apache.hivemind.ApplicationRuntimeException
>> Unable to read OGNL expression '<parsed OGNL expression>' of
>> $OrganizationHome_3@1771ead[organization/OrganizationHome]: allUnits
>> component:      $OrganizationHome_3@1771ead[organization/OrganizationHome]
>> location:       context:/organization/OrganizationHome.html
>>
>> ognl.OgnlException
>> allUnits
>>
>> java.lang.NoClassDefFoundError                  <-------------
>> Stack Trace:
>>
>>     *
>> sk.moolab.coordinator.pages.organization.OrganizationHome.getUnitHome(OrganizationHome.java:76)
>>
>>     *
>> sk.moolab.coordinator.pages.organization.OrganizationHome.getAllUnits(OrganizationHome.java:49)
>>     * sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>     *
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>     *
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>     * java.lang.reflect.Method.invoke(Method.java:585)
>>     * ognl.OgnlRuntime.invokeMethod(OgnlRuntime.java:491)
>>     * ognl.OgnlRuntime.getMethodValue(OgnlRuntime.java:904)
>>     *
>> ognl.ObjectPropertyAccessor.getPossibleProperty(ObjectPropertyAccessor.java:54)
>>     *
>> ognl.ObjectPropertyAccessor.getProperty(ObjectPropertyAccessor.java:122)
>>
>>
>>
>>
>> OrganizationHome.java (tapestry page component) around line 76 -- the
>> reference seems to be O.K., the code works fine on M5 release:
>>
>> private UnitLocalHome getUnitHome()
>>     throws NamingException, FinderException, Exception {
>>         try {
>>
>>             InitialContext aContext = new InitialContext();
>>             Object aReference =
>> aContext.lookup("java:comp/env/ejb/UnitLocalHome");
>>             UnitLocalHome aHome = (UnitLocalHome)
>>             PortableRemoteObject.narrow(aReference, UnitLocalHome.class);
>>             return aHome;
>>         } catch (Exception anException) {
>>             log.warn("Cannot create a UnitHome", anException);
>>             throw anException;
>>         }
>>     }
>>
>> ---------------------------------------
>>
>> Aaron Mulder
>> Fri, 27 Jan 2006 07:42:50 -0800
>>
>> When you have a one-to-many relationship, you only need mapping
>> information for one ejb-relationship-role in your openejb-jar.xml.
>> I'm not sure if that's causing the problem, but can you remove one of
>> the two and try that?  See example 12.8 at
>> http://chariotsolutions.com/geronimo/ejb-structure.html#id2612837
>>
>> Thanks,
>>     Aaron
>>
>> On 1/27/06, Milan Unger <[EMAIL PROTECTED]> wrote:
>>     
>>> Hi,
>>>
>>> I'm trying to deploy ear application with EJBs on Geronimo-1.0. The same
>>> application deploys without a problem on Geronimo-1.0M5. After
>>> transforming dependency format and parentIds for Geronimo 1.0 release I
>>> still got following error from the deployer:
>>>
>>>         Target TransactionBean does not have foreign key attribute
>>>     transactionid.
>>>
>>> Bellow are some snippets from openejb-jar.xml. Do you know a reason for
>>> this problem?
>>>
>>> Regards, Milan.
>>>       
>
>   


Re: deploying EJB with CMR - disabling CORBA

Posted by Milan Unger <mi...@siemens.com>.
I modified config.xml -> have added


   <gbean name="SystemProperties">
          <attribute name="systemProperties">
            javax.net.ssl.keyStorePassword=secret
            javax.net.ssl.trustStorePassword=secret
          </attribute>
  </gbean>

under <configuration name="geronimo/rmi-naming/1.0/car"> element, and
now EJB works with JRE/JDK 1.5 as well.

Thank, you.

David Jencks  wrote / napísal(a):
>
> On Feb 1, 2006, at 4:27 AM, Milan Unger wrote:
>
>> I have started Geronimo-1.0 under JRE 1.4 and recompiled my sources with
>> JDK1.4 and now it is working - the problem was due to JDK1.5.
>>
>> Is there a way to run Geronimo-1.0 safely under JRE 1.5, e.g. without
>> CORBA as I have mentioned before?
>
> Well, PRO.narrow is sort of a use of CORBA :-)
>
> I haven't tried it but I suspect that if you modify config.xml to
> override the SystemProperties gbean in rmi-naming configuration to not
> set any of the corba properties it normally sets, that PRO.narrow
> might work as long as you aren't actually using corba transport.
>
> thanks
> david jencks
>
>>
>> ---------------------------------------------------------------------
>> Hallo,
>>
>> I localized that the error is caused by call
>>
>>
>>
>> PortableRemoteObject.narrow(aReference, UnitLocalHome.class);
>>
>>
>> Anyway, UnitLocalHome.class executes without exception so it is
>> somewhere
>> in PortableRemoteObject.narrow.
>>
>> I got different exception on my page when accessed first time fter
>> server restart. It mentions CORBA Initialization - IMO,
>> the problem is that I use JRE 1.5 instead of 1.4 version. I will prefer
>> to stay with JDK1.5 and don't need CORBA.
>> Geronimo 1.0-M5 runs fine for me without it.
>>
>> Is there a way to disable CORBA infrastructure - what modules should be
>> uninstalled for that? I can test to deploy there
>> afterwards.
>>
>>
>> Regards, Milan.
>>
>> Aaron Mulder  wrote / napísal(a):
>>> I don't know a ton about Tapestry, but can you figure out what the
>>> actual problem is?  I see two possibilities:
>>>
>>> org.apache.hivemind.ApplicationRuntimeException
>>> Unable to read OGNL expression '<parsed OGNL expression>' of
>>> $OrganizationHome_3@1771ead[organization/OrganizationHome]: allUnits
>>> component:     
>>> $OrganizationHome_3@1771ead[organization/OrganizationHome]
>>> location:       context:/organization/OrganizationHome.html
>>>
>>> That's one -- I don't know what that means, what OGNL expression it
>>> might be trying to parse and so on.
>>>
>>> ognl.OgnlException
>>> allUnits
>>> java.lang.NoClassDefFoundError                  <-------------
>>>
>>> That's another -- what class is not found?  Is it ognl.OgnlException
>>> that is not found or is that part of the previous problem?  What JAR
>>> is the missing class in and how is it being loaded?
>>>
>>> Thanks,
>>>     Aaron
>>>
>>>
>>> On 1/30/06, Milan Unger <mi...@siemens.com> wrote:
>>>
>>>> I broke all my <ejb-relation> so that it contains just single
>>>> <ejb-relationship-role> (except for many-to-many relationship) and now
>>>> it deploys, thanks.
>>>>
>>>> Anyway, when I access tapestry page that references ejb local
>>>> interface
>>>> there is an exception -- see below -- which does not occur on M5
>>>> release. I retried to deploy new openejb-jar.xml on M5 but that has no
>>>> effect - it still run fine there.
>>>>
>>>> Both war and EJB jar are part of the same ear application.
>>>>
>>>> The exception is reported by tapestry - I was not able to configure
>>>> logging on geronimo to get more detailed info:
>>>>
>>>> org.apache.hivemind.ApplicationRuntimeException
>>>> Unable to read OGNL expression '<parsed OGNL expression>' of
>>>> $OrganizationHome_3@1771ead[organization/OrganizationHome]: allUnits
>>>> component:     
>>>> $OrganizationHome_3@1771ead[organization/OrganizationHome]
>>>> location:       context:/organization/OrganizationHome.html
>>>>
>>>> ognl.OgnlException
>>>> allUnits
>>>>
>>>> java.lang.NoClassDefFoundError                  <-------------
>>>> Stack Trace:
>>>>
>>>>     *
>>>> sk.moolab.coordinator.pages.organization.OrganizationHome.getUnitHome(OrganizationHome.java:76)
>>>>
>>>>
>>>>     *
>>>> sk.moolab.coordinator.pages.organization.OrganizationHome.getAllUnits(OrganizationHome.java:49)
>>>>
>>>>     * sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>     *
>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>>>
>>>>     *
>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>>>
>>>>     * java.lang.reflect.Method.invoke(Method.java:585)
>>>>     * ognl.OgnlRuntime.invokeMethod(OgnlRuntime.java:491)
>>>>     * ognl.OgnlRuntime.getMethodValue(OgnlRuntime.java:904)
>>>>     *
>>>> ognl.ObjectPropertyAccessor.getPossibleProperty(ObjectPropertyAccessor.java:54)
>>>>
>>>>     *
>>>> ognl.ObjectPropertyAccessor.getProperty(ObjectPropertyAccessor.java:122)
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> OrganizationHome.java (tapestry page component) around line 76 -- the
>>>> reference seems to be O.K., the code works fine on M5 release:
>>>>
>>>> private UnitLocalHome getUnitHome()
>>>>     throws NamingException, FinderException, Exception {
>>>>         try {
>>>>
>>>>             InitialContext aContext = new InitialContext();
>>>>             Object aReference =
>>>> aContext.lookup("java:comp/env/ejb/UnitLocalHome");
>>>>             UnitLocalHome aHome = (UnitLocalHome)
>>>>             PortableRemoteObject.narrow(aReference,
>>>> UnitLocalHome.class);
>>>>             return aHome;
>>>>         } catch (Exception anException) {
>>>>             log.warn("Cannot create a UnitHome", anException);
>>>>             throw anException;
>>>>         }
>>>>     }
>>>>
>>>> ---------------------------------------
>>>>
>>>> Aaron Mulder
>>>> Fri, 27 Jan 2006 07:42:50 -0800
>>>>
>>>> When you have a one-to-many relationship, you only need mapping
>>>> information for one ejb-relationship-role in your openejb-jar.xml.
>>>> I'm not sure if that's causing the problem, but can you remove one of
>>>> the two and try that?  See example 12.8 at
>>>> http://chariotsolutions.com/geronimo/ejb-structure.html#id2612837
>>>>
>>>> Thanks,
>>>>     Aaron
>>>>
>>>> On 1/27/06, Milan Unger <[EMAIL PROTECTED]> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I'm trying to deploy ear application with EJBs on Geronimo-1.0.
>>>>> The same
>>>>> application deploys without a problem on Geronimo-1.0M5. After
>>>>> transforming dependency format and parentIds for Geronimo 1.0
>>>>> release I
>>>>> still got following error from the deployer:
>>>>>
>>>>>         Target TransactionBean does not have foreign key attribute
>>>>>     transactionid.
>>>>>
>>>>> Bellow are some snippets from openejb-jar.xml. Do you know a
>>>>> reason for
>>>>> this problem?
>>>>>
>>>>> Regards, Milan.
>>>>>
>>>
>>>
>>
>
>

Re: deploying EJB with CMR

Posted by David Jencks <da...@yahoo.com>.
On Feb 1, 2006, at 4:27 AM, Milan Unger wrote:

> I have started Geronimo-1.0 under JRE 1.4 and recompiled my sources  
> with
> JDK1.4 and now it is working - the problem was due to JDK1.5.
>
> Is there a way to run Geronimo-1.0 safely under JRE 1.5, e.g. without
> CORBA as I have mentioned before?

Well, PRO.narrow is sort of a use of CORBA :-)

I haven't tried it but I suspect that if you modify config.xml to  
override the SystemProperties gbean in rmi-naming configuration to  
not set any of the corba properties it normally sets, that PRO.narrow  
might work as long as you aren't actually using corba transport.

thanks
david jencks

>
> ---------------------------------------------------------------------
> Hallo,
>
> I localized that the error is caused by call
>
>
>
> PortableRemoteObject.narrow(aReference, UnitLocalHome.class);
>
>
> Anyway, UnitLocalHome.class executes without exception so it is  
> somewhere
> in PortableRemoteObject.narrow.
>
> I got different exception on my page when accessed first time fter
> server restart. It mentions CORBA Initialization - IMO,
> the problem is that I use JRE 1.5 instead of 1.4 version. I will  
> prefer
> to stay with JDK1.5 and don't need CORBA.
> Geronimo 1.0-M5 runs fine for me without it.
>
> Is there a way to disable CORBA infrastructure - what modules  
> should be
> uninstalled for that? I can test to deploy there
> afterwards.
>
>
> Regards, Milan.
>
> Aaron Mulder  wrote / napísal(a):
>> I don't know a ton about Tapestry, but can you figure out what the
>> actual problem is?  I see two possibilities:
>>
>> org.apache.hivemind.ApplicationRuntimeException
>> Unable to read OGNL expression '<parsed OGNL expression>' of
>> $OrganizationHome_3@1771ead[organization/OrganizationHome]: allUnits
>> component:      $OrganizationHome_3@1771ead[organization/ 
>> OrganizationHome]
>> location:       context:/organization/OrganizationHome.html
>>
>> That's one -- I don't know what that means, what OGNL expression it
>> might be trying to parse and so on.
>>
>> ognl.OgnlException
>> allUnits
>> java.lang.NoClassDefFoundError                  <-------------
>>
>> That's another -- what class is not found?  Is it ognl.OgnlException
>> that is not found or is that part of the previous problem?  What JAR
>> is the missing class in and how is it being loaded?
>>
>> Thanks,
>>     Aaron
>>
>>
>> On 1/30/06, Milan Unger <mi...@siemens.com> wrote:
>>
>>> I broke all my <ejb-relation> so that it contains just single
>>> <ejb-relationship-role> (except for many-to-many relationship)  
>>> and now
>>> it deploys, thanks.
>>>
>>> Anyway, when I access tapestry page that references ejb local  
>>> interface
>>> there is an exception -- see below -- which does not occur on M5
>>> release. I retried to deploy new openejb-jar.xml on M5 but that  
>>> has no
>>> effect - it still run fine there.
>>>
>>> Both war and EJB jar are part of the same ear application.
>>>
>>> The exception is reported by tapestry - I was not able to configure
>>> logging on geronimo to get more detailed info:
>>>
>>> org.apache.hivemind.ApplicationRuntimeException
>>> Unable to read OGNL expression '<parsed OGNL expression>' of
>>> $OrganizationHome_3@1771ead[organization/OrganizationHome]: allUnits
>>> component:      $OrganizationHome_3@1771ead[organization/ 
>>> OrganizationHome]
>>> location:       context:/organization/OrganizationHome.html
>>>
>>> ognl.OgnlException
>>> allUnits
>>>
>>> java.lang.NoClassDefFoundError                  <-------------
>>> Stack Trace:
>>>
>>>     *
>>> sk.moolab.coordinator.pages.organization.OrganizationHome.getUnitHom 
>>> e(OrganizationHome.java:76)
>>>
>>>     *
>>> sk.moolab.coordinator.pages.organization.OrganizationHome.getAllUnit 
>>> s(OrganizationHome.java:49)
>>>     * sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>     *
>>> sun.reflect.NativeMethodAccessorImpl.invoke 
>>> (NativeMethodAccessorImpl.java:39)
>>>     *
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke 
>>> (DelegatingMethodAccessorImpl.java:25)
>>>     * java.lang.reflect.Method.invoke(Method.java:585)
>>>     * ognl.OgnlRuntime.invokeMethod(OgnlRuntime.java:491)
>>>     * ognl.OgnlRuntime.getMethodValue(OgnlRuntime.java:904)
>>>     *
>>> ognl.ObjectPropertyAccessor.getPossibleProperty 
>>> (ObjectPropertyAccessor.java:54)
>>>     *
>>> ognl.ObjectPropertyAccessor.getProperty 
>>> (ObjectPropertyAccessor.java:122)
>>>
>>>
>>>
>>>
>>> OrganizationHome.java (tapestry page component) around line 76 --  
>>> the
>>> reference seems to be O.K., the code works fine on M5 release:
>>>
>>> private UnitLocalHome getUnitHome()
>>>     throws NamingException, FinderException, Exception {
>>>         try {
>>>
>>>             InitialContext aContext = new InitialContext();
>>>             Object aReference =
>>> aContext.lookup("java:comp/env/ejb/UnitLocalHome");
>>>             UnitLocalHome aHome = (UnitLocalHome)
>>>             PortableRemoteObject.narrow(aReference,  
>>> UnitLocalHome.class);
>>>             return aHome;
>>>         } catch (Exception anException) {
>>>             log.warn("Cannot create a UnitHome", anException);
>>>             throw anException;
>>>         }
>>>     }
>>>
>>> ---------------------------------------
>>>
>>> Aaron Mulder
>>> Fri, 27 Jan 2006 07:42:50 -0800
>>>
>>> When you have a one-to-many relationship, you only need mapping
>>> information for one ejb-relationship-role in your openejb-jar.xml.
>>> I'm not sure if that's causing the problem, but can you remove  
>>> one of
>>> the two and try that?  See example 12.8 at
>>> http://chariotsolutions.com/geronimo/ejb-structure.html#id2612837
>>>
>>> Thanks,
>>>     Aaron
>>>
>>> On 1/27/06, Milan Unger <[EMAIL PROTECTED]> wrote:
>>>
>>>> Hi,
>>>>
>>>> I'm trying to deploy ear application with EJBs on Geronimo-1.0.  
>>>> The same
>>>> application deploys without a problem on Geronimo-1.0M5. After
>>>> transforming dependency format and parentIds for Geronimo 1.0  
>>>> release I
>>>> still got following error from the deployer:
>>>>
>>>>         Target TransactionBean does not have foreign key attribute
>>>>     transactionid.
>>>>
>>>> Bellow are some snippets from openejb-jar.xml. Do you know a  
>>>> reason for
>>>> this problem?
>>>>
>>>> Regards, Milan.
>>>>
>>
>>
>