geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hernan Cunico <hcun...@gmail.com>
Subject Re: Problem creating a DB2 datasource
Date Mon, 31 Mar 2008 16:20:02 GMT
I found some issues as well while deploying a pool using the db2 specific connector although
my testing was on G 2.1. I'll repeat these on 2.0.2 as soon as I can.

If I use the "generic" tranql connector the pool deploys OK with the appropriate plan and
I can access the DB via such pool.

If I use the tranql-connector-db2-xa connector with the corresponding deployment plan it will
deploy OK but it fail when accessing the DB, here is the exception:

11:00:33,781 ERROR [MCFConnectionInterceptor] Error occurred creating ManagedConnection for
org.apache.geronimo.connector.outbound.ConnectionInfo@11dc32b
javax.resource.spi.ResourceAdapterInternalException: Unable to obtain physical connection
to com.ibm.db2.jcc.DB2XADataSource@15be8ff
       at org.tranql.connector.jdbc.AbstractXADataSourceMCF.getPhysicalConnection(AbstractXADataSourceMCF.java:76)
       at org.tranql.connector.db2.XAMCF.createManagedConnection(XAMCF.java:59)
       at org.apache.geronimo.connector.outbound.MCFConnectionInterceptor.getConnection(MCFConnectionInterceptor.java:48)
       at org.apache.geronimo.connector.outbound.LocalXAResourceInsertionInterceptor.getConnection(LocalXAResourceInsertionInterceptor.java:41)
       at org.apache.geronimo.connector.outbound.SinglePoolConnectionInterceptor.internalGetConnection(SinglePoolConnectionInterceptor.java:70)
       at org.apache.geronimo.connector.outbound.AbstractSinglePoolConnectionInterceptor.getConnection(AbstractSinglePoolConnectionInterceptor.java:80)
       at org.apache.geronimo.connector.outbound.TransactionEnlistingInterceptor.getConnection(TransactionEnlistingInterceptor.java:46)
       at org.apache.geronimo.connector.outbound.TransactionCachingInterceptor.getConnection(TransactionCachingInterceptor.java:94)
       ...
Caused by: com.ibm.db2.jcc.b.SqlException: [ibm][db2][jcc][10257][10960] Unable to open file
.
       at com.ibm.db2.jcc.b.ch.a(ch.java:111)
       at com.ibm.db2.jcc.DB2BaseDataSource.computePrintWriter(DB2BaseDataSource.java:2900)
       at com.ibm.db2.jcc.DB2BaseDataSource.computeJccLogWriter(DB2BaseDataSource.java:2812)
       at com.ibm.db2.jcc.DB2BaseDataSource.computeJccLogWriterForNewConnection(DB2BaseDataSource.java:2792)
       at com.ibm.db2.jcc.DB2BaseDataSource.computeJccLogWriterForNewConnection(DB2BaseDataSource.java:2756)
       at com.ibm.db2.jcc.DB2XADataSource.getXAConnection(DB2XADataSource.java:73)
       at org.tranql.connector.jdbc.AbstractXADataSourceMCF.getPhysicalConnection(AbstractXADataSourceMCF.java:74)
       ... 33 more
com.ibm.db2.jcc.b.SqlException: [ibm][db2][jcc][10257][10960] Unable to open file .
       at com.ibm.db2.jcc.b.ch.a(ch.java:111)
       ...

I created the deployment plan using the Geronimo database pool wizard after adding the 2 (db2jcc-9.1.2.jar
and db2jcc_license_cu-9.1.2.jar) DB2 drivers to the repo.

Cheers!
Hernan


David Jencks wrote:
> I'm not sure where you got the prototype for your plan, but I doubt it 
> was the documentation you linked to, unless someone has completely  
> revised that documentation since your first post.  Your plan uses the 
> geronimo 1.0 plan syntax which is incompatible with geronimo 1.1 and 
> later, whereas the plan in the docs looks up to date.
> 
> The easiest way to get a working plan is to use the admin console wizard 
> to generate it.  I suggest using the wizard to generate the plan and 
> then deploying using the command line.  This way you can easily study 
> and modify the plan as needed.
> 
> thanks
> david jencks
> 
> On Mar 28, 2008, at 7:47 PM, SKService wrote:
> 
>>
>> Thankyou for your fruitful reply. But still I'm stuck.
>> First, I already have "tranql-connector-db2-xa-1.1" under the path
>> "repository/org/tranql/tranql-connector-db2-xa/1.1/tranql-connector-db2-xa-1.1.rar"

