-->
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.  [ 2 posts ] 
Author Message
 Post subject: error when attempting to set cache usage attribute
PostPosted: Mon Jul 12, 2004 12:15 pm 
Newbie

Joined: Wed Jun 30, 2004 11:00 am
Posts: 7
Hi,

I'm having trouble setting the cache usage attribute in my mapping file. I have a read only entity that I'd like to cache to avoid unecessary trips to the db. But, entereing the cache usage line into the xml throws a parsing error. What am I doing wrong here? The line is copied out of the documentation.

Thanks,
Eric

Code:

<class name="em.Forum" table="EM_FORUM" mutable="false">
    <cache usage="read-only" />
    ......
</class>



Error parsing XML: XML InputStream(127) The content of element type "class" must match "(meta*,(cache|jcs-cache)?,(id|composite-id),discriminator?,(version|timestamp)?,(property|many-to-one|one-to-one|component|dynamic-component|any|map|set|list|bag|idbag|array|primitive-array)*,(subclass*|joined-subclass*))".
12:09:05,649 ERROR [TP-Processor3] LoggerStream.write(140) | net.sf.hibernate.LazyInitializationException: Hibernate lazy instantiation problem

Hibernate 2.0


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 12, 2004 6:05 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
And you mapping is OK wo <cache> ?
Iss true, then try to set <cache in a different place (order) some parser are strict regarding the tag order.

_________________
Emmanuel


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

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.