| Author |
Message |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 03/20/2012 23:37:16
|
yjiqplpl
neo
Joined: 03/20/2012 23:30:45
Messages: 5
Offline
|
Hi, I'm looking at using terracotta to provide a distributed cache between OSGI containers on different machines.
I'm using ehcache-core-2.4.2.jar,ehcache-terracotta-2.4.2,terracotta-toolkit-1.2-runtime-3.1.0.jar,but the jar not osgi version.please tell me the osgi bundle anywhere.thanks.
|
|
|
 |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 03/21/2012 05:10:31
|
rajoshi
seraphim
Joined: 07/04/2011 04:36:10
Messages: 1466
Offline
|
Hi ,
Your query is not clear , which jar you are looking for ?? Currently we have tim-osgi supporting equinox 3.7.1 . Here is the way to install it :
You need to go to $TC_INSTALL_DIR/bin , do a "./tim-get.sh list" and then from there install the tim (tim-equinox-3.5.1 1.3.0) with command "./tim-get.sh install tim-equinox-3.5.1 1.3.0".
|
Rakesh Joshi
Terracotta. |
|
|
 |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 03/21/2012 06:01:57
|
yjiqplpl
neo
Joined: 03/20/2012 23:30:45
Messages: 5
Offline
|
HI,
I wan't osgi(equinox) bundle for ehcache-terracotta-2.4.2.jar and terracotta-toolkit-1.2-runtime-3.1.0.jar.
I'm using Terracotta3.5.1 thanks.
|
|
|
 |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 03/21/2012 18:06:56
|
yjiqplpl
neo
Joined: 03/20/2012 23:30:45
Messages: 5
Offline
|
2012-3-22 8:59:56 net.sf.ehcache.terracotta.TerracottaClient createNewClusteredInstanceFactory
信息: Creating new ClusteredInstanceFactory
2012-03-22 08:59:57,223 INFO - Terracotta 3.5.1, as of 20110411-170418 (Revision 17477 by cruise@rh5vfm1 from 3.5.1)
2012-03-22 08:59:57,660 INFO - Successfully loaded base configuration from server at 'localhost:9510'.
2012-03-22 08:59:57,739 INFO - Successfully loaded base configuration from file at 'C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\tc-config14623.xml'.
2012-03-22 08:59:57,817 INFO - Log file: 'C:\Documents and Settings\Administrator\terracotta\client-logs\terracotta-client.log'.
2012-03-22 08:59:59,082 INFO - Connection successfully established to server at 192.168.32.111:9510
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at net.sf.ehcache.util.ClassLoaderUtil.createNewInstance(ClassLoaderUtil.java:92)
at net.sf.ehcache.terracotta.TerracottaClusteredInstanceHelper.newClusteredInstanceFactory(TerracottaClusteredInstanceHelper.java:178)
at net.sf.ehcache.terracotta.TerracottaClient.createNewClusteredInstanceFactory(TerracottaClient.java:177)
at net.sf.ehcache.terracotta.TerracottaClient.createClusteredInstanceFactory(TerracottaClient.java:137)
at net.sf.ehcache.CacheManager.init(CacheManager.java:337)
at net.sf.ehcache.CacheManager.<init>(CacheManager.java:237)
at com.ehcache.terracotta.cache.impl.Activator.start(Activator.java:38)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:1009)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:1003)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:984)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:346)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:356)
at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1074)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:616)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:508)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:299)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:489)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:211)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:321)
Caused by: net.sf.ehcache.CacheException: Unable to create Terracotta client
at net.sf.ehcache.terracotta.StandaloneTerracottaClusteredInstanceFactory.<init>(StandaloneTerracottaClusteredInstanceFactory.java:67)
... 24 more
Caused by: java.lang.ClassNotFoundException: org.terracotta.modules.ehcache.store.TerracottaClusteredInstanceFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at org.eclipse.core.runtime.internal.adaptor.ContextFinder.loadClass(ContextFinder.java:129)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at org.terracotta.express.ClusteredStateLoader.loadClass(ClusteredStateLoader.java:127)
at org.terracotta.express.ClientImpl.instantiate(ClientImpl.java:177)
at net.sf.ehcache.terracotta.StandaloneTerracottaClusteredInstanceFactory.<init>(StandaloneTerracottaClusteredInstanceFactory.java:62)
... 24 more
net.sf.ehcache.CacheException: Unable to load class net.sf.ehcache.terracotta.StandaloneTerracottaClusteredInstanceFactory. Initial cause was Unable to create Terracotta client
at net.sf.ehcache.util.ClassLoaderUtil.createNewInstance(ClassLoaderUtil.java:110)
at net.sf.ehcache.terracotta.TerracottaClusteredInstanceHelper.newClusteredInstanceFactory(TerracottaClusteredInstanceHelper.java:178)
at net.sf.ehcache.terracotta.TerracottaClient.createNewClusteredInstanceFactory(TerracottaClient.java:177)
at net.sf.ehcache.terracotta.TerracottaClient.createClusteredInstanceFactory(TerracottaClient.java:137)
at net.sf.ehcache.CacheManager.init(CacheManager.java:337)
at net.sf.ehcache.CacheManager.<init>(CacheManager.java:237)
at com.ygsoft.ecp.cache.impl.Activator.start(Activator.java:38)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:1009)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:1003)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:984)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:346)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:356)
at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1074)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:616)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:508)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:299)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:489)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:211)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:321)
Caused by: net.sf.ehcache.CacheException: Unable to create Terracotta client
at net.sf.ehcache.terracotta.StandaloneTerracottaClusteredInstanceFactory.<init>(StandaloneTerracottaClusteredInstanceFactory.java:67)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at net.sf.ehcache.util.ClassLoaderUtil.createNewInstance(ClassLoaderUtil.java:92)
... 19 more
Caused by: java.lang.ClassNotFoundException: org.terracotta.modules.ehcache.store.TerracottaClusteredInstanceFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at org.eclipse.core.runtime.internal.adaptor.ContextFinder.loadClass(ContextFinder.java:129)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at org.terracotta.express.ClusteredStateLoader.loadClass(ClusteredStateLoader.java:127)
at org.terracotta.express.ClientImpl.instantiate(ClientImpl.java:177)
at net.sf.ehcache.terracotta.StandaloneTerracottaClusteredInstanceFactory.<init>(StandaloneTerracottaClusteredInstanceFactory.java:62)
... 24 more
|
|
|
 |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 03/21/2012 18:08:28
