7 Replies Latest reply: Mar 8, 2012 4:29 AM by guinotphil RSS

Problem with OracleValidConnectionChecker in 7.1.0 final

Guenther Bodlak Newbie

Hi,

 

I have the following datasource config in my standalone.xml:

 

{code:xml}

<datasource jta="true" jndi-name="java:jboss/datasources/isDS" pool-name="isDS_Pool" enabled="true" use-java-context="true" use-ccm="true">

    <connection-url>jdbc:oracle:thin:@MyHost:1539:IDEV</connection-url>

    <driver>ojdbc6</driver>

    <pool>

        <min-pool-size>1</min-pool-size>

        <max-pool-size>10</max-pool-size>

        <prefill>false</prefill>

        <use-strict-min>false</use-strict-min>

        <flush-strategy>FailingConnectionOnly</flush-strategy>

    </pool>

    <security>

        <user-name>isdev</user-name>

        <password>some-password</password>

    </security>

    <validation>

        <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleValidConnectionChecker"/>

        <validate-on-match>false</validate-on-match>

        <background-validation>false</background-validation>

        <use-fast-fail>false</use-fast-fail>

        <stale-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleStaleConnectionChecker"/>

        <exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleExceptionSorter"/>

    </validation>

    <timeout>

        <blocking-timeout-millis>30000</blocking-timeout-millis>

        <idle-timeout-minutes>10</idle-timeout-minutes>

        <use-try-lock>60</use-try-lock>

        <allocation-retry>0</allocation-retry>

        <allocation-retry-wait-millis>5000</allocation-retry-wait-millis>

    </timeout>

    <statement>

        <track-statements>TRUE</track-statements>

        <prepared-statement-cache-size>100</prepared-statement-cache-size>

    </statement>

</datasource>

{code}

 

I get the following exception logged when I use a connection from the datasource.

The code using the datasource works - but the connection-checker gets disabled:

 

{code}

10:41:07,833 WARN  [org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory] (http--127.0.0.1-8080-1) Exception trying to create valid connection checker (disabling):: java.lang.RuntimeException: Unable to resolve pingDatabase method:

    at org.jboss.jca.adapters.jdbc.extensions.oracle.OracleValidConnectionChecker.<init>(OracleValidConnectionChecker.java:65)

    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.7.0_02]

    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) [rt.jar:1.7.0_02]

    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [rt.jar:1.7.0_02]

    at java.lang.reflect.Constructor.newInstance(Constructor.java:525) [rt.jar:1.7.0_02]

    at java.lang.Class.newInstance0(Class.java:372) [rt.jar:1.7.0_02]

    at java.lang.Class.newInstance(Class.java:325) [rt.jar:1.7.0_02]

    at org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnectionFactory.loadPlugin(BaseWrapperManagedConnectionFactory.java:1085)

    at org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnectionFactory.isValidConnection(BaseWrapperManagedConnectionFactory.java:1158)

    at org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnection.checkValid(BaseWrapperManagedConnection.java:454)

    at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.matchManagedConnections(LocalManagedConnectionFactory.java:507)

    at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.getConnection(SemaphoreArrayListManagedConnectionPool.java:282)

    at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getSimpleConnection(AbstractPool.java:400)

    at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getConnection(AbstractPool.java:365)

    at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:329)

    at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:368)

    at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:464)

    at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:129)

    at inet.module.loginmodule.JaasDbLoginModule.getSQLConnection(JaasDbLoginModule.java:285) [loginModule-0.0.1-SNAPSHOT.jar:]

    at inet.module.loginmodule.JaasDbLoginModule.authenticate(JaasDbLoginModule.java:237) [loginModule-0.0.1-SNAPSHOT.jar:]

    at inet.module.loginmodule.JaasDbLoginModule.login(JaasDbLoginModule.java:128) [loginModule-0.0.1-SNAPSHOT.jar:]

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_02]

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_02]

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_02]

    at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_02]

    at javax.security.auth.login.LoginContext.invoke(LoginContext.java:784) [rt.jar:1.7.0_02]

    at javax.security.auth.login.LoginContext.access$000(LoginContext.java:203) [rt.jar:1.7.0_02]

    at javax.security.auth.login.LoginContext$4.run(LoginContext.java:698) [rt.jar:1.7.0_02]

    at javax.security.auth.login.LoginContext$4.run(LoginContext.java:696) [rt.jar:1.7.0_02]

    at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.7.0_02]

    at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:695) [rt.jar:1.7.0_02]

    at javax.security.auth.login.LoginContext.login(LoginContext.java:594) [rt.jar:1.7.0_02]

    at org.jboss.security.authentication.JBossCachedAuthenticationManager.defaultLogin(JBossCachedAuthenticationManager.java:449) [picketbox-infinispan-4.0.6.final.jar:4.0.6.final]

    at org.jboss.security.authentication.JBossCachedAuthenticationManager.proceedWithJaasLogin(JBossCachedAuthenticationManager.java:383) [picketbox-infinispan-4.0.6.final.jar:4.0.6.final]

    at org.jboss.security.authentication.JBossCachedAuthenticationManager.authenticate(JBossCachedAuthenticationManager.java:371) [picketbox-infinispan-4.0.6.final.jar:4.0.6.final]

    at org.jboss.security.authentication.JBossCachedAuthenticationManager.isValid(JBossCachedAuthenticationManager.java:160) [picketbox-infinispan-4.0.6.final.jar:4.0.6.final]

    at org.jboss.as.web.security.JBossWebRealm.authenticate(JBossWebRealm.java:215) [jboss-as-web-7.1.0.Final.jar:7.1.0.Final]

    at org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthenticator.java:180) [jbossweb-7.0.10.Final.jar:]

    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:455) [jbossweb-7.0.10.Final.jar:]

    at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.1.0.Final.jar:7.1.0.Final]

    at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:154) [jboss-as-web-7.1.0.Final.jar:7.1.0.Final]

    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.10.Final.jar:]

    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.10.Final.jar:]

    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.10.Final.jar:]

    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.10.Final.jar:]

    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.10.Final.jar:]

    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.10.Final.jar:]

    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.10.Final.jar:]

    at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_02]

Caused by: java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleConnection from [Module "org.jboss.ironjacamar.jdbcadapters:main" from local module loader @1bc26ee (roots: D:\appl\aik\jboss-as-7.1.0.Final\modules)]

    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)

    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)

    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)

    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)

    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)

    at java.lang.Class.forName0(Native Method) [rt.jar:1.7.0_02]

    at java.lang.Class.forName(Class.java:264) [rt.jar:1.7.0_02]

    at org.jboss.jca.adapters.jdbc.extensions.oracle.OracleValidConnectionChecker.initPing(OracleValidConnectionChecker.java:100)

    at org.jboss.jca.adapters.jdbc.extensions.oracle.OracleValidConnectionChecker.<init>(OracleValidConnectionChecker.java:61)

    ... 48 more

{code}

 

 

Is this a bug or am I missing something?

 

Thanks for you help

Günther