7 Replies Latest reply on Jul 25, 2003 2:04 PM by nusa

    oracle-service.xml in 3.2.x

    kstogian

      Hello,
      we are currently using jboss 3.0.7 with oracle 9i configured in the oracle-service.xml.
      I am now trying to move our project to 3.2.2RC1
      and the oracle-service.xml deployment throws an exception. In the docs\examples\jca directory of 3.2.2RC1 there are no oracle-service.xml samples.
      Can somebody post a -service.xml file that works in 3.2.2RC1

      the exception i get is

      11:44:56,848 INFO [ServiceConfigurator] Problem configuring service jboss.jca:s
      ervice=LocalTxDS,name=OracleDS
      org.jboss.deployment.DeploymentException: No Attribute found with name: JndiName

      at org.jboss.system.ServiceConfigurator.configure(ServiceConfigurator.ja
      va:334)
      at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigura
      tor.java:176)
      at org.jboss.system.ServiceConfigurator.processDependency(ServiceConfigu
      rator.java:439)

      ...
      Thanks Kleandros.

        • 1. Re: oracle-service.xml in 3.2.x
          jonlee

          The naming nomenclature for datasources has changed from 3.2.x. The configuration is also simpler. A datasource must end with -ds.xml so that JBoss realizes it is a datasource configuration rather than an MBean type configuration. Use the oracle-ds.xml from the examples as your new template. It goes in your deploy directory as you would normally expect.

          Hope it helps.

          • 2. Re: oracle-service.xml in 3.2.x
            kstogian

            Thanks jonlee,
            the oracle-ds.xml works fine.

            • 3. Re: oracle-service.xml in 3.2.x
              arupsarkar

              Hi,

              I have a similar problem as you have, if you have resolved it could you please help me. I have configured oracle-ds.xml, and put it is the jboss_installation_dir/server/default/deploy, when I am trying to connect via ejb I am getting the following error.

              "15:14:05,566 INFO [STDOUT] javax.ejb.EJBException: Unable to connect to database. Table not found", I have the following code for look up.

              try {
              InitialContext ic = new InitialContext();
              DataSource ds = (DataSource) ic.lookup("java:comp/env/jdbc/OracleDS");
              con = ds.getConnection();

              String selectStatement =
              "select row_id, last_name, fst_name" +
              " from siebel.s_contact where last_name = ? ";
              PreparedStatement prepStmt = con.prepareStatement(selectStatement);

              prepStmt.setString(1, "Rubinetti");

              ResultSet rs = prepStmt.executeQuery();

              if (rs.next()) {
              System.out.println(rs.getString(1));
              System.out.println(rs.getString(2));
              System.out.println(rs.getString(3));
              }

              regards
              arup
              arupsarkar@yahoo.com

              • 4. Re: oracle-service.xml in 3.2.x
                frito

                Looks like the table "siebel.s_contact" was not found.

                Greetings,
                Frito

                • 5. Re: oracle-service.xml in 3.2.x
                  arupsarkar

                  Frito:
                  The table is there I checked it, actually I am not being able to connect to the database.

                  ""15:14:05,566 INFO [STDOUT] javax.ejb.EJBException: Unable to connect to database. Table not found",

                  Regards
                  Arup

                  • 6. Re: oracle-service.xml in 3.2.x
                    frito

                    But still looks like a database/network problem, since you can lookup the datasource and get the connection.

                    Greetings,
                    Frito

                    • 7. Re: oracle-service.xml in 3.2.x
                      nusa

                      Try to change from this :
                      DataSource ds = (DataSource) ic.lookup("java:comp/env/jdbc/OracleDS");
                      into this :
                      DataSource ds = (DataSource) ic.lookup("java:/OracleDS");

                      Have a look as well in the testsuite directory,where you have a lot of examples.

                      nusa