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: ClassNotFoundException in OSCache 2.4 w/ JGroups and Java 6
PostPosted: Thu Feb 25, 2010 4:44 pm 
Beginner
Beginner

Joined: Mon Apr 24, 2006 9:47 pm
Posts: 33
Location: Kansas City, MO
We have been getting this aweful exception ever since we upgrade our JVM to Java 6.
We are using Tomcat 5.5.23, and Redhat 4.5.

The exception that occurs when our Spring/Hibernate based webapp starts up is:
Code:
ChannelException: failed loading class: java.lang.ClassNotFoundException: [Lorg.jgroups.Address;
   at org.jgroups.conf.ClassConfigurator.init(ClassConfigurator.java:94)
   at org.jgroups.conf.ClassConfigurator.getInstance(ClassConfigurator.java:114)
   at org.jgroups.stack.ProtocolStack.<init>(ProtocolStack.java:51)
   at org.jgroups.JChannel.<init>(JChannel.java:205)
   at org.jgroups.JChannel.<init>(JChannel.java:185)
   at org.jgroups.blocks.NotificationBus.<init>(NotificationBus.java:62)
   at com.opensymphony.oscache.plugins.clustersupport.JavaGroupsBroadcastingListener.initialize(JavaGroupsBroadcastingListener.java:113)
   at com.opensymphony.oscache.base.AbstractCacheAdministrator.configureStandardListeners(AbstractCacheAdministrator.java:328)
   at com.opensymphony.oscache.general.GeneralCacheAdministrator.createCache(GeneralCacheAdministrator.java:305)
   at com.opensymphony.oscache.general.GeneralCacheAdministrator.<init>(GeneralCacheAdministrator.java:99)
   at com.opensymphony.oscache.general.GeneralCacheAdministrator.<init>(GeneralCacheAdministrator.java:90)
   at com.opensymphony.oscache.hibernate.OSCacheProvider.start(OSCacheProvider.java:112)
   at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:183)
   at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
   at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:805)
   at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:745)
   at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:134)


"[Lorg.jgroups.Address;" is the string representation of an Array of org.jgroups.Address objects.

The problem is, jgroups 2.2.8 is trying to use loadClass to get the Class representing an array of Address objects, which works fine in Java 5, but Java 6's ClassLoader.loadClass(String className) does not support loading an object Array this way.

The solution is to upgrade your jgroups-2.2.8.jar to jgroups 2.4.1 or newer (which is also available for maven)

I hope this post saves you tons of time if you run into this problem.

Peace


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.