3 Replies Latest reply on Mar 9, 2003 10:07 PM by davidjencks

    Could anyone provide modified JDBC RA from Sun?

    simonhuang

      I try to deploy the JDBC RA provided by Sun into JBoss 3.0.6. I encounter many problems. Could anyone can shre me successful experience or modified ra?
      thanks

      When I try to deploy ra. A exception of "no setter of ConnectionURL" is thrown out from server.
      If I change
      <config-property>
      <config-property-name>ConnectionURL</config-property-name>
      <config-property-type>java.lang.String</config-property-type>
      <config-property-value>jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=Northwind</config-property-value>
      </config-property>
      into another format as below
      <config-property name="ConnectionURL" type="java.lang.String">jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=Northwind</config-property>

      I got another exception
      15:39:53,515 WARN [NestedThrowable] Duplicate throwable nesting of same base type: class org.jboss.deployment.DeploymentException is assignable from: class org.jboss.deployment.DeploymentException
      15:39:53,515 ERROR [URLDeploymentScanner] Failed to deploy: org.jboss.deployment
      .scanner.URLDeploymentScanner$DeployedURL@3393284{ url=file:/C:/temp/jboss-3.0.6
      /server/all/deploy/spi_10_ds.rar, deployedLastModified=1047022457030 }
      org.jboss.deployment.DeploymentException: problem with init in RARDeployer ; - nested throwable: (org.jboss.deployment.DeploymentException: expected one config-property-name tag)

      What do I miss?

        • 1. Re: Could anyone provide modified JDBC RA from Sun?
          davidjencks

          can you indicate exactly what you are trying to deploy (for instance where and when you got this adapter, or include the .rar file itself) and include the exact *-service.xml file you are using?

          • 2. Re: Could anyone provide modified JDBC RA from Sun?
            simonhuang

            I got the JDBC connector at sun's website.
            I deploy spi_10_ds.rar first.
            File name:jdbcconnector-1_0-ea.zip

            Below is the error message and my mssql-service.xml
            Error message:
            15:40:20,264 WARN [RARDeployment] The class 'class com.sun.gjc.spi.DSManagedCon
            nectionFactory' has no setter for config property 'ConnectionURL'
            15:40:20,279 ERROR [LocalTxConnectionManager] Starting failed
            java.lang.IllegalArgumentException: The class 'class com.sun.gjc.spi.DSManagedCo
            nnectionFactory' has no setter for config property 'ConnectionURL'
            at org.jboss.resource.connectionmanager.RARDeployment.setManagedConnecti
            onFactoryAttribute(RARDeployment.java:666)
            at org.jboss.resource.connectionmanager.RARDeployment.setMcfProperties(R
            ARDeployment.java:834)
            at org.jboss.resource.connectionmanager.RARDeployment.startManagedConnec
            tionFactory(RARDeployment.java:563)
            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.resource.connectionmanager.BaseConnectionManager2.startServ
            ice(BaseConnectionManager2.java:382)
            at org.jboss.resource.connectionmanager.LocalTxConnectionManager.startSe
            rvice(LocalTxConnectionManager.java:179)
            at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:1
            65)
            at sun.reflect.GeneratedMethodAccessor15.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:1003)
            at $Proxy4.start(Unknown Source)
            at org.jboss.system.ServiceController.start(ServiceController.java:413)
            at org.jboss.system.ServiceController.start(ServiceController.java:433)
            at org.jboss.system.ServiceController.start(ServiceController.java:433)
            at sun.reflect.GeneratedMethodAccessor3.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 $Proxy13.start(Unknown Source)
            at org.jboss.resource.RARDeployer.start(RARDeployer.java:212)
            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.GeneratedMethodAccessor11.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.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.GeneratedMethodAccessor4.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:1003)
            at $Proxy0.start(Unknown Source)
            at org.jboss.system.ServiceController.start(ServiceController.java:413)
            at sun.reflect.GeneratedMethodAccessor3.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 $Proxy2.start(Unknown Source)
            at org.jboss.deployment.SARDeployer.start(SARDeployer.java:230)
            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(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:325)
            at org.jboss.system.server.ServerImpl.start(ServerImpl.java:222)
            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)

            mssql-service.xml


            <!-- ======================================================================-->
            <!-- New ConnectionManager setup for Microsoft SQL Server 2000 driver -->
            <!-- You may download the latest Microsoft JDBC driver from *Microsoft* -->
            <!-- http://msdn.microsoft.com/downloads/default.asp?url=/downloads/sample.asp?url=/MSDN-FILES/027/001/779/msdncompositedoc.xml&frame=true -->
            <!-- Build jmx-api (build/build.sh all) and view for config documentation -->
            <!-- ===================================================================== -->



            <!-- Include a login module configuration named MSSQLDbRealm.
            Update your login-conf.xml, here is an example for a
            ConfiguredIdentityLoginModule:

            <application-policy name = "MSSQLDbRealm">

            <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required">
            <module-option name = "principal">yourprincipal</module-option>
            <module-option name = "userName">yourusername</module-option>
            <module-option name = "password">yourpassword</module-option>
            <module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=MSSQLDS</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 MSSQLDbRealm above
            MSSQLDbRealm
            -->
            jboss.jca:service=RARDeployer
            <depends optional-attribute-name="ManagedConnectionFactoryName">
            <!--embedded mbean-->

            <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=DataSource Resource Adapter
            jdbc/EmpDB


            <config-property name="ConnectionURL" type="java.lang.String">jdbc:microsoft:sqlserver://140.92.140.41:1433;DatabaseName=Northwind</config-property>
            <!--config-property name="DriverClass" type="java.lang.String">com.microsoft.jdbc.sqlserver.SQLServerDriver</config-property-->
            <!--set these only if you want only default logins, not through JAAS-->
            <config-property name="UserName" type="java.lang.String">sa</config-property>
            <config-property name="Password" type="java.lang.String"></config-property>


            <!--Below here are advanced properties -->
            <!--hack-->



            <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



            Could anyone help me?

            • 3. Re: Could anyone provide modified JDBC RA from Sun?
              davidjencks

              The first step is to look at ra.xml from the sun adapter and only try to set properties that are in fact properties of the adapter you are trying to use, not properties of a completely unrelated one jboss happens to supply.