3 Replies Latest reply on Apr 30, 2003 1:33 AM by kvikram

    Problems with jdbc diver - oracle

    Thilko Richter Newbie


      Hi!

      I have fixed the error before - my datasource mapping was not correct. Now I ?ve get the following error when I tried to deploy my simple Entity BEan:

      09:52:24,868 INFO [EJBDeployer]
      Bean : de.talkline.picasso.server.StatusEntity
      Method : public String ejbCreate(String) throws CreateException
      Section: 10.6.4
      Warning: The return type of an ejbCreate(...) method must be the entity bean's p
      rimary key type.

      09:52:24,928 INFO [EjbModule] Creating
      09:52:24,968 INFO [EjbModule] Deploying de.talkline.picasso.server.StatusEntity

      09:52:25,218 INFO [EjbModule] Deploying picasso/StatusHandler
      09:52:25,449 INFO [EjbModule] Created
      09:52:25,449 INFO [EjbModule] Starting
      09:52:28,994 WARN [ServiceController] Problem starting service jboss.j2ee:jndiN
      ame=ejb/picasso/StatusEntity,service=EJB
      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: E/A-Exception: The Network Adapter cou
      ld not establish the connection); - nested throwable: (org.jboss.resource.Resour
      ceException: Could not create connection; - nested throwable: (java.sql.SQLExcep
      tion: E/A-Exception: The Network Adapter could not establish the connection)))
      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.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 $Proxy20.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 $Proxy9.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.start(MainDeployer.java:799)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:621)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:585)
      at sun.reflect.GeneratedMethodAccessor10.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.scanDirectory(URLDe
      ploymentScanner.java:656)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
      canner.java:507)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(A
      bstractDeploymentScanner.java:261)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:1
      65)
      at sun.reflect.GeneratedMethodAccessor7.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.system.ServiceController$ServiceProxy.invoke(ServiceControl
      ler.java:978)
      at $Proxy0.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 $Proxy3.start(Unknown Source)
      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:249)
      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 org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:569)
      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.server.ServerImpl.doStart(ServerImpl.java:324)
      at org.jboss.system.server.ServerImpl.start(ServerImpl.java:221)
      at org.jboss.Main.boot(Main.java:148)
      at org.jboss.Main$1.run(Main.java:381)
      at java.lang.Thread.run(Thread.java:536)
      Caused by: org.jboss.util.NestedSQLException: Could not create connection; - nes
      ted throwable: (java.sql.SQLException: E/A-Exception: The Network Adapter could
      not establish the connection); - nested throwable: (org.jboss.resource.ResourceE
      xception: Could not create connection; - nested throwable: (java.sql.SQLExceptio
      n: E/A-Exception: The Network Adapter could not establish the connection))
      at org.jboss.resource.adapter.jdbc.local.LocalDataSource.getConnection(L
      ocalDataSource.java:106)
      at org.jboss.ejb.plugins.cmp.jdbc.SQLUtil.fixTableName(SQLUtil.java:38)
      ... 84 more
      Caused by: org.jboss.resource.ResourceException: Could not create connection; -
      nested throwable: (java.sql.SQLException: E/A-Exception: The Network Adapter cou
      ld not establish the connection)
      at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.c
      reateManagedConnection(LocalManagedConnectionFactory.java:144)
      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.cr
      eateConnection(InternalManagedConnectionPool.java:259)
      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.ge
      tConnection(InternalManagedConnectionPool.java:106)
      at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BaseP
      ool.getConnection(JBossManagedConnectionPool.java:323)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManage
      dConnection(BaseConnectionManager2.java:467)
      at org.jboss.resource.connectionmanager.LocalTxConnectionManager.getMana
      gedConnection(LocalTxConnectionManager.java:221)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateC
      onnection(BaseConnectionManager2.java:532)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2$Connectio
      nManagerProxy.allocateConnection(BaseConnectionManager2.java:814)
      at org.jboss.resource.adapter.jdbc.local.LocalDataSource.getConnection(L
      ocalDataSource.java:102)
      ... 85 more
      Caused by: java.sql.SQLException: E/A-Exception: The Network Adapter could not e
      stablish the connection
      at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
      at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
      at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:333)
      at oracle.jdbc.driver.OracleConnection.(OracleConnection.java:404)

      at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
      va:468)
      at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:314)
      at java.sql.DriverManager.getConnection(DriverManager.java:512)
      at java.sql.DriverManager.getConnection(DriverManager.java:140)
      at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.c
      reateManagedConnection(LocalManagedConnectionFactory.java:133)
      ... 93 more



      I think there is a problem with the jdbc driver... I have the classes12.zip in the ${JBOSS_HOME}/server/default/lib directory, is that correct?

      Thanks,
      Thilko

        • 1. Re: Problems with jdbc diver - oracle
          Frank Merenda Newbie

          The part that says "The Network Adapter could not establish the connection" tells me that you have a firewall or something like that blocking the connection to either the server you are trying to hit, or the machine you are tryint to connect from, or maybe your database server is down? Also, you may want to try to unzip the files in classes12.zip and re-jar them up, then put the jar file out there.

          Good luck-
          -Frank

          • 2. Re: Problems with jdbc diver - oracle
            kvikram Newbie

            Rename u'r classes.zip to classes.jar as jboss does not recongnise the .zip extension.This is all you need to connect to Oracle.
            If the classes.jar is placed in the default/lib dir then u may need to restart jboss.If u do not wish to do that you may instead place it in the default/deploy dir.

            • 3. Re: Problems with jdbc diver - oracle
              kvikram Newbie

              Hi
              Rename u'r classes.zip to classes.jar as jboss does not recongnise the .zip extension.This is all you need to connect to Oracle.
              If the classes.jar is placed in the default/lib dir then u may need to restart jboss.If u do not wish to do that you may instead place it in the default/deploy dir.

              This should help
              Good Luck
              Vikki