felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Achim Nierbeck <bcanh...@googlemail.com>
Subject Re: A better life: quick webapp deploy
Date Tue, 26 Apr 2011 18:34:22 GMT
Hi Daniele,

it's better to have a bunch of tools to choose, than only one tool not
working ;)

I guess somebody already did help you with the creation of wab archives.
This would have been my next one, create a manifest with the
maven-bundle-plugin and
create your war archive with the standard war plugin for maven. I
thought that 2.3.4 of
maven-bundle-plugin would suite your needs.


Regarding Wicket I really recommend taking a look at pax-wicket since
one of the pax
guys is really working hard to get this transparently flying :)

regards, Achim


Am 21.04.2011 19:00, schrieb Daniele Dellafiore:
> On Thu, Apr 21, 2011 at 11:45 AM, Achim Nierbeck <bcanhome@googlemail.com>wrote:
>
>> Daniele,
>>
>> there is also pax-wicket, this might help you with developing wicket apps.
>> :)
>> And as far as I know the maven-bundle-plugin 2.3.4 is much more
>> suitable for creating
>> war archives with manifest information.
>>
>> regards, achim
>>
> Thanks Achim.
>
> The problem is not the lack of tool that can help me, but the opposite:
> there seems to be so many different way to do this thing that came out
> during last few years, that is difficult to find relevant and actual
> information.
> I'm following the few things said on the book OSGi in ACtion I own, and it
> says that the thing that defines a  bundle as a WAB is Web-ContextPath,
> which should just define the URL context where to mound the webapp.
> That is nice, but still does not say anything on how to avoid the war to
> include dependencies.
>
>
> Here's what I've done:
>
> I managed my way to deploy a war. I've manually removed the jars in the lib
> folder after the war has been built by maven.
> The actual MANIFEST is what follows and it finally starts, but I got
> exceptions for some ClassNotFound which makes no sense: the bundle starts so
> every dependency is there, but indeed I have the class not found when the
> http service starts to make its work.
>
> Here's the relevant part of the manifest
>
> Bundle-ClassPath: WEB-INF/classes
> Bundle-SymbolicName: fenotipi-web
> Web-ContextPath: /fenotipi
> Bundle-Name: Fenotipi - Web Client
> Bundle-Version: 0.0.3.SNAPSHOT
> Bnd-LastModified: 1303403761811
> Bundle-ManifestVersion: 2
> Tool: Bnd-1.15.0
> Import-Package: [... lots of stuff... ]
>
> And here the log after. First I stop the module:
>
> 16:55:46,348 | INFO  | Thread-32        | HttpServiceFactoryImpl           |
> .internal.HttpServiceFactoryImpl   40 | 54 -
> org.ops4j.pax.web.pax-web-runtime - 1.0.1 | Unbinding bundle: [fenotipi-web
> [352]]
> 16:55:46,348 | INFO  | Thread-32        | JettyServerWrapper               |
> etty.internal.JettyServerWrapper  124 | 56 - org.ops4j.pax.web.pax-web-jetty
> - 1.0.1 | ServletContext service already removed
>
> Then I start it
>
> 16:55:49,085 | INFO  | NioProcessor-1   | ChannelSession                   |
> d.common.channel.AbstractChannel  162 | 17 - sshd-core - 0.5.0 | Received
> SSH_MSG_CHANNEL_WINDOW_ADJUST on channel 0
> 16:55:49,308 | INFO  | NioProcessor-1   | ChannelSession                   |
> d.common.channel.AbstractChannel  162 | 17 - sshd-core - 0.5.0 | Received
> SSH_MSG_CHANNEL_WINDOW_ADJUST on channel 0
> 16:55:49,488 | INFO  | NioProcessor-1   | ChannelSession                   |
> d.common.channel.AbstractChannel  162 | 17 - sshd-core - 0.5.0 | Received
> SSH_MSG_CHANNEL_WINDOW_ADJUST on channel 0
> 16:55:49,637 | INFO  | NioProcessor-1   | ChannelSession                   |
> d.common.channel.AbstractChannel  162 | 17 - sshd-core - 0.5.0 | Received
> SSH_MSG_CHANNEL_WINDOW_ADJUST on channel 0
> 16:55:59,008 | INFO  | Thread-32        | WebXmlObserver                   |
> nder.war.internal.WebXmlObserver  118 | 62 -
> org.ops4j.pax.web.pax-web-extender-war - 1.0.1 | Using [fenotipi] as web
> application context name
> 16:55:59,008 | INFO  | Thread-32        | WebXmlObserver                   |
> nder.war.internal.WebXmlObserver  133 | 62 -
> org.ops4j.pax.web.pax-web-extender-war - 1.0.1 | Using [] as web application
> root path
> 16:55:59,034 | INFO  | Thread-32        | HttpServiceFactoryImpl           |
> .internal.HttpServiceFactoryImpl   33 | 54 -
> org.ops4j.pax.web.pax-web-runtime - 1.0.1 | Binding bundle: [fenotipi-web
> [352]] to http service
> 16:55:59,087 | ERROR | Thread-32        | RegisterWebAppVisitorWC          |
> internal.RegisterWebAppVisitorWC  283 | 62 -
> org.ops4j.pax.web.pax-web-extender-war - 1.0.1 | Registration exception.
> Skipping.
> java.lang.ClassNotFoundException:
> org.springframework.web.context.ContextLoaderListener not found by
> fenotipi-web [352]
>
> Here we go. It can't find this class and also the WicketFilter class.
>
> This is strange, maybe it's using a different classloader?
>
>
>
>> 2011/4/21 Daniele Dellafiore <daniele@dellafiore.net>:
>>> On Thu, Apr 21, 2011 at 9:48 AM, Daniele Dellafiore
>>> <daniele@dellafiore.net>wrote:
>>>
>>>> I thank you all for the information. I need to make it run from the
>>>> maven-bundle-plugin 2.2.0.
>>>> With the configuration (pasted in the end of the email) and instructing
>> the
>>>> maven-war-plugin to where the MANIFEST file is, the module with
>> packaging =
>>>> war has the osgi info but still has the /lib folder with all the jars
>> and
>>>> the MANIFEST file is not even populated with the OSGI info (while for
>> all
>>>> the other jar it is)
>>>>
>>> sorry, here is the correct statement:
>>> 1. the Manifest is correctly populated with the OSGI info, either if it's
>>> built as jar or war, so this is ok, I think.
>>> 2. the lib folder still has the jars, and I want to get rid of them and
>> use
>>> the bundles on karaf referenced with the manifest, instead.
>>>
>>> Actually, the manifest import the packages, not the jars. Have I to
>> change
>>> this?
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Mime
View raw message