geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Burt Prior <bpr...@cisco.com>
Subject Re: Geronimo 2.1 and Seam
Date Wed, 27 Feb 2008 19:33:03 GMT

Hi Jacek,

Thanks very much for the reply.  Our team is really trying to make
Hibernate/Seam work on Geronimo 2.1, and we are stuck.  As mentioned,  we
have the standard Oracle thin drivers in the repository, and an Oracle db
pool correctly set up; additionally we think the Geronimo Transaction
Manager is installed correctly, as well as hibernate-entitymanager.jar
patched to avoid the NPE.

>From our console repository viewer:

...
<dependency> 
 <groupId>oracle</groupId>
 <artifactId>jdbc</artifactId>
 <version>10.2</version>
 <type>jar</type>
</dependency>
...

...
<dependency>
 <groupId>console.dbpool</groupId>
 <artifactId>ElvisPool</artifactId>
 <version>1.0</version>
 <type>rar</type>
</dependency>
...

...
<dependency>
 <groupId>org.apache.geronimo.hibernate</groupId> 
 <artifactId>geronimo-hibernate-transaction-manager-lookup</artifactId>
 <version>1.0-SNAPSHOT</version>
 <type>jar</type>
</dependency>
...

We are diligently following the Geronimo/Hibernate and Geronimo/Seam
examples, but we still have issues.

Please note that we have clean builds ('ant clean archive') as you listed in
the Geronimo/Seam doc.
So essentially, we think we have everything working until we get to "The
Plan" section.  The errors we see are when we try to 'deploy'.

Here is "The Plan" as we modified it, including your latest suggestion on
the dependency:  (we think 90% of it is correct)

<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-2.0">
  <environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.2">
    <moduleId>
      <groupId>org.jboss.seam.examples.jee5</groupId>
      <artifactId>jboss-seam-jee5</artifactId>
      <version>2.1.0.A1</version>
      <type>ear</type>
    </moduleId>
    <dependencies>
      <dependency>
        <groupId>org.apache.geronimo.hibernate</groupId>
       
<artifactId>geronimo-hibernate-transaction-manager-lookup</artifactId>
        <type>jar</type>
      </dependency>
      
       <!-- bprior added new dependency below per Jacek --> 
       	<dependency>
         	<groupId>oracle</groupId>
         	<artifactId>jdbc</artifactId>
         	<version>10.2</version>
         	<type>jar</type>
       	</dependency>
      
    </dependencies>
  </environment>
  
  <module>
    <web>jboss-seam-jee5.war</web>
    <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1">
      <environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.2">
        <moduleId>
          <groupId>org.jboss.seam.examples.jee5</groupId>
          <artifactId>jboss-seam-jee5</artifactId>
          <version>2.1.0.A1</version>
          <type>war</type>
        </moduleId>
      </environment>
      <context-root>/seam-jee5</context-root>
    </web-app>
  </module>
  
  <module>
    <ejb>jboss-seam-jee5.jar</ejb>
    <openejb-jar xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.1">

      <environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.2">
        <moduleId>
          <groupId>org.jboss.seam.examples.jee5</groupId>
          <artifactId>jboss-seam-jee5</artifactId>
          <version>2.1.0.A1</version>
          <type>jar</type>
        </moduleId>
      </environment>

      <!-- overrides what's in the module's persistence.xml -->

      <persistence xmlns="http://java.sun.com/xml/ns/persistence">
        <persistence-unit name="bookingDatabase">
          <jta-data-source>ElvisPool</jta-data-source>
          <non-jta-data-source>ElvisPool</non-jta-data-source>
          <class>org.jboss.seam.example.booking.Booking</class>
          <class>org.jboss.seam.example.booking.Hotel</class>
          <class>org.jboss.seam.example.booking.User</class>
          <exclude-unlisted-classes>true</exclude-unlisted-classes>

          <properties>
          	<property name="hibernate.dialect"
