2 Replies Latest reply on Jul 7, 2008 5:45 AM by Sandor Fiedler

    Jboss JNDI / Remote access to datasource

    Michael Porath Newbie

      Hi everyone,

      I'm accessing a datasource looked up through JNDI from a Java client using Ibatis framework from outside the container.

      When performing queries I always end up getting this error:

      java.lang.IllegalAccessException: Method=public abstract java.sql.Connection java.sql.Statement.getConnection() throws java.sql.SQLException does not return Serializable
      
      Stacktrace:
      org.jboss.resource.adapter.jdbc.remote.WrapperDataSourceService.doStatementMethod(WrapperDataSourceService.java:411),
      org.jboss.resource.adapter.jdbc.remote.WrapperDataSourceService.invoke(WrapperDataSourceService.java:223),
      sun.reflect.GeneratedMethodAccessor106.invoke(Unknown Source),
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25),
      java.lang.reflect.Method.invoke(Method.java:585),
      org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155),
      org.jboss.mx.server.Invocation.dispatch(Invocation.java:94),
      org.jboss.mx.server.Invocation.invoke(Invocation.java:86),
      org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264),
      org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659),
      


      My Datasource:
      <?xml version="1.0" encoding="UTF-8"?>
       <datasources>
       <local-tx-datasource>
       <jndi-name>jdbc/xxxxxDS</jndi-name>
       <connection-url>jdbc:oracle:thin:@xxxxxxxxx:1521:xxxxxxx</connection-url>
       <use-java-context>false</use-java-context>
       <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
       <user-name>xxxxxxxx</user-name>
       <password>xxxxxx</password>
       <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
       <min-pool-size>5</min-pool-size>
       <max-pool-size>20</max-pool-size>
       </local-tx-datasource>
       </datasources>
      


      I'm using JBoss 4.0.4.GA. Any help is much appreciated!

      Thanks in advance,

      Michael