4 Replies Latest reply on Aug 26, 2002 2:50 PM by Bakul Mukherjee

    or.jboss.resource.ResourceException when deploying CMP2.0 Be

    Bakul Mukherjee Newbie

      Hi,

      I have a CMP2.0 Bean, which originally referred to the standard DefaultDS in the jbosscmp-jdbc.xml. It deployed fine. I am using JBoss3.0

      Next I created my own Oracle DataSource OracleDS by modifying Oracle-service.xml to edit server/database values and then copied it to the deploy dir. I verified that the Datasource was bound to the JNDI tree in the server log.

      I then modified the Bean's jbosscmp-jdbc.xml file to change the datasource to java:/OracleDs and database-mapping to Oracle8. recompiled the jar file and deployed it to the server. This time the bean failed to deploy throwing the following exception. It complains about the host:port:sid.

      17:42:52,984 ERROR [EjbModule] Initialization failed
      org.jboss.deployment.DeploymentException: Error while fixing table name; - neste
      d throwable: (org.jboss.util.NestedSQLException: Could not create connection; -
      nested throwable: (java.sql.SQLException: Io exception: Invalid connection strin
      g format, a valid format is: "host:port:sid" ); - nested throwable: (org.jboss.r
      esource.ResourceException: Could not create connection; - nested throwable: (jav
      a.sql.SQLException: Io exception: Invalid connection string format, a valid form
      at is: "host:port:sid" )))
      at org.jboss.ejb.plugins.cmp.jdbc.SQLUtil.fixTableName(SQLUtil.java:67)
      at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCEntityBridge.(JDBCEnt
      ityBridge.java:103)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.create(JDBCStoreManag
      er.java:332)
      at org.jboss.ejb.plugins.CMPPersistenceManager.create(CMPPersistenceMana
      ger.java:155)
      at org.jboss.ejb.EntityContainer.create(EntityContainer.java:337)
      at org.jboss.ejb.Container.invoke(Container.java:789)
      at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1055)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
      ler.java:894)
      at $Proxy6.create(Unknown Source)
      at org.jboss.system.ServiceController.create(ServiceController.java:272)

      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
      nDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy33.create(Unknown Source)
      at org.jboss.ejb.EjbModule.createService(EjbModule.java:392)
      at org.jboss.system.ServiceMBeanSupport.create(ServiceMBeanSupport.java:
      134)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
      nDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
      ler.java:894)
      at $Proxy6.create(Unknown Source)
      at org.jboss.system.ServiceController.create(ServiceController.java:272)

      at org.jboss.system.ServiceController.create(ServiceController.java:212)

      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
      nDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy5.create(Unknown Source)
      at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:380)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:637)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:512)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:481)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
      nDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
      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:405)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scanDirectory(URLDe
      ploymentScanner.java:586)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
      canner.java:465)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(A
      bstractDeploymentScanner.java:237)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:1
      62)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
      nDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
      ler.java:894)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:340)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
      nDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy3.start(Unknown Source)
      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:243)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:678)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:513)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:481)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:465)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
      nDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
      at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:314)
      at org.jboss.system.server.ServerImpl.start(ServerImpl.java:216)
      at org.jboss.Main.boot(Main.java:142)
      at org.jboss.Main$1.run(Main.java:375)
      at java.lang.Thread.run(Thread.java:484)

      I was able to deploy the same bean on weblogic using the same DB URL, without complaining about the host:port:sid.

      Am I missing something? Is there anything else that I need to configure?

      Thanks
      Bakul