You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by ewhauser <ew...@gmail.com> on 2009/07/07 04:45:20 UTC
Embedded web console
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?
--
View this message in context: http://www.nabble.com/Embedded-web-console-tp24366288p24366288.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Embedded web console
Posted by Claus Ibsen <cl...@gmail.com>.
You may have something misconfigured in your web.xml.
The error talks about Servlet vs. SerlvetFilter which are two different things.
On Mon, Jan 25, 2010 at 9:38 PM, mistrz <gr...@edmunds.com> wrote:
>
> 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 <ja...@gmail.com>:
>>> 2009/7/8 Claus Ibsen <cl...@gmail.com>:
>>>> On Wed, Jul 8, 2009 at 2:44 PM, Claus Ibsen<cl...@gmail.com>
>>>> wrote:
>>>>> On Tue, Jul 7, 2009 at 4:45 AM, ewhauser<ew...@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.
>
>
--
Claus Ibsen
Apache Camel Committer
Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus
Re: Embedded web console
Posted by mistrz <gr...@edmunds.com>.
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 <ja...@gmail.com>:
>> 2009/7/8 Claus Ibsen <cl...@gmail.com>:
>>> On Wed, Jul 8, 2009 at 2:44 PM, Claus Ibsen<cl...@gmail.com>
>>> wrote:
>>>> On Tue, Jul 7, 2009 at 4:45 AM, ewhauser<ew...@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.
Re: Embedded web console
Posted by mgiammarco <mg...@gmail.com>.
I have tried camel-archetype-web and camel-archetype-webconsole (it seems
newer) but I am not able to see the console.
In my project too I cannot see console...
--
View this message in context: http://camel.465427.n5.nabble.com/Embedded-web-console-tp478885p5117887.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Embedded web console
Posted by James Strachan <ja...@gmail.com>.
2009/7/8 James Strachan <ja...@gmail.com>:
> 2009/7/8 Claus Ibsen <cl...@gmail.com>:
>> On Wed, Jul 8, 2009 at 2:44 PM, Claus Ibsen<cl...@gmail.com> wrote:
>>> On Tue, Jul 7, 2009 at 4:45 AM, ewhauser<ew...@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/
Re: Embedded web console
Posted by mgiammarco <mg...@gmail.com>.
Same thing for me! And I tried also to deploy projects created with maven
archetype webconsole without luck.
--
View this message in context: http://camel.465427.n5.nabble.com/Embedded-web-console-tp478885p5119175.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Embedded web console
Posted by Jim Talbut <jt...@spudsoft.co.uk>.
Claus,
I /think/ I fixed some relative URL issues in my patch for CAMEL-3519 (I
tested it embedded and in OSGi).
Jim
On 08/09/2011 15:34, Claus Ibsen wrote:
> On Thu, Sep 1, 2011 at 5:57 PM, boday<be...@initekconsulting.com> wrote:
>> hmmm...I'd think those paths would be relative to the web app context...not
>> sure why you'd need to add the context in explicity...
>>
> Yeah the urls ought to be relative when they are rendered.
>
> I guess we ought to create a JIRA about this so we wont forget. As ppl
> may embed camel-web under their context path of choice.
>
> And while we are at it, we ought to see if we can trim it down. I
> think we got some java script libraries in there which is not needed
> anymore. Eg we should keep the camel-web smaller in size.
>
>> wilsonsjc wrote:
>>> Thanks for your reply,
>>>
>>> I downloaded camel-web-2.8.0-sources.jar and modified java files under
>>> org.apache.camel.web.resources package from new URI("/routes") to new
>>> URI("/services/routes") then recompiled to jar.
>>>
>>> It's working. I can see the changes after I click the start and stop. Now
>>> it's redirect to "/services/routes"
>>>
>>
>> -----
>> Ben O'Day
>> IT Consultant -http://consulting-notes.com
>>
>> --
>> View this message in context: http://camel.465427.n5.nabble.com/Embedded-web-console-tp478885p4758894.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>
>
Re: Embedded web console
Posted by Claus Ibsen <cl...@gmail.com>.
On Thu, Sep 1, 2011 at 5:57 PM, boday <be...@initekconsulting.com> wrote:
> hmmm...I'd think those paths would be relative to the web app context...not
> sure why you'd need to add the context in explicity...
>
Yeah the urls ought to be relative when they are rendered.
I guess we ought to create a JIRA about this so we wont forget. As ppl
may embed camel-web under their context path of choice.
And while we are at it, we ought to see if we can trim it down. I
think we got some java script libraries in there which is not needed
anymore. Eg we should keep the camel-web smaller in size.
>
> wilsonsjc wrote:
>>
>> Thanks for your reply,
>>
>> I downloaded camel-web-2.8.0-sources.jar and modified java files under
>> org.apache.camel.web.resources package from new URI("/routes") to new
>> URI("/services/routes") then recompiled to jar.
>>
>> It's working. I can see the changes after I click the start and stop. Now
>> it's redirect to "/services/routes"
>>
>
>
> -----
> Ben O'Day
> IT Consultant -http://consulting-notes.com
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Embedded-web-console-tp478885p4758894.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
--
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/
Re: Embedded web console
Posted by boday <be...@initekconsulting.com>.
hmmm...I'd think those paths would be relative to the web app context...not
sure why you'd need to add the context in explicity...
wilsonsjc wrote:
>
> Thanks for your reply,
>
> I downloaded camel-web-2.8.0-sources.jar and modified java files under
> org.apache.camel.web.resources package from new URI("/routes") to new
> URI("/services/routes") then recompiled to jar.
>
> It's working. I can see the changes after I click the start and stop. Now
> it's redirect to "/services/routes"
>
-----
Ben O'Day
IT Consultant -http://consulting-notes.com
--
View this message in context: http://camel.465427.n5.nabble.com/Embedded-web-console-tp478885p4758894.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Embedded web console
Posted by wilsonsjc <wi...@gmail.com>.
Thanks for your reply,
I downloaded camel-web-2.8.0-sources.jar and modified java files under
org.apache.camel.web.resources package from new URI("/routes") to new
URI("/services/routes") then recompiled to jar.
It's working. I can see the changes after I click the start and stop. Now
it's redirect to "/services/routes"
--
View this message in context: http://camel.465427.n5.nabble.com/Embedded-web-console-tp478885p4758797.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Embedded web console
Posted by boday <be...@initekconsulting.com>.
I see the issue, in
camel-web\src\main\java\org\apache\camel\web\resources\RouteStatusResource.java,
the setStatus() method returns return Response.seeOther(new
URI("/routes")).build() after it starts/stops the route...this was to
"refresh" the route list display, but it doesn't play nice with an explicit
context, etc. It does this in several other places as well...not sure a way
around it at the moment.
wilsonsjc wrote:
>
> Hi All,
>
> I too embeded camel web console in my app it's working.
> To view the routes here is the url http://localhost:8081/services/routes
>
> But when I click the "stop" button to stop one of the route, the URL
> redirect to http://localhost:8081/routes (with out my app context
> "services")
> But It stop the route.
>
> Any one come across this issue any suggestion.
>
> Here is my web.xml
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
> <display-name>Onesource Services</display-name>
> <filter>
> <filter-name>hibernateFilter</filter-name>
>
> <filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
> <init-param>
> <param-name>singleSession</param-name>
> <param-value>true</param-value>
> </init-param>
> </filter>
> <filter-mapping>
> <filter-name>hibernateFilter</filter-name>
> <url-pattern>/*</url-pattern>
> </filter-mapping>
> <context-param>
> <param-name>contextConfigLocation</param-name>
> <param-value>WEB-INF/applicationContext.xml</param-value>
> </context-param>
> <listener>
>
> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
> </listener>
> <listener>
>
> <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
> </listener>
> <servlet>
> <servlet-name>CXFServlet</servlet-name>
>
> <servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
> <init-param>
> <param-name>service-list-path</param-name>
> <param-value>/wadl</param-value>
> </init-param>
> <load-on-startup>1</load-on-startup>
> </servlet>
> <servlet-mapping>
> <servlet-name>CXFServlet</servlet-name>
> <url-pattern>/guest/*</url-pattern>
> <url-pattern>/cast/*</url-pattern>
> <url-pattern>/admin/*</url-pattern>
> </servlet-mapping>
> <resource-ref>
> <description>Sleepy Datasource</description>
> <res-ref-name>jdbc/SLEEPY_DB</res-ref-name>
> <res-type>javax.sql.DataSource</res-type>
> <res-auth>Container</res-auth>
> </resource-ref>
> <welcome-file-list>
> <welcome-file>index.jsp</welcome-file>
> </welcome-file-list>
>
>
>
>
>
> <filter>
> <filter-name>Jersey Filter</filter-name>
>
> <filter-class>com.sun.jersey.spi.spring.container.servlet.SpringServlet</filter-class>
> <init-param>
>
> <param-name>com.sun.jersey.config.property.resourceConfigClass</param-name>
> <param-value>org.apache.camel.web.util.CamelResourceConfig</param-value>
> </init-param>
> <init-param>
>
> <param-name>com.sun.jersey.config.feature.FilterForwardOn404</param-name>
> <param-value>true</param-value>
> </init-param>
> <init-param>
>
> <param-name>com.sun.jersey.config.property.WebPageContentRegex</param-name>
> <param-value>/(images|css|js)/.*</param-value>
> </init-param>
> <init-param>
> <param-name>com.sun.jersey.config.feature.ImplicitViewables</param-name>
> <param-value>true</param-value>
> </init-param>
> <init-param>
> <param-name>com.sun.jersey.config.feature.Trace</param-name>
> <param-value>true</param-value>
> </init-param>
> <init-param>
> <param-name>com.sun.jersey.config.feature.Redirect</param-name>
> <param-value>true</param-value>
> </init-param>
> <init-param>
> <param-name>com.sun.jersey.config.property.packages</param-name>
> <param-value>org.apache.camel.web:</param-value>
> </init-param>
> <init-param>
> <param-name>com.sun.jersey.config.property.WadlResourceUri</param-name>
> <param-value>/api</param-value>
> </init-param>
> </filter>
>
> <filter-mapping>
> <filter-name>Jersey Filter</filter-name>
> <url-pattern>/*</url-pattern>
> </filter-mapping>
>
> <servlet>
> <servlet-name>TemplateEngineServlet</servlet-name>
>
>
> <servlet-class>org.fusesource.scalate.servlet.TemplateEngineServlet</servlet-class>
> <load-on-startup>1</load-on-startup>
> </servlet>
>
> <servlet-mapping>
> <servlet-name>TemplateEngineServlet</servlet-name>
> <url-pattern>*.mustache</url-pattern>
> </servlet-mapping>
> <servlet-mapping>
> <servlet-name>TemplateEngineServlet</servlet-name>
> <url-pattern>*.scaml</url-pattern>
> </servlet-mapping>
> <servlet-mapping>
> <servlet-name>TemplateEngineServlet</servlet-name>
> <url-pattern>*.ssp</url-pattern>
> </servlet-mapping>
>
> <error-page>
> <error-code>500</error-code>
> <location>/WEB-INF/scalate/errors/500.scaml</location>
> </error-page>
>
>
>
> </web-app>
>
-----
Ben O'Day
IT Consultant -http://consulting-notes.com
--
View this message in context: http://camel.465427.n5.nabble.com/Embedded-web-console-tp478885p4755900.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Embedded web console
Posted by Claus Ibsen <cl...@gmail.com>.
On Wed, Aug 31, 2011 at 9:06 PM, wilsonsjc <wi...@gmail.com> wrote:
> Hi All,
>
> I too embeded camel web console in my app it's working.
> To view the routes here is the url http://localhost:8081/services/routes
>
> But when I click the "stop" button to stop one of the route, the URL
> redirect to http://localhost:8081/routes (with out my app context
> "services")
> But It stop the route.
Is that the only "button" or link in your embedded web console, that
has this problem?
eg it looses the "services" from the path?
And what version of Camel are you using?
And how did you embed the camel web console. I dont see anything in
your web.xml file.
>
> Any one come across this issue any suggestion.
>
> Here is my web.xml
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
> <display-name>Onesource Services</display-name>
> <filter>
> <filter-name>hibernateFilter</filter-name>
>
> <filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
> <init-param>
> <param-name>singleSession</param-name>
> <param-value>true</param-value>
> </init-param>
> </filter>
> <filter-mapping>
> <filter-name>hibernateFilter</filter-name>
> <url-pattern>/*</url-pattern>
> </filter-mapping>
> <context-param>
> <param-name>contextConfigLocation</param-name>
> <param-value>WEB-INF/applicationContext.xml</param-value>
> </context-param>
> <listener>
>
> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
> </listener>
> <listener>
>
> <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
> </listener>
> <servlet>
> <servlet-name>CXFServlet</servlet-name>
> <servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
> <init-param>
> <param-name>service-list-path</param-name>
> <param-value>/wadl</param-value>
> </init-param>
> <load-on-startup>1</load-on-startup>
> </servlet>
> <servlet-mapping>
> <servlet-name>CXFServlet</servlet-name>
> <url-pattern>/guest/*</url-pattern>
> <url-pattern>/cast/*</url-pattern>
> <url-pattern>/admin/*</url-pattern>
> </servlet-mapping>
> <resource-ref>
> <description>Sleepy Datasource</description>
> <res-ref-name>jdbc/SLEEPY_DB</res-ref-name>
> <res-type>javax.sql.DataSource</res-type>
> <res-auth>Container</res-auth>
> </resource-ref>
> <welcome-file-list>
> <welcome-file>index.jsp</welcome-file>
> </welcome-file-list>
>
>
>
>
>
> <filter>
> <filter-name>Jersey Filter</filter-name>
>
> <filter-class>com.sun.jersey.spi.spring.container.servlet.SpringServlet</filter-class>
> <init-param>
>
> <param-name>com.sun.jersey.config.property.resourceConfigClass</param-name>
> <param-value>org.apache.camel.web.util.CamelResourceConfig</param-value>
> </init-param>
> <init-param>
> <param-name>com.sun.jersey.config.feature.FilterForwardOn404</param-name>
> <param-value>true</param-value>
> </init-param>
> <init-param>
>
> <param-name>com.sun.jersey.config.property.WebPageContentRegex</param-name>
> <param-value>/(images|css|js)/.*</param-value>
> </init-param>
> <init-param>
> <param-name>com.sun.jersey.config.feature.ImplicitViewables</param-name>
> <param-value>true</param-value>
> </init-param>
> <init-param>
> <param-name>com.sun.jersey.config.feature.Trace</param-name>
> <param-value>true</param-value>
> </init-param>
> <init-param>
> <param-name>com.sun.jersey.config.feature.Redirect</param-name>
> <param-value>true</param-value>
> </init-param>
> <init-param>
> <param-name>com.sun.jersey.config.property.packages</param-name>
> <param-value>org.apache.camel.web:</param-value>
> </init-param>
> <init-param>
> <param-name>com.sun.jersey.config.property.WadlResourceUri</param-name>
> <param-value>/api</param-value>
> </init-param>
> </filter>
>
> <filter-mapping>
> <filter-name>Jersey Filter</filter-name>
> <url-pattern>/*</url-pattern>
> </filter-mapping>
>
> <servlet>
> <servlet-name>TemplateEngineServlet</servlet-name>
>
>
> <servlet-class>org.fusesource.scalate.servlet.TemplateEngineServlet</servlet-class>
> <load-on-startup>1</load-on-startup>
> </servlet>
>
> <servlet-mapping>
> <servlet-name>TemplateEngineServlet</servlet-name>
> <url-pattern>*.mustache</url-pattern>
> </servlet-mapping>
> <servlet-mapping>
> <servlet-name>TemplateEngineServlet</servlet-name>
> <url-pattern>*.scaml</url-pattern>
> </servlet-mapping>
> <servlet-mapping>
> <servlet-name>TemplateEngineServlet</servlet-name>
> <url-pattern>*.ssp</url-pattern>
> </servlet-mapping>
>
> <error-page>
> <error-code>500</error-code>
> <location>/WEB-INF/scalate/errors/500.scaml</location>
> </error-page>
>
>
>
> </web-app>
>
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Embedded-web-console-tp478885p4755568.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
--
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/
Re: Embedded web console
Posted by wilsonsjc <wi...@gmail.com>.
Hi All,
I too embeded camel web console in my app it's working.
To view the routes here is the url http://localhost:8081/services/routes
But when I click the "stop" button to stop one of the route, the URL
redirect to http://localhost:8081/routes (with out my app context
"services")
But It stop the route.
Any one come across this issue any suggestion.
Here is my web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<display-name>Onesource Services</display-name>
<filter>
<filter-name>hibernateFilter</filter-name>
<filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
<init-param>
<param-name>singleSession</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>hibernateFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>WEB-INF/applicationContext.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<listener>
<listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
</listener>
<servlet>
<servlet-name>CXFServlet</servlet-name>
<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
<init-param>
<param-name>service-list-path</param-name>
<param-value>/wadl</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>CXFServlet</servlet-name>
<url-pattern>/guest/*</url-pattern>
<url-pattern>/cast/*</url-pattern>
<url-pattern>/admin/*</url-pattern>
</servlet-mapping>
<resource-ref>
<description>Sleepy Datasource</description>
<res-ref-name>jdbc/SLEEPY_DB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<filter>
<filter-name>Jersey Filter</filter-name>
<filter-class>com.sun.jersey.spi.spring.container.servlet.SpringServlet</filter-class>
<init-param>
<param-name>com.sun.jersey.config.property.resourceConfigClass</param-name>
<param-value>org.apache.camel.web.util.CamelResourceConfig</param-value>
</init-param>
<init-param>
<param-name>com.sun.jersey.config.feature.FilterForwardOn404</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>com.sun.jersey.config.property.WebPageContentRegex</param-name>
<param-value>/(images|css|js)/.*</param-value>
</init-param>
<init-param>
<param-name>com.sun.jersey.config.feature.ImplicitViewables</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>com.sun.jersey.config.feature.Trace</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>com.sun.jersey.config.feature.Redirect</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>com.sun.jersey.config.property.packages</param-name>
<param-value>org.apache.camel.web:</param-value>
</init-param>
<init-param>
<param-name>com.sun.jersey.config.property.WadlResourceUri</param-name>
<param-value>/api</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>Jersey Filter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<servlet>
<servlet-name>TemplateEngineServlet</servlet-name>
<servlet-class>org.fusesource.scalate.servlet.TemplateEngineServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>TemplateEngineServlet</servlet-name>
<url-pattern>*.mustache</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>TemplateEngineServlet</servlet-name>
<url-pattern>*.scaml</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>TemplateEngineServlet</servlet-name>
<url-pattern>*.ssp</url-pattern>
</servlet-mapping>
<error-page>
<error-code>500</error-code>
<location>/WEB-INF/scalate/errors/500.scaml</location>
</error-page>
</web-app>
--
View this message in context: http://camel.465427.n5.nabble.com/Embedded-web-console-tp478885p4755568.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Embedded web console
Posted by padewitte <pa...@gmail.com>.
Hi all,
Since CAMEL 2.8.0 my custom web.xml is not enrich with Jersey Filter and
TemplateEngine Servelet.
I had to add this to my web.xml to get the console working :
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<filter>
<filter-name>Jersey Filter</filter-name>
<filter-class>com.sun.jersey.spi.spring.container.servlet.SpringServlet</filter-class>
<init-param>
<param-name>com.sun.jersey.config.property.resourceConfigClass</param-name>
<param-value>org.apache.camel.web.util.CamelResourceConfig</param-value>
</init-param>
<init-param>
<param-name>com.sun.jersey.config.feature.FilterForwardOn404</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>com.sun.jersey.config.property.WebPageContentRegex</param-name>
<param-value>/(images|css|js)/.*</param-value>
</init-param>
<init-param>
<param-name>com.sun.jersey.config.feature.ImplicitViewables</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>com.sun.jersey.config.feature.Trace</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>com.sun.jersey.config.feature.Redirect</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>com.sun.jersey.config.property.packages</param-name>
<param-value>org.apache.camel.web:</param-value>
</init-param>
<init-param>
<param-name>com.sun.jersey.config.property.WadlResourceUri</param-name>
<param-value>/api</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>Jersey Filter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<servlet>
<servlet-name>TemplateEngineServlet</servlet-name>
<servlet-class>org.fusesource.scalate.servlet.TemplateEngineServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>TemplateEngineServlet</servlet-name>
<url-pattern>*.mustache</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>TemplateEngineServlet</servlet-name>
<url-pattern>*.scaml</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>TemplateEngineServlet</servlet-name>
<url-pattern>*.ssp</url-pattern>
</servlet-mapping>
<error-page>
<error-code>500</error-code>
<location>/WEB-INF/scalate/errors/500.scaml</location>
</error-page>
--
View this message in context: http://camel.465427.n5.nabble.com/Embedded-web-console-tp478885p4688736.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Embedded web console
Posted by boday <be...@initekconsulting.com>.
hmmm...anyone try to package camel-web within an existing app (lately)? I
tried adding the dependency (below) in my web app and deployed to
Tomcat...but, I can't seem to get to the console (tried
http://localhost:8080/ and http://localhost:8080/<my app context>, etc).
What is the URL/context to hit? Any other integration necessary?
<groupId>org.apache.camel</groupId>
<artifactId>camel-web</artifactId>
<version>2.7.1</version>
<type>war</type>
<scope>runtime</scope>
</dependency>
Once I get it figured out, I'll update the camel-web page with some better
information on this...thanks
-----
Ben O'Day
IT Consultant -http://consulting-notes.com
--
View this message in context: http://camel.465427.n5.nabble.com/Embedded-web-console-tp478885p4576821.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Embedded web console
Posted by Willem Jiang <wi...@gmail.com>.
I recalled Charles add the CamelResourceConfig few month ago,
it looks like regression, please feel free to log a JIRA[1] for it.
[1]http://issues.apache.org/activemq/browse/CAMEL
Willem
greenstar wrote:
>
>
> James.Strachan wrote:
>> 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.
>>
>
> This example does not currently deploy (with jetty:run) with camel-web
> 2.2.0. It results in the stacktrace below:
>
> It appears that org.apache.camel.web.util.CamelResourceConfig is trying to
> load "classpath:/application-doc.xml", which resolves to a resource that
> looks like the following:
>
>
> jar:file:{...}.m2/repository/org/apache/camel/camel-web/2.2.0/camel-web-2.2.0.war!/WEB-INF/classes/application-doc.xml
>
> Is this a regression, or is there something else wrong?
>
> SEVERE: Exception occurred when intialization
> java.lang.RuntimeException: Could not load WadlGeneratorConfiguration, check
> the configuration of com.sun.jersey.config.property.WadlGeneratorConfig
> at
> com.sun.jersey.api.wadl.config.WadlGeneratorConfigLoader.loadWadlGeneratorsFromConfig(WadlGeneratorConfigLoader.java:109)
> at com.sun.jersey.server.impl.wadl.WadlFactory.<init>(WadlFactory.java:74)
> at
> com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:909)
> at
> com.sun.jersey.spi.spring.container.servlet.SpringServlet.initiate(SpringServlet.java:99)
> at
> com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.initiate(ServletContainer.java:252)
> at
> com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:550)
> at
> com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:201)
> at
> com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:307)
> at
> com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:641)
> at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
> at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
> at
> org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:662)
> at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
> at
> org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
> at
> org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
> at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
> at
> org.mortbay.jetty.plugin.Jetty6PluginWebAppContext.doStart(Jetty6PluginWebAppContext.java:115)
> 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:224)
> 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.AbstractJettyRunMojo.execute(AbstractJettyRunMojo.java:210)
> at org.mortbay.jetty.plugin.Jetty6RunMojo.execute(Jetty6RunMojo.java:184)
> at
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:105)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:576)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:323)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:247)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:104)
> at org.apache.maven.cli.MavenCli.execute(MavenCli.java:427)
> at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:157)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:121)
> 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.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
> Caused by: java.lang.RuntimeException: Could not load wadl generators from
> wadlGeneratorDescriptions.
> at
> com.sun.jersey.api.wadl.config.WadlGeneratorConfig.getWadlGenerator(WadlGeneratorConfig.java:188)
> at
> com.sun.jersey.api.wadl.config.WadlGeneratorConfigLoader.loadWadlGeneratorsFromConfig(WadlGeneratorConfigLoader.java:85)
> ... 46 more
> Caused by: java.lang.IllegalArgumentException: URI is not hierarchical
> at java.io.File.<init>(File.java:363)
> at
> com.sun.jersey.api.wadl.config.WadlGeneratorLoader.setProperty(WadlGeneratorLoader.java:187)
> at
> com.sun.jersey.api.wadl.config.WadlGeneratorLoader.loadWadlGenerator(WadlGeneratorLoader.java:136)
> at
> com.sun.jersey.api.wadl.config.WadlGeneratorLoader.loadWadlGeneratorDescriptions(WadlGeneratorLoader.java:111)
> at
> com.sun.jersey.api.wadl.config.WadlGeneratorConfig.getWadlGenerator(WadlGeneratorConfig.java:186)
> ... 47 more
>
Re: Embedded web console
Posted by greenstar <jn...@gmail.com>.
James.Strachan wrote:
>
> 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.
>
This example does not currently deploy (with jetty:run) with camel-web
2.2.0. It results in the stacktrace below:
It appears that org.apache.camel.web.util.CamelResourceConfig is trying to
load "classpath:/application-doc.xml", which resolves to a resource that
looks like the following:
jar:file:{...}.m2/repository/org/apache/camel/camel-web/2.2.0/camel-web-2.2.0.war!/WEB-INF/classes/application-doc.xml
Is this a regression, or is there something else wrong?
SEVERE: Exception occurred when intialization
java.lang.RuntimeException: Could not load WadlGeneratorConfiguration, check
the configuration of com.sun.jersey.config.property.WadlGeneratorConfig
at
com.sun.jersey.api.wadl.config.WadlGeneratorConfigLoader.loadWadlGeneratorsFromConfig(WadlGeneratorConfigLoader.java:109)
at com.sun.jersey.server.impl.wadl.WadlFactory.<init>(WadlFactory.java:74)
at
com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:909)
at
com.sun.jersey.spi.spring.container.servlet.SpringServlet.initiate(SpringServlet.java:99)
at
com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.initiate(ServletContainer.java:252)
at
com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:550)
at
com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:201)
at
com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:307)
at
com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:641)
at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at
org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:662)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
at
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
at
org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
at
org.mortbay.jetty.plugin.Jetty6PluginWebAppContext.doStart(Jetty6PluginWebAppContext.java:115)
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:224)
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.AbstractJettyRunMojo.execute(AbstractJettyRunMojo.java:210)
at org.mortbay.jetty.plugin.Jetty6RunMojo.execute(Jetty6RunMojo.java:184)
at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:105)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:576)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:323)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:247)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:104)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:427)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:157)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:121)
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.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: java.lang.RuntimeException: Could not load wadl generators from
wadlGeneratorDescriptions.
at
com.sun.jersey.api.wadl.config.WadlGeneratorConfig.getWadlGenerator(WadlGeneratorConfig.java:188)
at
com.sun.jersey.api.wadl.config.WadlGeneratorConfigLoader.loadWadlGeneratorsFromConfig(WadlGeneratorConfigLoader.java:85)
... 46 more
Caused by: java.lang.IllegalArgumentException: URI is not hierarchical
at java.io.File.<init>(File.java:363)
at
com.sun.jersey.api.wadl.config.WadlGeneratorLoader.setProperty(WadlGeneratorLoader.java:187)
at
com.sun.jersey.api.wadl.config.WadlGeneratorLoader.loadWadlGenerator(WadlGeneratorLoader.java:136)
at
com.sun.jersey.api.wadl.config.WadlGeneratorLoader.loadWadlGeneratorDescriptions(WadlGeneratorLoader.java:111)
at
com.sun.jersey.api.wadl.config.WadlGeneratorConfig.getWadlGenerator(WadlGeneratorConfig.java:186)
... 47 more
--
View this message in context: http://old.nabble.com/Embedded-web-console-tp24366288p28074044.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Embedded web console
Posted by James Strachan <ja...@gmail.com>.
2009/7/8 Claus Ibsen <cl...@gmail.com>:
> On Wed, Jul 8, 2009 at 2:44 PM, Claus Ibsen<cl...@gmail.com> wrote:
>> On Tue, Jul 7, 2009 at 4:45 AM, ewhauser<ew...@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.
--
James
-------
http://macstrac.blogspot.com/
Open Source Integration
http://fusesource.com/
Re: Embedded web console
Posted by Claus Ibsen <cl...@gmail.com>.
On Wed, Jul 8, 2009 at 2:44 PM, Claus Ibsen<cl...@gmail.com> wrote:
> On Tue, Jul 7, 2009 at 4:45 AM, ewhauser<ew...@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.
>
>
>> --
>> View this message in context: http://www.nabble.com/Embedded-web-console-tp24366288p24366288.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
>
>
>
> --
> Claus Ibsen
> Apache Camel Committer
>
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
>
--
Claus Ibsen
Apache Camel Committer
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus
Re: Embedded web console
Posted by Claus Ibsen <cl...@gmail.com>.
On Tue, Jul 7, 2009 at 4:45 AM, ewhauser<ew...@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.
> --
> View this message in context: http://www.nabble.com/Embedded-web-console-tp24366288p24366288.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
--
Claus Ibsen
Apache Camel Committer
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus