mysql-service.xml and jBoss-3.0.0beta
steff Apr 19, 2002 8:09 AMHi
I know this is at common question, but I havent been able to finde a solution for my problem in the Forums.
I want to use mySQL with jBoss-3.0.0beta.
I have the follwing mysql-service.xml:
<?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 -->
<!-- ==================================================================== -->
<!--make the rar deploy! hack till better deployment-->
jboss.jca:service=RARDeployer
<depends optional-attribute-name="ManagedConnectionFactoryName">
<!--embedded mbean-->
<!--hack-->
<depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=Minerva JDBC
LocalTransaction ResourceAdapter
<!--real attributes-->
<config-property>
<config-property-name>ConnectionURL</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>jdbc:mysql://localhost:3306/jBoss</config-property-value>
</config-property>
<config-property>
<config-property-name>DriverClass</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>org.gjt.mm.mysql.Driver</config-property-value>
</config-property>
<config-property>
<config-property-name>UserName</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>steff</config-property-value>
</config-property>
<config-property>
<config-property-name>Password</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>Champ</config-property-value>
</config-property>
MySqlDS
<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
<!-- 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 the part of
SecurityDomainJndiName after java:/jaas/, 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 -->
java:/jaas/MySqlDbRealm
java:/TransactionManager
When I deploy it, I get the following error:
2002-04-19 14:03:05,125 INFO [org.jboss.deployment.MainDeployer] Deploying: file:/E:/jboss-3.0.0beta/deploy/mysql-service.xml
2002-04-19 14:03:05,455 INFO [Default] Server 1.6 is running
2002-04-19 14:03:05,455 INFO [Default] Press [Ctrl]+[C] to abort
2002-04-19 14:03:05,495 ERROR [org.jboss.system.ServiceController] Could not create MBean: jboss.jca:service=LocalTxCM,name=MySqlDS
javax.management.ReflectionException: The MBean class could not be loaded by the specified loader
at com.sun.management.jmx.MBeanServerImpl.createMBean(MBeanServerImpl.java:754)
at org.jboss.system.ServiceCreator.install(ServiceCreator.java:96)
at org.jboss.system.ServiceController.install(ServiceController.java:153)
at java.lang.reflect.Method.invoke(Native Method)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:78)
at $Proxy1.install(Unknown Source)
at org.jboss.deployment.SARDeployer.deploy(SARDeployer.java:228)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:458)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:413)
at org.jboss.deployment.MainDeployer.scan(MainDeployer.java:272)
at org.jboss.deployment.MainDeployer.startService(MainDeployer.java:218)
at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:160)
at java.lang.reflect.Method.invoke(Native Method)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at org.jboss.system.Server.(Server.java:157)
at org.jboss.Main.boot(Main.java:263)
at org.jboss.Main.run(Main.java:48)
at java.lang.Thread.run(Unknown Source)
2002-04-19 14:03:05,505 ERROR [org.jboss.deployment.SARDeployer] operation failed
javax.management.ReflectionException: The MBean class could not be loaded by the specified loader
at com.sun.management.jmx.MBeanServerImpl.createMBean(MBeanServerImpl.java:754)
at org.jboss.system.ServiceCreator.install(ServiceCreator.java:96)
at org.jboss.system.ServiceController.install(ServiceController.java:153)
at java.lang.reflect.Method.invoke(Native Method)
.....
What is wrong?
Kind Regards - Per Steffensen