JDBC Services Example?
garymarsh Mar 1, 2002 3:57 PMHi;
I am attempting to use JBoss3.0 Beta W/Tomcat4.0.2. I previously attempted to use the JBoss3.0 beta Jetty version but ran into problems with jetty. I was able to load and make my connections to my JDBC driver in the jetty version but in this version I fail to connect. I am using MS SQLServer 2000 and my service.xml looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<!-- ===================================================================== -->
<!-- -->
<!-- Sql Server 2000 Configuration -->
<!-- -->
<!-- ===================================================================== -->
<!-- $Id: sqlserver2000-service.xml,v 1.0 2002/02/15 21:03:00 Gary Marsh Exp $ -->
<!-- ==================================================================== -->
<!-- JDBC - Initialize the databases -->
<!-- to ConnectionFactoryLoader -->
<!-- ==================================================================== -->
ConnectionURL=jdbc:merant:sqlserver://localhost:1433;DatabaseName=PayeArchitecture;SelectMethod=cursor
DriverClass=com.merant.datadirect.jdbc.sqlserver.SQLServerDriver
UserName=myDB
password=g2x2y3
SQLServerPool
java:/TransactionManager
<!--Anonymous mbean-ref to database being started -->
<!--WARNING: DO NOT COPY BLINDLY! This is useful only if the database is
started by an mbean in the jboss jmx framework! The only example of this
we have right now is hsqldb! Do not use a line like this for external
databases. -->
<!--mbean-ref>JBOSS-SYSTEM:service=SQLServerPool</mbean-ref-->
<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>
#
#Wed Aug 15 16:17:29 EDT 2001
MinSize=0
MaxSize=10
BlockingTimeoutMillis=5000
IdleTimeoutMinutes=30
CleanupIntervalMinutes=10
MaxIdleTimeoutPercent=1.0
org.jboss.resource.security.ManyToOnePrincipalMapping
UserName=myDB
password=g2x2y3
ConnectionURL=jdbc:merant:sqlserver://localhost:1433;DatabaseName=PayeArchitecture;SelectMethod=cursor
DriverClass=com.merant.datadirect.jdbc.sqlserver.SQLServerDriver
UserName=myDB
password=g2x2y3
AutoCommit=true
SQLServerNoTransDS
java:/TransactionManager
<!--Anonymous mbean-ref to database being started -->
<!--mbean-ref>JBOSS-SYSTEM:service=SQLServerPool</mbean-ref-->
<mbean-ref name="ResourceAdapterName">JCA:service=RARDeployment,name=Minerva JDBC LocalTransaction ResourceAdapter</mbean-ref>
<mbean-ref name="ConnectionManagerFactoryLoaderName">JCA:service=ConnectionManagerFactoryLoader,name=MinervaNoTransCMFactory</mbean-ref>
#
#Wed Aug 15 16:17:29 EDT 2001
MinSize=0
MaxSize=10
BlockingTimeoutMillis=5000
IdleTimeoutMinutes=30
CleanupIntervalMinutes=10
MaxIdleTimeoutPercent=1.0
org.jboss.resource.security.ManyToOnePrincipalMapping
UserName=myDB
password=g2x2y3
the error that is produced at startup is :
2002-03-01 12:24:53,781 INFO [org.jboss.deployment.MainDeployer] Deploying: file:/D:/jboss-3.0.0beta/deploy/sqlserver2000-service.xml
2002-03-01 12:24:54,472 INFO [org.jboss.resource.ConnectionFactoryLoader] Creating
2002-03-01 12:24:54,482 INFO [org.jboss.resource.ConnectionFactoryLoader] Created
2002-03-01 12:24:54,482 INFO [org.jboss.resource.ConnectionFactoryLoader] Creating
2002-03-01 12:24:54,492 INFO [org.jboss.resource.ConnectionFactoryLoader] Created
2002-03-01 12:24:54,512 INFO [org.jboss.resource.ConnectionFactoryLoader] Starting
2002-03-01 12:24:54,532 ERROR [org.jboss.resource.ConnectionFactoryLoader.SQLServerPool] Starting failed
javax.management.RuntimeOperationsException: Object name cannot be null
at com.sun.management.jmx.MBeanServerImpl.isRegistered(MBeanServerImpl.java:1096)
at org.jboss.resource.ConnectionFactoryLoader.startService(ConnectionFactoryLoader.java:429)
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.ServiceController$ServiceProxy.invoke(ServiceController.java:777)
at $Proxy2.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:341)
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.start(Unknown Source)
at org.jboss.deployment.SARDeployer.deploy(SARDeployer.java:257)
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(Thread.java:484)
200
Can someone answer why my service.xml works for the JBoss3.0 beta Jetty version and not for the current JBoss3.0 beta Tomcat version?
Thanks,
Gary