Hi Achim,

> Since your using Karaf as your runtime now, you are not required to
> transform it into a WebApplicationBundle (WAB/aka War with Manifest)
> but it surely helps when running into issues, so way to go :)

Actually while I'm using Karaf for investigating this issue it may not
be the environment long term so I need the ability to create a full wab
anyway. 

> Regarding ruby, you really need to make sure you're not using any
> Thread.getCurrentClassloader, this usually get's mixed up a lot.
> There is a nice Blog from Neil Bartlet giving some insights on this :)
> 
> http://njbartlett.name/2010/08/30/osgi-readiness-loading-classes.html

Thanks. In fact the latest jRuby (1.6.0 as released) has some OSGi
compatibility and support baked in. I can successfully create OSGi
bundles which register servlets who render their content via Ruby and
Haml using that - quite satisfying :)

It's the next step of being able to deploy full Ruby Rack applications
(Sinatra in my case) that tripped me up.

I may "just" rethink the architecture and stick to finer grain
components and replace the Sinatra layer with some java osgi based
dispatch support. That way I can mix and match implementation languages
for different components within a nice modular server framework.
Pondering required.

Dave

> 2011/4/5 Dave Reynolds <[email protected]>:
> > On Tue, 2011-04-05 at 09:15 +0800, Niclas Hedhman wrote:
> >> On Mon, Apr 4, 2011 at 3:33 AM, Dave Reynolds <[email protected]> 
> >> wrote:
> >> > Bundle-ClassPath :
> >> > WEB_INF/lib/jruby-core-1.6.0.jar,WEB_INF/lib/jruby-rack-1.0.8.jar,WEB_INF/lib/jruby-stdlib-1.6.0.jar
> >>
> >> Missing the "." (dot) in the classpath???
> >
> > Thanks, I had tried with that.
> >
> >> Or should it be lib/classes or something like that for WARs??
> >
> > There would normally be a WEB-INF/classes except in this case (its a
> > Wabled jruby sintra application) there aren't any seperate classes just
> > the libs.
> >
> >> If I am not mistaken, doesn't pax-web-extender expect a non-osgi WAR
> >> file?? Or was that an additional extension?
> >
> > The documentation for the the war extender says you need to OSGI your
> > war: http://wiki.ops4j.org/display/paxweb/WAR+Extender
> >
> > There's various support for automatically transforming plain artefacts
> > if you use the right URL handler but I don't want to depend on those.
> >
> >
> > As it turns out I had two trivial problems (always the hardest to spot)
> > - a typo, those should be "WEB-INF" not "WEB_INF" (slaps head) plus some
> > missing javax imports. Easy to find once you start actually seeing the
> > error traces.
> >
> > With those fixed it gets as far as installing the Filter + Listener and
> > the listener fires. So the basic java war part is now working. The ruby
> > part then fails to load the gems (can't find bundler/setup).
> >
> > So at this point I have the Pax Web components working fine, thanks for
> > the help, and am just down to juggling classpaths and ruby load paths
> > until I figure what's wrong at the ruby level.
> >
> > Cheers,
> > Dave
> >
> >
> >
> > _______________________________________________
> > general mailing list
> > [email protected]
> > http://lists.ops4j.org/mailman/listinfo/general
> >
> 
> _______________________________________________
> general mailing list
> [email protected]
> http://lists.ops4j.org/mailman/listinfo/general




_______________________________________________
general mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/general

Reply via email to