value="org.hibernate.dialect.OracleDialect"/>
            <property name="hibernate.transaction.manager_lookup_class"
             
value="org.apache.geronimo.hibernate.transaction.GeronimoTransactionManagerLookup"
/>
          </properties>
          
        </persistence-unit>
        <!-- change the way the default PU works - make it an alias to
bookingDatabase PU -->
        <persistence-unit name="cmp">
          <class>org.jboss.seam.example.booking.Booking</class>
          <class>org.jboss.seam.example.booking.Hotel</class>
          <class>org.jboss.seam.example.booking.User</class>
          <exclude-unlisted-classes>true</exclude-unlisted-classes>
        </persistence-unit>
      </persistence>

    </openejb-jar>
  </module>
  
  <ext-module>
    <connector>seam-jee5-dbpool</connector>
    <external-path
xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">
      <dep:groupId>org.tranql</dep:groupId>
      <dep:artifactId>tranql-connector-oracle-local</dep:artifactId>
      <dep:type>rar</dep:type>
    </external-path>
    <connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2">
      <environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.2">
        <moduleId>
          <groupId>org.jboss.seam.examples.jee5</groupId>
          <artifactId>booking-dbpool</artifactId>
          <version>2.1.0.A1</version>
          <type>rar</type>
        </moduleId>
        <dependencies>
          <dependency>
            <groupId>org.apache.geronimo.configs</groupId>
            <artifactId>system-database</artifactId>
            <type>car</type>
          </dependency>
   
          
        </dependencies>
      </environment>
      <resourceadapter>
        <outbound-resourceadapter>
          <connection-definition>
           
<connectionfactory-interface>javax.sql.DataSource</connectionfactory-interface>
            <connectiondefinition-instance>
              
              <name>ElvisPool</name>
              
              <!-- 
              <config-property-setting
name="UserName">ENGLRN_BPRIOR</config-property-setting>
              <config-property-setting
name="Password">BPRIOR</config-property-setting>
              <config-property-setting
name="Driver">oracle.jdbc.driver.OracleDriver</config-property-setting>
              <config-property-setting
name="ConnectionURL">jdbc:oracle:thin:@englearn-app1@cisco.com:1521:xe</config-property-setting>
              -->
                            
              <!--  <config-property-setting
name="DatabaseName">SystemDatabase</config-property-setting> -->
              
              <connectionmanager>
                <local-transaction />
                <single-pool>
                  <max-size>8</max-size>
                  <min-size>4</min-size>
                 
<blocking-timeout-milliseconds>5000</blocking-timeout-milliseconds>
                  <select-one-assume-match />
                </single-pool>
              </connectionmanager>
            </connectiondefinition-instance>
          </connection-definition>
        </outbound-resourceadapter>
      </resourceadapter>
    </connector>
  </ext-module>

</application>


The errors (on deploy) we get are:  (trimmed):


C:\geronimo-jetty6-javaee5-2.1>.\bin\deploy.bat -u system -p manager deploy
C:\jboss-seam-2.1.0.A1\examples\jee5\booking\dist\jboss-seam-jee5.ear
C:\jboss-seam-
2.1.0.A1\examples\jee5\booking\jboss-seam-jee5-geronimo-plan.xml
Using GERONIMO_BASE:   C:\geronimo-jetty6-javaee5-2.1
Using GERONIMO_HOME:   C:\geronimo-jetty6-javaee5-2.1
Using GERONIMO_TMPDIR: var\temp
Using JRE_HOME:        C:\Program Files\Java\jdk1.6.0_01\jre
org.apache.geronimo.kernel.config.LifecycleException: start of
org.jboss.seam.examples.jee5/jboss-seam-jee5/2.1.0.A1/ear failed
        at
org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:551)
        at
org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:515)
        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:597)
        at
org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
        at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
        at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:867)
        at
org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
        at
org.apache.geronimo.kernel.KernelGBean.invoke(KernelGBean.java:342)
        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:597)
        at
