Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

[JTATransaction] You should set hibernate.transaction.manager_lookup_class if cache is enabled

Avatar

Level 3

Hello

I keep seeing the above error in my server log. My model file has the following. What is the warning about and how to rectify it in the right way

thanks

Rupak

<annotation name="DMS">

    <item name="datasource">java:comp/env/ALGODB</item>

    <item name="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</item>

    <item name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JOTMTransactionManagerLookup</item>

    <item name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</item>

    <item name="ServerGeneratedEntities">false</item>

  </annotation>

3 Replies

Avatar

Level 3

Rupak,

Your configuration seems to be correct. Can you post your Hibernate config file and server log?

Regards,

Ashish Vashisht

Avatar

Level 3

Hi Ashish

There is nothing else in log other than the following. Where do I find hibernate configuration file. There is none in my project folder and the only place hibernate is being configured is in the .fml file that also I pasted..

: You should set hibernate.transaction.manager_lookup_class if cache is enabled

thanks

Rupak

Avatar

Level 3

Hi

Sorry for the delay in replying, I was out of office for the last week or so.

Can you check your Data Source configuration, specifically if it has the factory property specified or not?

    <Transaction factory="org.objectweb.jotm.UserTransactionFactory" jotm.timeout="60"/>    
    <Resource name="jdbc/ordersDB" type="javax.sql.DataSource"
          driverClassName="org.hsqldb.jdbcDriver"
          maxIdle="2" maxWait="5000"
          factory="org.objectweb.jndi.DataSourceFactory"
          url="jdbc:hsqldb:hsql://localhost:9002/ordersdb" username="sa" password="" maxActive="4"
    />

If that does not help, can you enable trace level logging on org.hibernate.jdbc.* and org.hibernate.transaction.* That should help identify the cause of the issue.

Regards,

Ashish Vashisht