5 Replies Latest reply on Apr 26, 2002 2:22 PM by Travel Maniac

    Got oracle service xml, now what?

    Travel Maniac Newbie

      I followed the instructions on the documentation on creating an oracleds-service.xml. It was deployed without any errors. But now how do I tell the system that oracle tables are what I want to use and not those of hypersonic? I read on the forum somewhere that you have to specify that in your .ear file? Is that true? Did I miss something in the online documentation on what to do after I deploy the service.xml file? A link to the right direction would be enough. Thanks.

      G

        • 1. Re: Got oracle service xml, now what?
          L Stitz Newbie

          Hey,

          I had the same problem just minutes ago, perhaps someone should add it to the FAQ? Or update the documentation on this...

          Here the thread where it was solved:

          http://jboss.org/forums/thread.jsp?forum=46&thread=14082

          Hope this did help.

          Regards,
          Lars

          • 2. Re: Got oracle service xml, now what?
            L Stitz Newbie

            Ok, for the benefit of the community: This one works for me, creating a datasource called OracleDS. Check if it works for you by putting it in a file called "oracle-service.xml" ...

            Contents of oracle-service.xml
            ------------------------------

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


            <!--make the rar deploy! hack till better deployment-->
            jboss.jca:service=RARDeployer
            <depends optional-attribute-name="ManagedConnectionFactoryName">
            <!--embedded mbean-->

            <!--hack-->
            <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=Minerva JDBC LocalTransaction ResourceAdapter
            <!--real attributes-->


            <config-property>
            <config-property-name>ConnectionURL</config-property-name>
            <config-property-type>java.lang.String</config-property-type>
            <config-property-value>jdbc:oracle:thin:@[HOST]:[PORT]:[SID]</config-property-value>
            </config-property>
            <config-property>
            <config-property-name>DriverClass</config-property-name>
            <config-property-type>java.lang.String</config-property-type>
            <config-property-value>oracle.jdbc.driver.OracleDriver</config-property-value>
            </config-property>
            <config-property>
            <config-property-name>UserName</config-property-name>
            <config-property-type>java.lang.String</config-property-type>
            <config-property-value>[USERNAME]</config-property-value>
            </config-property>
            <config-property>
            <config-property-name>Password</config-property-name>
            <config-property-type>java.lang.String</config-property-type>
            <config-property-value>[PASSWORD]</config-property-value>
            </config-property>


            OracleDS


            <depends optional-attribute-name="ManagedConnectionPool">
            <!--embedded mbean-->

            0
            50
            5000
            15
            ByContainer


            <depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager
            java:/TransactionManager



            Deploy this file, and point your browser to http://localhost:8082 ... Now there should be some entries like the following under jboss.jca:

            service=CachedConnectionManager
            service=JmsXACM
            service=JmsXADS
            service=JmsXAPool
            service=LocalTxCM,name=OracleDS
            service=LocalTxCM,name=hsqldbDS
            service=LocalTxDS,name=OracleDS
            service=LocalTxDS,name=hsqldbDS
            service=LocalTxPool,name=OracleDS
            service=LocalTxPool,name=hsqldbDS
            service=RARDeployer
            service=RARDeployment,name=JMS Adapter
            service=RARDeployment,name=Minerva JDBC LocalTransaction ResourceAdapter
            service=RARDeployment,name=Minerva JDBC XATransaction ResourceAdapter

            If so, you can access OracleDS.

            Happy to help,
            Lars

            • 3. Re: Got oracle service xml, now what?
              Travel Maniac Newbie

              Thanks. I copied and pasted Lars's oracle xml. And voila, on port 8082 of the server I see that OracleDS is now registered along side hsqlDS, just as Lars expected.

              HOWEVER, when I redeployed my .ear file, I keep getting repeated lines:
              nested throwable is: org.jboss.deployment.DeploymentException: OracleDS not bound

              What gives? I didn't change any of the standard files, only created a new oracle xml file and in my ear I put in a jaw.xml, which contains the following, hoping to override the default in standardjaw.xml. Anyone has any clue why OracleDS is still not deployed?

              Thanks.
              G

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


              java:/OracleDS
              <type-mapping>Oracle8</type-mapping>
              true

              <default-entity>
              <create-table>true</create-table>
              <remove-table>false</remove-table>
              <tuned-updates>true</tuned-updates>
              <read-only>false</read-only>
              <time-out>300</time-out>
              <row-locking>false</row-locking>
              <read-ahead>false</read-ahead>
              </default-entity>





              • 4. Re: Got oracle service xml, now what?
                David Jencks Master

                If you are restarting jboss and seeing this exception, it's possible that your ear is deployed before oracle-service.xml. In this case, try starting jboss, waiting for it to finish, then deploying your ear. A fairly easy way to make this happen automatically is to make a application directory, add it to the urls in the DeploymentScanner (last mbean in conf/jboss-service.xml), and put your .ear in the new folder.

                Also check jndiview to make sure OracleDS really is bound... maybe there is something wrong with your url or some such.

                • 5. Re: Got oracle service xml, now what?
                  Travel Maniac Newbie

                  Hmm, it's still not working. What do you mean by "really" bound? It's registered with jboss.jca along with hypersonic. I can click on one of the three links with the word "OracleDS" in it but I don't know how to tell that the next page is saying there's something wrong.

                  G