>>
>> . But I'm confused in using it because I'm not sure where in the plan 
>> to add
>> the deployment plan tag referred by you,
>>    <external-path
>> xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">
>>      <dep:groupId>org.tranql</dep:groupId>
>>      <dep:artifactId>tranql-connector-db2-xa</dep:artifactId>
>>      <dep:type>rar</dep:type>
>>    </external-path>
>>
>> Second, I've tried after correcting the command parameter sequence. The
>> corrected command (with my old setup) is,
>> deploy --user system --password manager deploy
>> ..\repository\org\tranql\tranql-connector-ra\1.4\tranql-connector-ra-1.4.rar 
>>
>>
>> Please take a look at the error pasted below, which also has the plan. 
>> and
>> suggested whether my plan needs to be corrected.
>>
>> Appreciate your help.
>>
>> C:\geronimo-tomcat6-jee5-2.0.2\bin>deploy --user system --password 
>> manager
>> deploy
>> ..\repository\org\tranql\tranql-connector-ra\1.4\tranql-connector-ra-1.4.rar 
>>
>>    C:\geronimo-tomcat6-jee5-2.0.2\bin\db2-geronimo-plan.xml
>> Using GERONIMO_BASE:   C:\geronimo-tomcat6-jee5-2.0.2
>> Using GERONIMO_HOME:   C:\geronimo-tomcat6-jee5-2.0.2
>> Using GERONIMO_TMPDIR: var\temp
>> Using JRE_HOME:        C:\Program Files\Java\jdk1.5.0_06\jre
>>     Error: Unable to distribute tranql-connector-ra-1.4.rar:
>>     org.apache.geronimo.common.DeploymentException: Could not parse
>>     module descriptor
>>
>>         Could not parse module descriptor
>>
>>         Invalid deployment descriptor: errors:
>>
>>
>>     C:\geronimo-tomcat6-jee5-2.0.2\bin\db2-geronimo-plan.xml:2:1: error:
>>     cvc-complex-type.3.2.1: Attribute not allowed (no wildcards
>>     allowed): configId in element
>>     connector@http://geronimo.apache.org/xml/ns/j2ee/connector-1.2
>>
>>
>>     C:\geronimo-tomcat6-jee5-2.0.2\bin\db2-geronimo-plan.xml:15:3:
>>     error: cvc-complex-type.2.4a: Expected element
>>     
>> 'resourceadapter@http://geronimo.apache.org/xml/ns/j2ee/connector-1.2'
>>     instead of
>>     'dependency@http://geronimo.apache.org/xml/ns/j2ee/connector-1.2'
>>     here in element
>>     connector@http://geronimo.apache.org/xml/ns/j2ee/connector-1.2
>>
>>
>>     C:\geronimo-tomcat6-jee5-2.0.2\bin\db2-geronimo-plan.xml:19:3:
>>     error: cvc-complex-type.2.4a: Expected element
>>     
>> 'resourceadapter@http://geronimo.apache.org/xml/ns/j2ee/connector-1.2'
>>     instead of
>>     'dependency@http://geronimo.apache.org/xml/ns/j2ee/connector-1.2'
>>     here in element
>>     connector@http://geronimo.apache.org/xml/ns/j2ee/connector-1.2
>>
>>
>>     C:\geronimo-tomcat6-jee5-2.0.2\bin\db2-geronimo-plan.xml:23:3:
>>     error: cvc-complex-type.2.4a: Expected element
>>     
>> 'resourceadapter@http://geronimo.apache.org/xml/ns/j2ee/connector-1.2'
>>     instead of
>>     'dependency@http://geronimo.apache.org/xml/ns/j2ee/connector-1.2'
>>     here in element
>>     connector@http://geronimo.apache.org/xml/ns/j2ee/connector-1.2
>>
>>
>>     Descriptor:
>>
>>     <xml-fragment configId="user/database-pool-DB2_Test/1/car"
>>     xmlns:con="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2">
>>
>>       <!--#####        COMMENT OUT THIS SECTION      #####-->
>>
>>       <!---->
>>
>>       <!--<dep:dependency
>>     xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.0">-->
>>
>>   <!--<dep:uri>db2/db2jcc/8.1.7/jar</dep:uri>-->
>>
>>   <!--</dep:dependency>-->
>>
>>   <!--##### ADD THE FOLLOWING THREE DEPENDENCIES #####-->
>>
>>   <con:dependency>
>>
>>     <con:uri>db2/db2jcc/8.1.7/jar</con:uri>
>>
>>   </con:dependency>
>>
>>   <con:dependency>
>>
>>     <con:uri>db2/db2jcc_license_cu/8.1.7/jar</con:uri>
>>
>>   </con:dependency>
>>
>>   <con:dependency>
>>
>>     <con:uri>db2/db2jcc_license_cisuz/8.1.7/jar</con:uri>
>>
>>   </con:dependency>
>>
>>   <!--#####  THE REMAINING PART DOES NOT CHANGE  #####-->
>>
>>   <con:resourceadapter>
>>
>>     <con:outbound-resourceadapter>
>>
>>       <con:connection-definition>
>>
>>
>> <con:connectionfactory-interface>javax.sql.DataSource</con:connectionfactory-interface>

>>
>>
>>         <con:connectiondefinition-instance>
>>
>>           <con:name>DB2_TEST1</con:name>
>>
>>           <con:config-property-setting
>> name="Password">db2admin</con:config-property-setting>
>>
>>           <con:config-property-setting
>> name="CommitBeforeAutocommit">false</con:config-property-setting>
>>
>>           <con:config-property-setting
>> name="Driver">com.ibm.db2.jcc.DB2Driver</con:config-property-setting>
>>
>>           <con:config-property-setting
>> name="ExceptionSorterClass">org.tranql.connector.AllExceptionsAreFatalSorter</con:config-property-setting>

>>
>>
>>           <con:config-property-setting
>> name="UserName">db2admin</con:config-property-setting>
>>
>>           <con:config-property-setting
>> name="ConnectionURL">jdbc:db2://localhost:50000/TEST1</con:config-property-setting>

>>
>>
>>           <con:connectionmanager>
>>
>>             <con:local-transaction/>
>>
>>             <con:single-pool>
>>
>>               <con:match-one/>
>>
>>             </con:single-pool>
>>
>>           </con:connectionmanager>
>>
>>         </con:connectiondefinition-instance>
>>
>>       </con:connection-definition>
>>
>>     </con:outbound-resourceadapter>
>>
>>   </con:resourceadapter>
>>
>> </xml-fragment>
>> -- 
>> View this message in context: 
>> http://www.nabble.com/Problem-creating-a-DB2-datasource-tp16344329s134p16366049.html

>>
>> Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
>>
> 
> 


Mime
View raw message