geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Blevins <david.blev...@visi.com>
Subject Re: Geronimo 2.1 and Seam
Date Thu, 06 Mar 2008 23:59:58 GMT

On Mar 6, 2008, at 1:30 PM, Burt Prior wrote:

> ...
> 13:16:36,385 INFO  [OpenEJB] invoking method create on
> jboss-seam.jar/EjbSynchronizations
> 13:16:36,385 INFO  [OpenEJB] finished invoking method create
> 13:16:36,495 INFO  [Transaction] TX Required: Started transaction
> org.apache.geronimo.transaction.manager.TransactionImpl@13a6ecc
> 13:16:36,495 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)
> ...
> 13:16:36,495 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)
> ...
>
> I'm really stuck on this. Any idea's on how I can resolve this last  
> error?

This it seems like some code is trying to call  
InvocationContext.getParameters() from inside a lifecycle method.

I can't find a reference to this in the spec, but the TCK definitely  
says this must throw an IllegalStateException.

-David

> 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-tp15621154s134p15884374.html
> Sent from the Apache Geronimo - Users mailing list archive at  
> Nabble.com.
>
>


Mime
View raw message