Skip navigation
RupakKhurana
Currently Being Moderated

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

Jan 31, 2012 12:28 PM

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.trans action.JOTMTransactionManagerLookup</item>

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

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

  </annotation>

 
Replies
  • Currently Being Moderated
    Jan 31, 2012 10:51 PM   in reply to RupakKhurana

    Rupak,

     

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

     

    Regards,

     

    Ashish Vashisht

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 6, 2012 11:23 PM   in reply to RupakKhurana

    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

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points