This discussion is archived
1 Reply Latest reply: Jul 2, 2013 12:37 PM by Rohith puchalapalli RSS

Coherence POF java.io.NotSerializableException on standalone Webcenter spaces server.

927837 Newbie
Currently Being Moderated

Hi,

I’m using coherence(V3.6.1) with POF serialization in ADF web application. I have setup local coherence server node and Jdev integrated webcenter server in my local system(windows 7 OS), the application works perfectly when I run in local Jdeveloper integrated server. But when I deploy the application on dev environment ( standalone webcenter spaces server v11G on Unix OS) we are getting exception “(Wrapped) java.io.NotSerializableException: com.enbridge.co.ux.coherence.pojos.CommodityPojo”

It seems that POF is not configured properly on the standalone webcenter (spaces) server, please help finding out the solution for this issue. On standalone webcenter spaces server is there any extra configurations we have to do?

The error logs and configuration filess I have used:

1. Exception logs:

<14-Jun-2013 3:43:04 o'clock AM MDT> <Error> <HTTP> <BEA-101216> <Servlet: "MMFBootStrapServlet" failed to preload on startup in Web application: "MMFUIPortal-Portal-context-root".

(Wrapped) java.io.NotSerializableException: com.enbridge.co.ux.coherence.pojos.CommodityPojo

                at com.tangosol.util.ExternalizableHelper.toBinary(ExternalizableHelper.java:215)

                at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$ConverterValueToBinary.convert(PartitionedCache.CDB:3)

                at com.tangosol.util.ConverterCollections$ConverterMap.put(ConverterCollections.java:1578)

                at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$ViewMap.put(PartitionedCache.CDB:1)

                at com.tangosol.coherence.component.util.SafeNamedCache.put(SafeNamedCache.CDB:1)

                Truncated. see log file for complete stacktrace

Caused By: java.io.NotSerializableException: com.enbridge.co.ux.coherence.pojos.CommodityPojo

                at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164)

                at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)

                at java.util.ArrayList.writeObject(ArrayList.java:570)

                at sun.reflect.GeneratedMethodAccessor983.invoke(Unknown Source)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                Truncated. see log file for complete stacktrace

 

2.     2.  tangosol-coherence-override.xml:

<?xml version='1.0'?>

<coherence xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

           xmlns="http://xmlns.oracle.com/coherence/coherence-operational-config"

           xsi:schemaLocation="http://xmlns.oracle.com/coherence/ coherence-operational-config coherence-operational-config.xsd">

  <cluster-config>

    <member-identity>

      <cluster-name>mmf_Coh_Cluster</cluster-name>

    </member-identity>

    <multicast-listener>

      <address>224.3.6.0</address>

      <port>60001</port>

      <time-to-live>0</time-to-live>

    </multicast-listener>

    <serializers>

      <serializer>

        <class-name>com.tangosol.io.pof.ConfigurablePofContext</class-name>

        <init-params>

          <init-param>

            <param-type>java.lang.String</param-type>

            <param-value system-property="pof.config">mmfui-pof-config.xml</param-value>

           </init-param>

        </init-params>

      </serializer>

    </serializers>

  </cluster-config>

  <configurable-cache-fact0ry-config>

    <init-params>

      <init-param>

        <param-type>java.lang.String</param-type>

        <param-value system-property="tangosol.coherence.cacheconfig">mmfui-cache-config.xml</param-value>

      </init-param>

    </init-params>

  </configurable-cache-fact0ry-config>

</coherence>

 

 

3. mmfui-cache-config.xml

<?xml version="1.0"?>

<!DOCTYPE cache-config SYSTEM "cache-config.dtd">

<cache-config>

<defaults>

    <serializer>pof</serializer>

