[jboss-user] [Installation, Configuration & DEPLOYMENT] - Re: Incomplete deployment - DataSourceBinding- JBOSS 4.2.2 +

July Pyrra do-not-reply at jboss.com
Wed Jun 4 07:28:24 EDT 2008


Thanks for your precisions. I read the documentation to configure JBoss, it seems it never ends, I always discover new things to do.

So now, I have the famous mysql-ds.xml that I added to JBOSSHOME/server/myapp/deploy as follow:
<datasources>
  |   <local-tx-datasource>
  |     <jndi-name>cuoreds</jndi-name>
  |     <connection-url>jdbc:mysql://localhost:3306/cuore</connection-url>
  |     <driver-class>com.mysql.jdbc.Driver</driver-class>
  |     <user-name>root</user-name>
  |     <password>123456</password>      <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
  |     <new-connection-sql>cuore</new-connection-sql>
  |     <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml -->
  |     <metadata>
  |        <type-mapping>mySQL</type-mapping>
  |     </metadata>
  |   </local-tx-datasource>
  | </datasources>

Then I had an error of jbdc driver, so I dowloaded it , put the sqljdbc.jar  in JBOSSHOME/server/myapp/lib, added it in the BUILDPATH in Eclipse and added it in the deploy folder, even if I'm not sure it's really useful.
Then I did the same with the mysql-connector-java-5.0.8-bin.jar.

But it still doesn't work...:´( Here is the log

2008-06-04 13:28:03,583 DEBUG [org.jboss.util.NestedThrowable] org.jboss.util.NestedThrowable.detectDuplicateNesting=true
2008-06-04 13:28:03,583 WARN  [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Throwable while attempting to get a new connection: null
org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'cuore' at line 1)
	at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:179)
	at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:577)
	at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:262)
	at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:500)
	at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:341)
	at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:315)
	at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:396)
	at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:842)
	at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
	at org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:47)
	at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:84)
	at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009)
	at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292)
	at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:713)
	at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:127)
	at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:246)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
... 
and tons of lines.

It also says me this at the end:
Caused by: org.hibernate.HibernateException: Hibernate Dialect must be explicitly set

I'm lost and desperate...


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

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




More information about the jboss-user mailing list