org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
        at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
        at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:867)
        at
org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
        at
org.apache.geronimo.system.jmx.MBeanGBeanBridge.invoke(MBeanGBeanBridge.java:172)
        at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
        at
com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
        at
javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1426)
        at
javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:72)
        at
javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1264)
        at java.security.AccessController.doPrivileged(Native Method)
        at
javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1366)
        at
javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:788)
        at sun.reflect.GeneratedMethodAccessor130.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
        at sun.rmi.transport.Transport$1.run(Transport.java:159)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
        at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
        at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
        at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
        at java.lang.Thread.run(Thread.java:619)
Caused by: org.apache.geronimo.kernel.config.InvalidConfigException: Unknown
start exception
        at
org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:522)
        at
org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:187)
        at
org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:534)
        ... 40 more
Caused by: org.apache.geronimo.gbean.InvalidConfigurationException:
Configuration org.jboss.seam.examples.jee5/jboss-seam-jee5/2.1.0.A1/ear
failed to start due
to the following reasons:
  The service
EJBModule=jboss-seam-jee5.jar,J2EEApplication=org.jboss.seam.examples.jee5/jboss-seam-jee5/2.1.0.A1/ear,PersistenceUnitModule=jboss-seam-jee5.jar,
j2eeType=PersistenceUnit,name=bookingDatabase did not start for an unknown
reason
  The service
EJBModule=jboss-seam-jee5.jar,J2EEApplication=org.jboss.seam.examples.jee5/jboss-seam-jee5/2.1.0.A1/ear,j2eeType=StatelessSessionBean,name=Authent
icatorAction did not start because
org.jboss.seam.examples.jee5/jboss-seam-jee5/2.1.0.A1/ear?J2EEApplication=org.jboss.seam.examples.jee5/jboss-seam-jee5/2.1.0.
A1/ear,j2eeType=EJBModule,name=jboss-seam-jee5.jar did not start.
  The service
EJBModule=jboss-seam-jee5.jar,J2EEApplication=org.jboss.seam.examples.jee5/jboss-seam-jee5/2.1.0.A1/ear,j2eeType=StatefulSessionBean,name=BookingL
istAction did not start because
org.jboss.seam.examples.jee5/jboss-seam-jee5/2.1.0.A1/ear?J2EEApplication=org.jboss.seam.examples.jee5/jboss-seam-jee5/2.1.0.A1/
ear,j2eeType=EJBModule,name=jboss-seam-jee5.jar did not start.
  The service
EJBModule=jboss-seam-jee5.jar,J2EEApplication=org.jboss.seam.examples.jee5/jboss-seam-jee5/2.1.0.A1/ear,j2eeType=StatefulSessionBean,name=ChangePa
sswordAction did not start because
org.jboss.seam.examples.jee5/jboss-seam-jee5/2.1.0.A1/ear?J2EEApplication=org.jboss.seam.examples.jee5/jboss-seam-jee5/2.1.0.
A1/ear,j2eeType=EJBModule,name=jboss-seam-jee5.jar did not start.
  The service
EJBModule=jboss-seam-jee5.jar,J2EEApplication=org.jboss.seam.examples.jee5/jboss-seam-jee5/2.1.0.A1/ear,j2eeType=StatefulSessionBean,name=HotelBoo
kingAction did not start because
org.jboss.seam.examples.jee5/jboss-seam-jee5/2.1.0.A1/ear?J2EEApplication=org.jboss.seam.examples.jee5/jboss-seam-jee5/2.1.0.A1
/ear,j2eeType=EJBModule,name=jboss-seam-jee5.jar did not start.
  The service
EJBModule=jboss-seam-jee5.jar,J2EEApplication=org.jboss.seam.examples.jee5/jboss-seam-jee5/2.1.0.A1/ear,j2eeType=StatefulSessionBean,name=HotelSea
rchingAction did not start because
org.jboss.seam.examples.jee5/jboss-seam-jee5/2.1.0.A1/ear?J2EEApplication=org.jboss.seam.examples.jee5/jboss-seam-jee5/2.1.0.
A1/ear,j2eeType=EJBModule,name=jboss-seam-jee5.jar did not start.
  The service
