Using Coherence: 3.5.2
Eclipselink: 2.0.0.v20091127-r5931
Kowing me I probably mispelled something somewhere.
I get an error that I have no Persitence provider...
2010-01-20 15:45:50.046/42.422 Oracle Coherence GE 3.5.2/463 <Error> (thread=DistributedCache:ModelService, member=1): BackingMapManager com.tangosol.net.DefaultConfigurableCacheFactory$Manager: failed to instantiate a cache: ca.xxxxxx.model.Log
2010-01-20 15:45:50.046/42.422 Oracle Coherence GE 3.5.2/463 <Error> (thread=DistributedCache:ModelService, member=1):
(Wrapped: Failed to instantiate class "com.tangosol.coherence.jpa.JpaCacheStore" using sun.misc.Launcher$AppClassLoader@19134f4
<class-scheme>
<class-name>com.tangosol.coherence.jpa.JpaCacheStore</class-name>
<init-params>
<init-param>
<param-type>java.lang.String</param-type>
<param-value>ca.xxxxxx.model.Log</param-value>
</init-param>
<init-param>
<param-type>java.lang.String</param-type>
<param-value>ca.xxxxxx.model.Log</param-value>
</init-param>
<init-param>
<param-type>java.lang.String</param-type>
<param-value>ModelUnit</param-value>
</init-param>
</init-params>
</class-scheme>) java.lang.reflect.InvocationTargetException
at com.tangosol.util.Base.ensureRuntimeException(Base.java:293)
at com.tangosol.run.xml.XmlHelper.createInstance(XmlHelper.java:2307)
at com.tangosol.net.DefaultConfigurableCacheFactory.instantiateAny(DefaultConfigurableCacheFactory.java:2994)
at com.tangosol.net.DefaultConfigurableCacheFactory.instantiateCacheStore(DefaultConfigurableCacheFactory.java:2857)
at com.tangosol.net.DefaultConfigurableCacheFactory.instantiateReadWriteBackingMap(DefaultConfigurableCacheFactory.java:1493)
at com.tangosol.net.DefaultConfigurableCacheFactory.configureBackingMap(DefaultConfigurableCacheFactory.java:1258)
at com.tangosol.net.DefaultConfigurableCacheFactory$Manager.instantiateBackingMap(DefaultConfigurableCacheFactory.java:3492)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$Storage.instantiateResourceMap(DistributedCache.CDB:22)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$Storage.setCacheName(DistributedCache.CDB:27)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$ConfigListener.entryInserted(DistributedCache.CDB:15)
at com.tangosol.util.MapEvent.dispatch(MapEvent.java:206)
at com.tangosol.util.MapEvent.dispatch(MapEvent.java:166)
at com.tangosol.util.MapListenerSupport.fireEvent(MapListenerSupport.java:556)
at com.tangosol.util.ObservableHashMap.dispatchEvent(ObservableHashMap.java:229)
at com.tangosol.util.ObservableHashMap$Entry.onAdd(ObservableHashMap.java:270)
at com.tangosol.util.SafeHashMap.put(SafeHashMap.java:244)
at com.tangosol.coherence.component.util.collections.WrapperMap.put(WrapperMap.CDB:1)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid$ServiceConfigMap.put(Grid.CDB:31)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$StorageIdRequest.onReceived(DistributedCache.CDB:45)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onMessage(Grid.CDB:9)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:136)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onNotify(DistributedCache.CDB:3)
at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
at java.lang.Thread.run(Thread.java:619)
Caused by: 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:513)
at com.tangosol.util.ClassHelper.newInstance(ClassHelper.java:662)
at com.tangosol.run.xml.XmlHelper.createInstance(XmlHelper.java:2297)
... 22 more
Caused by: javax.persistence.PersistenceException: No Persistence provider for EntityManager named ModelUnit
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:89)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:60)
at com.tangosol.coherence.jpa.JpaCacheLoader.initialize(JpaCacheLoader.java:160)
at com.tangosol.coherence.jpa.JpaCacheLoader.<init>(JpaCacheLoader.java:49)
at com.tangosol.coherence.jpa.JpaCacheStore.<init>(JpaCacheStore.java:44)
... 28 more
2010-01-20 15:45:50.077/42.453 Oracle Coherence GE 3.5.2/463 <D5> (thread=Cluster, member=1): Member 2 joined Service DistributedCacheForCommandPatternDistributedCommands with senior member 1
2010-01-20 15:45:50.077/42.453 Oracle Coherence GE 3.5.2/463 <D5> (thread=DistributedCache:DistributedCacheForCommandPatternDistributedCommands, member=1): Service DistributedCacheForCommandPatternDistributedCommands: sending ServiceConfigSync containing 259 entries to Member 2
My Cache Config... I just replaced my JDBC cache store that was working with the JPA.
<cachestore-scheme>
<class-scheme>
<class-name>com.tangosol.coherence.jpa.JpaCacheStore</class-name>
<init-params>
<init-param>
<param-type>java.lang.String</param-type>
<param-value>{cache-name}</param-value>
</init-param>
<init-param>
<param-type>java.lang.String</param-type>
<param-value>{cache-name}</param-value>
</init-param>
<init-param>
<param-type>java.lang.String</param-type>
<param-value>ModelUnit</param-value>
</init-param>
</init-params>
</class-scheme>
</cachestore-scheme>
My persitence.xml
<persistence
xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
version="1.0">
<persistence-unit name="ModelUnit" transaction-type="RESOURCE_LOCAL">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<class>ca.xxxxxx.model.Log</class>
<properties>
<property name="javax.persistence.jdbc.driver" value="xxxxxx"/>
<property name="javax.persistence.jdbc.url" value="xxxxxx"/>
<property name="javax.persistence.jdbc.user" value="xxxxxx"/>
<property name="javax.persistence.jdbc.password" value="xxxxxx"/>
</properties>
</persistence-unit>
</persistence>
I have persitence.xml in the coherence bin/ folder right beside, my cache and pof config xml files
I have eclipselink.jar inside my coherence lib folder
And I start my cache server as follows...
set COH_OPTS=%COH_OPTS% -server -cp %COHERENCE_HOME%\lib\coherence.jar;%COHERENCE_HOME%\lib\coherence-common-1.5.0.jar;%COHERENCE_HOME%\lib\coherence-commandpattern-2.5.0.jar;%COHERENCE_HOME%\lib\xxxxxx.jar;%COHERENCE_HOME%\lib\coherence-jpa.jar;%COHERENCE_HOME%\lib\eclipselink.jar;%COHERENCE_HOME%\lib\javax.persistence_1.0.0.jar;%COHERENCE_HOME%\bin\classes;
set COH_OPTS=%COH_OPTS% -Dtangosol.coherence.cacheconfig=%CONFIG%test-cache-config.xml -Dtangosol.pof.config=%CONFIG%test-pof-config.xml
java %COH_OPTS% -Xms1g -Xmx1g -Xloggc: com.tangosol.net.DefaultCacheServer %2 %3 %4 %5 %6 %7
What can be wrong and is there a way to get more usefull information?