You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by barnesjd <ba...@gmail.com> on 2013/01/24 23:50:25 UTC

[2.3.0] Deploying a war with a listener in web.xml

I've run into some classloading issues when I try to deploy a war that
specifies a listener in web.xml.  Do any of you know of a sample web
application bundle that uses a listener?  The only sample I've found is the
one offered in the  Karaf User Guide
<http://karaf.apache.org/manual/2.3.0/users-guide/web-applications.html>  ,
but they only use servlets.  I believe an example will help me figure out
what I'm doing wrong with my war.

Thanks,
Joe



--
View this message in context: http://karaf.922171.n3.nabble.com/2-3-0-Deploying-a-war-with-a-listener-in-web-xml-tp4027455.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: [2.3.0] Deploying a war with a listener in web.xml

Posted by Achim Nierbeck <bc...@googlemail.com>.
thanks for the feedback.
Working with non-osgi ready bundles can be a real PITA.
That's why there are already a couple of different wrapper projects
available.
For example there is the Spring repository for OSGi bundle, then there is
the ServiceMix wrappers for all kinds of 3rd-party libs take a look at it
you probably will find a couple of those you are affected, and last but not
least there is the newly created Pax-Tipi project also trying to help out
with "wrapping" the "unwilling" 3rd party libs :)

And of course you still are able to do it either yourself or just embed non
OSGi jars in your application jar/war (just place them in the lib-folder an
make sure bnd knows it while creating your manifest)

regards, Achim


2013/1/27 barnesjd <ba...@gmail.com>

> In case you're interested, I wrote a blog post about how I figured it out:
> http://barnesjd.wordpress.com/2013/01/26/noclassdeffounderror-wrong-name/
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/2-3-0-Deploying-a-war-with-a-listener-in-web-xml-tp4027455p4027493.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>



-- 

Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
OPS4J Pax for Vaadin <http://team.ops4j.org/wiki/display/PAXVAADIN/Home>
Commiter & Project Lead
blog <http://notizblog.nierbeck.de/>

Re: [2.3.0] Deploying a war with a listener in web.xml

Posted by barnesjd <ba...@gmail.com>.
In case you're interested, I wrote a blog post about how I figured it out:
http://barnesjd.wordpress.com/2013/01/26/noclassdeffounderror-wrong-name/



--
View this message in context: http://karaf.922171.n3.nabble.com/2-3-0-Deploying-a-war-with-a-listener-in-web-xml-tp4027455p4027493.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: [2.3.0] Deploying a war with a listener in web.xml

Posted by Achim Nierbeck <bc...@googlemail.com>.
Good to know.

Regards Achim

sent from mobile device
Am 25.01.2013 23:25 schrieb "barnesjd" <ba...@gmail.com>:

> Yep, I figured it out.  I had whipped up a script to use BND to help me
> OSGi-ify some of my dependencies and it was messing up the contents of the
> jar.
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/2-3-0-Deploying-a-war-with-a-listener-in-web-xml-tp4027455p4027478.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>

Re: [2.3.0] Deploying a war with a listener in web.xml

Posted by barnesjd <ba...@gmail.com>.
Yep, I figured it out.  I had whipped up a script to use BND to help me
OSGi-ify some of my dependencies and it was messing up the contents of the
jar.



--
View this message in context: http://karaf.922171.n3.nabble.com/2-3-0-Deploying-a-war-with-a-listener-in-web-xml-tp4027455p4027478.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: [2.3.0] Deploying a war with a listener in web.xml

Posted by barnesjd <ba...@gmail.com>.
Thanks for the tip!  After more experimentation with the library I'm trying
to use, I'm convinced that there is an issue with its jar.  



--
View this message in context: http://karaf.922171.n3.nabble.com/2-3-0-Deploying-a-war-with-a-listener-in-web-xml-tp4027455p4027468.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: [2.3.0] Deploying a war with a listener in web.xml

Posted by Achim Nierbeck <bc...@googlemail.com>.
Hi Joe,

Take a look at the samples of Pax-Web, they can be found at [1]. The itests
used by Pax-Web might also give you a good starting point. [2]
But keep in mind, that those samples are for the latest version and might
not fit 100%.
If you have more questions, don't hesitate to ask.

[1] - https://github.com/ops4j/org.ops4j.pax.web/tree/master/samples
[2] -
https://github.com/ops4j/org.ops4j.pax.web/tree/master/itest/src/test/java/org/ops4j/pax/web/itest

sent from mobile device
Am 24.01.2013 23:50 schrieb "barnesjd" <ba...@gmail.com>:

> I've run into some classloading issues when I try to deploy a war that
> specifies a listener in web.xml.  Do any of you know of a sample web
> application bundle that uses a listener?  The only sample I've found is the
> one offered in the  Karaf User Guide
> <http://karaf.apache.org/manual/2.3.0/users-guide/web-applications.html>
>  ,
> but they only use servlets.  I believe an example will help me figure out
> what I'm doing wrong with my war.
>
> Thanks,
> Joe
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/2-3-0-Deploying-a-war-with-a-listener-in-web-xml-tp4027455.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>