2 Replies Latest reply on Sep 24, 2003 1:08 AM by Giustino De Vincentiis

    help on configure JBoss to Oracle

    ayc868 Newbie


      Any one live in the Bay Area that can help
      to solve the problem. I will pay for the effort.

      I wrote a simple EJB CMP based on scott/tiger
      DEPT table. For some reason, my JAR file
      fail when start JBOSS server.

      14:58:30,464 INFO [MainDeployer] Undeploying file:/C:/jboss-3.0.4/server/defaul
      t/deploy/ejb1.jar
      14:58:30,464 INFO [EjbModule] Stopping
      14:58:30,464 INFO [EjbModule] Stopped
      14:58:30,464 INFO [EjbModule] Destroying
      14:58:30,484 INFO [EjbModule] Remove JSR-77 EJB Module: jboss.management.single
      :J2EEApplication= ,J2EEServer=Single,j2eeType=EJBModule,name=ejb1.jar
      14:58:30,484 INFO [EjbModule] Destroyed
      14:58:30,484 INFO [MainDeployer] could not delete directory file:/C:/jboss-3.0.
      4/server/default/tmp/deploy/server/default/deploy/ejb1.jar/59.ejb1.jar restart w
      ill delete it
      14:58:30,484 INFO [MainDeployer] Undeployed file:/C:/jboss-3.0.4/server/default
      /deploy/ejb1.jar
      14:58:30,494 INFO [MainDeployer] Starting deployment of package: file:/C:/jboss
      -3.0.4/server/default/deploy/ejb1.jar
      14:58:30,624 INFO [EJBDeployer]
      Bean : Dept
      Method : public Long ejbCreate(Long)
      Section: 10.6.4
      Warning: The throws clause must define the javax.ejb.CreateException.

      14:58:30,624 INFO [EJBDeployer]
      Bean : Dept
      Method : public Long ejbCreate()
      Section: 10.6.4
      Warning: The throws clause must define the javax.ejb.CreateException.

      14:58:30,644 INFO [EjbModule] Creating
      14:58:30,664 INFO [EjbModule] Deploying Dept
      14:58:30,685 INFO [EjbModule] Deploying MySessionEJB1
      14:58:30,715 INFO [EjbModule] Created
      14:58:30,725 INFO [EjbModule] Starting
      14:58:30,845 WARN [ServiceController] Problem starting service jboss.j2ee:jndiN
      ame=Dept,service=EJB
      org.jboss.deployment.DeploymentException: Error: can't find data source: java:/D
      efaultDS; - nested throwable: (javax.naming.NameNotFoundException: DefaultDS not
      bound)
      at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCEntityBridge.(JDBCEnt
      ityBridge.java:99)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.initStoreManager(JDBC
      StoreManager.java:397)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManage
      r.java:339)
      at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManag
      er.java:198)
      at org.jboss.ejb.EntityContainer.start(EntityContainer.java:376)
      at org.jboss.ejb.Container.invoke(Container.java:756)
      at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1058)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
      ler.java:978)
      at $Proxy5.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:398)
      at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
      nDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy30.start(Unknown Source)
      at org.jboss.ejb.EjbModule.startService(EjbModule.java:430)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:1
      65)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
      nDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
      ler.java:978)
      at $Proxy5.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:398)
      at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
      nDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy11.start(Unknown Source)
      at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:395)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:807)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:621)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:585)
      at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
      nDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy4.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
      tScanner.java:435)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
      canner.java:561)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
      doScan(AbstractDeploymentScanner.java:212)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
      loop(AbstractDeploymentScanner.java:225)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
      run(AbstractDeploymentScanner.java:202)
      Caused by: javax.naming.NameNotFoundException: DefaultDS not bound
      at org.jnp.server.NamingServer.getBinding(NamingServer.java:495)
      at org.jnp.server.NamingServer.getBinding(NamingServer.java:503)
      at org.jnp.server.NamingServer.getObject(NamingServer.java:509)
      at org.jnp.server.NamingServer.lookup(NamingServer.java:282)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:464)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:443)
      at javax.naming.InitialContext.lookup(InitialContext.java:347)
      at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCEntityBridge.(JDBCEnt
      ityBridge.java:96)
      ... 51 more
      14:58:30,865 INFO [EjbModule] Started
      14:58:30,865 INFO [MainDeployer] Deployed package: file:/C:/jboss-3.0.4/server/
      default/deploy/ejb1.jar
      14:58:30,865 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.j2ee:jndiName=AndrewJob,service=EJB
      state: FAILED
      I Depend On:
      Depends On Me: org.jboss.deployment.DeploymentException: DefaultDS not bound, O
      bjectName: jboss.j2ee:jndiName=Dept,service=EJB
      state: FAILED
      I Depend On:
      Depends On Me: org.jboss.deployment.DeploymentException: Error: can't find data
      source: java:/DefaultDS; - nested throwable: (javax.naming.NameNotFoundExceptio
      n: DefaultDS not bound)]
      14:59:57,089 INFO [MainDeployer] Undeploying file:/C:/jboss-3.0.4/server/defaul
      t/deploy/ejb1.jar
      14:59:57,089 INFO [EjbModule] Stopping
      14:59:57,089 INFO [EjbModule] Stopped
      14:59:57,089 INFO [EjbModule] Destroying
      14:59:57,119 INFO [EjbModule] Remove JSR-77 EJB Module: jboss.management.single
      :J2EEApplication= ,J2EEServer=Single,j2eeType=EJBModule,name=ejb1.jar
      14:59:57,119 INFO [EjbModule] Destroyed
      14:59:57,119 INFO [MainDeployer] could not delete directory file:/C:/jboss-3.0.
      4/server/default/tmp/deploy/server/default/deploy/ejb1.jar/61.ejb1.jar restart w
      ill delete it
      14:59:57,119 INFO [MainDeployer] Undeployed file:/C:/jboss-3.0.4/server/default
      /deploy/ejb1.jar
      14:59:57,129 INFO [MainDeployer] Starting deployment of package: file:/C:/jboss
      -3.0.4/server/default/deploy/ejb1.jar
      14:59:57,309 INFO [EJBDeployer]
      Bean : Dept
      Method : public Long ejbCreate(Long)
      Section: 10.6.4
      Warning: The throws clause must define the javax.ejb.CreateException.

      14:59:57,309 INFO [EJBDeployer]
      Bean : Dept
      Method : public Long ejbCreate()
      Section: 10.6.4
      Warning: The throws clause must define the javax.ejb.CreateException.

      14:59:57,319 INFO [EjbModule] Creating
      14:59:57,339 INFO [EjbModule] Deploying Dept
      14:59:57,349 INFO [EjbModule] Deploying MySessionEJB1
      14:59:57,389 INFO [EjbModule] Created
      14:59:57,389 INFO [EjbModule] Starting
      14:59:57,650 WARN [ServiceController] Problem starting service jboss.j2ee:jndiN
      ame=Dept,service=EJB
      org.jboss.deployment.DeploymentException: Error: can't find data source: java:/D
      efaultDS; - nested throwable: (javax.naming.NameNotFoundException: DefaultDS not
      bound)
      at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCEntityBridge.(JDBCEnt
      ityBridge.java:99)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.initStoreManager(JDBC
      StoreManager.java:397)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManage
      r.java:339)
      at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManag
      er.java:198)
      at org.jboss.ejb.EntityContainer.start(EntityContainer.java:376)
      at org.jboss.ejb.Container.invoke(Container.java:756)
      at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1058)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
      ler.java:978)
      at $Proxy5.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:398)
      at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
      nDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy37.start(Unknown Source)
      at org.jboss.ejb.EjbModule.startService(EjbModule.java:430)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:1
      65)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
      nDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
      ler.java:978)
      at $Proxy5.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:398)
      at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
      nDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy11.start(Unknown Source)
      at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:395)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:807)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:621)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:585)
      at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
      nDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy4.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
      tScanner.java:435)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
      canner.java:561)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
      doScan(AbstractDeploymentScanner.java:212)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
      loop(AbstractDeploymentScanner.java:225)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
      run(AbstractDeploymentScanner.java:202)
      Caused by: javax.naming.NameNotFoundException: DefaultDS not bound
      at org.jnp.server.NamingServer.getBinding(NamingServer.java:495)
      at org.jnp.server.NamingServer.getBinding(NamingServer.java:503)
      at org.jnp.server.NamingServer.getObject(NamingServer.java:509)
      at org.jnp.server.NamingServer.lookup(NamingServer.java:282)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:464)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:443)
      at javax.naming.InitialContext.lookup(InitialContext.java:347)
      at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCEntityBridge.(JDBCEnt
      ityBridge.java:96)

        • 1. Re: help on configure JBoss to Oracle
          John Newbie

          Have you deployed an oracle-service.xml to the %jboss_home%/server/default/deploy directory? JBoss will bind your datasource to the jndi name specified in this file - unless your datasource cannot be found or is not started etc Your CMP entity bean is referencing this datasource in its deployment descriptor.

          Please post the contents of your datasource configuration file (*-service.xml) so we can better help you.

          • 2. Re: help on configure JBoss to Oracle
            Giustino De Vincentiis Newbie

            Put a file named oracle-service.xml, containing something like the following, in the deployment directory:


            <local-tx-datasource>
            <jndi-name>OracleDS</jndi-name>
            <connection-url>jdbc:oracle:thin:@localhost:1521:test</connection-url>
            <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
            <user-name>scott</user-name>
            tiger
            <min-pool-size>5</min-pool-size>
            </local-tx-datasource>


            Your datasource will be java:/OracleDS.