10 Replies Latest reply on Dec 5, 2002 1:33 AM by msnair

    How to configue an Oracle datasource in JBoss 3.0.4? - lets

    msnair

      Hello All,

      I have been trying to setup an Oracle datasource using JBoss 3.0.4, Oracle Thin JDBC drivers on Windows NT platform for about a week now. Still had no luck.

      Here are the steps I have been following:
      1. Install JBoss 3.0.4 (Non Tomcat version)
      2. Modify the %JBOSSDIR%\docs\examples\jca\oracle-xa-service.xml
      3. Changes made:
      a. MinSize, MaxSize (values 5, 15)
      b. URL=URL=jdbc:oracle:oci8:@tc was changed to
      URL=jdbc:oracle:thin:mytest/mytest@myserver:1521:ora817
      4. Put Oracle JDBC driver classes12.zip in %JBOSSDIR%\server\default\lib
      5. Bring up the server
      6. Copy the file oracle-xa-service.xml to %JBOSSDIR%\server\default\deploy

      Everything goes fine till this point.

      Meantime, on the console the following gets displayed:

      18:13:30,912 INFO [MainDeployer] Starting deployment of package: file:/Q:/jboss
      -3.0.4/jboss-3.0.4/server/default/deploy/oracle-xa-service.xml
      18:13:31,240 WARN [ServiceController] jboss.jca:service=XATxDS,name=XAOracleDS
      does not implement any Service methods
      18:13:31,240 INFO [JBossManagedConnectionPool] Creating
      18:13:31,240 INFO [JBossManagedConnectionPool] Created
      18:13:31,256 INFO [XATxConnectionManager] Creating
      18:13:31,256 INFO [XATxConnectionManager] Created
      18:13:31,271 INFO [JBossManagedConnectionPool] Starting
      18:13:31,271 INFO [JBossManagedConnectionPool] Started
      18:13:31,271 INFO [XATxConnectionManager] Starting
      18:13:31,506 INFO [XAOracleDS] Bound connection factory for resource adapter 'M
      inerva JDBC XATransaction ResourceAdapter' to JNDI name 'java:/XAOracleDS'
      18:13:31,506 INFO [XATxConnectionManager] Started
      18:13:31,506 INFO [MainDeployer] Deployed package: file:/Q:/jboss-3.0.4/jboss-3
      .0.4/server/default/deploy/oracle-xa-service.xml

      Now the problem:
      1. No Oracle database connections seemed to have been established

      Is there any step I am missing???

      Thanks for your time.

      Best Regards
      MS

        • 1. Re: How to configue an Oracle datasource in JBoss 3.0.4? - l
          tfk257

          I have followed the same steps that you have mentioned and faced the same problem.

          Please reply ASAP

          • 2. Re: How to configue an Oracle datasource in JBoss 3.0.4? - l
            msnair

            Hello,

            I am also facing the same error... Still looking for some help to get it resolved.

            regards
            MS

            • 3. Re: How to configue an Oracle datasource in JBoss 3.0.4? - l
              jecop

              have you tried:


              <config-property name="XADataSourceProperties"
              type="java.lang.String">URL=jdbc:oracle:thin:@myserver:1521:ora817</config-property>
              <config-property name="XADataSourceClass"
              type="java.lang.String">oracle.jdbc.xa.client.OracleXADataSource</config-property>
              <!--set these only if you want only default logins, not through JAAS -->
              <config-property name="UserName"
              type="java.lang.String">mytest</config-property>
              <config-property name="Password"
              type="java.lang.String">mytest</config-property>


              • 4. Re: How to configue an Oracle datasource in JBoss 3.0.4? - l
                msnair

                Hello Jeroen,

                Thanks for your time.

                Now, I am getting the following message on the console. Could you please have a look:

                10:03:42,237 INFO [MainDeployer] Starting deployment of package: file:/Q:/jboss
                -3.0.4/jboss-3.0.4/server/default/deploy/oracle-service.xml
                10:03:42,487 WARN [ServiceController] jboss.jca:service=LocalTxDS,name=OracleDS
                does not implement any Service methods
                10:03:42,487 INFO [JBossManagedConnectionPool] Creating
                10:03:42,487 INFO [JBossManagedConnectionPool] Created
                10:03:42,503 INFO [JBossManagedConnectionPool] Starting
                10:03:42,503 INFO [JBossManagedConnectionPool] Started
                10:03:42,503 INFO [MainDeployer] Deployed package: file:/Q:/jboss-3.0.4/jboss-3
                .0.4/server/default/deploy/oracle-service.xml
                10:03:42,596 ERROR [URLDeploymentScanner] MBeanException: Exception in MBean ope
                ration 'checkIncompleteDeployments()'
                Cause: Incomplete Deployment listing:
                Packages waiting for a deployer:

                Incompletely deployed packages:

                MBeans waiting for classes:

                MBeans waiting for other MBeans:
                [ObjectName: jboss.jca:service=LocalTxCM,name=OracleDS
                state: CONFIGURED
                I Depend On: jboss.jca:service=LocalTxDS,name=OracleDS
                jboss.jca:service=LocalTxPool,name=OracleDS
                jboss.jca:service=CachedConnectionManager
                jboss.security:name=JaasSecurityManager
                jboss.jca:service=RARDeployer

                Depends On Me: ]


                • 5. Re: How to configue an Oracle datasource in JBoss 3.0.4? - l
                  jerk

                  I think you can't change the connection url from jdbc:oracle:oci8:@tc to jdbc:oracle:thin:mytest/mytest@myserver:1521:ora817 because you are not using oracle thin driver (oracle.jdbc.driver.OracleDriver).

                  You are using oracle.jdbc.xa.client.OracleXADataSource (<config-property name="XADataSourceClass" type="java.lang.String">oracle.jdbc.xa.client.OracleXADataSource</config-property>).

                  That did'nt make any difference to me, I'm as stuck as you guys. Let's join our brains!!!

                  • 6. Re: How to configue an Oracle datasource in JBoss 3.0.4? - l
                    igorfie

                    Guys,

                    Even if you would be able to configure oracle xa datasource, JBoss 3.0.x does not support oracle in XA. Oracle provides pretty crapy xa drivers and we were not able to workaround all their (known) problems until 3.2. If you really need to do XA then you should get latest 3.2 from cvs, compile and use either oracle-xa-sirvice.xml or new simplified datasource configuration oracle-xa-ds.xml.

                    As for URL strings you can use either "jdbc:oracle:oci8:@hoststring" or "jdbc:oracle:thin:@youroraclehost:1521:yoursid". oci8 (a.k.a type 2) driver MUST be used you are using LOBs.

                    • 7. Re: How to configue an Oracle datasource in JBoss 3.0.4? - l
                      msnair

                      Hello Igor,

                      Thanks for the response...

                      I installed JBoss 3.2.0 Beta version and was able to setup an Oracle datasource (Non-XA) pretty easily. But now the problem is that I don't see any established Oracle database connections.

                      Does JBoss need to be restarted after datasource creation for taking connections??

                      Also, my XA Oracle datasource does not work.. It gives me error.

                      regards
                      MS

                      • 8. Re: How to configue an Oracle datasource in JBoss 3.0.4? - l
                        dnoyeb

                        my issue it that the JBoss does not respect my jaws.xml settings. therefore I had to change the names at the beginnings of

                        standardjbosscmp-jdbc.xml
                        and
                        standardjaws.xml

                        maybe just the jaws change is needed but I didnt test yet.

                        • 9. Re: How to configue an Oracle datasource in JBoss 3.0.4? - l
                          dnoyeb

                          See my real solution here http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t=forums/ requires an additional xml file in your jarfile.

                          • 10. Re: How to configue an Oracle datasource in JBoss 3.0.4? - l
                            msnair

                            Hello,

                            I moved to JBoss 3.2 Beta and was able to setup an Oracle Non-XA datasource quickly.

                            I am still working on configuring Oracle XA datasource.

                            regards
                            MS