Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > java.lang.NoClassDefFoundError

Reply
Thread Tools

java.lang.NoClassDefFoundError

 
 
g-factor
Guest
Posts: n/a
 
      03-30-2007
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.ExtensionsP haseListener.<clinit>(ExtensionsPhaseListener.java :
45)
at sun.reflect.NativeConstructorAccessorImpl.newInsta nce0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInsta nce(NativeConstructorAccessorImpl.java:
39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newI nstance(DelegatingConstructorAccessorImpl.java:
27)
at java.lang.reflect.Constructor.newInstance(Construc tor.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

 
Reply With Quote
 
 
 
 
Andrew Thompson
Guest
Posts: n/a
 
      03-30-2007
On Mar 30, 11:11 pm, "g-factor" <(E-Mail Removed)> wrote:
...
> I am developing a web application ..

....
> It works fine till I add 2 libraries, 2 .jar files ..


Archives might go in WEB-INF/lib.

Andrew T.

 
Reply With Quote
 
 
 
 
g-factor
Guest
Posts: n/a
 
      03-30-2007
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?

 
Reply With Quote
 
Leion
Guest
Posts: n/a
 
      03-30-2007
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

 
Reply With Quote
 
g-factor
Guest
Posts: n/a
 
      03-30-2007
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?

 
Reply With Quote
 
Andrew Thompson
Guest
Posts: n/a
 
      03-30-2007
On Mar 31, 12:27 am, "g-factor" <(E-Mail Removed)> wrote:
...
> Any other suggestion?


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.

 
Reply With Quote
 
g-factor
Guest
Posts: n/a
 
      03-30-2007
On Mar 30, 5:06 pm, "Andrew Thompson" <(E-Mail Removed)> wrote:
> On Mar 31, 12:27 am, "g-factor" <(E-Mail Removed)> wrote:
> ..
>
> > Any other suggestion?

>
> 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..

 
Reply With Quote
 
Andrew Thompson
Guest
Posts: n/a
 
      03-31-2007
On Mar 31, 1:15 am, "g-factor" <(E-Mail Removed)> wrote:
> On Mar 30, 5:06 pm, "Andrew Thompson" <(E-Mail Removed)> wrote:
>
> > On Mar 31, 12:27 am, "g-factor" <(E-Mail Removed)> wrote:
> > ..

>
> > > Any other suggestion?

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

....
> 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.

 
Reply With Quote
 
Rts
Guest
Posts: n/a
 
      04-26-2007
I have the same problem with tomahawk-1.1.5.jar

Did not found solution yet

 
Reply With Quote
 
Philipp Taprogge
Guest
Posts: n/a
 
      04-27-2007
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments