On 5/15/09 10:51 AM, Dmitry Sklyut wrote:
I knew about the 4.2 thing - but I specifically pulled down equinox 3.5
dependencies because version that Karaf uses is 3.5.x.
(<equinox.version>  3.5.0.v20090429-1630</equinox.version>  in top level
pom.xml).

I think the biggest issues with me using felix is fragment bundle support.
We are planning on using fragments for contributing types to hibernate
session factory vs. doing something more complicated (i.e. modulefusion
like).  Our customers would not mind a quick reboot when deploying a patch
or another set of features.  We are also planning on using fragments to
provide easy UI bundles when customizing L&F for application.

The 1.8.0 release of Felix (available since yesterday) should provide support for the most common cases of fragments. There are still some bugs, I am sure, since it is an initial release, but the only aspect that is still completely missing is support for native libraries in fragments, which I will start to look into before long.

So, in short, try out the fragment support in Felix and see if it works for you. It passes most of the OSGi TCK fragment tests at this point. If you try it and run into any issues, please report it here or create a JIRA issue.

-> richard
I did check on the versions and they are different from compendium and
equinox services/utils. Versions are bumped up a notch in equinox case.
One thing in compendium that confused me was use of DynamicImport-Package:
*.  Why would that be there?
In equinox services there is this configuration:
DynamicImport-Package: javax.servlet,javax.servlet.http

I rulled out SpringDM change early on.  I did try to 1.2.0-rc1 and 1.2.0
final with same result.  I did not roll back spring jars to 2.5.6.A vs
.SEC01.  I did not want to rollback to 2.5.6 because I seem to remmember
Spring guys mentioning that 2.5.6.A was a fix to the manifest ( of I could
be mistaking a version number ).

I think I tried felix but got some other issue that I can recollect now.  I
think it had to do with one of the Hibernate bundles from BRITS (annotations
I think) that is packaged as a fragment.

I can try to bump down a version of equinox, but I would really hate to do
that.  I would really like to use distributed osgi part of it to simplify
(hopefully) cxf integration.

Thanks

Dmtiry

On Fri, May 15, 2009 at 10:18 AM, Guillaume Nodet<gno...@gmail.com>  wrote:

Not sure exactly.  I don't think this comes from a problem with the
classes used, but maybe from the version of the package exported.
IIRC, equinox follows the not yet published spec of OSGi 4.2, so it
may already has bumped some of the packages, though I'm still not sure
how that would affect the bundles.

We need to rule out a number of things: have you tried without
upgrading spring-dm ? What if you use felix instead of equinox ?

On Fri, May 15, 2009 at 15:21, Dmitry Sklyut
<dskl...@chariotsolutions.com>  wrote:
Hi All,

I am trying to use Karaf with equinox and ran into a very strange
classloading issue yesterday.

Here is a situation:
1. Stock karaf with FELIX-1150 (
https://issues.apache.org/jira/browse/FELIX-1150) applied (upgrade to
Spring
2.5.6.SEC01 and SpringDM 1.2.0) and config.properties modified to point
to
equinox (i.e. karaf.framework=equinox)
2. Bundle "datasource" wraps h2database and c3p0 and publishes a
DataSource
3. Bundle "hibernate" is session factory producing bundle.  It publishes
SessionFactory and Spring PlatformTransactionManager using SpringDM.
4. All of the supporting spring libraries (transaction, orm, etc) and
hibernate (pulled from BRITS) and supporting java spec bundles are also
deployed.

When deploying those two bundles I was constantly getting a CNF on
org.hibernate.JDBCException in Karaf from bundle .  Those bundles were
working just fine with Pax Runner.
I thought that it was a problem with my bundles.  I tried everything,
modified imports, tried require bundle (with reexport and without),
finally
tried Dynamic import = *.
Still I was getting a CNF.

I finally reconfigured Karaf to use:
1. org.eclipse.osgi.services-3.2.0.v20090429.jar vs.

org/apache/felix/org.osgi.compendium/${felix.compendium.version}/org.osgi.compendium-${felix.compendium.version}.jar
2. org.eclipse.osgi.util-3.2.0.v20090429.jar because PAX runner uses it
in
minimal equinox configuraiton.

Now everything seems to work.  So I have a solution for my issue, but I
still don't have a "WHY" this issue came up.  Can anyone think of a
"WHY"?
Is it an isseu with Compendium services used in stock Karaf?

I am willing to submit my changes as a patch but I would like to discuss
this a little more to get it right.  I have a pax-construct project that
generates required dependencies and bundles in question for testing if
anyone is interested in trying this.

Thanks in advance

Dmitry


--
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

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



Reply via email to