Hello,
I want to use a mysql database with jboss (4.0.4 RC1), but somehow I can't get 
it configured.
I put the mysql-connector-java-3.1.12-bin.jar in the server/default/lib 
directory, and I have the mysql-ds.xml in the server/default/deploy directory. 

It looks as follows:

  | <datasources> 
  |   <local-tx-datasource> 
  |  
  |     <jndi-name>DefaultDS</jndi-name> 
  |  
  |     <connection-url>jdbc:mysql://localhost:3306/isep</connection-url> 
  |     <driver-class>com.mysql.jdbc.Driver</driver-class> 
  |  
  |     <user-name>root</user-name> 
  |     <password>mypassword</password> 
  |  
  |     <connection-property name="autoReconnect">true</connection-property>
  |  
  |     <!-- Typemapping for JBoss 4.0 --> 
  |     <metadata> 
  |       <type-mapping>mySQL</type-mapping> 
  |     </metadata> 
  |  
  |   </local-tx-datasource> 
  | </datasources>
  | 
  | 

isep is the database I want to use, so I think the connection url should be 
okay. Also I deleted the hsqldb-ds.xml from the deploy directory because mysql 
is the default database.

Now when I am starting my server, I get:

  | 
===============================================================================
  | .
  |   JBoss Bootstrap Environment
  | .
  |   JBOSS_HOME: C:\isep\jboss\bin\\..
  | .
  |   JAVA: C:\Programme\Java\jdk1.5.0_06\bin\java
  | .
  |   JAVA_OPTS:  -Dprogram.name=run.bat -Xms128m -Xmx512m
  | .
  |   CLASSPATH: 
C:\Programme\Java\jdk1.5.0_06\lib\tools.jar;C:\isep\jboss\bin\\run.
  | jar
  | .
  | 
===============================================================================
  | .
  | 18:47:13,202 INFO  [Server] Starting JBoss (MX MicroKernel)...
  | 18:47:13,202 INFO  [Server] Release ID: JBoss [Zion] 4.0.4RC1 (build: 
CVSTag=JBo
  | ss_4_0_4_RC1 date=200602071519)
  | 18:47:13,212 INFO  [Server] Home Dir: C:\isep\jboss
  | 18:47:13,212 INFO  [Server] Home URL: file:/C:/isep/jboss/
  | 18:47:13,212 INFO  [Server] Patch URL: null
  | 18:47:13,212 INFO  [Server] Server Name: default
  | 18:47:13,212 INFO  [Server] Server Home Dir: C:\isep\jboss\server\default
  | 18:47:13,212 INFO  [Server] Server Home URL: 
file:/C:/isep/jboss/server/default/
  | 
  | 18:47:13,212 INFO  [Server] Server Temp Dir: 
C:\isep\jboss\server\default\tmp
  | 18:47:13,212 INFO  [Server] Root Deployment Filename: jboss-service.xml
  | 18:47:13,582 INFO  [ServerInfo] Java version: 1.5.0_06,Sun Microsystems Inc.
  | 18:47:13,582 INFO  [ServerInfo] Java VM: Java HotSpot(TM) Client VM 
1.5.0_06-b05
  | ,Sun Microsystems Inc.
  | 18:47:13,582 INFO  [ServerInfo] OS-System: Windows XP 5.1,x86
  | 18:47:14,023 INFO  [Server] Core system initialized
  | 18:47:15,165 INFO  [Log4jService$URLWatchTimerTask] Configuring from URL: 
resour
  | ce:log4j.xml
  | 18:47:16,907 INFO  [SocketServerInvoker] Invoker started for locator: 
