1 Reply Latest reply on Jul 23, 2003 4:54 AM by gorges

    An error using oracle as the database for JBoss CMP

    gorges Newbie

      I followed the steps mentioned in the forum to setup a Connection Pool for my CMP,But when run JBoss,an error occurs as follows:
      10:49:00,525 WARN [ServiceController] Problem starting service jboss.j2ee:jndiName=UsersRemote,service=EJB

      org.jboss.deployment.DeploymentException: Error while fixing table name; - nested throwable: (org.jboss.util.NestedSQLException: Could not create connection; - nested throwable: (java.sql.SQLException: Invalid Parameter in the call); - nested throwable: (org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: Invalid Parameter in the call)))

      at org.jboss.ejb.plugins.cmp.jdbc.SQLUtil.fixTableName(SQLUtil.java:67)

      at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCEntityBridge.(JDBCEntityBridge.java:103)

      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.initStoreManager(JDBCStoreManager.java:397)

      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:339)

      at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager.java:198)

      at org.jboss.ejb.EntityContainer.start(EntityContainer.java:376)

      at org.jboss.ejb.Container.invoke(Container.java:782)

      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(ServiceController.java:1003)

      at $Proxy4.start(Unknown Source)

      at org.jboss.system.ServiceController.start(ServiceController.java:413)

      at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

      at java.lang.reflect.Method.invoke(Method.java:324)

      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)

      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)

      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)

      at $Proxy23.start(Unknown Source)

      at org.jboss.ejb.EjbModule.startService(EjbModule.java:404)

      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:165)

      at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

      at java.lang.reflect.Method.invoke(Method.java:324)

      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)

      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)

      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:1003)

      at $Proxy4.start(Unknown Source)

      at org.jboss.system.ServiceController.start(ServiceController.java:413)

      at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

      at java.lang.reflect.Method.invoke(Method.java:324)

      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)

      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)

      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)

      at $Proxy10.start(Unknown Source)

      at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:395)

      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:814)

      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:627)

      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:591)

      at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

      at java.lang.reflect.Method.invoke(Method.java:324)

      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)

      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)

      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)

      at $Proxy3.deploy(Unknown Source)

      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:435)

      at org.jboss.deployment.scanner.URLDeploymentScanner.scanDirectory(URLDeploymentScanner.java:656)

      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:507)

      at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:266)

      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:165)

      at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

      at java.lang.reflect.Method.invoke(Method.java:324)

      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)

      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)

      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:1003)

      at $Proxy0.start(Unknown Source)

      at org.jboss.system.ServiceController.start(ServiceController.java:413)

      at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

      at java.lang.reflect.Method.invoke(Method.java:324)

      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)

      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)

      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)

      at $Proxy2.start(Unknown Source)

      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:232)

      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:814)

      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:627)

      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:591)

      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:575)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

      at java.lang.reflect.Method.invoke(Method.java:324)

      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.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; - nested throwable: (java.sql.SQLException: Invalid Parameter in the call); - nested throwable: (org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: Invalid Parameter in the call))

      at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:106)

      at org.jboss.ejb.plugins.cmp.jdbc.SQLUtil.fixTableName(SQLUtil.java:38)

      ... 82 more

      Caused by: org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: Invalid Parameter in the call)

      at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:160)

      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnection(InternalManagedConnectionPool.java:359)

      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:150)

      at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:335)

      at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:467)

      at org.jboss.resource.connectionmanager.LocalTxConnectionManager.getManagedConnection(LocalTxConnectionManager.java:221)

      at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:532)

      at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:828)

      at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:102)

      ... 83 more

      Caused by: java.sql.SQLException: Invalid Parameter in the call

      at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)

      at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)

      at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:1160)

      at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:183)

      at oracle.jdbc.driver.OracleConnection.(OracleConnection.java:346)

      at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java: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.createManagedConnection(LocalManagedConnectionFactory.java:150)

      ... 91 more

      Following is my oracle-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">VISITOR</module-option>
      <module-option name = "userName">VISITOR</module-option>
      <module-option name = "password">VISITOR</module-option>
      <module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=OracleDS</module-option>
      </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:@localhost:1521:XIECJ</config-property>
      <!--

      Here are a couple of the possible OCI configurations.
      For more information, see http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/java.920/a96654/toc.htm

      <config-property name="ConnectionURL" type="java.lang.String">jdbc:oracle:oci:@youroracle-tns-name</config-property>
      or
      <config-property name="ConnectionURL" type="java.lang.String">jdbc:oracle:oci:@(description=(address=(host=youroraclehost)(protocol=tcp)(port=1521))(connect_data=(SERVICE_NAME=yourservicename)))</config-property>

      Clearly, its better to have TNS set up properly.
      -->
      <config-property name="DriverClass" type="java.lang.String">oracle.jdbc.driver.OracleDriver</config-property>
      <!--set these only if you want only default logins, not through JAAS -->
      <config-property name="UserName" type="java.lang.String"></config-property>
      <config-property name="Password" type="java.lang.String"></config-property>




      <!--Below here are advanced properties -->
      <!--hack-->
      <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper



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


      0
      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=CachedConnectionManager

      <depends optional-attribute-name="JaasSecurityManagerService">jboss.security:service=JaasSecurityManager

      java:/TransactionManager

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






      I'm using jboss-3.0.7_jakarta-tomcat-4.1.24.
      Could anyone tell me what's the prolem?
      Thanks!