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 Thu, 06 Mar 2008 19:00:06 GMT

Hi David,

I made all the changes you listed below:  Success!

I now have: Geronimo 2.1 / Oracle 10g / Hibernate / Seam 2.1.0.A1 with the
Jboss 'booking' example working!  I can't tell you how excited my team is to
get to this milestone.

In 'exercising' the 'booking' example, i do see one error (it seems to
always be the same error as well), and I don't think it's because of the
booking app or seam.

In running the booking application, geronimo starts fine and correctly
deploys the app. As I try various aspects of the app, i'm tailing the log as
well. the application goes thru its business logic fine, including saving
data to the database.  

But when I execute some business logic (save, navigate, whatever) I
consistently get the following error:


Hibernate: select booking0_.id as id0_, booking0_.beds as beds0_,
booking0_.checkinDate as checkinD3_0_, booking0_.checkoutDate as
checkout4_0_, booking0_.creditCard as creditCard0_,
booking0_.creditCardExpiryMonth as creditCa6_0_,
booking0_.creditCardExpiryYear as creditCa7_0_, booking0_.creditCardName as
creditCa8_0_, booking0_.hotel_id as hotel10_0_, booking0_.smoking as
smoking0_, booking0_.user_username as user11_0_ from Booking booking0_ where
booking0_.user_username=? order by booking0_.checkinDate
10:33:13,399 INFO  [Transaction] TX RequiresNew: Committing transaction
org.apache.geronimo.transaction.manager.TransactionImpl@1d2a7ed
10:33:13,399 INFO  [Transaction] TX RequiresNew: Resuming transaction
org.apache.geronimo.transaction.manager.TransactionImpl@12f6f8e
10:33:13,399 INFO  [OpenEJB] The following method doesn't have a transaction
policy assigned: public abstract void
org.jboss.seam.example.booking.HotelBooking.destroy()
10:33:13,399 INFO  [Transaction] TX Required: Started transaction
org.apache.geronimo.transaction.manager.TransactionImpl@1b0454f
10:33:13,414 ERROR [OpenEJB] The bean instance business method encountered a
system exception: Callback methods cannot access parameters
java.lang.IllegalStateException: Callback methods cannot access parameters
	at
org.apache.openejb.core.interceptor.ReflectionInvocationContext.getParameters(ReflectionInvocationContext.java:71)
	at
org.jboss.seam.intercept.EJBInvocationContext.getParameters(EJBInvocationContext.java:34)
	at
org.jboss.seam.intercept.SeamInvocationContext.getParameters(SeamInvocationContext.java:49)
	at
org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:33)
...

and

...
10:33:13,414 INFO  [OpenEJB] Activation failed: file not found
C:\DOCUME~1\bprior\LOCALS~1\Temp\51df64433d24c9fb=29fc4b93=118855a6199=-7f9b
10:33:13,430 WARN  [Component] Exception calling component @Destroy method:
hotelBooking
javax.ejb.EJBException: The bean encountered a non-application exception.;
nested exception is: 
	java.lang.IllegalStateException: Callback methods cannot access parameters
	at
org.apache.openejb.core.ivm.BaseEjbProxyHandler.convertException(BaseEjbProxyHandler.java:366)
	at
org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:323)
	at
