This discussion is archived
3 Replies Latest reply: Nov 4, 2010 8:48 AM by 810633 RSS

Processing Pattern error on Cache Node Startup

727418 Newbie
Currently Being Moderated
Hi Guys,

I have come across the following error whilst starting up Coherence nodes incorporating the Processing pattern.
The first node will start up OK, but any further node starts will throw this error.
I am not running any example code - just starting up the nodes.

Could someone please let me know why this is happening and how it can be fixed up (or, most likely, what I've done wrong).

Many Thanks,

Adrian.

==================

010-09-29 10:23:05,387 --> 13.224 Oracle Coherence 3.5.3/465 D5(thread=DistributedCache:DistributedServiceForProcessingPatternSubmissionResults, member=2): Service DistributedServiceForProcessingPatternSubmissionResults: received ServiceConfigSync containing 259 entries
2010-09-29 10:23:05,399 --> 13.236 Oracle Coherence 3.5.3/465 D4(thread=DistributedCache:DistributedServiceForProcessingPatternSubmissionResults, member=2): Asking member 5 for 128 primary partitions
2010-09-29 10:23:05,491 --> 13.327 Oracle Coherence 3.5.3/465 D5(thread=ReplicatedCache:ReplicatedServiceForProcessingPattern, member=2): Service ReplicatedServiceForProcessingPattern joined the cluster with senior service member 5
2010-09-29 10:23:05,555 --> 13.392 Oracle Coherence 3.5.3/465 D5(thread=ReplicatedCache:ReplicatedServiceForProcessingPattern, member=2): Creating a temporary map: 2
2010-09-29 10:23:05,668 --> 13.505 Oracle Coherence 3.5.3/465 Info(thread=Environment.Background.Executor:Thread-1, member=2): DefaultTask Processor Definition Manager starting Class:com.oracle.coherence.patterns.processing.internal.task.DefaultTaskProcessorDefinitionManager
2010-09-29 10:23:05,777 --> 13.613 Oracle Coherence 3.5.3/465 Error(thread=Environment.Background.Executor:Thread-1, member=2): A TaskProcessor with the ID Identifier{SingleTaskProcessor} already exists (SINGLE) Class:com.oracle.coherence.patterns.processing.internal.task.DefaultTaskProcessorDefinitionManager
2010-09-29 10:23:05,777 --> 13.614 Oracle Coherence 3.5.3/465 Error(thread=Environment.Background.Executor:Thread-1, member=2): Could not store TaskProcessorDefinition Class:com.oracle.coherence.patterns.processing.internal.task.DefaultTaskProcessorDefinitionManager
java.lang.RuntimeException: Portable(java.lang.IllegalStateException): An object with the key TPSK:{Identifier{SingleTaskProcessor},0} already exists
at com.oracle.coherence.patterns.processing.internal.task.DefaultTaskProcessorDefinitionManager.storeTaskProcessorDefinition(DefaultTaskProcessorDefinitionManager.java:190)
at com.oracle.coherence.patterns.processing.internal.task.DefaultTaskProcessorDefinitionManager.onDependenciesSatisfied(DefaultTaskProcessorDefinitionManager.java:246)
at com.oracle.coherence.environment.extensible.dependencies.DependencyTracker.processLater(DependencyTracker.java:204)
at com.oracle.coherence.environment.extensible.dependencies.DependencyTracker.processLater(DependencyTracker.java:46)
at com.oracle.coherence.common.events.processing.AbstractAsynchronousEventProcessor$1.run(AbstractAsynchronousEventProcessor.java:53)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: Portable(java.lang.IllegalStateException): An object with the key TPSK:{Identifier{SingleTaskProcessor},0} already exists
at com.tangosol.io.pof.ThrowablePofSerializer.deserialize(ThrowablePofSerializer.java:57)
at com.tangosol.io.pof.PofBufferReader.readAsObject(PofBufferReader.java:3293)
at com.tangosol.io.pof.PofBufferReader.readObject(PofBufferReader.java:2600)
at com.tangosol.io.pof.ConfigurablePofContext.deserialize(ConfigurablePofContext.java:348)
at com.tangosol.util.ExternalizableHelper.deserializeInternal(ExternalizableHelper.java:2673)
at com.tangosol.util.ExternalizableHelper.fromBinary(ExternalizableHelper.java:257)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$ConverterFromBinary.convert(DistributedCache.CDB:4)
at com.tangosol.util.ConverterCollections$ConverterInvocableMap.invoke(ConverterCollections.java:2135)
at com.tangosol.util.ConverterCollections$ConverterNamedCache.invoke(ConverterCollections.java:2590)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$ViewMap.invoke(DistributedCache.CDB:11)
at com.tangosol.coherence.component.util.SafeNamedCache.invoke(SafeNamedCache.CDB:1)
at com.oracle.coherence.common.util.ObjectProxyFactory.createRemoteObjectIfNotExists(ObjectProxyFactory.java:149)
at com.oracle.coherence.patterns.processing.internal.task.DefaultTaskProcessorDefinitionManager.storeTaskProcessorDefinition(DefaultTaskProcessorDefinitionManager.java:165)
... 10 more
  • 1. Re: Processing Pattern error on Cache Node Startup
    567247 Explorer
    Currently Being Moderated
    What I suspect is that you are trying to instantiate a "SingleTaskProcessor" with the same ID on multiple cluster nodes as indicated by this error:

    2010-09-29 10:23:05,777 --> 13.613 Oracle Coherence 3.5.3/465 Error(thread=Environment.Background.Executor:Thread-1, member=2): A TaskProcessor with the ID Identifier{SingleTaskProcessor} already exists (SINGLE) Class:com.oracle.coherence.patterns.processing.internal.task.DefaultTaskProcessorDefinitionManager

    If you wary the id for each node in the cluster (i.e. different config file for each node) it should start up correctly.

    If you want to have a topology where each grid node has a taskprocessor, I would suggest changing the type of the TaskProcessor to grid.

    If you still have problems after considering the suggestions above, I would be happy to help you further offline.

    /Christer
  • 2. Re: Processing Pattern error on Cache Node Startup
    810633 Newbie
    Currently Being Moderated
    On a related note, I am working on a project where I need to establish a Single Task Processor that is connecting via extend. I have the example config file that is given at http://coherence.oracle.com/display/INCUBATOR/Configuration+for+the+Processing+Pattern, however I have not been able to find any examples of a .cmd file that could be used to start up such a Task Processor. Is there any example online that can be found?
  • 3. Re: Processing Pattern error on Cache Node Startup
    810633 Newbie
    Currently Being Moderated
    Some additional information, I am using a .cmd file currently that is configured as follows:

    @echo off

    java -cp "%COHERENCE_HOME%\lib\coherence.jar";"%COHERENCE_HOME%\lib\common.jar";"%COHERENCE_HOME%\lib\processingpattern.jar"; ^
         -Dtangosol.coherence.distributed.localstorage=false ^
         -Dtangosol.coherence.cacheconfig=node-config.xml ^
         -Dtangosol.pof.config=custom-pof-config.xml ^
         com.tangosol.net.DefaultCacheServer


    When I try to execute this .cmd with a cache and proxy already running, the following error appears:

    Exception in thread "main" (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(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at com.tangosol.util.ClassHelper.newInstance(ClassHelper.java:662)
    at com.tangosol.net.DefaultCacheFactoryBuilder.getDefaultFactory(DefaultCacheFactoryBuilder.java:381)
    ... 6 more
    Caused by: java.lang.RuntimeException: java.lang.NullPointerException
    at com.oracle.coherence.patterns.processing.configuration.ProcessingPatternNamespaceHandler.parseProcessingPatternExtendConfig(ProcessingPatte
    rnNamespaceHandler.java:307)
    at com.oracle.coherence.patterns.processing.configuration.ProcessingPatternNamespaceHandler.access$100(ProcessingPatternNamespaceHandler.java:
    69)
    at com.oracle.coherence.patterns.processing.configuration.ProcessingPatternNamespaceHandler$2.onElement(ProcessingPatternNamespaceHandler.java
    :106)
    at com.oracle.coherence.environment.extensible.namespaces.AbstractNamespaceContentHandler.onElement(AbstractNamespaceContentHandler.java:146)
    at com.oracle.coherence.environment.extensible.DefaultConfigurationContext.processElement(DefaultConfigurationContext.java:320)
    at com.oracle.coherence.environment.extensible.DefaultConfigurationContext.processElementsOf(DefaultConfigurationContext.java:453)
    at com.oracle.coherence.environment.extensible.namespaces.CoherenceNamespaceContentHandler.onUnknownElement(CoherenceNamespaceContentHandler.j
    ava:408)
    at com.oracle.coherence.environment.extensible.namespaces.AbstractNamespaceContentHandler.onElement(AbstractNamespaceContentHandler.java:151)
    at com.oracle.coherence.environment.extensible.DefaultConfigurationContext.processElement(DefaultConfigurationContext.java:320)
    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)
    ... 12 more
    Caused by: java.lang.NullPointerException
    at com.oracle.coherence.patterns.processing.configuration.ProcessingPatternNamespaceHandler.parseProcessingPatternTaskProcessors(ProcessingPat
    ternNamespaceHandler.java:458)
    at com.oracle.coherence.patterns.processing.configuration.ProcessingPatternNamespaceHandler.parseProcessingPatternExtendConfig(ProcessingPatte
    rnNamespaceHandler.java:298)
    ... 26 more

Legend

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