So I’ve finally returned and thanks to the excellent series of articles
by Ekke at http://ekkescorner.wordpress.com/blog-series/osgi-apps/ I was
able to capture logging information from JGroups and Ehcache.
On a high level I’m attempting to create a distributed cache using
Ehcache (com.springsource.net.sf.ehcache-1.5.0.jar) which in turn uses
JGroups (com.springsource.org.jgroups-2.5.1.jar) to replicate the data
across machines.
I currently have 2 machines running Felix 1.8.0 with the following bundles:
* · com.springsource.antlr-2.7.6.jar
* · com.springsource.ch.qos.logback.classic-0.9.15.jar
* · com.springsource.ch.qos.logback.core-0.9.15.jar
* · com.springsource.edu.emory.mathcs.backport-3.0.0.jar
* · com.springsource.javassist-3.3.0.ga.jar
* · com.springsource.javax.mail-1.4.1.jar
* · com.springsource.javax.servlet-2.5.0.jar
* · com.springsource.javax.xml.stream-1.0.1.jar
* · com.springsource.net.sf.cglib-2.1.3.jar
* · com.springsource.net.sf.ehcache-1.5.0.jar
* · com.springsource.net.sf.jsr107cache-1.0.0.jar
* · com.springsource.org.apache.commons.collections-3.2.0.ja
* · com.springsource.org.dom4j-1.6.1.jar
* · com.springsource.org.hibernate-3.3.1.GA-1.jar
* · com.springsource.org.jgroups-2.5.1.jar
* · com.springsource.slf4j.api-1.5.6.jar
* · com.springsource.slf4j.bridge-1.5.6.jar
* · com.springsource.slf4j.org.apache.log4j-1.5.6.jar
* · contextmanager-1.0-SNAPSHOT.jar
* · jcl-over-slf4j-1.5.6.jar
* · jgroupsFrag-1.0-SNAPSHOT.jar
* · JULToSLF4JBridgeFrag-1.0-SNAPSHOT.jar
* · LogbackFrag-1.0-SNAPSHOT.jar
When I take these same set of jars and run them in a standard JVM it
works fine. However when run them inside of Felix (or for that matter
Equinox or Knoplerfish) I get the following error:
*exception=java.lang.IllegalArgumentException:
java.lang.ClassNotFoundException:
net.sf.ehcache.distribution.jgroups.JGroupSerializable*
So it seems that the Ehache bundle is not able to find the
net.sf.ehcache.distribution.jgroups.JGroupSerializable which is in the
JGroups bundle.
So I figured I would create a fragment (jgroupsFrag-1.0-SNAPSHOT.jar)
that would provide this class to the Ehcache bundle. The following is
the manifest from this fragment.
Manifest-Version: 1.0
Private-Package: .
Bundle-ClassPath: .
Built-By: wdrew
Tool: Bnd-0.0.311
Bundle-Name: jgroupsFrag
Created-By: Apache Maven Bundle Plugin
Fragment-Host: com.springsource.org.jgroups
Bundle-Version: 1.0.0.SNAPSHOT
Build-Jdk: 1.6.0_13
Bnd-LastModified: 1246064720234
Bundle-ManifestVersion: 2
Bundle-SymbolicName: com.ss.mother.jgroupsFrag
Apparently I’m doing something wrong here because when I deploy/install
this fragment I still get the ClassNotFoundException above.
Any ideas where I’m going wrong with this?
William Drew wrote:
Karl,
Thanks for the quick response. I was hoping that it was something very
simple so I didn't include detailed information. I'll get a more
reasonable set of diagnostics and get back asap.
Karl Pauls wrote:
Can you give us a little more information about what is going wrong
(like error messages etc.)? Furthermore, are you using the latest
version of felix or are you running on trunk?
regards,
Karl
On Mon, Jun 1, 2009 at 10:22 PM, William Drew <[email protected]>
wrote:
I am attempting to use Ehcache within Felix to provide a distributed
cache
capability and using JGroups for the replication of the data between
the
JVMs. To ensure that my ehcache configuration was correct I ran the
code
outside of OSGi. The data is being successfully added to the cache and
replicated across two JVMs running on separate machines.
The problem is when I run this same code inside a bundle within
Felix. The
bundle is started successfully and it all runs fine except for the
fact that
I can not seem to get the same connection between the JVMs as I did
when I
ran them outside of Felix. JGroups does not seem to be able to
connect when
running inside the OSGi container.
Is there some configuration settings within Felix that I need to set in
order to enable network connections to be established? I'm sure there's
something simple that I'm missing here.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]