EJBModule=jboss-seam-jee5.jar,J2EEApplication=org.jboss.seam.examples.jee5/jboss-seam-jee5/2.1.0.A1/ear,j2eeType=StatefulSessionBean,name=Register
Action did not start because
org.jboss.seam.examples.jee5/jboss-seam-jee5/2.1.0.A1/ear?J2EEApplication=org.jboss.seam.examples.jee5/jboss-seam-jee5/2.1.0.A1/ear
,j2eeType=EJBModule,name=jboss-seam-jee5.jar did not start.
  The service
J2EEApplication=org.jboss.seam.examples.jee5/jboss-seam-jee5/2.1.0.A1/ear,j2eeType=EJBModule,name=jboss-seam-jee5.jar
did not start because create
Application.failed
[C:\geronimo-jetty6-javaee5-2.1\var\temp\geronimo-deploymentUtil44832.jar]:
Error building bean 'HotelBookingAction'.  Exception: class org.a
pache.openejb.OpenEJBException: PersistenceUnit 'bookingDatabase 91456273'
not found for EXTENDED ref
'org.jboss.seam.example.booking.HotelBookingAction/em': Pe
rsistenceUnit 'bookingDatabase 91456273' not found for EXTENDED ref
'org.jboss.seam.example.booking.HotelBookingAction/em'

        at
org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:485)
        ... 42 more
    Error: Operation failed: start of
    org.jboss.seam.examples.jee5/jboss-seam-jee5/2.1.0.A1/ear failed

        Unknown start exception

        Configuration
    org.jboss.seam.examples.jee5/jboss-seam-jee5/2.1.0.A1/ear failed to
    start due to the following reasons:

      The service
   
EJBModule=jboss-seam-jee5.jar,J2EEApplication=org.jboss.seam.examples.jee5/jboss-seam-jee5/2.1.0.A1/ear,PersistenceUnitModule=jboss-seam-jee5.jar,j2eeType=P
ersistenceUnit,name=bookingDatabase
    did not start for an unknown reason

      The service
   
EJBModule=jboss-seam-jee5.jar,J2EEApplication=org.jboss.seam.examples.jee5/jboss-seam-jee5/2.1.0.A1/ear,j2eeType=StatelessSessionBean,name=AuthenticatorActi
on
    did not start because
   
org.jboss.seam.examples.jee5/jboss-seam-jee5/2.1.0.A1/ear?J2EEApplication=org.jboss.seam.examples.jee5/jboss-seam-jee5/2.1.0.A1/ear,j2eeType=EJBModule,name=
jboss-seam-jee5.jar
    did not start.

      The service
   
EJBModule=jboss-seam-jee5.jar,J2EEApplication=org.jboss.seam.examples.jee5/jboss-seam-jee5/2.1.0.A1/ear,j2eeType=StatefulSessionBean,name=BookingListAction
    did not start because
   
org.jboss.seam.examples.jee5/jboss-seam-jee5/2.1.0.A1/ear?J2EEApplication=org.jboss.seam.examples.jee5/jboss-seam-jee5/2.1.0.A1/ear,j2eeType=EJBModule,name=
jboss-seam-jee5.jar
    did not start.

      The service
   
EJBModule=jboss-seam-jee5.jar,J2EEApplication=org.jboss.seam.examples.jee5/jboss-seam-jee5/2.1.0.A1/ear,j2eeType=StatefulSessionBean,name=ChangePasswordActi
on
    did not start because
   
org.jboss.seam.examples.jee5/jboss-seam-jee5/2.1.0.A1/ear?J2EEApplication=org.jboss.seam.examples.jee5/jboss-seam-jee5/2.1.0.A1/ear,j2eeType=EJBModule,name=
jboss-seam-jee5.jar
    did not start.

      The service
   
