Announcement Announcement Module
Collapse
No announcement yet.
persisting fails due to "JpaDialect does not support JDBC connection retrieval"? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • persisting fails due to "JpaDialect does not support JDBC connection retrieval"?

    Hi all,

    I'm having a little bit of trouble persisting an entity (successfully received from my flex front-end).
    The logging output I get:

    Code:
    2011-11-15 16:51:24,894 ["http-apr-8080"-exec-9] INFO  be.tradelec.server.service.TradServerService - persistTradTranslation tradTranslation:NL: Grote Markt, FR: Grand Marchee
    2011-11-15 16:51:24,895 ["http-apr-8080"-exec-9] DEBUG org.springframework.orm.jpa.JpaTransactionManager - Found thread-bound EntityManager [org.hibernate.ejb.EntityManagerImpl@705fe568] for JPA transaction
    2011-11-15 16:51:24,896 ["http-apr-8080"-exec-9] DEBUG org.springframework.orm.jpa.JpaTransactionManager - Participating in existing transaction
    2011-11-15 16:51:24,932 ["http-apr-8080"-exec-9] DEBUG org.springframework.orm.jpa.JpaTransactionManager - Participating transaction failed - marking existing transaction as rollback-only
    2011-11-15 16:51:24,934 ["http-apr-8080"-exec-9] DEBUG org.springframework.orm.jpa.JpaTransactionManager - Setting JPA transaction on EntityManager [org.hibernate.ejb.EntityManagerImpl@705fe568] rollback-only
    2011-11-15 16:51:24,936 ["http-apr-8080"-exec-9] DEBUG org.springframework.orm.jpa.JpaTransactionManager - Initiating transaction rollback
    2011-11-15 16:51:24,936 ["http-apr-8080"-exec-9] DEBUG org.springframework.orm.jpa.JpaTransactionManager - Rolling back JPA transaction on EntityManager [org.hibernate.ejb.EntityManagerImpl@705fe568]
    2011-11-15 16:51:24,938 ["http-apr-8080"-exec-9] DEBUG org.springframework.orm.jpa.JpaTransactionManager - Not closing pre-bound JPA EntityManager after transaction
    2011-11-15 16:51:24,950 ["http-apr-8080"-exec-9] DEBUG org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter - Closing JPA EntityManager in OpenEntityManagerInViewFilter
    2011-11-15 16:51:24,951 ["http-apr-8080"-exec-9] DEBUG org.springframework.orm.jpa.EntityManagerFactoryUtils - Closing JPA EntityManager
    My persistence.xml (created by Spring Roo):
    Code:
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
    <persistence-unit name="persistenceUnit" transaction-type="RESOURCE_LOCAL">
            <provider>org.hibernate.ejb.HibernatePersistence</provider>
            <properties>
                <property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5InnoDBDialect"/>
                <!-- value="create" to build a new database on each run; value="update" to modify an existing database; value="create-drop" means the same as "create" but also drops tables when Hibernate closes; value="validate" makes no changes to the database -->
                <property name="hibernate.hbm2ddl.auto" value="update"/>
                <property name="hibernate.ejb.naming_strategy" value="org.hibernate.cfg.ImprovedNamingStrategy"/>
                <property name="hibernate.connection.charSet" value="UTF-8"/>
                <!-- Uncomment the following two properties for JBoss only -->
                <!-- property name="hibernate.validator.apply_to_ddl" value="false" /-->
                <!-- property name="hibernate.validator.autoregister_listeners" value="false" /-->
            </properties>
        </persistence-unit>
    </persistence>
    The code that executes the persist:
    Code:
        @Transactional
        public void persistTradTranslation(TradTranslation tradTranslation){
        	log.info("persistTradTranslation tradTranslation:"+tradTranslation);
        	tradTranslation.persist();
        }
    I added the "@Transactional" afterwards when I already had the issue, but it didn't resolve it.
    In the same project in one of my controllers I already persist a posted entity just using the same ".persist()" method without any issues.

    Any thoughts on how I could resolve the issue? I couldn't find a solution searching the web and the existing forum posts btw.
Working...
X