-->
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: Hibernate, Jboss TreeCache (local mode)-NoClassDefFoundError
PostPosted: Tue Jul 10, 2007 11:59 am 
Newbie

Joined: Thu Jun 14, 2007 5:28 pm
Posts: 7
Hi,

Iam trying to use treecahce (Jboss Cache) as a second-level cache and cache mode as local.
I included all the jboss jar files that comes with hibernate3.1 Iam getting the following exception when i try to execute a standalone java class. (not in an app server). Following is the exception:

Initial SessionFactory creation failed.java.lang.NoClassDefFoundError: org/jboss/mx/util/Serialization
java.lang.ExceptionInInitializerError
at com.util.HibernateUtil.init(HibernateUtil.java:38)
at com.util.HibernateUtil.getSessionFactory(HibernateUtil.java:44)
at com.businessprocess.Test.getPrivs(Test.java:71)
at com.businessprocess.Test.main(Test.java:40)
Caused by: java.lang.NoClassDefFoundError: org/jboss/mx/util/Serialization
at javax.management.ObjectName.<clinit>(ObjectName.java:86)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.jboss.system.ServiceMBeanSupport.class$(ServiceMBeanSupport.java:45)
at org.jboss.system.ServiceMBeanSupport.<clinit>(ServiceMBeanSupport.java:45)
at org.hibernate.cache.TreeCacheProvider.start(TreeCacheProvider.java:47)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:173)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1176)
at com.util.HibernateUtil.init(HibernateUtil.java:33)

I can see the org/jboss/mx/util/Serialization in the jboss-jmx.jar which i already included.


Following is my treecahce.xml config:
<?xml version="1.0" encoding="UTF-8"?>
<server>
<classpath codebase="./lib" archives="jboss-cache.jar, jgroups.jar" />
<mbean code="org.jboss.cache.TreeCache"
name="jboss.cache:service=TreeCache">
<depends>jboss:service=Naming</depends>
<depends>jboss:service=TransactionManager</depends>


<attribute name="CacheMode">LOCAL</attribute>

<attribute name="LockAcquisitionTimeout">15000</attribute>
<attribute name="FetchStateOnStartup">true</attribute>
<attribute name="EvictionPolicyClass">
org.jboss.cache.eviction.LRUPolicy
</attribute>
<attribute name="EvictionPolicyConfig">
<config>
<attribute name="wakeUpIntervalSeconds">5</attribute>
<!-- Cache wide default -->
<region name="/_default_">
<attribute name="maxNodes">5000</attribute>
<attribute name="timeToIdleSeconds">1000</attribute>
</region>
<region name="/com/businessobjects/Account">
<attribute name="maxNodes">500</attribute>
<attribute name="timeToIdleSeconds">5000</attribute>
</region>
</config>
</attribute>
</mbean>
</server>

Can some one help?

thx.


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.