1 Reply Latest reply on Aug 30, 2002 9:37 PM by davidjencks

    Jboss3.0.1RC + MSSQL datasource configuration problem

    qiangliu

      Hi! I have problem in configuration Jboss3.0.1RC+MSSQL2000,
      I use MSSQL2000 JDBC driver. I used the mssql-service.xml
      (I copied from the forum) in my C:\jboss\jboss-3.0.1RC1\server\default\deploy, I also changed the login-config.xml in \default\config dir, I also changed the DefaultDS to MSSQLDS, but I had the following errors in deployment:

      10:03:07,019 INFO [JBossManagedConnectionPool] Starting
      10:03:07,019 INFO [JBossManagedConnectionPool] Started
      10:03:07,019 INFO [MainDeployer] Deployed package: file:/C:/jboss/jboss-3.0.1RC1/server/default/dep
      loy/mssql-service.xml
      10:03:07,019 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
      Packages waiting for a deployer:

      Incompletely deployed packages:

      MBeans waiting for classes:

      MBeans waiting for other MBeans:
      [ObjectName: jboss.security:service=JaasSecurityDomain,domain=RMI+SSL
      state: FAILED
      I Depend On:
      Depends On Me: java.io.IOException: Too many certificates in chain, ObjectName: jboss:service=invok
      er,type=jrmp,socketType=SSL
      state: FAILED
      I Depend On:
      Depends On Me: org.jboss.deployment.DeploymentException: No Attribute found with name: SecurityDoma
      in, ObjectName: jboss.j2ee:service=EJB,jndiName=EchoBean4
      state: FAILED
      I Depend On:
      Depends On Me: java.lang.RuntimeException: homeInvoker is null: jboss:service=invoker,type=jrmp,soc
      ketType=SSL, ObjectName: jboss.j2ee:service=EJB,jndiName=LocationEJB
      state: FAILED
      I Depend On:
      Depends On Me: org.jboss.deployment.DeploymentException: Error: can't find data source: java:/MSSQL
      DS; - nested throwable: (javax.naming.NameNotFoundException: MSSQLDS not bound), ObjectName: jboss.j
      2ee:service=EJB,jndiName=OrganizationEJB
      state: FAILED
      I Depend On:
      Depends On Me: org.jboss.deployment.DeploymentException: Error: can't find data source: java:/MSSQL
      DS; - nested throwable: (javax.naming.NameNotFoundException: MSSQLDS not bound), ObjectName: jboss.j
      2ee:service=EJB,jndiName=JBossUtilAutoNumber
      state: FAILED
      I Depend On:
      Depends On Me: org.jboss.deployment.DeploymentException: Error: can't find data source: java:/MSSQL
      DS; - nested throwable: (javax.naming.NameNotFoundException: MSSQLDS not bound), ObjectName: jboss.j
      2ee:service=EJB,jndiName=JobEJB
      state: FAILED
      I Depend On:
      Depends On Me: org.jboss.deployment.DeploymentException: Error: can't find data source: java:/MSSQL
      DS; - nested throwable: (javax.naming.NameNotFoundException: MSSQLDS not bound), ObjectName: jboss.j
      2ee:service=EJB,jndiName=GangsterEJB
      state: FAILED
      I Depend On:
      Depends On Me: org.jboss.deployment.DeploymentException: Error: can't find data source: java:/MSSQL
      DS; - nested throwable: (javax.naming.NameNotFoundException: MSSQLDS not bound), ObjectName: jboss.j
      ca:service=LocalTxCM,name=MSSQLDS
      state: CONFIGURED
      I Depend On: jboss.jca:service=LocalTxDS,name=MSSQLDS
      jboss.jca:service=LocalTxPool,name=MSSQLDS
      jboss.jca:service=CachedConnectionManager
      jboss.security:name=JaasSecurityManager
      jboss.jca:service=RARDeployer

      Depends On Me: ]


      ****************
      My mssql-service.xml is as follows:

      <?xml version="1.0" encoding="UTF-8"?>

      <!-- ===================================================================== -->
      <!-- -->
      <!-- JBoss Server Configuration -->
      <!-- -->
      <!-- ===================================================================== -->


      <!-- ======================================================================-->
      <!-- 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">sa</module-option>
      <module-option name = "userName">sa</module-option>
      <module-option name = "password"></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.
      -->
      <!--comment out this line if you want component managed security or want
      to use the default values in the ManagedConnectionFactoryProperties -->
      <!--
      MSSQLDbRealm
      -->

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



      MSSQLDS



      <config-property name="ConnectionURL" type="java.lang.String">jdbc:microsoft:sqlserver://LLIU-DESK:1433;DatabaseName=VSS</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"></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:name=JaasSecurityManager

      java:/TransactionManager
      <mbean-ref name="ResourceAdapterName">JCA:service=RARDeployment,name=Minerva
      JDBC LocalTransaction ResourceAdapter</mbean-ref>

      <mbean-ref name="ConnectionManagerFactoryLoaderName">JCA:service=ConnectionManagerFactoryLoader,name=MinervaSharedLocalCMFactory</mbean-ref>

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





      **************
      My login-config.xml is as follows:

      <?xml version='1.0'?>
      <!DOCTYPE policy PUBLIC
      "-//JBoss//DTD JBOSS Security Config 3.0//EN"
      "http://www.jboss.org/j2ee/dtd/security_config.dtd">

      <!-- The XML based JAAS login configuration read by the
      org.jboss.security.auth.login.XMLLoginConfig mbean. Add
      an application-policy element for each security domain.

      The outline of the application-policy is:
      <application-policy name="security-domain-name">

      <login-module code="login.module1.class.name" flag="control_flag">
      <module-option name = "option1-name">option1-value</module-option>
      <module-option name = "option2-name">option2-value</module-option>
      ...
      </login-module>

      <login-module code="login.module2.class.name" flag="control_flag">
      ...
      </login-module>
      ...

      </application-policy>

      $Revision: 1.1.2.3 $
      -->


      <!-- Used by clients within the application server VM such as
      mbeans and servlets that access EJBs.
      -->
      <application-policy name = "client-login">

      <login-module code = "org.jboss.security.ClientLoginModule"
      flag = "required">
      </login-module>

      </application-policy>

      <!-- Security domain for JBossMQ -->
      <application-policy name = "jbossmq">

      <login-module code = "org.jboss.mq.sm.file.DynamicLoginModule"
      flag = "required">
      <module-option name = "unauthenticatedIdentity">guest</module-option>
      <module-option name = "sm.objectname">jboss.mq:service=StateManager</module-option>
      </login-module>

      </application-policy>

      <!-- Security domains for testing new jca framework -->
      <application-policy name = "HsqlDbRealm">

      <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule"
      flag = "required">
      <module-option name = "principal">sa</module-option>
      <module-option name = "userName">sa</module-option>
      <module-option name = "password"></module-option>
      <module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=hsqldbDS</module-option>
      </login-module>

      </application-policy>

      <application-policy name = "FirebirdDBRealm">

      <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule"
      flag = "required">
      <module-option name = "principal">sysdba</module-option>
      <module-option name = "userName">sysdba</module-option>
      <module-option name = "password">masterkey</module-option>
      <module-option name = "managedConnectionFactoryName">jboss.jca:service=XaTxCM,name=FirebirdDS</module-option>
      </login-module>

      </application-policy>

      <application-policy name = "JmsXARealm">

      <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule"
      flag = "required">
      <module-option name = "principal">guest</module-option>
      <module-option name = "userName">guest</module-option>
      <module-option name = "password">guest</module-option>
      <module-option name = "managedConnectionFactoryName">jboss.jca:service=XaTxCM,name=jmsra</module-option>
      </login-module>

      </application-policy>

      <!-- The default login configuration used by any security domain that
      does not have a application-policy entry with a matching name
      -->
      <application-policy name = "other">
      <!-- A simple server login module, which can be used when the number
      of users is relatively small. It uses two properties files:
      users.properties, which holds users (key) and their password (value).
      roles.properties, which holds users (key) and a comma-separated list of
      their roles (value).
      The unauthenticatedIdentity property defines the name of the principal
      that will be used when a null username and password are presented as is
      the case for an unuathenticated web client or MDB. If you want to
      allow such users to be authenticated add the property, e.g.,
      unauthenticatedIdentity="nobody"
      -->

      <login-module code = "org.jboss.security.auth.spi.UsersRolesLoginModule"
      flag = "required" />

      </application-policy>

      <!-- Oracle configuration
      <application-policy name = "OracleDbRealm">

      <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=OracleDS</module-option>
      </login-module>

      </application-policy>
      -->


      <application-policy name = "MSSQLDbRealm">

      <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required">
      <module-option name = "principal">sa</module-option>
      <module-option name = "userName">sa</module-option>
      <module-option name = "password"></module-option>
      <module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=MSSQLDS</module-option>
      </login-module>

      </application-policy>





      **************
      My standardjaws.xml, I changed the DefaultDS as follows:

      java:/MSSQLDS
      <type-mapping>MS SQLSERVER2000</type-mapping>
      false

      **************
      My standardjbosscmp-jdbc.xml do the same change:

      java:/MSSQLDS
      <datasource-mapping>MS SQLSERVER2000</datasource-mapping>


      I wonder if anyone knows about it, any reply is highly appriciated!!

      Thanks

      qiang

        • 1. Re: Jboss3.0.1RC + MSSQL datasource configuration problem
          davidjencks

          Please indicate what anyone could do so that you would use the version of a sample configuration file that is appropriate for the jboss version you have. I am not trying to be snide, but I spend several hours each week explaining the differences between different versions, and I am getting very tired of it.

          Then please upgrade to jboss 3.0.2 and use the example mssql-service.xml file that comes with it.

          I suggest working in stages. First get the datasource deployed without error, then add your app.