0 Replies Latest reply on Jun 10, 2003 7:42 AM by ch_lakshmi

    Configuring MySql service for JBoss3.2.1

    ch_lakshmi

      Could someone help me with this.
      I am getting the following exception with mysql-service.xml. The same file works fine with JBoss3.2.0RC3 version.

      16:38:14,629 INFO [MainDeployer] Starting deployment of package: file:/E:/jboss
      -3.2.1_tomcat-4.1.24/server/default/deploy/mysql-service.xml
      16:38:14,669 INFO [ServiceConfigurator] Problem configuring service jboss.jca:s
      ervice=LocalTxCM,name=printPool
      org.jboss.deployment.DeploymentException: Exception setting attribute javax.mana
      gement.Attribute: name=ManagedConnectionFactoryName value=jboss.jca:service=Loca
      lTxDS,name=printPool on mbean jboss.jca:service=LocalTxCM,name=printPool; - nest
      ed throwable: (javax.management.AttributeNotFoundException: Writable attribute '
      ManagedConnectionFactoryName' not found)
      at org.jboss.system.ServiceConfigurator.setAttribute(ServiceConfigurator
      .java:472)
      at org.jboss.system.ServiceConfigurator.configure(ServiceConfigurator.ja
      va:357)
      at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigura
      tor.java:176)
      at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java
      :118)
      -----------------------------------------------------
      Here is the mysql-servcie.xml file that I am using


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

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



      <!-- ==================================================================== -->
      <!-- New ConnectionManager setup for mysql using 2.0.11 driver -->
      <!-- Build jmx-api (build/build.sh all) and view for config documentation -->
      <!-- ==================================================================== -->




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

      <application-policy name = "MySqlDbRealm">

      <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=MySqlDS</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 MySqlDbRealm above
      MySqlDbRealm
      -->

      printPool
      <depends optional-attribute-name="ManagedConnectionFactoryName">


      <config-property name="ConnectionURL" type="java.lang.String">jdbc:mysql://localhost/print29</config-property>
      <config-property name="DriverClass" type="java.lang.String">org.gjt.mm.mysql.Driver</config-property>
      <!--set these only if you want only default logins, not through JAAS -->
      <config-property name="UserName" type="java.lang.String">print29</config-property>
      <config-property name="Password" type="java.lang.String">print29</config-property>


      <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper



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


      10
      60
      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





      ---------------------------------------------------------------

      the mysql-ds.xml contents are :

      <local-tx-datasource>
      <jndi-name>MySqlDS</jndi-name>
      <connection-url>jdbc:mysql://localhost/sudildb</connection-url>
      <driver-class>org.gjt.mm.mysql.Driver</driver-class>
      <user-name>print29</user-name>
      print29
      </local-tx-datasource>



      ----------------------------------------
      what has to be corrected in the above.
      I appreciate your help

      Thanks
      Lakshmi