You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by drhades <ya...@gmail.com> on 2011/05/15 17:53:14 UTC

issues when hot deploying war

Karaf version:2.2.0 
Pax Web - Extender - WAR(1.0.1) 

To be deployed: geowebcache.war from http://geowebcache.org/

Way 1: 
throw geowebcache.war into karaf/deploy directory; 
osgi:list command will show "geowebcache" bundle installed; 
but /geowebcache request will cause the following error 

Error: 
java.lang.NoClassDefFoundError:
com/noelios/restlet/ext/servlet/ServletConverter 
which is inside
geowebcache.war/WEB-INF/lib/com.noelios.restlet.ext.servlet-1.0.8.jar 

Way 2: 
update geowebcache.war/MANIFEST.MF, append the following entries and throw
into karaf/deploy directory; 
MANIFEST.MF++: 
Bundle-Name: geowebcache 
Bundle-ManifestVersion: 2 
Bundle-SymbolicName: geowebcache 
Bundle-ClassPath: ., WEB-INF/classes,
WEB-INF/lib/acegi-security-1.0.7.jar,...(all depended jar)... 
Import-Package: javax.servlet, javax.servlet.http 

Then, in karaf console, 
osgi:list show nothing new bundle relating with "geowebcache". 

Could somebody help me?

--
View this message in context: http://karaf.922171.n3.nabble.com/issues-when-hot-deploying-war-tp2943742p2943742.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: issues when hot deploying war

Posted by Achim Nierbeck <bc...@googlemail.com>.
you might switch to debug level of logging while experimenting with
your Manifest :-)
To do so, just alter the org.ops4j.pax.logging.cfg file.

regards, Achim

2011/5/16 drhades <ya...@gmail.com>:
> Thank Achim.
>
> I've upgraded karaf to 2.2.1.
>
> The most difficult issue is the missing of log information when attempting
> modified manifest.mf.
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/issues-when-hot-deploying-war-tp2943742p2946805.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>



-- 
--
*Achim Nierbeck*


Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
Committer & Project Lead

Re: issues when hot deploying war

Posted by drhades <ya...@gmail.com>.
Thank Achim.

I've upgraded karaf to 2.2.1.

The most difficult issue is the missing of log information when attempting
modified manifest.mf.

--
View this message in context: http://karaf.922171.n3.nabble.com/issues-when-hot-deploying-war-tp2943742p2946805.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: issues when hot deploying war

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

first of all, I suggest using Karaf. 2.2.1 as it uses Pax Web 1.0.3.

Your first way didn't succeed because the Manifest generation inside
pax-web/pax-url does make sure no servlet*.jars are included.
This is to prevent classloader issues.

Your second attempt is the right way, but it might be that
there are other jars included which don't work right.
I already tried to deploy the geoserver.war to work on Karaf
and I know it's not easy to find the problematic jars.

Jars that will do give you trouble for sure are:
- some sort of servlet-api jar
- multiple jars of the same kind (xml-apis are usually good candidates)

You can try with an exploded war first and see what happens if you
remove certain jars from your classpath.
And the classpath shouldn't contain the "." in it.

regards, Achim

> Karaf version:2.2.0 
> Pax Web - Extender - WAR(1.0.1) 
>
> To be deployed: geowebcache.war from http://geowebcache.org/
>
> Way 1: 
> throw geowebcache.war into karaf/deploy directory; 
> osgi:list command will show "geowebcache" bundle installed; 
> but /geowebcache request will cause the following error 
>
> Error: 
> java.lang.NoClassDefFoundError:
> com/noelios/restlet/ext/servlet/ServletConverter 
> which is inside
> geowebcache.war/WEB-INF/lib/com.noelios.restlet.ext.servlet-1.0.8.jar 
>
> Way 2: 
> update geowebcache.war/MANIFEST.MF, append the following entries and throw
> into karaf/deploy directory; 
> MANIFEST.MF++: 
> Bundle-Name: geowebcache 
> Bundle-ManifestVersion: 2 
> Bundle-SymbolicName: geowebcache 
> Bundle-ClassPath: ., WEB-INF/classes,
> WEB-INF/lib/acegi-security-1.0.7.jar,...(all depended jar)... 
> Import-Package: javax.servlet, javax.servlet.http 
>
> Then, in karaf console, 
> osgi:list show nothing new bundle relating with "geowebcache". 
>
> Could somebody help me?
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/issues-when-hot-deploying-war-tp2943742p2943742.html
> Sent from the Karaf - User mailing list archive at Nabble.com.