java.lang.ClassNotFoundException: com.martquest.cache.MqCounterProcessor exception is thrown when importing records into master catalog when distributed caching(Tangosol) is used

java.lang.ClassNotFoundException: com.martquest.cache.MqCounterProcessor exception is thrown when importing records into master catalog when distributed caching(Tangosol) is used

book

Article ID: KB0085654

calendar_today

Updated On:

Products Versions
TIBCO Collaborative Information Manager -
Not Applicable -

Description

Resolution:
java.lang.ClassNotFoundException: com.martquest.cache.MqCounterProcessor exception is thrown when importing records into master catalog when distributed caching(Tangosol) is used

Environment:

TIBCO Product name and version: TIBCO Collaborative Information Manager 7.2.1
Operating System(s): All Operating Systems

Symptoms:
Following exception is thrown while doing an import into the mastercalog with usage of independent Tangosol instance.
java.io.IOException: readObject failed: java.lang.ClassNotFoundException: com.martquest.cache.MqCounterProcessor
    at java.lang.Class.forName(Class.java:160)
    at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:599)
    at com.tangosol.io.ResolvingObjectInputStream.resolveClass(ResolvingObjectInputStream.java:68)
    at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1563)
    at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1485)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1718)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1324)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:362)
    at com.tangosol.util.ExternalizableHelper.readSerializable(ExternalizableHelper.java:2064)
    at com.tangosol.util.ExternalizableHelper.readObject(ExternalizableHelper.java:2182)
    at com.tangosol.coherence.component.net.Message.readObject(Message.CDB:3)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.DistributedCache$InvokeRequest.read(DistributedCache.CDB:8)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.onNotify(Service.CDB:109)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.DistributedCache.onNotify(DistributedCache.CDB:3)
    at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:35)
    at java.lang.Thread.run(Thread.java:799)

Cause:
Not having required jar in classpath.

Resolution:
Issue would occur when the ECMCounterProcessor.jar is not there in $TANGOSOL_HOME/lib/mq folder.

The script cache-server.sh/cmd refers to the runtime class path as follows:
$JAVAEXEC -server -showversion $JAVA_OPTS -cp "$TANGOSOL_HOME/config:$TANGOSOL_HOME/lib/external/coherence.jar:$TANGOSOL_HOME/lib/mq/ECMCounterProcessor.jar"

Copy $MQ_HOME/lib/mq/ECMCounterProcessor.jar on to your $TANGOSOL_HOME/lib/mq explicitly and try the import again.

Note this has been fixed in CIM 8.0.0, tangosol packaging script.

References:

None

Issue/Introduction

java.lang.ClassNotFoundException: com.martquest.cache.MqCounterProcessor exception is thrown when importing records into master catalog when distributed caching(Tangosol) is used