tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Romain Manni-Bucau (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (TOMEE-1266) Unable to configure a datasource with TomEE in context of Oracle Wallet
Date Thu, 03 Jul 2014 18:18:34 GMT

    [ https://issues.apache.org/jira/browse/TOMEE-1266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14051778#comment-14051778
] 

Romain Manni-Bucau commented on TOMEE-1266:
-------------------------------------------

Hi Thierry,

Is it the same adding DataSourceCreator = dbcp?

> Unable to configure a datasource with TomEE in context of Oracle Wallet
> -----------------------------------------------------------------------
>
>                 Key: TOMEE-1266
>                 URL: https://issues.apache.org/jira/browse/TOMEE-1266
>             Project: TomEE
>          Issue Type: Bug
>    Affects Versions: 1.6.0, 1.6.0.2
>         Environment: TomEE 1.5.1 to 1.6.0.2
> Oracle Wallet
>            Reporter: Thierry Beucher
>              Labels: Oracle, Wallet, datasource
>
> When configuring datasource with TomEE (here TomEE 1.5.1 but same with TomEE 1.6.0) for
use with Oracle Wallet like below, without *UserName* and *Password* properties ... 
> {code}
> <Resource id="jdbc/myDB" type="DataSource">
>   JdbcDriver oracle.jdbc.driver.OracleDriver
>   JdbcUrl    jdbc:oracle:thin:/@ACSCAC
>   IgnoreDefaultValues true
>   JtaManaged true 
>   InitialSize	10
>   MaxActive 32 
>   TestOnBorrow true 
>   PoolPreparedStatements true 
>   MaxOpenPreparedStatements 250
> </Resource>
> {code}
> ... the application failed with exception ...
> {code}
> Jul 2, 2014 11:42:17 AM org.apache.tomee.jdbc.TomEEDataSourceCreator$TomEEDataSource
<init>
> SEVERE: Can't create DataSource
> java.sql.SQLException: ORA-01005: null password given; logon denied
> 	at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440)
> 	at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:389)
> 	at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:382)
> 	at oracle.jdbc.driver.T4CTTIfun.processError(T4CTTIfun.java:573)
> 	at oracle.jdbc.driver.T4CTTIoauthenticate.processError(T4CTTIoauthenticate.java:431)
> 	at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:445)
> 	at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191)
> 	at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:366)
> 	at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:752)
> 	at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:366)
> 	at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:536)
> 	at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:228)
> 	at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
> 	at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521)
> 	at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:278)
> 	at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:182)
> 	at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:702)
> 	at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:634)
> 	at org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:488)
> 	at org.apache.tomcat.jdbc.pool.ConnectionPool.<init>(ConnectionPool.java:144)
> 	at org.apache.tomee.jdbc.TomEEDataSourceCreator$TomEEConnectionPool.<init>(TomEEDataSourceCreator.java:282)
> 	at org.apache.tomee.jdbc.TomEEDataSourceCreator$TomEEDataSource.createPool(TomEEDataSourceCreator.java:215)
> 	at org.apache.tomee.jdbc.TomEEDataSourceCreator$TomEEDataSource.<init>(TomEEDataSourceCreator.java:203)
> 	at org.apache.tomee.jdbc.TomEEDataSourceCreator.pool(TomEEDataSourceCreator.java:81)
> 	at org.apache.openejb.resource.jdbc.pool.PoolDataSourceCreator.poolManaged(PoolDataSourceCreator.java:64)
> 	at org.apache.openejb.resource.jdbc.DataSourceFactory.create(DataSourceFactory.java:118)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> 	at java.lang.reflect.Method.invoke(Unknown Source)
> 	at org.apache.xbean.recipe.ReflectionUtil$StaticFactory.create(ReflectionUtil.java:996)
> 	at org.apache.xbean.recipe.ObjectRecipe.internalCreate(ObjectRecipe.java:276)
> 	at org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:96)
> 	at org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:61)
> 	at org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:49)
> 	at org.apache.openejb.assembler.classic.Assembler.createResource(Assembler.java:1733)
> 	at org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:425)
> 	at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:344)
> 	at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:144)
> 	at org.apache.openejb.OpenEJB.init(OpenEJB.java:290)
> 	at org.apache.tomee.catalina.TomcatLoader.initialize(TomcatLoader.java:233)
> 	at org.apache.tomee.catalina.TomcatLoader.init(TomcatLoader.java:130)
> 	at org.apache.tomee.catalina.ServerListener.lifecycleEvent(ServerListener.java:121)
> 	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
> 	at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
> 	at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402)
> 	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:110)
> 	at org.apache.catalina.startup.Catalina.load(Catalina.java:633)
> 	at org.apache.catalina.startup.Catalina.load(Catalina.java:658)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> 	at java.lang.reflect.Method.invoke(Unknown Source)
> 	at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:281)
> 	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:450)
> {code}
> Digging in TomEE internals I found something strange in *TomEEDataSourceCreator* class
which is suspected to be the cause ...
> {code}
>         if (!converted.containsKey("password")) {
>             converted.setProperty("password", "");
>         }
> {code}
> ... which means the property *password* is set to an empty value even if it has been
willingly removed from the datasource configuration, conforming to Oracle Wallet usage. 
> Thus, it means this property is present while Oracle Wallet doesn't expect it.
> This may give a strong track to explain the "ORA-01005: null password given; logon denied"
SQLException if Oracle interprets a "blank" password as a "null" password.
> Questions :
> Is it really usefull to set the *password* property to blank instead of let it missing
? 
> Is there a workaround to permit usage with Oracle Wallet ?
> FYI Otherwise, the Oracle Wallet configuration must be assumed as correct because the
application works with a direct Tomcat (7.0.54) resource configuration like below :
> {code}
> <Resource auth="Container" 
>     driverClassName="oracle.jdbc.driver.OracleDriver" 
>     factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" 
>     name="jdbc/myDB" 
>     url="jdbc:oracle:thin:/@ACSGW" 
>     type="javax.sql.DataSource" 
>     initialSize="10"
>     maxActive="100" 
>     maxIdle = "5" 
>     minIdle="5"
>     testOnBorrow="true"
>     validationQuery="SELECT 1 FROM DUAL" 
>     validationInterval="30000" />
> {code}
>  



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message