4 Replies Latest reply on May 7, 2003 12:37 AM by Edwin Litterst

    migrating oracle connection to jboss3.2

    Edwin Litterst Newbie

      I tried to move my running code to jboss3.2, but I couldn't establish a connection to oracle. I noticed that the deploy file has changed to oracle-ds.xml and that it's a format quite different from the old oracle-service.xml. Lookup of the datasource works (though I had to change the lookup string), but getConnection fails. I am using the same connection-url as with 3.0.7:
      jdbc:oracle:thin:login/passw@myIP:1521:osdb01
      and I also tried to pass loginid and password with <user-name> and instead as part of the connection string.
      What am I doing still wrong?

      And also my source code doesn't work the same way as before. I was using LocalConnection and getUnderlyingConnection because I am doing oracle specific stuff, but LocalConnection doesn't seem to be contained in this version. At least it is no longer contained in jms-ja.rar

      Eddie

        • 1. Re: migrating oracle connection to jboss3.2
          David Jencks Master

          LocalConnection has been replaced with org.jboss.resource.adapter.jdbc.WrappedConnection (note different package).

          stack trace of the problem getting a connection?

          • 2. Re: migrating oracle connection to jboss3.2
            Edwin Litterst Newbie

            Ok, I'll use WrappedConnection now.
            I also solved the problem with getConnection which was my fault (I put classes12.zip accidentally into the wrong server's lib directory.)

            Thanks for your help,
            Eddie

            • 3. Re: migrating oracle connection to jboss3.2
              Donald Newbie

              Do you have the resolve? I am having issues in getting the connection. I set up the pool correctly. I used the new xxx-ds.xml and I see the pool set up correctly. I get a class cast exception when I do a getConnection() in source code. I see that the datasource object is not null. the .toString() ont he DSO is

              ERR] java.lang.ClassCastException
              15:48:01,697 ERROR [STDERR] at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.getXADataSource(XAManagedConnectionFactory.java:240)
              15:48:01,697 ERROR [STDERR] at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.createManagedConnection(XAManagedConnectionFactory.java:137)
              15:48:01,697 ERROR [STDERR] at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnection(InternalManagedConnectionPool.java:352)
              15:48:01,697 ERROR [STDERR] at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:151)
              15:48:01,697 ERROR [STDERR] at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool.getConnection(JBossManagedConnectionPool.java:648)

              • 4. Re: migrating oracle connection to jboss3.2
                Edwin Litterst Newbie

                After setting up the pool and environment correctly it worked for me.
                Looking at your error messages I would assume that you need oracle-xa-ds.xml instead of oracle-ds.xml or whichever database you are using.

                Eddie