2 Replies Latest reply on Mar 19, 2003 8:02 PM by cibo_1

    OracleDS not bound

    Denise Oliveira Newbie

      Group,

      Please, I’m having a problem initializing Oracle Pool in JBoss (jboss-3.0.6).

      I’ve configure a xml service to create the pool (it comes below), and put

      classes12.zip at C:\jboss-3.0.6\lib.

      But, at the file C:\jboss-3.0.6\server\default\log\server.log I've fount an error:

      2003-03-18 14:08:02,988 ERROR [org.jboss.deployment.scanner.URLDeploymentScanner]

      MBeanException: Exception in MBean operation '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: ]
      2003-03-18 14:08:03,035 INFO [org.jboss.deployment.scanner.URLDeploymentScanner]

      Started



      I´m trying to access the JBoss pool via a class test, doing the following:

      htb.put(Context.INITIAL_CONTEXT_FACTORY,

      "org.jnp.interfaces.NamingContextFactory");
      htb.put(Context.PROVIDER_URL, "localhost");

      try{
      ictx = new InitialContext(htb);
      }
      catch (Exception e1){
      throw new SQLCmdException(20);
      }

      try {
      this.ds = (DataSource) ictx.lookup("OracleDS");
      }
      catch (Exception e2){
      throw new SQLCmdException(20);
      }


      But whenever I call this.ds = (DataSource) ictx.lookup(QUtil.getDataSource()), I get

      the following error: "OracleDS not bound". I think that it´s happening because I

      haven´t started the pool correctly. Does someone got the same error? Could someone

      help me?

      Thanks,

      Denise.




      ++++++++
      The xml service file: queriesdb-service.xml

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

      <!-- ===================================================================== -->
      <!-- -->
      <!-- JBoss Server Configuration -->
      <!-- -->
      <!-- ===================================================================== -->



      <!-- ==================================================================== -->
      <!-- ConnectionManager setup for Oracle dbs -->
      <!-- Build jmx-api (build/build.sh all) and view for config documentation -->
      <!-- Thanks to Steven Coy -->
      <!-- ==================================================================== -->




      <!-- Include a login module configuration named OracleDbRealm.
      Update your login-conf.xml, here is an example for a
      ConfiguredIdentityLoginModule:

      <application-policy name = "OracleDbRealm">

      <login-module code =

      "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required">
      <module-option name = "principal">oper</module-option>
      <module-option name = "userName">qol_aplic</module-option>
      <module-option name = "password">qol_aplic</module-option>
      <module-option name =

      "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=OracleDS</module-opt

      ion>
      </login-module>

      </application-policy>

      NOTE: the application-policy name attribute must match SecurityDomainJndiName,

      and the
      module-option name = "managedConnectionFactoryName"
      must match the object name of the ConnectionManager you are configuring here.
      -->
      <!--uncomment out this line if you are using the OracleDbRealm above
      OracleDbRealm
      -->

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


      OracleDS



      <config-property name="ConnectionURL"

      type="java.lang.String">jdbc:oracle:thin:@172.20.138.20:1521:oper</config-property>
      <config-property name="DriverClass"

      type="java.lang.String">oracle.jdbc.driver.OracleDriver</config-property>
      <config-property name="UserName"

      type="java.lang.String">qol</config-property>
      <config-property name="Password"

      type="java.lang.String">qol</config-property>




      <!--Below here are advanced properties -->
      <!--hack-->
      <depends

      optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=JBos

      s LocalTransaction JDBC Wrapper



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


      1
      50
      5000
      15
      <!--criteria indicates if Subject (from security domain) or app supplied
      parameters (such as from getConnection(user, pw)) are used to

      distinguish
      connections in the pool. Choices are
      ByContainerAndApplication (use both),
      ByContainer (use Subject),
      ByApplication (use app supplied params only),
      ByNothing (all connections are equivalent, usually if adapter supports
      reauthentication)-->
      ByContainer



      <depends

      optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnection

      Manager

      <depends

      optional-attribute-name="JaasSecurityManagerService">jboss.security:name=JaasSecurit

      yManager

      java:/TransactionManager

      <!--make the rar deploy! hack till better deployment-->
      jboss.jca:service=RARDeployer





        • 1. Re: OracleDS not bound
          David Jencks Master

          Don't put ANYTHING in $JBOSS_HOME/lib unless you REALLY know what you are doing.

          Put libraries such as the oracle driver in $JBOSS_HOME/server/default/lib. (or whatever [config]/lib is appropriate for the configuration you are running)

          • 2. Re: OracleDS not bound
            cibo_1 Newbie

            Hi, I have the same problem as mentioned above.
            However, I did put my jar/zip files in the jboss/server/default/lib directory.

            Is there anyone out there know how to fix this?

            Just for your information, i'll list in details of the steps that i've done:

            1. Copy the "classes12.jar" from "oracle/ora90/jdbc/lib" to the "jboss/server/default/lib" catalog. (the Oracle JDBC driver)

            2. Copy the "nls_charset12.jar" from "oracle/ora90/jdbc/lib" to the "jboss/server/default/lib" catalog. (Oralce language package)

            3. Copy the "ocrs12.jar" from "oracle/ora90/jdbc/lib" to the "jboss/server/default/lib" catalog. (don't remember)

            4. Copy the "jboss/docs/examples/jca/oracle-service.xml" file into the "jboss/server/default/deploy" catalog.

            5. Edit the file "jboss/server/default/deploy/oracle-service.xml":
            In the "OracleRealm" block
            <blabla..."UserName">yourOralceLogin</module-option>
            <blabla..."password">yourOraclePass</module-option>

            In the "ManagedConnectionFactoryProperties" block:
            <config-property name="ConnectionURL" type="java.lang.String">jdbc:oracle:thin@localhost:1521:yourDB</configure-property>

            localhost = your host (IP or DNS name) where you are running Oracle. An URL (eg "//oracle.foo.com" or "//129.129.129.129". Try both with and without "//")
            1521 = port no.
            yourDB = Oralce database name.

            <blabla...UserName"...>yourOracleLogin</config-property>
            <blabla...password"...>yourOraclePass</config-property>


            6. Edit the the first lines in the file "jboss/server/default/conf/standardjaws.xml":


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

            In /JBoss/server/default/conf/standardjbosscmp-jdbc.xml.
            Set

            java:/OracleDS
            <datasource-mapping>Oracle8</datasource-mapping>


            and the Messages when starting jboss:

            11:44:57,667 ERROR [URLDeploymentScanner] MBeanException: Exception in MBean operation '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: ]


            any help would be deeply appreciated.
            Thanks in advance.