1 Reply Latest reply on Jan 1, 2002 9:02 AM by David Jencks

    OracleDS not found exception when deloying CMP bean

    amitesh chandra Newbie

      Hi
      I am trying to deploy a simple CMP entity bean.I am using oracle8i as my database.When i am starting jboss it's thow exception.OracleDS not found....Please help me.......Is there any change required in jboss.jcml file

      Error is like this:
      [Container factory] Deploying StudentBean
      [Container factory] org.jboss.ejb.DeploymentException: OracleDS not bound
      [Container factory] at org.jboss.ejb.plugins.jaws.metadata.JawsApplicationMe
      taData.init(JawsApplicationMetaData.java:120)
      [Container factory] at org.jboss.ejb.plugins.jaws.metadata.JawsXmlFileLoader
      .load(JawsXmlFileLoader.java:75)
      [Container factory] at org.jboss.ejb.plugins.jaws.jdbc.JDBCCommandFactory.<i
      nit>(JDBCCommandFactory.java:133)
      [Container factory] at org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.ini
      t(JAWSPersistenceManager.java:83)
      [Container factory] at org.jboss.ejb.plugins.CMPPersistenceManager.init(CMPP
      ersistenceManager.java:110)
      [Container factory] at org.jboss.ejb.EntityContainer.init(EntityContainer.ja
      va:291)
      [Container factory] at org.jboss.ejb.Application.init(Application.java:202)
      [Container factory] at org.jboss.ejb.ContainerFactory.deploy(ContainerFactor
      y.java:372)
      [Container factory] at org.jboss.ejb.ContainerFactory.deploy(ContainerFactor
      y.java:304)
      [Container factory] at java.lang.reflect.Method.invoke(Native Method)
      [Container factory] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanSe
      rverImpl.java:1628)
      [Container factory] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanSe
      rverImpl.java:1523)
      [Container factory] at org.jboss.deployment.J2eeDeployer.startModules(J2eeDe
      ployer.java:494)
      [Container factory] at org.jboss.deployment.J2eeDeployer.startApplication(J2
      eeDeployer.java:468)
      [Container factory] at org.jboss.deployment.J2eeDeployer.deploy(J2eeDeployer
      .java:208)
      [Container factory] at java.lang.reflect.Method.invoke(Native Method)
      [Container factory] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanSe
      rverImpl.java:1628)
      [Container factory] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanSe
      rverImpl.java:1523)
      [Container factory] at org.jboss.ejb.AutoDeployer.deploy(AutoDeployer.java:3
      79)
      [Container factory] at org.jboss.ejb.AutoDeployer.run(AutoDeployer.java:217)

      [Container factory] at java.lang.Thread.run(Thread.java:484)
      [J2EE Deployer Default] Starting student.jar failed!
      [Default] org.jboss.ejb.DeploymentException: Could not deploy file:/C:/jboss/JBo
      ss-2.4.3/tmp/deploy/Default/student.jar/, Cause:org.jboss.ejb.DeploymentExceptio
      n: OracleDS not bound
      [Default] at org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:4
      01)
      [Default]
      [Default] at org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:3
      04)
      [Default]
      [Default] at java.lang.reflect.Method.invoke(Native Method)
      [Default]
      [Default] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
      .java:1628)
      [Default]
      [Default] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
      .java:1523)
      [Default]
      [Default] at org.jboss.deployment.J2eeDeployer.startModules(J2eeDeployer.j
      ava:494)
      [Default]
      [Default] at org.jboss.deployment.J2eeDeployer.startApplication(J2eeDeploy
      er.java:468)
      [Default]
      [Default] at org.jboss.deployment.J2eeDeployer.deploy(J2eeDeployer.java:20
      8)
      [Default]
      [Default] at java.lang.reflect.Method.invoke(Native Method)
      [Default]
      [Default] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
      .java:1628)
      [Default]
      [Default] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
      .java:1523)
      [Default]
      [Default] at org.jboss.ejb.AutoDeployer.deploy(AutoDeployer.java:379)
      [Default]
      [Default] at org.jboss.ejb.AutoDeployer.run(AutoDeployer.java:217)
      [Default]
      [Default] at java.lang.Thread.run(Thread.java:484)
      [Default]
      [J2EE Deployer Default] Module student.jar is not running
      [J2EE Deployer Default] Destroying application student.jar
      [AutoDeployer] Deployment failed:file:/C:/jboss/JBoss-2.4.3/deploy/student.jar
      [AutoDeployer] org.jboss.deployment.J2eeDeploymentException: Error while startin
      g student.jar: Could not deploy file:/C:/jboss/JBoss-2.4.3/tmp/deploy/Default/st
      udent.jar/, Cause: org.jboss.ejb.DeploymentException: Could not deploy file:/C:/
      jboss/JBoss-2.4.3/tmp/deploy/Default/student.jar/, Cause:org.jboss.ejb.Deploymen
      tException: OracleDS not bound
      [AutoDeployer] at org.jboss.deployment.J2eeDeployer.startModules(J2eeDeployer.j
      ava:519)
      [AutoDeployer] at org.jboss.deployment.J2eeDeployer.startApplication(J2eeDeploy
      er.java:468)
      [AutoDeployer] at org.jboss.deployment.J2eeDeployer.deploy(J2eeDeployer.java:20
      8)
      [AutoDeployer] at java.lang.reflect.Method.invoke(Native Method)
      [AutoDeployer] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
      .java:1628)
      [AutoDeployer] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
      .java:1523)
      [AutoDeployer] at org.jboss.ejb.AutoDeployer.deploy(AutoDeployer.java:379)
      [AutoDeployer] at org.jboss.ejb.AutoDeployer.run(AutoDeployer.java:217)
      [AutoDeployer] at java.lang.Thread.run(Thread.java:484)
      [AutoDeployer] Auto deploy of file:/C:/jboss/JBoss-2.4.3/deploy/student.jar
      [J2EE Deployer Default] Deploy J2EE application: file:/C:/jboss/JBoss-2.4.3/depl
      oy/student.jar
      [J2eeDeployer] Create application student.jar
      [J2eeDeployer] install EJB module student.jar
      [Container factory] Deploying:file:/C:/jboss/JBoss-2.4.3/tmp/deploy/Default/stud
      ent.jar/
      [Verifier] Verifying file:/C:/jboss/JBoss-2.4.3/tmp/deploy/Default/student.jar/e
      jb1008.jar
      [Verifier]
      Bean : StudentBean
      Method : public Student ejbCreate(int)
      Section: 9.2.3
      Warning: The return type of an ejbCreate(...) method must be the entity bean's p
      rimary key type.

      [Verifier]
      Bean : StudentBean
      Section: 9.4.7.1
      Warning: The type of the field named in the primkey-field element must match the
      class in the prim-key-class element.

      [Container factory] Deploying StudentBean
      [Container factory] org.jboss.ejb.DeploymentException: OracleDS not bound
      [Container factory] at org.jboss.ejb.plugins.jaws.metadata.JawsApplicationMe
      taData.init(JawsApplicationMetaData.java:120)
      [Container factory] at org.jboss.ejb.plugins.jaws.metadata.JawsXmlFileLoader
      .load(JawsXmlFileLoader.java:75)
      [Container factory] at org.jboss.ejb.plugins.jaws.jdbc.JDBCCommandFactory.<i
      nit>(JDBCCommandFactory.java:133)
      [Container factory] at org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.ini
      t(JAWSPersistenceManager.java:83)
      [Container factory] at org.jboss.ejb.plugins.CMPPersistenceManager.init(CMPP
      ersistenceManager.java:110)
      [Container factory] at org.jboss.ejb.EntityContainer.init(EntityContainer.ja
      va:291)
      [Container factory] at org.jboss.ejb.Application.init(Application.java:202)
      [Container factory] at org.jboss.ejb.ContainerFactory.deploy(ContainerFactor
      y.java:372)
      [Container factory] at org.jboss.ejb.ContainerFactory.deploy(ContainerFactor
      y.java:304)
      [Container factory] at java.lang.reflect.Method.invoke(Native Method)
      [Container factory] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanSe
      rverImpl.java:1628)
      [Container factory] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanSe
      rverImpl.java:1523)
      [Container factory] at org.jboss.deployment.J2eeDeployer.startModules(J2eeDe
      ployer.java:494)
      [Container factory] at org.jboss.deployment.J2eeDeployer.startApplication(J2
      eeDeployer.java:468)
      [Container factory] at org.jboss.deployment.J2eeDeployer.deploy(J2eeDeployer
      .java:208)
      [Container factory] at java.lang.reflect.Method.invoke(Native Method)
      [Container factory] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanSe
      rverImpl.java:1628)
      [Container factory] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanSe
      rverImpl.java:1523)
      [Container factory] at org.jboss.ejb.AutoDeployer.deploy(AutoDeployer.java:3
      79)
      [Container factory] at org.jboss.ejb.AutoDeployer.run(AutoDeployer.java:217)

      [Container factory] at java.lang.Thread.run(Thread.java:484)
      [J2EE Deployer Default] Starting student.jar failed!
      [Default] org.jboss.ejb.DeploymentException: Could not deploy file:/C:/jboss/JBo
      ss-2.4.3/tmp/deploy/Default/student.jar/, Cause:org.jboss.ejb.DeploymentExceptio
      n: OracleDS not bound
      [Default] at org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:4
      01)
      [Default]
      [Default] at org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:3
      04)
      [Default]
      [Default] at java.lang.reflect.Method.invoke(Native Method)
      [Default]
      [Default] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
      .java:1628)
      [Default]
      [Default] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
      .java:1523)
      [Default]
      [Default] at org.jboss.deployment.J2eeDeployer.startModules(J2eeDeployer.j
      ava:494)
      [Default]
      [Default] at org.jboss.deployment.J2eeDeployer.startApplication(J2eeDeploy
      er.java:468)
      [Default]
      [Default] at org.jboss.deployment.J2eeDeployer.deploy(J2eeDeployer.java:20
      8)
      [Default]
      [Default] at java.lang.reflect.Method.invoke(Native Method)
      [Default]
      [Default] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
      .java:1628)
      [Default]
      [Default] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
      .java:1523)
      [Default]
      [Default] at org.jboss.ejb.AutoDeployer.deploy(AutoDeployer.java:379)
      [Default]
      [Default] at org.jboss.ejb.AutoDeployer.run(AutoDeployer.java:217)
      [Default]
      [Default] at java.lang.Thread.run(Thread.java:484)
      [Default]
      [J2EE Deployer Default] Module student.jar is not running
      [J2EE Deployer Default] Destroying application student.jar
      [AutoDeployer] Deployment failed:file:/C:/jboss/JBoss-2.4.3/deploy/student.jar
      [AutoDeployer] org.jboss.deployment.J2eeDeploymentException: Error while startin
      g student.jar: Could not deploy file:/C:/jboss/JBoss-2.4.3/tmp/deploy/Default/st
      udent.jar/, Cause: org.jboss.ejb.DeploymentException: Could not deploy file:/C:/
      jboss/JBoss-2.4.3/tmp/deploy/Default/student.jar/, Cause:org.jboss.ejb.Deploymen
      tException: OracleDS not bound
      [AutoDeployer] at org.jboss.deployment.J2eeDeployer.startModules(J2eeDeployer.j
      ava:519)
      [AutoDeployer] at org.jboss.deployment.J2eeDeployer.startApplication(J2eeDeploy
      er.java:468)
      [AutoDeployer] at org.jboss.deployment.J2eeDeployer.deploy(J2eeDeployer.java:20
      8)
      [AutoDeployer] at java.lang.reflect.Method.invoke(Native Method)
      [AutoDeployer] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
      .java:1628)
      [AutoDeployer] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
      .java:1523)
      [AutoDeployer] at org.jboss.ejb.AutoDeployer.deploy(AutoDeployer.java:379)
      [AutoDeployer] at org.jboss.ejb.AutoDeployer.run(AutoDeployer.java:217)
      [AutoDeployer] at java.lang.Thread.run(Thread.java:484)

      // jaws.xml


      OracleDS
      <type-mapping>Oracle8</type-mapping>

      <enterprise-beans>

      <ejb-name>StudentBean</ejb-name>
      <table-name>Student</table-name>
      <remove-table>true</remove-table>
      <cmp-field>
      <field-name>id</field-name>
      <column-name>ID</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>name</field-name>
      <column-name>Name</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>VARCHAR(100)</sql-type>
      </cmp-field>
      <cmp-field>
      <field-name>title</field-name>
      <column-name>Title</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>VARCHAR(100)</sql-type>
      </cmp-field>
      <cmp-field>
      <field-name>marks</field-name>
      <column-name>MarksR</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>div</field-name>
      <column-name>Div</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>VARCHAR(10)</sql-type>
      </cmp-field>



      </enterprise-beans>


      //oracleds-service.xml



      <!-- ==================================================================== -->
      <!-- JDBC - Initialize the databases -->
      <!-- to ConnectionFactoryLoader -->
      <!-- ==================================================================== -->


      ConnectionURL=jdbc:oracle:thin:@oraserver:1521:coutts
      DriverClass=oracle.jdbc.driver.OracleDriver

      OracleDS
      java:/TransactionManager
      <depends optional-attribute-name="ResourceAdapterName">JCA:service=RARDeployment,name=Minerva JDBC LocalTransaction ResourceAdapter
      <depends optional-attribute-name="ConnectionManagerFactoryLoaderName">JCA:service=ConnectionManagerFactoryLoader,name=MinervaSharedLocalCMFactory
      #
      #Wed Aug 15 16:17:29 EDT 2001
      BlockingTimeoutMillis=50000
      IdleTimeoutMinutes=30
      MaxSize=10
      CleanupIntervalMinutes=10
      MinSize=0
      MaxIdleTimeoutPercent=1.0


      org.jboss.resource.security.ManyToOnePrincipalMapping

      userName=smart
      password=smartpass