« Return to Thread: New Cargo 1.0 plugin fails to configure Tomcat in our environment

New Cargo 1.0 plugin fails to configure Tomcat in our environment

by Vogelsang, Jeff :: Rate this Message:

Reply to Author | View in Thread

Some parts of this message have been removed. Learn more about Nabble's security policy.

Hello,

 

I was going recently attempted to update our cargo maven2 plugin from 1.0-beta-2 to 1.0 release version. Unfortunately, it breaks our current Tomcat 6.0.18 configuration. I played with it for a while to see if I could find the fix, but I was not successful. Basically prior to 1.0, cargo was configuring a datasource properly and everything was ok. Cargo 1.0 configures the datasource differently, and the new way doesn’t work. The configurations are significantly different. Literally swapping out the plugin for the old version gets me working again. Any ideas on why this is happening or how to fix it?

 

Our Config:

 

<cargo.datasource.datasource.default>

                cargo.datasource.driver= oracle.jdbc.OracleDriver |

                cargo.datasource.url= jdbc:oracle:thin:@localhost:1521:xe |

                cargo.datasource.jndi=EISDS|

                cargo.datasource.username=blah|

                cargo.datasource.password=blah

</cargo.datasource.datasource.default>

 

Old way from 1.0-beta-2 (worked):

 

In server.xml :

 

<Resource name='EISDS'

    auth='Container'

    type='javax.sql.DataSource'

    username='blah'

    password='blah'

    driverClassName='oracle.jdbc.OracleDriver'

    url='jdbc:oracle:thin:@localhost:1521:xe'/>

                <Resource jotm.timeout='60' factory='org.objectweb.jotm.UserTransactionFactory' name='UserTransaction' type='javax.transaction.UserTransaction' auth='Container'>

</Resource>

 

New way from 1.0 (doesn’t work):

 

In context.xml

 

<Context>

  <Resource name="EISDS" type="javax.sql.DataSource" auth="Container" factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory" user="blah" password="blah" url="jdbc:oracle:thin:@localhost:1521:xe" driverClassName="oracle.jdbc.OracleDriver"/>

  <Transaction factory="org.objectweb.jotm.UserTransactionFactory"/>

</Context>

 

Error:

 

[INFO] [talledLocalContainer] WARN 2009-07-01 20:05:32,055 [main] JDBCExceptionReporter.logExceptions(100) | SQL Error: 0, SQLState: null

[INFO] [talledLocalContainer] ERROR 2009-07-01 20:05:32,057 [main] JDBCExceptionReporter.logExceptions(101) | Cannot create PoolableConnectionFactory (ORA-01017: invalid username/password; logon denied

[INFO] [talledLocalContainer] )

[INFO] [talledLocalContainer] WARN 2009-07-01 20:05:32,059 [main] SettingsFactory.buildSettings(144) | Could not obtain connection metadata

[INFO] [talledLocalContainer] org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (ORA-01017: invalid username/password; logon denied

[INFO] [talledLocalContainer] )

[INFO] [talledLocalContainer]   at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1225)

[INFO] [talledLocalContainer]   at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)

INFO] [talledLocalContainer]   at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:82)

 

I know the password works here. I just swap out the maven plugin for 1.0-beta-2 and all is well.

 

Thanks!

 

J

 « Return to Thread: New Cargo 1.0 plugin fails to configure Tomcat in our environment