1 Reply Latest reply on May 14, 2004 10:14 AM by Darran Lofthouse

    Jboss-Db2 configuration

    skundurthi Newbie

      hello everybody,
      I am facing some difficulty in connecting to Db2 database from Jboss..
      Can anybody help me with the following issue..
      I wanted to connect to DB2 database from the Jboss Server..(Earlier we are able to connect to oracle)
      I am getting an error Invalid Argument Type SQLSTATE Hy009.I belive this is some thing to do with the driver..
      I am sending you an attachment of the Configuration file that helps to connect to database..


      <?xml version="1.0" encoding="UTF-8"?>

      <!-- ===================================================================== -->

      <!-- -->

      <!-- JBoss Server Configuration -->

      <!-- -->

      <!-- ===================================================================== -->

      <!-- $Id: db2-ds.xml,v 2003/09/05 16:38:24 patriot1burke Exp $ -->



      <connection-url>jdbc:db2://sjmemcrp2:50000/cris3</connection-url> ( sjmemcrp2 is the server where Db2 is residing,50000 is the default port where the database is and cris3 is the database name)

      <driver-class>COM.ibm.db2.jdbc.net.DB2Driver</driver-class>(i tried the other option jdbc.app instead of jdbc.net)




      <!-- sql to call when connection is created

      <new-connection-sql>some arbitrary sql</new-connection-sql>


      <!-- sql to call on an existing pooled connection when it is obtained from pool

      <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>



      The app server is never returning back to me sometimes..I mean it is trying to access the database for ever..

      Can anybody pl take a look at the configuration file and let me know what's going wrong?

      Anticipating your reply

        • 1. Re: Jboss-Db2 configuration
          Darran Lofthouse Master

          What is actually using the database connection?

          What is the full error message and stack trace?

          If it is a CMP entity bean have you configured the beans to use the DB2 mappings instead of the Oracle mappings that you were probably using earlier?

          If it is CMP beans is the error when the tables are created or when the data is accessed?