Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Disabling all response content when response status code is 4xx or 5xx

The jetty.xml file is meant to configure the jetty Server instance,
not a ContextHandler.

You need to use the <webAppConfig> element and use maven syntax to
configure the appropriate setter - something like
 <webAppConfig>
   <errorHandler implementation="com.cisco.sep2.MyErrorPageHandler"/>


Alternatively, if you could upgrade to jetty-7you can apply a context
xml file to the <webApp> element, and you could configure your
ErrorHandler in there instead.

Jan

On 8 March 2012 17:15, Paul Duffy <paduffy@xxxxxxxxx> wrote:
> I am unable to set my error handler via ContextHandler via the jetty.xml
> involved by the jetty maven pluggin.
>
> jetty.xml is able to find the ContextHandler class, but is then throwing...
>
> "Caused by: java.lang.IllegalArgumentException: Object is not of type class
> org.mortbay.jetty.handler.ContextHandler"
>
> Please take a look to see if thee is anything obviously wrong with what I've
> done.
>
> ------------
>
> jetty.xml ...
>
> <?xml version="1.0"  encoding="ISO-8859-1"?>
> <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN"
> "http://jetty.mortbay.org/configure.dtd";>
> <Configure class="org.mortbay.jetty.handler.ContextHandler">
> <Set name="contextPath">/sep2-jersey-demo</Set>
> <Set name="resourceBase">/sep2-jersey-demo</Set>
>
> <!-- Instantiate your own error handler -->
> <Set name="errorHandler">
> <New class="com.cisco.sep2.MyErrorPageHandler"/>
> </Set>
> </Configure>
>
> pom.xml ...
>
> <plugin>
> <!-- JETTY 6 PLUGIN -->
> <groupId>org.mortbay.jetty</groupId>
> <artifactId>maven-jetty-plugin</artifactId>
> <version>6.1.14</version>
> <configuration>
> <jettyConfig>${basedir}/jetty.xml</jettyConfig>
> <scanIntervalSeconds>10</scanIntervalSeconds>
> <contextPath>/sep2-jersey-demo</contextPath>
> <connectors>
> <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
> <port>8088</port>
> <maxIdleTime>60000</maxIdleTime>
> </connector>
> </connectors>
> <webApp>${basedir}/target/sep2-jersey-demo</webApp>
> <requestLog implementation="org.mortbay.jetty.NCSARequestLog">
> <filename>target/yyyy_mm_dd.request.log</filename>
> <retainDays>90</retainDays>
> <append>true</append>
> <extended>true</extended>
> <logTimeZone>GMT</logTimeZone>
> </requestLog>
>
> </configuration>
> <executions>
> <execution>
> <id>start-jetty</id>
> <phase>pre-integration-test</phase>
> <goals>
> <goal>run</goal>
> </goals>
> <configuration>
> <scanIntervalSeconds>0</scanIntervalSeconds>
> <daemon>true</daemon>
> </configuration>
> </execution>
> <execution>
> <id>stop-jetty</id>
> <phase>post-integration-test</phase>
> <goals>
> <goal>stop</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
>
> Full stack trace after invoking "mvn -e jetty:run"
>
>
>
> C:\Users\paduffy\My Documents\zigbee\WADL\my-wadl-app>mvn -e jetty:run
> + Error stacktraces are turned on.
> [INFO] Scanning for projects...
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building my-wadl-app Maven Webapp
> [INFO]    task-segment: [jetty:run]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Preparing jetty:run
> [WARNING] Removing: run from forked lifecycle, to prevent recursive
> invocation.
> [INFO] [resources:resources {execution: default-resources}]
> [WARNING] Using platform encoding (Cp1252 actually) to copy filtered
> resources,
> i.e. build is platform dependent!
> [INFO] Copying 0 resource
> [INFO] [compiler:compile {execution: default-compile}]
> [INFO] Nothing to compile - all classes are up to date
> [INFO] [resources:testResources {execution: default-testResources}]
> [WARNING] Using platform encoding (Cp1252 actually) to copy filtered
> resources,
> i.e. build is platform dependent!
> [INFO] Copying 1 resource
> [INFO] [compiler:testCompile {execution: default-testCompile}]
> [INFO] Nothing to compile - all classes are up to date
> [INFO] [jetty:run {execution: default-cli}]
> [INFO] Configuring Jetty for project: my-wadl-app Maven Webapp
> [INFO] Webapp source directory = C:\Users\paduffy\My
> Documents\zigbee\WADL\my-wa
> dl-app\src\main\webapp
> [INFO] Reload Mechanic: automatic
> [INFO] web.xml file = C:\Users\paduffy\My
> Documents\zigbee\WADL\my-wadl-app\src\
> main\webapp\WEB-INF\web.xml
> [INFO] Classes = C:\Users\paduffy\My
> Documents\zigbee\WADL\my-wadl-app\target\cl
> asses
> [INFO] Configuring Jetty from xml configuration file = C:\Users\paduffy\My
> Docum
> ents\zigbee\WADL\my-wadl-app\jetty.xml
> 2012-03-08 01:05:13.674::INFO:  Logging to STDERR via
> org.mortbay.log.StdErrLog
> [INFO] Jetty server exiting.
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Failure
>
> Embedded error: Object is not of type class
> org.mortbay.jetty.handler.ContextHan
> dler
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Failure
>        at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
> ultLifecycleExecutor.java:719)
>        at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
> Goal(DefaultLifecycleExecutor.java:569)
>        at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
> ltLifecycleExecutor.java:539)
>        at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
> dleFailures(DefaultLifecycleExecutor.java:387)
>        at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
> ts(DefaultLifecycleExecutor.java:348)
>        at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
> fecycleExecutor.java:180)
>        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
>        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
>        at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
>        at
> org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:6
> 0)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> java:39)
>        at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
>        at java.lang.reflect.Method.invoke(Method.java:597)
>        at
> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>        at
> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>
>        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Failure
>        at
> org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMo
> jo.java:404)
>        at
> org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.
> java:321)
>        at
> org.mortbay.jetty.plugin.AbstractJettyRunMojo.execute(AbstractJettyRu
> nMojo.java:205)
>        at
> org.mortbay.jetty.plugin.Jetty6RunMojo.execute(Jetty6RunMojo.java:184
> )
>        at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
> nManager.java:490)
>        at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
> ultLifecycleExecutor.java:694)
>        ... 17 more
> Caused by: java.lang.IllegalArgumentException: Object is not of type class
> org.m
> ortbay.jetty.handler.ContextHandler
>        at
> org.mortbay.xml.XmlConfiguration.configure(XmlConfiguration.java:189)
>
>        at
> org.mortbay.jetty.plugin.Jetty6RunMojo.applyJettyXml(Jetty6RunMojo.ja
> va:176)
>        at
> org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMo
> jo.java:336)
>        ... 22 more
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 7 seconds
> [INFO] Finished at: Thu Mar 08 01:05:13 EST 2012
> [INFO] Final Memory: 10M/26M
> [INFO]
> ------------------------------------------------------------------------
> 2012-03-08 01:05:13.770::INFO:  Shutdown hook executing
> 2012-03-08 01:05:13.771::INFO:  Shutdown hook complete
>
>
>
>
> On 3/7/2012 7:30 PM, Paul Duffy wrote:
>>
>> Progress?  Custom handler below.
>>
>> Now all that is needed is the magic to enable MyErrorPageHandler when
>> jetty is started via mvn jetty:run
>>
>> Any ideas? Pointers to a clear example out on the Web (which so far have
>> eluded me)?
>>
>> Thanks
>>
>> --------------------------
>>
>>
>> package com.cisco.sep2;
>>
>> import java.io.IOException;
>> import javax.servlet.http.HttpServletRequest;
>> import javax.servlet.http.HttpServletResponse;
>>
>> import org.mortbay.jetty.Response;
>> import org.mortbay.jetty.servlet.ErrorPageErrorHandler;
>>
>> public class MyErrorPageHandler extends ErrorPageErrorHandler{
>>
>>    @Override
>>    public void handle(String target, HttpServletRequest req,
>>            HttpServletResponse resp, int dispatch) throws IOException {
>>
>>        int status = ((Response)resp).getStatus();
>>        if (status >= 400 || status <= 599)
>>        {
>>            resp.setContentLength(0);
>>            return;
>>        }
>>    }
>> }
>>
>> [INFO] Preparing jetty:run
>> [WARNING] Removing: run from forked lifecycle, to prevent recursive
>> invocation.
>> [INFO] [resources:resources {execution: default-resources}]
>> [WARNING] Using platform encoding (Cp1252 actually) to copy filtered
>> resources,
>> i.e. build is platform dependent!
>> [INFO] Copying 0 resource
>> [INFO] [compiler:compile {execution: default-compile}]
>> [INFO] Nothing to compile - all classes are up to date
>> [INFO] [resources:testResources {execution: default-testResources}]
>> [WARNING] Using platform encoding (Cp1252 actually) to copy filtered
>> resources,
>> i.e. build is platform dependent!
>> [INFO] Copying 1 resource
>> [INFO] [compiler:testCompile {execution: default-testCompile}]
>> [INFO] Nothing to compile - all classes are up to date
>> [INFO] [jetty:run {execution: default-cli}]
>> [INFO] Configuring Jetty for project: my-wadl-app Maven Webapp
>> [INFO] Webapp source directory = C:\Users\paduffy\My
>> Documents\zigbee\WADL\my-wa
>> dl-app\src\main\webapp
>> [INFO] Reload Mechanic: automatic
>> [INFO] web.xml file = C:\Users\paduffy\My
>> Documents\zigbee\WADL\my-wadl-app\src\
>> main\webapp\WEB-INF\web.xml
>> [INFO] Classes = C:\Users\paduffy\My
>> Documents\zigbee\WADL\my-wadl-app\target\cl
>> asses
>> [INFO] Configuring Jetty from xml configuration file = C:\Users\paduffy\My
>> Docum
>> ents\zigbee\WADL\my-wadl-app\jetty.xml
>> 2012-03-08 00:45:39.648::INFO:  Logging to STDERR via
>> org.mortbay.log.StdErrLog
>> [INFO] Jetty server exiting.
>> [INFO]
>> ------------------------------------------------------------------------
>> [ERROR] BUILD ERROR
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Failure
>>
>> Embedded error: Object is not of type class
>> org.mortbay.jetty.handler.ContextHan
>> dler
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Trace
>> org.apache.maven.lifecycle.LifecycleExecutionException: Failure
>>        at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
>> ultLifecycleExecutor.java:719)
>>        at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
>> Goal(DefaultLifecycleExecutor.java:569)
>>        at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
>> ltLifecycleExecutor.java:539)
>>        at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
>> dleFailures(DefaultLifecycleExecutor.java:387)
>>        at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
>> ts(DefaultLifecycleExecutor.java:348)
>>        at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
>> fecycleExecutor.java:180)
>>        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
>>        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
>>        at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
>>        at
>> org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:6
>> 0)
>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>        at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
>> java:39)
>>        at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
>> sorImpl.java:25)
>>        at java.lang.reflect.Method.invoke(Method.java:597)
>>        at
>> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>>        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>>        at
>> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>>
>>        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
>> Caused by: org.apache.maven.plugin.MojoExecutionException: Failure
>>        at
>> org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMo
>> jo.java:404)
>>        at
>> org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.
>> java:321)
>>        at
>> org.mortbay.jetty.plugin.AbstractJettyRunMojo.execute(AbstractJettyRu
>> nMojo.java:205)
>>        at
>> org.mortbay.jetty.plugin.Jetty6RunMojo.execute(Jetty6RunMojo.java:184
>> )
>>        at
>> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
>> nManager.java:490)
>>        at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
>> ultLifecycleExecutor.java:694)
>>        ... 17 more
>> Caused by: java.lang.IllegalArgumentException: Object is not of type class
>> org.m
>> ortbay.jetty.handler.ContextHandler
>>        at
>> org.mortbay.xml.XmlConfiguration.configure(XmlConfiguration.java:189)
>>
>>        at
>> org.mortbay.jetty.plugin.Jetty6RunMojo.applyJettyXml(Jetty6RunMojo.ja
>> va:176)
>>        at
>> org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMo
>> jo.java:336)
>>        ... 22 more
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Total time: 7 seconds
>> [INFO] Finished at: Thu Mar 08 00:45:39 EST 2012
>> [INFO] Final Memory: 10M/26M
>> [INFO]
>> ------------------------------------------------------------------------
>> 2012-03-08 00:45:39.793::INFO:  Shutdown hook executing
>> 2012-03-08 00:45:39.794::INFO:  Shutdown hook complete
>> C:\Users\paduffy\My Documents\zigbee\WADL\my-wadl-app>mvn -e jetty:run
>> + Error stacktraces are turned on.
>> [INFO] Scanning for projects...
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Building my-wadl-app Maven Webapp
>> [INFO]    task-segment: [jetty:run]
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Preparing jetty:run
>> [WARNING] Removing: run from forked lifecycle, to prevent recursive
>> invocation.
>> [INFO] [resources:resources {execution: default-resources}]
>> [WARNING] Using platform encoding (Cp1252 actually) to copy filtered
>> resources,
>> i.e. build is platform dependent!
>> [INFO] Copying 0 resource
>> [INFO] [compiler:compile {execution: default-compile}]
>> [INFO] Nothing to compile - all classes are up to date
>> [INFO] [resources:testResources {execution: default-testResources}]
>> [WARNING] Using platform encoding (Cp1252 actually) to copy filtered
>> resources,
>> i.e. build is platform dependent!
>> [INFO] Copying 1 resource
>> [INFO] [compiler:testCompile {execution: default-testCompile}]
>> [INFO] Nothing to compile - all classes are up to date
>> [INFO] [jetty:run {execution: default-cli}]
>> [INFO] Configuring Jetty for project: my-wadl-app Maven Webapp
>> [INFO] Webapp source directory = C:\Users\paduffy\My
>> Documents\zigbee\WADL\my-wa
>> dl-app\src\main\webapp
>> [INFO] Reload Mechanic: automatic
>> [INFO] web.xml file = C:\Users\paduffy\My
>> Documents\zigbee\WADL\my-wadl-app\src\
>> main\webapp\WEB-INF\web.xml
>> [INFO] Classes = C:\Users\paduffy\My
>> Documents\zigbee\WADL\my-wadl-app\target\cl
>> asses
>> [INFO] Configuring Jetty from xml configuration file = C:\Users\paduffy\My
>> Docum
>> ents\zigbee\WADL\my-wadl-app\jetty.xml
>> 2012-03-08 00:54:04.959::INFO:  Logging to STDERR via
>> org.mortbay.log.StdErrLog
>> [INFO] Jetty server exiting.
>> [INFO]
>> ------------------------------------------------------------------------
>> [ERROR] BUILD ERROR
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Failure
>>
>> Embedded error: Object is not of type class
>> org.mortbay.jetty.handler.ContextHan
>> dler
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Trace
>> org.apache.maven.lifecycle.LifecycleExecutionException: Failure
>>        at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
>> ultLifecycleExecutor.java:719)
>>        at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
>> Goal(DefaultLifecycleExecutor.java:569)
>>        at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
>> ltLifecycleExecutor.java:539)
>>        at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
>> dleFailures(DefaultLifecycleExecutor.java:387)
>>        at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
>> ts(DefaultLifecycleExecutor.java:348)
>>        at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
>> fecycleExecutor.java:180)
>>        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
>>        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
>>        at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
>>        at
>> org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:6
>> 0)
>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>        at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
>> java:39)
>>        at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
>> sorImpl.java:25)
>>        at java.lang.reflect.Method.invoke(Method.java:597)
>>        at
>> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>>        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>>        at
>> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>>
>>        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
>> Caused by: org.apache.maven.plugin.MojoExecutionException: Failure
>>        at
>> org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMo
>> jo.java:404)
>>        at
>> org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.
>> java:321)
>>        at
>> org.mortbay.jetty.plugin.AbstractJettyRunMojo.execute(AbstractJettyRu
>> nMojo.java:205)
>>        at
>> org.mortbay.jetty.plugin.Jetty6RunMojo.execute(Jetty6RunMojo.java:184
>> )
>>        at
>> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
>> nManager.java:490)
>>        at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
>> ultLifecycleExecutor.java:694)
>>        ... 17 more
>> Caused by: java.lang.IllegalArgumentException: Object is not of type class
>> org.m
>> ortbay.jetty.handler.ContextHandler
>>        at
>> org.mortbay.xml.XmlConfiguration.configure(XmlConfiguration.java:189)
>>
>>        at
>> org.mortbay.jetty.plugin.Jetty6RunMojo.applyJettyXml(Jetty6RunMojo.ja
>> va:176)
>>        at
>> org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMo
>> jo.java:336)
>>        ... 22 more
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Total time: 7 seconds
>> [INFO] Finished at: Thu Mar 08 00:54:05 EST 2012
>> [INFO] Final Memory: 10M/26M
>> [INFO]
>> ------------------------------------------------------------------------
>> 2012-03-08 00:54:05.097::INFO:  Shutdown hook executing
>> 2012-03-08 00:54:05.098::INFO:  Shutdown hook complete
>> C:\Users\paduffy\My Documents\zigbee\WADL\my-wadl-app>mvn -e jetty:run
>> + Error stacktraces are turned on.
>> [INFO] Scanning for projects...
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Building my-wadl-app Maven Webapp
>> [INFO]    task-segment: [jetty:run]
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Preparing jetty:run
>> [WARNING] Removing: run from forked lifecycle, to prevent recursive
>> invocation.
>> [INFO] [resources:resources {execution: default-resources}]
>> [WARNING] Using platform encoding (Cp1252 actually) to copy filtered
>> resources,
>> i.e. build is platform dependent!
>> [INFO] Copying 0 resource
>> [INFO] [compiler:compile {execution: default-compile}]
>> [INFO] Nothing to compile - all classes are up to date
>> [INFO] [resources:testResources {execution: default-testResources}]
>> [WARNING] Using platform encoding (Cp1252 actually) to copy filtered
>> resources,
>> i.e. build is platform dependent!
>> [INFO] Copying 1 resource
>> [INFO] [compiler:testCompile {execution: default-testCompile}]
>> [INFO] Nothing to compile - all classes are up to date
>> [INFO] [jetty:run {execution: default-cli}]
>> [INFO] Configuring Jetty for project: my-wadl-app Maven Webapp
>> [INFO] Webapp source directory = C:\Users\paduffy\My
>> Documents\zigbee\WADL\my-wa
>> dl-app\src\main\webapp
>> [INFO] Reload Mechanic: automatic
>> [INFO] web.xml file = C:\Users\paduffy\My
>> Documents\zigbee\WADL\my-wadl-app\src\
>> main\webapp\WEB-INF\web.xml
>> [INFO] Classes = C:\Users\paduffy\My
>> Documents\zigbee\WADL\my-wadl-app\target\cl
>> asses
>> [INFO] Configuring Jetty from xml configuration file = C:\Users\paduffy\My
>> Docum
>> ents\zigbee\WADL\my-wadl-app\jetty.xml
>> 2012-03-08 01:05:13.674::INFO:  Logging to STDERR via
>> org.mortbay.log.StdErrLog
>> [INFO] Jetty server exiting.
>> [INFO]
>> ------------------------------------------------------------------------
>> [ERROR] BUILD ERROR
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Failure
>>
>> Embedded error: Object is not of type class
>> org.mortbay.jetty.handler.ContextHan
>> dler
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Trace
>> org.apache.maven.lifecycle.LifecycleExecutionException: Failure
>>        at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
>> ultLifecycleExecutor.java:719)
>>        at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
>> Goal(DefaultLifecycleExecutor.java:569)
>>        at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
>> ltLifecycleExecutor.java:539)
>>        at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
>> dleFailures(DefaultLifecycleExecutor.java:387)
>>        at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
>> ts(DefaultLifecycleExecutor.java:348)
>>        at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
>> fecycleExecutor.java:180)
>>        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
>>        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
>>        at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
>>        at
>> org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:6
>> 0)
>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>        at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
>> java:39)
>>        at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
>> sorImpl.java:25)
>>        at java.lang.reflect.Method.invoke(Method.java:597)
>>        at
>> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>>        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>>        at
>> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>>
>>        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
>> Caused by: org.apache.maven.plugin.MojoExecutionException: Failure
>>        at
>> org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMo
>> jo.java:404)
>>        at
>> org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.
>> java:321)
>>        at
>> org.mortbay.jetty.plugin.AbstractJettyRunMojo.execute(AbstractJettyRu
>> nMojo.java:205)
>>        at
>> org.mortbay.jetty.plugin.Jetty6RunMojo.execute(Jetty6RunMojo.java:184
>> )
>>        at
>> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
>> nManager.java:490)
>>        at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
>> ultLifecycleExecutor.java:694)
>>        ... 17 more
>> Caused by: java.lang.IllegalArgumentException: Object is not of type class
>> org.m
>> ortbay.jetty.handler.ContextHandler
>>        at
>> org.mortbay.xml.XmlConfiguration.configure(XmlConfiguration.java:189)
>>
>>        at
>> org.mortbay.jetty.plugin.Jetty6RunMojo.applyJettyXml(Jetty6RunMojo.ja
>> va:176)
>>        at
>> org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMo
>> jo.java:336)
>>        ... 22 more
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Total time: 7 seconds
>> [INFO] Finished at: Thu Mar 08 01:05:13 EST 2012
>> [INFO] Final Memory: 10M/26M
>> [INFO]
>> ------------------------------------------------------------------------
>> 2012-03-08 01:05:13.770::INFO:  Shutdown hook executing
>> 2012-03-08 01:05:13.771::INFO:  Shutdown hook complete
>> C:\Users\paduffy\My Documents\zigbee\WADL\my-wadl-app>^X^X
>>
>>
>>
>>
>>
>>
>> On 3/7/2012 1:47 AM, Paul Duffy wrote:
>>>
>>> Not obvious from docs or mailer archive.
>>>
>>> Much appreciate a pointer.
>>>
>>> Cheers
>>>
>>>
>>> _______________________________________________
>>> jetty-users mailing list
>>> jetty-users@xxxxxxxxxxx
>>> https://dev.eclipse.org/mailman/listinfo/jetty-users
>>>
>>
>> _______________________________________________
>> jetty-users mailing list
>> jetty-users@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/jetty-users
>>
>
> _______________________________________________
> jetty-users mailing list
> jetty-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/jetty-users


Back to the top