You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by William Drew <so...@verizon.net> on 2009/07/14 02:36:25 UTC
Re: Ehcache and JGroups connectiivity
I haven't had any success in solving this issue and no responses from
the list to date so I thought I'd try again with a slightly different
explanation.
I'm using Ehcache (com.springsource.net.sf.ehcache-1.5.0.jar) in Felix
1.8.0. using JGroups (com.springsource.org.jgroups-2.5.1.jar) for data
replication. I deploy these bundles on two machines on the network each
running the exact same bundles within Felix. When I add data to the
cache on one of the machines it attempts to replicate it to the other
machine running Ehcache and I get the following:
*exception=java.lang.IllegalArgumentException:
java.lang.ClassNotFoundException:
net.sf.ehcache.distribution.jgroups.JGroupSerializable
*
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
Unfortunately when I deploy the fragment I get the same CNFE. The layout
of the jgroupsFrag-1.0-SNAPSHOT.jar is:
META-INF/MANIFEST.MF
META-INF/
META-INF/maven/
META-INF/maven/com.ss.mother/
META-INF/maven/com.ss.mother/jgroupsFrag/
META-INF/maven/com.ss.mother/jgroupsFrag/pom.properties
META-INF/maven/com.ss.mother/jgroupsFrag/pom.xml
com.springsource.net.sf.ehcache-1.5.0.jar
First, is this the correct approach to solving this problem? If so, what
I'm I missing here?
Any help would be greatly appreciated.
William Drew wrote:
>
> 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 <so...@verizon.net>
>>> 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: 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
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> 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
Re: Ehcache and JGroups connectiivity
Posted by Dmitry Sklyut <ds...@chariotsolutions.com>.
You can try changing Bundle-ClassPath of a fragment bundle to actually point
to the embedded com.springsource.net.sf.ehcache-1.5.0.jar.
Bundle-ClassPath: .,com.springsource.net.sf.ehcache-1.5.0.jar
See if that works.
Dmitry
On Mon, Jul 13, 2009 at 8:36 PM, William Drew <so...@verizon.net> wrote:
> I haven't had any success in solving this issue and no responses from the
> list to date so I thought I'd try again with a slightly different
> explanation.
>
> I'm using Ehcache (com.springsource.net.sf.ehcache-1.5.0.jar) in Felix
> 1.8.0. using JGroups (com.springsource.org.jgroups-2.5.1.jar) for data
> replication. I deploy these bundles on two machines on the network each
> running the exact same bundles within Felix. When I add data to the cache on
> one of the machines it attempts to replicate it to the other machine running
> Ehcache and I get the following:
>
> *exception=java.lang.IllegalArgumentException:
> java.lang.ClassNotFoundException:
> net.sf.ehcache.distribution.jgroups.JGroupSerializable
> *
> 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
>
> Unfortunately when I deploy the fragment I get the same CNFE. The layout of
> the jgroupsFrag-1.0-SNAPSHOT.jar is:
>
> META-INF/MANIFEST.MF
> META-INF/
> META-INF/maven/
> META-INF/maven/com.ss.mother/
> META-INF/maven/com.ss.mother/jgroupsFrag/
> META-INF/maven/com.ss.mother/jgroupsFrag/pom.properties
> META-INF/maven/com.ss.mother/jgroupsFrag/pom.xml
> com.springsource.net.sf.ehcache-1.5.0.jar
>
> First, is this the correct approach to solving this problem? If so, what
> I'm I missing here?
>
> Any help would be greatly appreciated.
>
>
> William Drew wrote:
>
>>
>> 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 <so...@verizon.net>
>>>> 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: 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
>>>
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> 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
>
>