java.lang.NoClassDefFoundError

G

g-factor

Hi everybody,

I am developing a web application in JSF, usign application server 9.0
update 1.
It works fine till I add 2 libraries, 2 .jar files in the project
properties.
I go on properties of the project Add JAR/Folder, and I add these
2 .jar files:

1) tomahawk-1.1.3.jar
2) tomahawk-sandbox-1.1.5-SNAPSHOT.jar

Then I build my application, it works fine, then I deploy it on the
server and as I launch it it gives me this error

HTTP Status 404 -
description The requested resource () is not available.

When I go in the log file of the server this is the error message I
get:

Log Entry Detail

Details
Timestamp:

Mar 30, 2007 13:47:50.609
Log Level:

SEVERE
Logger:

javax.enterprise.system.container.web
Name-Value Pairs:

_ThreadID=41;_ThreadName=Thread-88;_RequestID=4eb5ac27-
f59b-44d8-8433-2fa2a19bc1c6;
Record Number:

1701
Message ID:

WebModule[/PMA]Exception sending context initialized event to listener
instance of class com.sun.faces.config.ConfigureListener
java.lang.NoClassDefFoundError
Complete Message

org/apache/commons/logging/LogFactory
at
org.apache.myfaces.renderkit.html.util.ExtensionsPhaseListener.<clinit>(ExtensionsPhaseListener.java:
45)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:
39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:
27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355-
-
-
-
-
-
-

then it keeps going.

Anybody has an idea why when I add the two libraries at the project I
get this error message?
If I remove them it works fine...but I need them...

Anybody has ideas?

Thanks.

Gabriele
 
G

g-factor

Hi Andrew,

thanks for your reply, I really appreciate it :)
Actually when I deploy the application in the server the "lib" folder
exists inside the WEB-INF folder, and both the .jar files are
there.....so I don't really know why I still get the message :"The
requested resource () is not available. ".

I saw around the net that somebody suggested to add the .jar files
also in some other lib folder of the server. But since I am using
application server 9.0 I really don't know what other folder to copy
them into.

Any other suggestion?
 
L

Leion

Hi Gabriele
I don't know much about JSF or tomahawk, but whenever I see a
java.lang.NoClassDefFoundError I first check that I'm compiling and
running my code with the same version of java.

/Henrik
 
G

g-factor

Hi Henrik,

locally I have J2SE 5.0 Update 10, on the server I have J2SE 5.0
Update 10 and Update 11.

Could this be an issue?
 
G

g-factor

Refresh the server. This might be done by
stopping and restarting it, but Tomcat* can
be refreshed while still running.

* The only server I have any experience with.

Andrew T.

Do you mean the application server or the physical server itself?

Because the app. server i've already restarted it several times...but
still it has problems with these libraries that I import.

If I run the web app without importing these 2 libraries it works
fine..
 
A

Andrew Thompson

....
Do you mean the application server or the physical server itself?

Pfft.. dunno. What's the difference?

As an aside, I noticed when first replying,
that the 'subject' of this post might better
have been listed as I changed it above.

The NCDFE is a common problem for people just
starting in Java, and the web-app. gurus generally
leave those questions for a small group of people
who enjoy helping noobs. Perhaps one of them will
notice this subject, and be able to advise further.

Andrew T.
 
P

Philipp Taprogge

Hi!

Thus spake g-factor on 03/30/2007 03:11 PM:
WebModule[/PMA]Exception sending context initialized event to listener
instance of class com.sun.faces.config.ConfigureListener
java.lang.NoClassDefFoundError

Hmm... there seems to be a ServletContextListener defined in your
web.xml...? The error seems to pop up in that listeners
contextInitialized() method...
Could we see the web.xml and perhaps the Listener code...?

Regards,

Phil
 
Joined
Aug 10, 2007
Messages
1
Reaction score
0
the problem, my solution

I have that problem when I add tomahawk jar to the classpath

classnotfound
org/apache/commons/logging/LogFactory

I solve it adding common-loggins.jar to the classpath
:deal: :deal:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top