Discussion:
[JBossCache] - Re: java.lang.NoClassDefFoundError: org/jboss/cache/TreeCach
bstansberry@jboss.com
2006-01-05 17:56:40 UTC
Permalink
Hi Vladi,

I suspect the class def it can't find *isn't* org.jboss.cache.TreeCache, but rather some other class that TreeCache uses. One of my favorite java quirks is the fact that a NoClassDefFoundError tells you the class it was trying to initialize when it couldn't find a class, rather than the missing class itself.

Did you copy over jgroups.jar as well?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3915906#3915906

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3915906


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
vovik1
2006-01-05 18:04:12 UTC
Permalink
Hi Brian,
Thanks for your reply.

I've thought about that. I did copy jgroups.jar there (default/lib).
Should I copy something else?

Vladi.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3915908#3915908

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3915908


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
bstansberry@jboss.com
2006-01-05 18:43:59 UTC
Permalink
jboss-cache.jar and jgroups.jar should be all you need; all other JBossCache dependencies are already on the classpath in the default config.

Suggest you try the following (I just did this and it worked fine):

1) Remove any JBOSS_CLASSPATH tweaks you may have done; get JBoss into its standard state except you've got jboss-cache.jar and jgroups.jar in default/lib.

2) Copy the tc5-cluster-service.xml file from all/deploy to default/deploy. This file starts the TreeCache we use for HttpSession replication. You don't need it, but if it deploys correctly we know that a cache instance can be started.

3) Remove your ear (so we can get a clean picture).

4) Start JBoss. If the tree cache starts cleanly, we know the needed classes are on the classpath. If then your app still has a problem, there is something odd with the classloading configuration of your ear.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3915914#3915914

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3915914


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
vovik1
2006-01-05 20:05:29 UTC
Permalink
Brian,
Thanks so much.
I did what you said and it started working!!!

I guess the problem was in the order of my actions.
I copied jboss-cache.jar
It didn't work, so I explicitly added jboss-cache.jar to the JBOSS_CLASSPATH

It didn't work either, so I copied over jgroups.jar (by the way, I don't think there is a documentation about it. I just guessed)
Then, it didn't work again.

Only removing jboss-cache.jar from the JBOSS_CLASSPATH did the trick.
(this last attempt I haven't done, I mostly tried to copy other .jars and to different places).
The real problem here is (I guess): Why does loader complain about TreeCache class when it misses something else. I am sure that standard JVM loader (at least 1.4 JVM) does not do that (I've been through it ones).

Any way, thanks a lot.
I really appreciate it!

Vladi.



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3915927#3915927

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3915927


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
bstansberry@jboss.com
2006-01-05 20:20:44 UTC
Permalink
Glad it worked; hadn't really thought through why the JBOSS_CLASSPATH setting would be a problem, but experience has taught me to start with a clean setup :)

I see now why it would be a problem -- jars loaded via JBOSS_CLASSPATH are in a parent classloader to those loaded from default/lib. If you loaded jboss-cache.jar from JBOSS_CLASSPATH and jgroups.jar from default/lib, the classloader that loaded jboss-cache.jar would not be able to see jgroups.jar.

anonymous wrote : The real problem here is (I guess): Why does loader complain about TreeCache class when it misses something else. I am sure that standard JVM loader (at least 1.4 JVM) does not do that (I've been through it ones).

That's interesting. I've seen this kind of problem many times, but honestly can't recall if it was always in JBoss. If I get a chance I'll check it out.

(If anyone in the community wants to look into whether this misleading message is a JBoss issue and finds that it is, please write a test case and create a JIRA issue. Please search JIRA first in case there is an existing issue).

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3915929#3915929

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3915929


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click

Loading...