This discussion is archived
3 Replies Latest reply: Dec 2, 2011 6:44 AM by 694204 RSS

Error with Environment.getResource using common and processing pattern 3.6

694204 Newbie
Currently Being Moderated
Hi,

I am using coherence-common and coherence-processing-patter nbut when my coherence node starts I get an error due to the Environment class having a NoSuchMethodError as follows:-

Exception in thread "Main Thread" (Wrapped: Failed to load the factory) java.lang.reflect.InvocationTargetException
     at com.tangosol.util.Base.ensureRuntimeException(Base.java:293)
     at com.tangosol.net.DefaultCacheFactoryBuilder.getDefaultFactory(DefaultCacheFactoryBuilder.java:419)
     at com.tangosol.net.DefaultCacheFactoryBuilder.getSingletonFactory(DefaultCacheFactoryBuilder.java:113)
     at com.tangosol.net.DefaultCacheFactoryBuilder.getFactory(DefaultCacheFactoryBuilder.java:173)
     at com.tangosol.net.DefaultCacheFactoryBuilder.getConfigurableCacheFactory(DefaultCacheFactoryBuilder.java:149)
     at com.tangosol.net.CacheFactory.getConfigurableCacheFactory(CacheFactory.java:657)
     at com.tangosol.net.DefaultCacheServer.getDefaultConfigurableCacheFactory(DefaultCacheServer.java:364)
     at com.tangosol.net.DefaultCacheServer.main(DefaultCacheServer.java:197)
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.net.DefaultCacheFactoryBuilder.getDefaultFactory(DefaultCacheFactoryBuilder.java:381)
     ... 6 more
Caused by: java.lang.NoSuchMethodError: com/oracle/coherence/environment/Environment.getResource(Ljava/lang/Class;)Ljava/lang/Object;
     at com.maersk.esl.cache.configuration.ConfigurationHandler.onStartScope(ConfigurationHandler.java:77)
     at com.oracle.coherence.environment.extensible.DefaultConfigurationContext$Scope.establishNamespaceContentHandlerFor(DefaultConfigurationContext.java:593)
     at com.oracle.coherence.environment.extensible.DefaultConfigurationContext.ensureNamespaceContentHandler(DefaultConfigurationContext.java:94)
     at com.oracle.coherence.environment.extensible.DefaultConfigurationContext.processElement(DefaultConfigurationContext.java:254)
     at com.oracle.coherence.environment.extensible.DefaultConfigurationContext.processDocument(DefaultConfigurationContext.java:204)
     at com.oracle.coherence.environment.extensible.ExtensibleEnvironment.setConfig(ExtensibleEnvironment.java:438)
     at com.tangosol.net.DefaultConfigurableCacheFactory.<init>(DefaultConfigurableCacheFactory.java:186)
     at com.tangosol.net.DefaultConfigurableCacheFactory.<init>(DefaultConfigurableCacheFactory.java:172)
     at com.tangosol.net.DefaultConfigurableCacheFactory.<init>(DefaultConfigurableCacheFactory.java:148)
     at com.oracle.coherence.environment.extensible.ExtensibleEnvironment.<init>(ExtensibleEnvironment.java:154)

I am using the following versions:-

coherence-3.6-common-1.7.3.20019.jar
coherence-3.6-processingpattern-1.3.4.23238.jar

Looking at the source code for the Environment class the getResource(Class) method is not there. There is a method getResource(Class<R>,Object)

How do I get around this issue as the JARs seem incompatible somewhere.....

TIA
Martin

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points