You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Chris Wolf <cw...@gmail.com> on 2013/07/18 19:46:50 UTC

How to use hawtio with Camel web app?

I would like to use hawtio's Camel route diagram view for inspecting
and displaying routes.

http://hawt.io/getstarted/index.html

Since the app will be deployed in a private Intranet, I tried their
"offline" WAR:

https://oss.sonatype.org/content/repositories/public/io/hawt/hawtio-default-offline/1.2-M1/hawtio-default-offline-1.2-M1.war

This didn't work - the first problem was an incompletely declared
WEB-INF/web.xml root element, which I fixed,
this allowed the web app to deploy, but I still see this error in the
server log:


13:02:21,940 ERROR
[org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/hawtio]]
Failed to startup blueprint container.
org.osgi.service.blueprint.container.ComponentDefinitionException:
Unable to intialize bean aetherFacade:
org.osgi.service.blueprint.container.ComponentDefinitionException:
Unable to intialize bean aetherFacade

Although I can navigate and inspect MBeans through the JMX view.

If I download the full WAR, which includes a sample Camel context:

https://oss.sonatype.org/content/repositories/public/io/hawt/sample/1.2-M1/sample-1.2-M1.war

This also works, although with a large volume of assorted stack traces
in the log.

I don't need all the extra stuff that the full sample WAR has, e.g.
ActiveMQ because JBoss6 uses
HornetQ, etc.   I just want to know how to combine my Camel web app
with the most minimal hawtio
web app to be able to view/inspect context(s) and routes in diagram view?

I searched the list archive and only found a thread concerning the
initial announcement:

http://camel.465427.n5.nabble.com/ANN-hawtio-a-new-lightweight-HTML5-console-for-Apache-Camel-ActiveMQ-JMX-OSGi-amp-Fuse-Fabric-td5726244.html#a5726248

Does anyone have an idea?

Thanks,


Chris

Re: How to use hawtio with Camel web app?

Posted by James Strachan <ja...@gmail.com>.
On 18 July 2013 20:51, Chris Wolf <cw...@gmail.com> wrote:
> Thanks for getting back to me.
>
>>>
>>> This didn't work - the first problem was an incompletely declared
>>> WEB-INF/web.xml root element, which I fixed,
>>
>> What change did you make? Any chance of a pull request or at least a
>> gist of the latest version? :)
>>
>
> It was very minor.  I think it it fails because JBoss-6 is configured
> to perform schema validation
> of web.xml, so I changed the declaration of the root element from:
>
>
> <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/javaee">
>
>
> to:
>
> <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">
>
> I don't think you need version 2.5, but I just had another web.xml I
> copy/pasted from, with the
> schemaLocation for 2.5.

Ah thanks! I've added the XSD to all the web.xml files in the hawtio
project; I kept it at 2.4 for now since I figured this would mean we'd
work in more web containers
https://github.com/hawtio/hawtio/commit/872bda892cc9aa5ec13f95d87bb9d61cf259e0f9

let me know if we need to change this to 2.5 though. Thanks again for
the heads up

--
James
-------
Red Hat

Email: jstracha@redhat.com
Web: http://fusesource.com
Twitter: jstrachan, fusenews
Blog: http://macstrac.blogspot.com/

Open Source Integration

Re: How to use hawtio with Camel web app?

Posted by Chris Wolf <cw...@gmail.com>.
Thanks for getting back to me.

>>
>> This didn't work - the first problem was an incompletely declared
>> WEB-INF/web.xml root element, which I fixed,
>
> What change did you make? Any chance of a pull request or at least a
> gist of the latest version? :)
>

It was very minor.  I think it it fails because JBoss-6 is configured
to perform schema validation
of web.xml, so I changed the declaration of the root element from:


<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/javaee">


to:

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

I don't think you need version 2.5, but I just had another web.xml I
copy/pasted from, with the
schemaLocation for 2.5.


I will get back to you on the other items, right now I have it all
ripped apart, temporarily..


Thanks,

Chris

Re: How to use hawtio with Camel web app?

Posted by James Strachan <ja...@gmail.com>.
On 18 July 2013 18:46, Chris Wolf <cw...@gmail.com> wrote:
> I would like to use hawtio's Camel route diagram view for inspecting
> and displaying routes.
>
> http://hawt.io/getstarted/index.html
>
> Since the app will be deployed in a private Intranet, I tried their
> "offline" WAR:
>
> https://oss.sonatype.org/content/repositories/public/io/hawt/hawtio-default-offline/1.2-M1/hawtio-default-offline-1.2-M1.war
>
> This didn't work - the first problem was an incompletely declared
> WEB-INF/web.xml root element, which I fixed,

What change did you make? Any chance of a pull request or at least a
gist of the latest version? :)


> this allowed the web app to deploy, but I still see this error in the
> server log:
>
>
> 13:02:21,940 ERROR
> [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/hawtio]]
> Failed to startup blueprint container.
> org.osgi.service.blueprint.container.ComponentDefinitionException:
> Unable to intialize bean aetherFacade:
> org.osgi.service.blueprint.container.ComponentDefinitionException:
> Unable to intialize bean aetherFacade

Any chance of the whole log as a gist? Then we can figure out whats wrong.

There's been a recent issue fixed which caused some startup noise -
which we'll have a new milestone or full 1.2 release soon...
https://github.com/hawtio/hawtio/issues/385

There's currently some other issues for the Maven indexer plugin as
our fusesource nexus doesn't seem to have a downloadable index any
more too...


If you're having issues though, maybe try just hawtio-web.war which
has the bare minimum stuff inside (so hopefully won't have many
errors).


> Although I can navigate and inspect MBeans through the JMX view.

Ah - in that case it might be working fine then? If you deploy your
camel routes in a separate WAR, do you see them in the Camel tab?

--
James
-------
Red Hat

Email: jstracha@redhat.com
Web: http://fusesource.com
Twitter: jstrachan, fusenews
Blog: http://macstrac.blogspot.com/

Open Source Integration