You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Greg Hall <gr...@evo-uw.com> on 2005/08/31 10:15:03 UTC

RE: Jetty Plugin: java.lang.NoClassDefFoundError: sun/tools/javac/Main

Hi Vincent,

I tried the new version of the plugin, and it seems to have fixed the
tools.jar problem. However, I now get another error which I think is due
to ant.jar not on the classpath (stack trace below). I do have ANT_HOME
set correctly i.e. &ANT_HOME=/opt/tools/ant

Thanks for your help on this.

Regards,
Greg.
 
[java] java.lang.NoClassDefFoundError:
org/apache/tools/ant/BuildException
    [java]      at
org.apache.jasper.JspCompilationContext.createCompiler
(JspCompilationContext.java:202)
    [java]      at org.apache.jasper.JspCompilationContext.compile
(JspCompilationContext.java:470)
    [java]      at org.apache.jasper.servlet.JspServletWrapper.service
(JspServletWrapper.java:190)
    [java]      at org.apache.jasper.servlet.JspServlet.serviceJspFile
(JspServlet.java:295)
    [java]      at org.apache.jasper.servlet.JspServlet.service
(JspServlet.java:241)
    [java]      at javax.servlet.http.HttpServlet.service
(HttpServlet.java:853)
    [java]      at org.mortbay.jetty.servlet.ServletHolder.handle
(ServletHolder.java:358)
    [java]      at
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch
(WebApplicationHandler.java:294)
    [java]      at org.mortbay.jetty.servlet.Dispatcher.dispatch
(Dispatcher.java:222)
    [java]      at org.mortbay.jetty.servlet.Dispatcher.forward
(Dispatcher.java:135)
    [java]      at org.mortbay.jetty.servlet.Default.handleGet
(Default.java:293)
    [java]      at org.mortbay.jetty.servlet.Default.service
(Default.java:208)
    [java]      at javax.servlet.http.HttpServlet.service
(HttpServlet.java:853)
    [java]      at org.mortbay.jetty.servlet.ServletHolder.handle
(ServletHolder.java:358)
    [java]      at org.mortbay.jetty.servlet.WebApplicationHandler
$Chain.doFilter(WebApplicationHandler.java:342)
    [java]      at
com.opensymphony.module.sitemesh.filter.PageFilter.parsePage
(PageFilter.java:118)
    [java]      at
com.opensymphony.module.sitemesh.filter.PageFilter.doFilter
(PageFilter.java:52)
    [java]      at org.mortbay.jetty.servlet.WebApplicationHandler
$Chain.doFilter(WebApplicationHandler.java:334)
    [java]      at
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch
(WebApplicationHandler.java:286)
    [java]      at org.mortbay.jetty.servlet.ServletHandler.handle
(ServletHandler.java:567)
    [java]      at org.mortbay.http.HttpContext.handle
(HttpContext.java:1807)
    [java]      at
org.mortbay.jetty.servlet.WebApplicationContext.handle
(WebApplicationContext.java:525)
    [java]      at org.mortbay.http.HttpContext.handle
(HttpContext.java:1757)
    [java]      at org.mortbay.http.HttpServer.service
(HttpServer.java:879)
    [java]      at org.mortbay.http.HttpConnection.service
(HttpConnection.java:790)
    [java]      at org.mortbay.http.HttpConnection.handleNext
(HttpConnection.java:961)
    [java]      at org.mortbay.http.HttpConnection.handle
(HttpConnection.java:807)
    [java]      at org.mortbay.http.SocketListener.handleConnection
(SocketListener.java:197)
    [java]      at org.mortbay.util.ThreadedServer.handle
(ThreadedServer.java:276)
    [java]      at org.mortbay.util.ThreadPool$PoolThread.run
(ThreadPool.java:511)

On Tue, 2005-08-30 at 19:25 +0200, Vincent Massol wrote:

> Hi Greg,
> 
> > -----Original Message-----
> > From: Greg Hall [mailto:greg.hall@evo-uw.com]
> > Sent: mardi 30 août 2005 18:47
> > To: users@maven.apache.org
> > Subject: Jetty Plugin: java.lang.NoClassDefFoundError:
> > sun/tools/javac/Main
> > 
> > Hi,
> > 
> > I'm new to Maven and have been following the examples in the Maven
> > developers notebook book. I've tried using the jetty plugin to load a
> > war containing an application which includes some JSP's.
> > 
> > Jetty starts up fine, but when I go to the first page (a JSP) I get the
> > error below.
> > 
> > I realise this is because Jetty can't find tools.jar to compile the
> > generated servlet code- what I don't know is how to add tools.jar to the
> > jetty plugin classpath. JAVA_HOME is set up correctly. I'm using jdk1.5
> > on Linux.
> > 
> > Any help would be most appreciated.
> 
> I guess I've neglected the Jetty plugin for some time now... (Actually I've
> been working on Cargo - htptp://cargo.codehaus.org - which I hope will
> replace all those individual container plugins one day).
> 
> I've just applied http://jira.codehaus.org/browse/MPJETTY-2. Could you
> please try
> http://www.apache.org/~vmassol/maven-jetty-plugin-1.2-SNAPSHOT.jar and see
> if it works? To use it, simply drop it in your MAVNEHOME/plugins directory
> and remove the previous version there.
> 
> Thanks
> -Vincent
> 
> 
> 	
> 
> 	
> 		
> ___________________________________________________________________________ 
> Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger 
> Téléchargez cette version sur http://fr.messenger.yahoo.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 

Gregory Hall MIAP MBCS
Chief Software Architect
Evolution Technology Services Ltd
----------------------------------

Evolution Technology Services Ltd.

PLEASE NOTE:
This e-mail is confidential to the ordinary user of the mailbox to which it was addressed. It may be disclosed only for the purposes for which it was sent. If you receive this e-mail in error you should not use, disclose, copy, forward or rely on it, but destroy it and notify the sender.
 
Please visit http://www.evolutionunderwriting.com/home/email.html for the full wording of our disclaimer.

Re: Jetty Plugin: java.lang.NoClassDefFoundError:sun/tools/javac/Main

Posted by Greg Hall <gr...@evo-uw.com>.
Hi Arnaud,

The new version works. Thanks for your help with this.

Regards,
Greg.

On Wed, 2005-08-31 at 18:32 +0200, Arnaud HERITIER wrote:

> I added ant to the jetty classpath
> 
> can you try it :
> 
> maven plugin:download -DgroupId=maven -DartifactId=maven-jetty-plugin 
> -Dversion=1.2-SNAPSHOT -Dmaven.repo.remote=http://cvs.apache.org/repository/
> 
> Arnaud
> 
> On 8/31/05, Greg Hall <gr...@evo-uw.com> wrote:
> > 
> > Hi Vincent,
> > 
> > I've tried the new version of the plugin but unfortunately it doesn't
> > work. I'm still getting the "java.lang.NoClassDefFoundError:
> > org/apache/tools/ant/BuildException" exception when I go to the first
> > JSP.
> > 
> > I did notice that Maven downloaded the latest ant.jar file (1.6.5) when
> > I first ran "maven jetty:run". I guess ant.jar is not getting added to
> > the classpath for some reason.
> > 
> > Regards,
> > Greg.
> > 
> > 
> > On Wed, 2005-08-31 at 17:24 +0200, Vincent Massol wrote:
> > 
> > > Hi Greg,
> > >
> > > > -----Original Message-----
> > > > From: Greg Hall [mailto:greg.hall@evo-uw.com]
> > > > Sent: mercredi 31 août 2005 10:15
> > > > To: Maven Users List
> > > > Subject: RE: Jetty Plugin:
> > > > java.lang.NoClassDefFoundError:sun/tools/javac/Main
> > > >
> > > > Hi Vincent,
> > > >
> > > > I tried the new version of the plugin, and it seems to have fixed the
> > > > tools.jar problem. However, I now get another error which I think is 
> > due
> > > > to ant.jar not on the classpath (stack trace below). I do have 
> > ANT_HOME
> > > > set correctly i.e. &ANT_HOME=/opt/tools/ant
> > >
> > > I've uploaded a new version on:
> > > http://www.apache.org/~vmassol/maven-jetty-plugin-1.2-SNAPSHOT.jar
> > >
> > > Make sure you delete the old version and remove your 
> > ~userhome/.maven/cache
> > > directory to be sure there's no mixup with the previous version.
> > >
> > > Let me if it works
> > >
> > > [snip]
> > >
> > > Thanks
> > > -Vincent
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > 
> > Gregory Hall MIAP MBCS
> > Chief Software Architect
> > Evolution Technology Services Ltd
> > ----------------------------------
> > 
> > Evolution Technology Services Ltd.
> > 
> > PLEASE NOTE:
> > This e-mail is confidential to the ordinary user of the mailbox to which 
> > it was addressed. It may be disclosed only for the purposes for which it was 
> > sent. If you receive this e-mail in error you should not use, disclose, 
> > copy, forward or rely on it, but destroy it and notify the sender.
> > 
> > Please visit http://www.evolutionunderwriting.com/home/email.html for the 
> > full wording of our disclaimer.
> >

