3 Replies Latest reply on Feb 3, 2002 11:27 PM by java_developer

    3.0 Alpha : DataSource not binding in JNDI

    mikefinn

      I defined a service.xml for an MS SQL Server datasource, using the mssql-service.xml from the doc as a guide. After some tweaking to fix the new dependency syntax (mbean-ref) and for the MS JDBC driver, I got JBoss to load the service. However, the datasource does not get bound in JNDI, as it does for, say, the Hypersonic service. After the AutoDeployer finishes, there is no DS bound in the JNDI tree. The log excerpt and service.xml are below. What's missing?

      Also, in 3.0, I assume the old mechanism for XADataSource loader MBean (a la jboss.jcml) has been replaced by the JCA-XA?

      TIA,
      Mike


      ***** Log where SQL Server DS service is deployed ****
      [11:18:37,249,AutoDeployer] Auto deploy of file:/D:/jboss/jboss-3.0.0alpha/deploy/mssqlds-service.xml
      [11:18:37,319,Default] Libraries adding URLClassLoader -861013034 key URL file:/D:/jboss/jboss-3.0.0alpha//lib/ext/msbase.jar
      [11:18:37,339,Default] Libraries adding URLClassLoader 657315836 key URL file:/D:/jboss/jboss-3.0.0alpha//lib/ext/mssqlserver.jar
      [11:18:37,339,Default] Libraries adding URLClassLoader 1590486151 key URL file:/D:/jboss/jboss-3.0.0alpha//lib/ext/msutil.jar
      [11:18:37,339,ServiceCreator] About to create the beanjboss.jca:service=ConnectionFactoryLoader,name=MSSQL2000DS
      [11:18:37,349,ServiceCreator] Created the beanjboss.jca:service=ConnectionFactoryLoader,name=MSSQL2000DS
      [11:18:37,550,AutoDeployer] Started


      ***** The service descriptor ****

        • 1. Re: 3.0 Alpha : DataSource not binding in JNDI
          mikefinn

          Ooops. Here's the mssqlds-service.xml:




          ConnectionURL=jdbc:microsoft:sqlserver://localhost:1433;uid=jboss;pwd=jboss
          DriverClass=com.microsoft.jdbc.SQLServerDriver

          MSSQL2000DS
          java:/TransactionManager
          <mbean-ref name="ResourceAdapterName">jboss.jca:service=RARDeployment,name=Minerva
          JDBC LocalTransaction ResourceAdapter</mbean-ref>
          <mbean-ref name="ConnectionManagerFactoryLoaderName">jboss.jca:service=ConnectionManagerFactoryLoader,name=MinervaSharedLocalCMFactory</mbean-ref>
          #
          #Wed Aug 15 16:17:29 EDT 2001
          BlockingTimeoutMillis=50000
          IdleTimeoutMinutes=30
          MaxSize=10
          CleanupIntervalMinutes=10
          MinSize=1
          MaxIdleTimeoutPercent=1.0


          org.jboss.resource.security.ManyToOnePrincipalMapping

          userName=jboss

          • 2. Re: 3.0 Alpha : DataSource not binding in JNDI
            mikefinn

            It's fixed. The problem was an embedded in the mbean-ref for ResourceAdapterName. The name value within the element was:
            "Minerva JDBCLocalTransaction ResourceAdapter"
            instead of
            "Minerva JDBC LocalTransaction ResourceAdapter"

            The symptoms were that the service would be deployed, but no JNDI name would be bound for the data source. Fallout from copy/paste I suppose.

            • 3. Re: 3.0 Alpha : DataSource not binding in JNDI
              java_developer

              hi,
              i've set up jboss3.0 with atinav driver for mssqlserver using the configuration:


              <?xml version="1.0" encoding="UTF-8"?>
              <!-- $Id: mssql-service.xml,v 1.2 2002/01/14 00:16:51 d_jencks Exp $ -->

              <!-- =====================================================================-->
              <!-- mssql-service.xml -->
              <!-- JBoss v3.0alpha (november 23, 2001) ATINAV thin driver Configuration -->
              <!-- tested against MS SQL 2000 -->
              <!-- =====================================================================-->
              <!-- -->
              <!-- please put jdbc driver (in this case TaveConn25C.jar) under -->
              <!-- jboss_home/lib/ext -->
              <!-- please put this file (mssqlds-service.xml) under jboss_home/deploy -->
              <!-- The atinav driver is from -->
              <!-- http://www.atinav.com/products/aveconnect/aveconnect.htm -->
              <!-- This configuration is contributed by Alex Pavlov apavlov@ma.us.mks.com -->
              <!-- =====================================================================-->







              ConnectionURL=jdbc:AvenirDriver://10.122.10.88:1433/tempdb;uid=sa;pwd=""
              DriverClass=net.avenir.jdbc2.Driver

              MSSQL2000DS
              java:/TransactionManager
              <depends optional-attribute-name="ResourceAdapterName">jboss.jca:service=RARDeployment,name=Minerva
              JDBC LocalTransaction ResourceAdapter
              <depends optional-attribute-name="ConnectionManagerFactoryLoaderName">jboss.jca:service=ConnectionManagerFactoryLoader,name=MinervaSharedLocalCMFactory
              #
              #Wed Aug 15 16:17:29 EDT 2001
              BlockingTimeoutMillis=50000
              IdleTimeoutMinutes=30
              MaxSize=10
              CleanupIntervalMinutes=10
              MinSize=0
              MaxIdleTimeoutPercent=1.0


              org.jboss.resource.security.ManyToOnePrincipalMapping

              userName=sa
              password=""



              however when i restart jboss i get the error:

              [11:12:23,398,MailService] Mail Service 'Mail' bound to java:/Mail
              [11:12:23,408,MailService] Started
              [11:12:23,428,AutoDeployer] Auto deploy of file:/C:/jboss/deploy/mssql-service.x
              ml
              [11:12:23,518,Default] Libraries adding URLClassLoader 1652023458 key URL file:/
              C:/jboss//lib/ext/TaveCEXAPI25C.jar
              [11:12:23,558,ServiceCreator] About to create the beanjboss.jca:service=Connecti
              onFactoryLoader,name=MSSQL2000DS
              [11:12:23,588,ServiceCreator] Created the beanjboss.jca:service=ConnectionFactor
              yLoader,name=MSSQL2000DS
              [11:12:23,909,ConnectionFactoryLoader] Starting
              [11:12:23,939,MSSQL2000DS] Stopped
              javax.management.RuntimeOperationsException: Object name cannot be null
              at com.sun.management.jmx.MBeanServerImpl.isRegistered(MBeanServerImpl.j
              ava:1096)
              at org.jboss.resource.ConnectionFactoryLoader.startService(ConnectionFac
              toryLoader.java:402)
              at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:1
              17)

              Is there some other configuration i've missed?
              what is the "Object name" that cannot be null?

              thnks