|
yjiqplpl
neo
Joined: 03/20/2012 23:30:45
Messages: 5
Offline
|
public void start(BundleContext context){
try {
final String configPath = ShareData.getFmisConfigPath();
CacheManager ehcache = new CacheManager(configPath + "ehcache.xml");
Cache cache = ehcache.getCache("mycache");
cache.put(new Element("key", "value"));
} catch (Exception ex) {
ex.printStackTrace();
}
}
|
|
|
 |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 03/21/2012 18:10:38
|
yjiqplpl
neo
Joined: 03/20/2012 23:30:45
Messages: 5
Offline
|
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Ehcache
Bundle-SymbolicName: ehcache
Bundle-Version: 2.4.2
Bundle-Vendor: org.apache.ehcache
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ClassPath: .,
lib/ehcache-terracotta-2.4.2.jar,
lib/activemq-all-5.4.2.jar,
lib/terracotta-toolkit-1.2-runtime-3.1.0.jar
Require-Bundle: org.hibernate;bundle-version="1.0.0"
Export-Package: net.sf.ehcache,
net.sf.ehcache.config,
net.sf.ehcache.distribution.jms,
net.sf.ehcache.event,
net.sf.ehcache.hibernate,
net.sf.ehcache.loader,
net.sf.ehcache.management,
net.sf.ehcache.search,
net.sf.ehcache.search.aggregator,
net.sf.ehcache.search.attribute,
net.sf.ehcache.search.expression,
net.sf.ehcache.search.impl,
net.sf.ehcache.store,
net.sf.ehcache.transaction,
net.sf.ehcache.util,
net.sf.ehcache.util.counter,
net.sf.ehcache.writer
Import-Package: javax.management,
javax.management.openmbean,
javax.servlet;version="2.4.0",
javax.xml.parsers,
org.jgroups,
org.jgroups.jmx,
org.jgroups.util
|
|
|
 |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 03/22/2012 18:12:26
|
boy2012
neo
Joined: 03/22/2012 17:59:22
Messages: 9
Offline
|
good luck!!
|
|
|
 |
|
|