Gregory Hall MIAP MBCS
Chief Software Architect
Evolution Technology Services Ltd
----------------------------------

Evolution Technology Services Ltd.

PLEASE NOTE:
This e-mail is confidential to the ordinary user of the mailbox to which it was addressed. It may be disclosed only for the purposes for which it was sent. If you receive this e-mail in error you should not use, disclose, copy, forward or rely on it, but destroy it and notify the sender.
 
Please visit http://www.evolutionunderwriting.com/home/email.html for the full wording of our disclaimer.

Re: Jetty Plugin: java.lang.NoClassDefFoundError:sun/tools/javac/Main

Posted by Arnaud HERITIER <ah...@gmail.com>.
I added ant to the jetty classpath

can you try it :

maven plugin:download -DgroupId=maven -DartifactId=maven-jetty-plugin 
-Dversion=1.2-SNAPSHOT -Dmaven.repo.remote=http://cvs.apache.org/repository/

Arnaud

On 8/31/05, Greg Hall <gr...@evo-uw.com> wrote:
> 
> Hi Vincent,
> 
> I've tried the new version of the plugin but unfortunately it doesn't
> work. I'm still getting the "java.lang.NoClassDefFoundError:
> org/apache/tools/ant/BuildException" exception when I go to the first
> JSP.
> 
> I did notice that Maven downloaded the latest ant.jar file (1.6.5) when
> I first ran "maven jetty:run". I guess ant.jar is not getting added to
> the classpath for some reason.
> 
> Regards,
> Greg.
> 
> 
> On Wed, 2005-08-31 at 17:24 +0200, Vincent Massol wrote:
> 
> > Hi Greg,
> >
> > > -----Original Message-----
> > > From: Greg Hall [mailto:greg.hall@evo-uw.com]
> > > Sent: mercredi 31 août 2005 10:15
> > > To: Maven Users List
> > > Subject: RE: Jetty Plugin:
> > > java.lang.NoClassDefFoundError:sun/tools/javac/Main
> > >
> > > Hi Vincent,
> > >
> > > I tried the new version of the plugin, and it seems to have fixed the
> > > tools.jar problem. However, I now get another error which I think is 
> due
> > > to ant.jar not on the classpath (stack trace below). I do have 
> ANT_HOME
> > > set correctly i.e. &ANT_HOME=/opt/tools/ant
> >
> > I've uploaded a new version on:
> > http://www.apache.org/~vmassol/maven-jetty-plugin-1.2-SNAPSHOT.jar
> >
> > Make sure you delete the old version and remove your 
> ~userhome/.maven/cache
> > directory to be sure there's no mixup with the previous version.
> >
> > Let me if it works
> >
> > [snip]
> >
> > Thanks
> > -Vincent
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> 
> Gregory Hall MIAP MBCS
> Chief Software Architect
> Evolution Technology Services Ltd
> ----------------------------------
> 
> Evolution Technology Services Ltd.
> 
> PLEASE NOTE:
> This e-mail is confidential to the ordinary user of the mailbox to which 
> it was addressed. It may be disclosed only for the purposes for which it was 
> sent. If you receive this e-mail in error you should not use, disclose, 
> copy, forward or rely on it, but destroy it and notify the sender.
> 
> Please visit http://www.evolutionunderwriting.com/home/email.html for the 
> full wording of our disclaimer.
>

