[jboss-user] [JBoss jBPM] - Re: Hibernate Dialect -must be explicitly set

k.karanjkar do-not-reply at jboss.com
Wed Nov 21 01:06:00 EST 2007


Hello all ,

I am getting following error .. .when I try to run my EJB application .. 

I am using Jboss 4.0.4 , neatbeans 5.5 and mysql5 .. 


ObjectName: persistence.units:ear=simplyRent.ear,jar=simplyRent-ejb.jar,unitName=simplyRent-ejbPU
  State: FAILED
  Reason: org.hibernate.HibernateException: Hibernate Dialect must be explicitly set
  I Depend On:
    jboss.jca:service=ManagedConnectionFactory,name=MySqlDS
  Depends On Me:
    jboss.j2ee:ear=simplyRent.ear,jar=simplyRent-ejb.jar,name=LocationMasterFacade,service=EJB3
    jboss.j2ee:ear=simplyRent.ear,jar=simplyRent-ejb.jar,name=LocationMasterMessage,service=EJB3

ObjectName: jboss.j2ee:ear=simplyRent.ear,jar=simplyRent-ejb.jar,name=LocationMasterFacade,service=EJB3
  State: NOTYETINSTALLED
  I Depend On:
    persistence.units:ear=simplyRent.ear,jar=simplyRent-ejb.jar,unitName=simplyRent-ejbPU

ObjectName: jboss.j2ee:ear=simplyRent.ear,jar=simplyRent-ejb.jar,name=LocationMasterMessage,service=EJB3
  State: NOTYETINSTALLED
  I Depend On:
    persistence.units:ear=simplyRent.ear,jar=simplyRent-ejb.jar,unitName=simplyRent-ejbPU

--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: persistence.units:ear=simplyRent.ear,jar=simplyRent-ejb.jar,unitName=simplyRent-ejbPU
  State: FAILED
  Reason: org.hibernate.HibernateException: Hibernate Dialect must be explicitly set
  I Depend On:
    jboss.jca:service=ManagedConnectionFactory,name=MySqlDS
  Depends On Me:
    jboss.j2ee:ear=simplyRent.ear,jar=simplyRent-ejb.jar,name=LocationMasterFacade,service=EJB3
    jboss.j2ee:ear=simplyRent.ear,jar=simplyRent-ejb.jar,name=LocationMasterMessage,service=EJB3

ObjectName: jboss.jca:service=DataSourceBinding,name=DefaultDS
  State: NOTYETINSTALLED
  Depends On Me:
    jboss.ejb:service=EJBTimerService,persistencePolicy=database
    jboss.mq:service=StateManager
    jboss.mq:service=PersistenceManager



My Mysql_ds.xml file is 
<?xml version="1.0" encoding="UTF-8"?>

<!-- $Id: mysql-ds.xml 63175 2007-05-21 16:26:06Z rrajesh $ -->
<!--  Datasource config for MySQL using 3.0.9 available from:
http://www.mysql.com/downloads/api-jdbc-stable.html
-->


  <local-tx-datasource>
    <jndi-name>MySqlDS</jndi-name>
    <connection-url>jdbc:mysql://localhost:3306/rentdb</connection-url>
    <driver-class>com.mysql.jdbc.Driver</driver-class>
    <user-name>root</user-name>
    root
    <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
    <!-- should only be used on drivers after 3.22.1 with "ping" support
    <valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionChecker</valid-connection-checker-class-name>
    -->
    <!-- sql to call when connection is created
    <new-connection-sql>some arbitrary sql</new-connection-sql>
      -->
    <!-- sql to call on an existing pooled connection when it is obtained from pool - MySQLValidConnectionChecker is preferred for newer drivers
    <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
      -->

    <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml -->
    
       <type-mapping>mySQL</type-mapping>
    
  </local-tx-datasource>



My persistence.xml is 
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
  <persistence-unit name="simplyRent-ejbPU" transaction-type="JTA">
    org.hibernate.ejb.HibernatePersistence
    <jta-data-source>MySqlDS</jta-data-source>
    ejb.user.UserMaster
    ejb.LocationMaster
    
      
    
  </persistence-unit>


and my Jboss-ds.xml is 

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

  <local-tx-datasource>
    <jndi-name>MySqlDS</jndi-name>
    <connection-url>jdbc:mysql://localhost:3306/rentdb</connection-url>
    <driver-class>com.mysql.jdbc.Driver</driver-class>
    <user-name>root</user-name>
    root
    <min-pool-size>5</min-pool-size>
    <max-pool-size>20</max-pool-size>
    <idle-timeout-minutes>5</idle-timeout-minutes>
  </local-tx-datasource>
  



Could any body tell me wht is going wrong here ... 
I am not able to connect to mysql database while running 






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

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



More information about the jboss-user mailing list