</defaults>

  <caching-scheme-mapping>

    <cache-mapping>

      <cache-name>mmfcache</cache-name>

      <scheme-name>ExamplesPartitionedPofScheme</scheme-name>

    </cache-mapping>

  </caching-scheme-mapping>

  <caching-schemes>

    <distributed-scheme>

      <scheme-name>ExamplesPartitionedPofScheme</scheme-name>

      <service-name>PartitionedPofCache</service-name>

      <serializer>

      <instance>

        <class-name>com.tangosol.io.pof.ConfigurablePofContext</class-name>

        <init-params>

         <init-param>

            <param-type>String</param-type>

            <param-value system-property="pof.config">mmfui-pof-config.xml</param-value>

          </init-param>       

        </init-params>

      </instance>

      </serializer>

      <backing-map-scheme>

        <local-scheme>

          <!-- each node will be limited to 250MB -->

          <high-units>250M</high-units>

          <unit-calculator>binary</unit-calculator>

        </local-scheme>

      </backing-map-scheme>

      <autostart>true</autostart>

    </distributed-scheme>

  </caching-schemes>

</cache-config>

 

4. mmfui-pof-config.xml

<?xml version="1.0"?>

<!DOCTYPE pof-config SYSTEM "pof-config.dtd">

<pof-config>

  <user-type-list>

    <!-- coherence POF user types -->

    <include>coherence-pof-config.xml</include>

    <!-- com.tangosol.examples package -->

    <user-type>

      <type-id>1001</type-id>

      <class-name>com.enbridge.co.ux.coherence.pojos.CommodityPojo</class-name>

    </user-type>

  </user-type-list>

</pof-config>

 

5. ~-cache-server.sh file on coherence distribution

 

COHERENCE_HOME=/u01/app/oracle/product/fmw11g/coherence_3.6

JAVA_HOME=/usr/java/jdk1.6.0_24

PATH=$PATH:$JAVA_HOME/bin

CONFIG_HOME=/u01/app/oracle/product/fmw11g/coherence_3.6/mmfconfig

# specify the JVM heap size

MEMORY=512m

 

if [ ! -f ${COHERENCE_HOME}/bin/cache-server.sh ]; then

  echo "coherence.sh: must be run from the Coherence installation directory."

  exit

fi

 

if [ -f $JAVA_HOME/bin/java ]; then

  JAVAEXEC=$JAVA_HOME/bin/java

else

  JAVAEXEC=java

Fi

 

COH_OPTS=$COH_OPTS  -Dtangosol.coherence.distributed.localstorage=true -Dtangosol.coherence.cluster=mmf_Coh_Cluster -Dtangosol.coherence.clusterport=60001 -Dtangosol.coherence.clusteraddress=224.3.6.0 -Dtangosol.coherence.cacheconfig=~/mmfui-cache-config.xml

 

JAVA_OPTS="-Xms$MEMORY -Xmx$MEMORY -Dtangosol.pof.enabled=true -Dtangosol.pof.config=~/mmfui-pof-config.xml"

 

 

$JAVAEXEC $COH_OPTS -server -showversion $JAVA_OPTS -cp "$COHERENCE_VAR:$CONFIG_HOME:$COHERENCE_HOME/lib/coherence.jar:$COHERENCE_HOME/lib/coherence-common-1.5.0.jar:pojoClasses.jar" com.tangosol.net.DefaultCacheServer $1

 

6.COHERENCE_PROPERTIES variable added in setDomainEnv.sh file:

 

COHERENCE_PROPERTIES=-Dtangosol.coherence.distributed.localstorage=false -Dtangosol.coherence.clusteraddress=224.3.6.0 -Dtangosol.coherence.clusterport=60001 -Dtangosol.coherence.cluster=mmf_Coh_Cluster -Dtangosol.coherence.override=~/tangosol-coherence-override.xml  -Dtangosol.coherence.cacheconfig=~/mmfui-cache-config.xml -Dpof.config=~/ mmfui-pof-config.xml

 

JAVA_PROPERTIES=-Dplatform.home=${WL_HOME} -Dwls.home=${WLS_HOME} -Dweblogic.home=${WLS_HOME} ${COHERENCE_PROPERTIES}

Legend

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