EJBModule=jboss-seam-jee5.jar,J2EEApplication=org.jboss.seam.examples.jee5/jboss-seam-jee5/2.1.0.A1/ear,j2eeType=StatefulSessionBean,name=HotelBookingAction

    did not start because
   
org.jboss.seam.examples.jee5/jboss-seam-jee5/2.1.0.A1/ear?J2EEApplication=org.jboss.seam.examples.jee5/jboss-seam-jee5/2.1.0.A1/ear,j2eeType=EJBModule,name=
jboss-seam-jee5.jar
    did not start.

      The service
   
EJBModule=jboss-seam-jee5.jar,J2EEApplication=org.jboss.seam.examples.jee5/jboss-seam-jee5/2.1.0.A1/ear,j2eeType=StatefulSessionBean,name=HotelSearchingActi
on
    did not start because
   
org.jboss.seam.examples.jee5/jboss-seam-jee5/2.1.0.A1/ear?J2EEApplication=org.jboss.seam.examples.jee5/jboss-seam-jee5/2.1.0.A1/ear,j2eeType=EJBModule,name=
jboss-seam-jee5.jar
    did not start.

...

      The service
   
J2EEApplication=org.jboss.seam.examples.jee5/jboss-seam-jee5/2.1.0.A1/ear,j2eeType=EJBModule,name=jboss-seam-jee5.jar
    did not start because createApplication.failed
   
[C:\geronimo-jetty6-javaee5-2.1\var\temp\geronimo-deploymentUtil44832.jar]:
    Error building bean 'HotelBookingAction'.  Exception: class
    org.apache.openejb.OpenEJBException: PersistenceUnit
    'bookingDatabase 91456273' not found for EXTENDED ref
    'org.jboss.seam.example.booking.HotelBookingAction/em':
    PersistenceUnit 'bookingDatabase 91456273' not found for EXTENDED
    ref 'org.jboss.seam.example.booking.HotelBookingAction/em'

C:\geronimo-jetty6-javaee5-2.1>


We would greatly appreciate any help on this.  We feel we are almost there.

Thanks again,
.Burt




Jacek Laskowski wrote:
> 
> On Tue, Feb 26, 2008 at 4:29 PM, Burt Prior <bprior@cisco.com> wrote:
> 
>>  The deployment plan uses the Derby database.  I'm using Oracle.  I've
>>  successfully installed the Oracle jar in the respository and a
>> configured a
>>  (thin driver) database pool that jar.
>>
>>  I now successfully build the app, but when I try to deploy.bat from the
>>  command line using the "The Plan", I get errors such as...
>>
>>  "Exception in Thread.. java.lang.NoClassDefFoundError:
>>  oracle/jdbc/pool/OracleDataSource"
>>
>>  This class is in the oracle jar, but I think the geronimo deployment
>> plan is
>>  incorrect.
> 
> Hi,
> 
> Add Oracle Thin driver as a dependency to the app in the plan and
> rerun the deployment. I think you need something like:
> 
>     <dependencies>
>       <dependency>
>         <groupId>org.apache.geronimo.hibernate.transaction</groupId>
>        
> <artifactId>geronimo-hibernate-transaction-manager-lookup</artifactId>
>         <type>jar</type>
>       </dependency>
>       <dependency>
>         <groupId>com.oracle.thindriver</groupId>
>         <artifactId>oracle-thin-driver</artifactId>
>         <type>jar</type>
>       </dependency>
>     </dependencies>
> 
> Note the part for the oracle thin driver. Update it with correct data
> and give it a go.
> 
> When in trouble, show the plan so it's easier to help you.
> 
> Jacek
> 
> -- 
> Jacek Laskowski
> http://www.JacekLaskowski.pl
> 
> 

-- 
View this message in context: http://www.nabble.com/Geronimo-2.1-and-Seam-tp15621154s134p15721151.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Mime
View raw message