org.apache.openejb.util.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:49)
	at $Proxy77.destroy(Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
...

Again, the booking app appears to be working correctly; saving data to db,
performing business logic, etc, and the error is consistent; I always get
the same error; essentially:

"ERROR [OpenEJB] The bean instance business method encountered a system
exception: Callback methods cannot access parameters -
java.lang.IllegalStateException: Callback methods cannot access parameters
	at
org.apache.openejb.core.interceptor.ReflectionInvocationContext.getParameters(ReflectionInvocationContext.java:71)"


Could I ask for your help in resolving this issue?  It appears to me that
the EJB3 container is looking for something that it cannot find, but I'm not
sure.

Just to note again for your excellent help and advice.
.Burt











djencks wrote:
> 
> I don't have oracle set up here which makes it hard to test much.
> 
> Right now you have the persistence element in your geronimo plan set  
> up so that it's using the jdbc/ElvisPool configured later on in the  
> same plan.  While it was my idea originally to introduce the "ext- 
> module" stuff I now think its usually a bad idea.  In this case there  
> are no config-properties specified in the plan for the pool, so it's  
> not surprising that oracle can't figure out where the db is.
> 
>  From the end of your post it looks like you've set up a pool using  
> the wizard.  I'd recommend using that one.  So
> - remove the entire ext-module section from your plan.
> -  Change the persistence element so the jta-datasource is whatever  
> you named the datasource in the wizard-created pool.
> - Remove the oracle dependency from the plan and replace it with a  
> dependency on the wizard-created pool.
> - I don't know if you'll need the non-jta-datasource.  I strongly  
> recommend removing it until you find out you need it.  If present, it  
> absolutely needs to be a different datasource, with no-transaction  
> configured.
> 
> hope this helps
> david jencks
> 
> 
> 
> On Mar 4, 2008, at 5:07 PM, Burt Prior wrote:
> 
>>
>> Hi Jacek and David,
>>
>> Here is the stack trace of when I try to 'register' myself in the  
>> booking
>> application:
>> <snip>
>> and here is my 'jboss-seam-jee5-geronimo-plan.xml':
>>
>> <?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>
>>        	
>>        <!--  bprior added new dependency below per david jencks -->
>>
>>        <dependency>
>>         <groupId>concurrent</groupId>
>>         <artifactId>concurrent</artifactId>
>>         <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">
>>           <provider>org.hibernate.ejb.HibernatePersistence</provider>
>>           <jta-data-source>jdbc/ElvisPool</jta-data-source>
>>           <non-jta-data-source>jdbc/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.GeronimoTransactionMa 
>> nagerLookup"
>> />
>>
>>          <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
>>          <property name="hibernate.show_sql" value="true"/>
>>          <property  
>> name="hibernate.transaction.flush_before_completion"
>> value="true"/>
>>          <property name="hibernate.cache.provider_class"
>>               value="org.hibernate.cache.HashtableCacheProvider"/>
>>
>>           </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>jdbc/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>
>>
>>
>> and here is my 'persistence.xml':
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <persistence xmlns="http://java.sun.com/xml/ns/persistence"
>>              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>              xsi:schemaLocation="http://java.sun.com/xml/ns/ 
>> persistence
>> http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
>>              version="1.0">
>>    <persistence-unit name="bookingDatabase">
>>       <provider>org.hibernate.ejb.HibernatePersistence</provider>
>>       <jta-data-source>ElvisPool</jta-data-source>
>>       <properties>
>>          <!-- The following two properties are for Glassfish -->
>>          <property name="hibernate.dialect"
>> value="org.hibernate.dialect.OracleDialect"/>
>>          <property name="hibernate.transaction.manager_lookup_class"
>>
>> value="org.apache.geronimo.hibernate.transaction.GeronimoTransactionMa 
>> nagerLookup"/>
>>
>>
>>          <!-- The following three properties are OC4J -->
>>          <!--
>>          <property name="hibernate.dialect"
>>                    value="org.hibernate.dialect.HSQLDialect"/>
>>          <property name="hibernate.query.factory_class"
>>
>> value="org.hibernate.hql.classic.ClassicQueryTranslatorFactory"/>
>>          <property name="hibernate.transaction.manager_lookup_class"
>>
>> value="org.hibernate.transaction.OrionTransactionManagerLookup"/>
>>          -->
>>
>>          <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
>>          <property name="hibernate.show_sql" value="true"/>
>>          <property  
>> name="hibernate.transaction.flush_before_completion"
>> value="true"/>
>>          <property name="hibernate.cache.provider_class"
>>               value="org.hibernate.cache.HashtableCacheProvider"/>
>>       </properties>
>>    </persistence-unit>
>> </persistence>
>>
>>
>> I think the 'jta-data-source' is incorrect, but I've tried every  
>> example I
>> could find with no luck.
>>
>> I have my Geronimo database pool configured correctly with the  
>> usual Oracle
>> thin driver;
>>
>> <dependency>
>>    <groupId>console.dbpool</groupId>
>>     <artifactId>ElvisPool</artifactId>
>>     <version>1.0</version>
>>      <type>rar</type>
>> </dependency>
>>
>>
>> Could I ask for your help in this?  I'm just not able to connect to  
>> the
>> geronimo's database pool, and I'm not sure why.
>>
>> Thanks again,
>> .Burt
>>
>>
>>
>>
>> Jacek Laskowski wrote:
>>>
>>> On Mon, Mar 3, 2008 at 10:16 AM, Burt Prior <bprior@cisco.com> wrote:
>>>
>>>>  'java.sql.SQLException - invalid oracle url specified:
>>>>  OracleDataSource.makeURL'.
>>>
>>> Show the plan for the database pool and the entire stack trace. If
>>> oracle thin driver class barfs it could mean that the url is  
>>> incorrect
>>> which might be easy to fix. In the meantime write a sample jdbc
>>> program to connect to the database to make sure it can be connected
>>> from outside.
>>>
>>> Jacek
>>>
>>> -- 
>>> Jacek Laskowski
>>> http://www.JacekLaskowski.pl
>>>
>>>
>>
>> -- 
>> View this message in context: http://www.nabble.com/Geronimo-2.1- 
>> and-Seam-tp15621154s134p15840865.html
>> Sent from the Apache Geronimo - Users mailing list archive at  
>> Nabble.com.
>>
> 
> 
> 

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


Mime
View raw message