Following this pattern, when starting jetty I get this exception:

[                   Main Thread] ContextLoader                  INFO  Root
WebApplicationContext: initialization complet
ed in 2516 ms
2010-01-25 12:24:11.456::WARN:  failed Jersey Filter
java.lang.IllegalStateException: class
com.sun.jersey.spi.spring.container.servlet.SpringServlet is not a
javax.servlet.
Filter
        at
org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:88)
        at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
        at
org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:653)
        at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
        at
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1239)
        at
org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
        at
org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:466)
        at
org.mortbay.jetty.plugin.Jetty6PluginWebAppContext.doStart(Jetty6PluginWebAppContext.java:124)
        at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
        at
org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
        at
org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
        at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
        at
org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
        at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
        at
org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
        at org.mortbay.jetty.Server.doStart(Server.java:222)
        at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
        at
org.mortbay.jetty.plugin.Jetty6PluginServer.start(Jetty6PluginServer.java:132)
        at
org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:441)
        at
org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:383)
        at
org.mortbay.jetty.plugin.Jetty6RunWarExploded.execute(Jetty6RunWarExploded.java:170)
        at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:512)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:482)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.jav
a:330)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.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)


Any ideas?



James.Strachan wrote:
> 
> 2009/7/8 James Strachan <james.strac...@gmail.com>:
>> 2009/7/8 Claus Ibsen <claus.ib...@gmail.com>:
>>> On Wed, Jul 8, 2009 at 2:44 PM, Claus Ibsen<claus.ib...@gmail.com>
>>> wrote:
>>>> On Tue, Jul 7, 2009 at 4:45 AM, ewhauser<ewhau...@gmail.com> wrote:
>>>>>
>>>>> I'm trying to figure out the best way to package the functionality in
>>>>> the
>>>>> camel web console in my apps.  Is the web console designed to be
>>>>> embedded in
>>>>> a Camel application?  Or should the camel-web project be used as a
>>>>> template
>>>>> for a Camel WAR app?
>>>> Hi
>>>>
>>>> At present time you gotta copy all the camel-web/src/main/web files
>>>> into your own web application to be able to use
>>>> the web console to browse your own camel application.
>>>>
>>>> It does not have any remote management functionallity - eg it must be
>>>> collocated with your web app.
>>>
>>> Ah I was told if you use maven then just depend on camel-web in your
>>> pom.xml
>>>
>>> Then maven does all the hard parts of merging all the src/main/web
>>> files.
>>
>>
>> There's an example in the sandbox
>> https://svn.apache.org/repos/asf/camel/sandbox/components/camel-activemq-web/
>>
>> which creates an extension of camel-web, adding new dependencies and
>> changing the spring configuration.
>>
>> if you look at the pom
>> https://svn.apache.org/repos/asf/camel/sandbox/components/camel-activemq-web/pom.xml
>>
>> the trick is just depending on the camel-web war in your war's pom.xml.
>>
>>    <dependency>
>>      <groupId>org.apache.camel</groupId>
>>      <artifactId>camel-web</artifactId>
>>      <version>2.0</version>
>>      <type>war</type>
>>      <scope>runtime</scope>
>>    </dependency>
>>
>> You can then override any file locally; whether its parts of the
>> default views or the spring XML or adding new views or your own
>> servlets and whatnot.
>>
>> We're using Jersey as a filter; so you should be able to mix camel-web
>> with any servlet/framework to do other things (see the web.xml for how
>> we exclude bits of the URI space from Jersey to work with regular
>> static resources & JSPs etc).
>>
>> But if you just basically want the camel-web console/REST API with
>> your own routes/components it should just work out of the box.
> 
> BTW there's the camel-archetype-war which you can use to create a
> sample project which reuses the camel-web console & REST API to deploy
> your routes.
> 
> -- 
> James
> -------
> http://macstrac.blogspot.com/
> 
> Open Source Integration
> http://fusesource.com/
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Embedded-web-console-tp24366288p27313145.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to