RE: Jetty Plugin: java.lang.NoClassDefFoundError:sun/tools/javac/Main

Posted by Greg Hall <gr...@evo-uw.com>.
Hi Vincent,

I've tried the new version of the plugin but unfortunately it doesn't
work. I'm still getting the  "java.lang.NoClassDefFoundError:
org/apache/tools/ant/BuildException" exception when I go to the first
JSP. 

I did notice that Maven downloaded the latest ant.jar file (1.6.5) when
I first ran "maven jetty:run". I guess ant.jar is not getting added to
the classpath for some reason.

Regards,
Greg.


On Wed, 2005-08-31 at 17:24 +0200, Vincent Massol wrote:

> Hi Greg,
> 
> > -----Original Message-----
> > From: Greg Hall [mailto:greg.hall@evo-uw.com]
> > Sent: mercredi 31 août 2005 10:15
> > To: Maven Users List
> > Subject: RE: Jetty Plugin:
> > java.lang.NoClassDefFoundError:sun/tools/javac/Main
> > 
> > Hi Vincent,
> > 
> > I tried the new version of the plugin, and it seems to have fixed the
> > tools.jar problem. However, I now get another error which I think is due
> > to ant.jar not on the classpath (stack trace below). I do have ANT_HOME
> > set correctly i.e. &ANT_HOME=/opt/tools/ant
> 
> I've uploaded a new version on: 
> http://www.apache.org/~vmassol/maven-jetty-plugin-1.2-SNAPSHOT.jar
> 
> Make sure you delete the old version and remove your ~userhome/.maven/cache
> directory to be sure there's no mixup with the previous version.
> 
> Let me if it works
> 
> [snip]
> 
> Thanks
> -Vincent
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 

Gregory Hall MIAP MBCS
Chief Software Architect
Evolution Technology Services Ltd
----------------------------------

Evolution Technology Services Ltd.

PLEASE NOTE:
This e-mail is confidential to the ordinary user of the mailbox to which it was addressed. It may be disclosed only for the purposes for which it was sent. If you receive this e-mail in error you should not use, disclose, copy, forward or rely on it, but destroy it and notify the sender.
 
Please visit http://www.evolutionunderwriting.com/home/email.html for the full wording of our disclaimer.

RE: Jetty Plugin: java.lang.NoClassDefFoundError:sun/tools/javac/Main

Posted by Vincent Massol <vm...@pivolis.com>.
Hi Greg,

> -----Original Message-----
> From: Greg Hall [mailto:greg.hall@evo-uw.com]
> Sent: mercredi 31 août 2005 10:15
> To: Maven Users List
> Subject: RE: Jetty Plugin:
> java.lang.NoClassDefFoundError:sun/tools/javac/Main
> 
> Hi Vincent,
> 
> I tried the new version of the plugin, and it seems to have fixed the
> tools.jar problem. However, I now get another error which I think is due
> to ant.jar not on the classpath (stack trace below). I do have ANT_HOME
> set correctly i.e. &ANT_HOME=/opt/tools/ant

I've uploaded a new version on: 
http://www.apache.org/~vmassol/maven-jetty-plugin-1.2-SNAPSHOT.jar

Make sure you delete the old version and remove your ~userhome/.maven/cache
directory to be sure there's no mixup with the previous version.

Let me if it works

[snip]

Thanks
-Vincent


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org