InvokerLoc
  | ator [socket://192.168.1.102:3873/]
  | 18:47:17,278 INFO  [AspectDeployer] Deployed AOP: 
file:/C:/isep/jboss/server/def
  | ault/deploy/ejb3-interceptors-aop.xml
  | 18:47:18,199 INFO  [WebService] Using RMI server codebase: 
http://destiny:8083/
  | 18:47:18,319 WARN  [EJBTimerServiceImpl] Cannot obtain TransactionManager 
from J
  | NDI, using TxManager.getInstance(): javax.naming.NameNotFoundException: 
Transact
  | ionManager not bound
  | 18:47:20,102 INFO  [NamingService] Started jndi bootstrap jnpPort=1099, 
rmiPort=
  | 1098, backlog=50, bindAddress=/0.0.0.0, Client SocketFactory=null, Server 
Socket
  | [EMAIL PROTECTED]
  | 18:47:20,182 INFO  [EJB3Deployer] Default persistence.properties: 
{hibernate.tra
  | nsaction.flush_before_completion=true, 
hibernate.cglib.use_reflection_optimizer=
  | false, hibernate.transaction.auto_close_session=false, 
hibernate.jndi.java.namin
  | g.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces, 
hibernate.cache.provider
  | _class=org.hibernate.cache.HashtableCacheProvider, 
hibernate.transaction.manager
  | _lookup_class=org.hibernate.transaction.JBossTransactionManagerLookup, 
hibernate
  | .jndi.java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, 
hiber
  | nate.query.factory_class=org.hibernate.hql.ast.ASTQueryTranslatorFactory, 
hibern
  | ate.connection.release_mode=after_statement}
  | 18:47:20,923 INFO  [Embedded] Catalina naming disabled
  | 18:47:21,334 INFO  [Http11BaseProtocol] Initializing Coyote HTTP/1.1 on 
http-0.0
  | .0.0-8080
  | 18:47:21,334 INFO  [Catalina] Initialization processed in 351 ms
  | 18:47:21,334 INFO  [StandardService] Starting service jboss.web
  | 18:47:21,344 INFO  [StandardEngine] Starting Servlet Engine: Apache 
Tomcat/5.5.1
  | 2
  | 18:47:21,384 INFO  [StandardHost] XML validation disabled
  | 18:47:21,404 INFO  [Catalina] Server startup in 70 ms
  | 18:47:21,554 INFO  [TomcatDeployer] deploy, ctxPath=/, 
warUrl=.../deploy/jbosswe
  | b-tomcat55.sar/ROOT.war/
  | 18:47:21,894 INFO  [WebappLoader] Dual registration of jndi stream handler: 
fact
  | ory already defined
  | 18:47:22,475 INFO  [RARDeployment] Required license terms exist, view 
META-INF/r
  | a.xml in .../deploy/jboss-local-jdbc.rar
  | 18:47:22,595 INFO  [RARDeployment] Required license terms exist, view 
META-INF/r
  | a.xml in .../deploy/jms/jms-ra.rar
  | 18:47:22,896 INFO  [ConnectionFactoryBindingService] Bound 
ConnectionManager 'jb
  | oss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 
'java:JmsXA'
  | 18:47:23,036 INFO  [ConnectionFactoryBindingService] Bound 
ConnectionManager 'jb
  | oss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 
'java:DefaultDS'
  | 18:47:23,797 WARN  [ServiceController] Problem starting service 
jboss.mq:service
  | =PersistenceManager
  | org.jboss.mq.SpyJMSException: Could not resolve uncommited transactions.  
Messag
  | e recovery may not be accurate; - nested throwable: (java.sql.SQLException: 
Ever
  | y derived table must have its own alias)
  |         at 
org.jboss.mq.pm.jdbc2.PersistenceManager.resolveAllUncommitedTXs(Pers
  | istenceManager.java:442)
  |         at 
org.jboss.mq.pm.jdbc2.PersistenceManager.startService(PersistenceMana
  | ger.java:1571)
  |         at 
org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanS
  | upport.java:289)
  |         at 
org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMB
  | eanSupport.java:245)
  |         at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
  |         at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
  | sorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at 
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
  | er.java:155)
  |         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  |         at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
  |         at 
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
  | java:260)
  |         at 
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  |         at 
org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
  | ler.java:974)
  |         at $Proxy0.start(Unknown Source)
  |         at 
org.jboss.system.ServiceController.start(ServiceController.java:417)
  |         at 
org.jboss.system.ServiceController.start(ServiceController.java:435)
  |         at 
org.jboss.system.ServiceController.start(ServiceController.java:435)
  |         at 
org.jboss.system.ServiceController.start(ServiceController.java:435)
  |         at 
org.jboss.system.ServiceController.start(ServiceController.java:435)
  |         at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
  |         at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
  | sorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at 
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
  | er.java:155)
  |         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  |         at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
  |         at 
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
  | java:260)
  |         at 
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  |         at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:190)
  |         at $Proxy4.start(Unknown Source)
  |         at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |         at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
  | java:39)
  |         at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
  | sorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at 
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
  | er.java:155)
  |         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  |         at 
org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
  | or.java:133)
  |         at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  |         at 
org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
  | BeanOperationInterceptor.java:142)
  |         at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  |         at 
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
  | java:260)
  |         at 
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  |         at 
org.jboss.mx.util.JMXInvocationHandler.invoke(JMXInvocationHandler.ja
  | va:287)
  |         at $Proxy18.start(Unknown Source)
  |         at 
org.jboss.deployment.XSLSubDeployer.start(XSLSubDeployer.java:198)
  |         at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
  |         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
  |         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
  |         at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
  |         at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
  | sorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at 
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
  | er.java:155)
  |         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  |         at 
