-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Problem with Hibernate3.3.0CR1 jbc2 L2 cache
PostPosted: Fri May 23, 2008 4:19 am 
Newbie

Joined: Fri May 23, 2008 2:57 am
Posts: 1
when i want to use jbosscache2.1 for L2 cache.
some problems happed.

my cfg files like:

hibernate.cfg.xml (just a part)
...

<property name="hibernate.cache.use_second_level_cache">
true
</property>
<property name="hibernate.cache.use_query_cache">
true
</property>
<property name="hibernate.cache.region.jbc2.query.localonly">
true
</property>
<property name="hibernate.cache.region.factory_class">
org.hibernate.cache.jbc2.MultiplexedJBossCacheRegionFactory
</property>
...

category.hbm.xml (just a part)
<class name="Category" table="CATEGORY">
<cache usage="transactional"/>
<id name="categoryId" type="java.lang.Long">
<column name="CATEGORYID" precision="22" scale="0" />
<generator class="assigned" />
</id>

...

<map name="props" table="CATEGORYPROP" >
<cache usage="transactional"/>
<key column="CATEGORYID"/>
<index column="NAME" type="java.lang.String" length="100" />
<element column="PROPVALUE" type="java.lang.String" length="4000" not-null="true"/>
</map>
</class>

Exceptions:
1
15:48:42,031 FATAL optimistic-entity:390 - No transaction manager lookup class has been defined. Transactions cannot be used and thus OPTIMISTIC locking cannot be used! Expect errors!!
2
Failed to create local transaction; TransactionManager is null

and some puzzle Exceptions(when no cache conf. ,it's OK!):
3
Could not parse mapping document from resource Category.hbm.xml
4
Duplicate collection role mapping Category.props
the class is like:

public class Category {
private Long categoryId;
private Map<String,String> props = new HashMap<String,String>();
...
//getter/setter
...
}


I had read the doc. for a week,and seach it by google,but i cannot solve it
some one can help me?
thanks!

and could some one give me a demo ?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.