org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
  | or.java:133)
  |         at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  |         at 
org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
  | BeanOperationInterceptor.java:142)
  |         at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  |         at 
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
  | java:260)
  |         at 
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  |         at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:190)
  |         at $Proxy6.deploy(Unknown Source)
  |         at 
org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
  | tScanner.java:334)
  |         at 
org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
  | canner.java:522)
  |         at 
org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
  | doScan(AbstractDeploymentScanner.java:207)
  |         at 
org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(A
  | bstractDeploymentScanner.java:280)
  |         at 
org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanS
  | upport.java:289)
  |         at 
org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMB
  | eanSupport.java:245)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |         at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
  | java:39)
  |         at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
  | sorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at 
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
  | er.java:155)
  |         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  |         at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
  |         at 
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
  | java:260)
  |         at 
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  |         at 
org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
  | ler.java:974)
  |         at $Proxy0.start(Unknown Source)
  |         at 
org.jboss.system.ServiceController.start(ServiceController.java:417)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |         at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
  | java:39)
  |         at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
  | sorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at 
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
  | er.java:155)
  |         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  |         at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
  |         at 
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
  | java:260)
  |         at 
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  |         at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:190)
  |         at $Proxy4.start(Unknown Source)
  |         at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
  |         at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
  |         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
  |         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
  |         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:755)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |         at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
  | java:39)
  |         at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
  | sorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at 
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
  | er.java:155)
  |         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  |         at 
org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
  | or.java:133)
  |         at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  |         at 
org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
  | BeanOperationInterceptor.java:142)
  |         at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  |         at 
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
  | java:260)
  |         at 
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  |         at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:190)
  |         at $Proxy5.deploy(Unknown Source)
  |         at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:477)
  |         at org.jboss.system.server.ServerImpl.start(ServerImpl.java:357)
  |         at org.jboss.Main.boot(Main.java:200)
  |         at org.jboss.Main$1.run(Main.java:464)
  |         at java.lang.Thread.run(Thread.java:595)
  | Caused by: java.sql.SQLException: Every derived table must have its own 
alias
  |         at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2928)
  |         at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1571)
  |         at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1666)
  |         at com.mysql.jdbc.Connection.execSQL(Connection.java:2994)
  |         at 
com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.ja
  | va:936)
  |         at 
com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:
  | 1030)
  |         at 
org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery
  | (WrappedPreparedStatement.java:236)
  |         at 
org.jboss.mq.pm.jdbc2.PersistenceManager.resolveAllUncommitedTXs(Pers
  | istenceManager.java:403)
  |         ... 113 more
  | 18:47:23,827 INFO  [TomcatDeployer] deploy, ctxPath=/jmx-console, 
warUrl=.../dep
  | loy/jmx-console.war/
  | 18:47:23,957 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
  | 
  | --- MBeans waiting for other MBeans ---
  | ObjectName: jboss.mq:service=PersistenceManager
  |   State: FAILED
  |   Reason: org.jboss.mq.SpyJMSException: Could not resolve uncommited 
transaction
  | s.  Message recovery may not be accurate; - nested throwable: 
(java.sql.SQLExcep
  | tion: Every derived table must have its own alias)
  |   I Depend On:
  |     jboss.jca:service=DataSourceBinding,name=DefaultDS
  |   Depends On Me:
  |     jboss.mq:service=DestinationManager
  | 
  | --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
  | ObjectName: jboss.mq:service=PersistenceManager
  |   State: FAILED
  |   Reason: org.jboss.mq.SpyJMSException: Could not resolve uncommited 
transaction
  | s.  Message recovery may not be accurate; - nested throwable: 
(java.sql.SQLExcep
  | tion: Every derived table must have its own alias)
  |   I Depend On:
  |     jboss.jca:service=DataSourceBinding,name=DefaultDS
  |   Depends On Me:
  |     jboss.mq:service=DestinationManager
  | 
  | 
  | 18:47:23,987 INFO  [Http11BaseProtocol] Starting Coyote HTTP/1.1 on 
http-0.0.0.0
  | -8080
  | 18:47:24,158 INFO  [ChannelSocket] JK: ajp13 listening on /0.0.0.0:8009
  | 18:47:24,168 INFO  [JkMain] Jk running ID=0 time=0/40  config=null
  | 18:47:24,178 INFO  [Server] JBoss (MX MicroKernel) [4.0.4RC1 (build: 
CVSTag=JBos
  | s_4_0_4_RC1 date=200602071519)] Started in 10s:966ms
  | 

I do not even have any projects trying to use mysql, it's a clean jboss install 
with only the mentioned changes.

Any ideas?
If there is anything else I need to configure, please let me know. 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3930179#3930179

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3930179


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to