Java.io.NotSerializableException: com.tangosol.util.internal.ConcurrentCoun

Hi,
I am working on a small prototyep project trying to understand how coherence works.
I have a object that creates an instance of entry processor and invokes the cache. I get following error. Entry processor is serializable - the app can write an instance of EP into a file.
Using same setup if I merely call put() it works fine for me.
Any idea what coherence is doing here ?
Thanks
~s
===
(Wrapped) com.tangosol.util.internal.ConcurrentCounter) java.io.NotSerializableException: com.tangosol.util.internal.ConcurrentCounter
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.writeObject(Unknown Source)
at java.util.Hashtable.writeObject(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source)
at com.tangosol.coherence.Component.writeObject(Component.CDB:1)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.writeObject(Unknown Source)
at java.util.Hashtable.writeObject(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source)
at com.tangosol.coherence.Component.writeObject(Component.CDB:1)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source)
at com.tangosol.coherence.Component.writeObject(Component.CDB:1)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source)
at com.tangosol.coherence.Component.writeObject(Component.CDB:1)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)

The problem is fixed.
In my EP, process() was returning "entry" instead of modified object. Comparing my code with some other samples helped me.
So it is all down to my mistake.
Thanks
~s

Similar Messages

  • Order cannot be cast to com.tangosol.util.MapEvent

    This code is causing an exception. How should I be writing this filter? I want to listen for events when the status changes for one specific Order object. That Order has an integer key property which is the same integer key value used to store it in the cache. The code causing the exception is:
        public void addStatusChangeListener() {
                Filter f1 = new ValueChangeEventFilter("OrderStatus");
                Filter f2 = new EqualsFilter("Key", this.getKey());
                Filter f3 = new AndFilter(f1,f2);
                Filter statusChangeFilter = new MapEventFilter(MapEventFilter.E_UPDATED, f3);
                System.out.println("ADD STATUS CHANGE LISTENER "+this.symbol+" "+this.getKey());
                this.getCache().addMapListener(this , statusChangeFilter, false);
    2009-09-18 10:52:54.796/238.692 Oracle Coherence GE 3.5/459 <Error> (thread=DistributedCache, member=1):
    Exception occured during filter evaluation: MapEventFilter(mask=UPDATED, filter=
    AndFilter(ValueChangeEventFilter(extractor=.OrderStatus()), EqualsFilter(.Key(), 189000006))); removing the filter...
    2009-09-18 10:52:54.796/238.692 Oracle Coherence GE 3.5/459 <Error> (thread=DistributedCache, member=1):
    java.lang.ClassCastException: oms.Order cannot be cast to com.tangosol.util.MapEvent
            at com.tangosol.util.filter.ValueChangeEventFilter.evaluate(ValueChangeEventFilter.java:69)
            at com.tangosol.util.filter.AllFilter.evaluate(AllFilter.java:56)
            at com.tangosol.util.filter.MapEventFilter.evaluate(MapEventFilter.java:178)
            at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$Storage.prepareDispatch(DistributedCache.CDB:82)
            at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$Storage.postInvoke(DistributedCache.CDB:10)
            at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$Storage.invoke(DistributedCache.CDB:117)
            at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onInvokeRequest(DistributedCache.CDB:50)
            at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$InvokeRequest.run(DistributedCache.CDB:1)
            at com.tangosol.coherence.component.net.message.requestMessage.DistributedCacheKeyRequest.onReceived(DistributedCacheKeyRequest.CDB:12)
            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:37)
            at java.lang.Thread.run(Thread.java:619)Thanks,
    Andrew

    Ok, but isn't it just something wrong with how I wrote/used that filter?
    -Andrew
    public class Order implements Cloneable, Comparable, java.io.Serializable, MapListener {
        private String symbol = null;
        private OrderStatus orderStatus = OrderStatus.PENDING_NEW;
        private int id = 0; // java int max = 2,147,483,647
        private transient ArrayList<OrderStatusChangeListener> statusChangeListeners = new ArrayList<OrderStatusChangeListener>();
        public static NamedCache getCache() {
            if (cache == null) {
                System.out.println("Order...CacheFactory.getCache(\"orders\")");
                cache = CacheFactory.getCache("orders");
            return cache;
        public void send() {
            getCache().put(this.id, this);
        public static int sendMultiple(Iterable<Order> orders){
            int counter=0;
            HashMap m = new HashMap();
            for (Order o:orders){
                m.put(o.getKey(),o);
                counter++;
            getCache().putAll(m);
            return counter;
        public static class CancelProcessor extends AbstractProcessor {
            public Object process(InvocableMap.Entry entry) {
                Order o = (Order)entry.getValue();
                if (o.cancelCount == 0) {
                    o.cancelCount = 1;
                } else {
                    logger.info("ignoring dup. cancel req on " + o.symbol + " id=" + o.id);
                return o.cancelCount;
        public void cancel() {
            Filter f = new EqualsFilter("getCancelCount", 0);
            UpdaterProcessor up1 = new UpdaterProcessor("setCancelCount", new Integer(1));
            UpdaterProcessor up2 = new UpdaterProcessor("setCancelSubmittedTime", Base.getSafeTimeMillis() );
            CompositeProcessor cp = new CompositeProcessor(new InvocableMap.EntryProcessor[] {up1,up2});
            ConditionalProcessor x = new ConditionalProcessor(f, cp);
            getCache().invoke(key, x);
        private static NumberIncrementor ni1 = new NumberIncrementor("CancelCount", 1, false);
        public static void cancelMultiple(Collection<Integer> orderIds){
            getCache().invokeAll(orderIds, ni1);
        public static void cancelAllByAccount(String account){
            getCache().invokeAll( new EqualsFilter("getAccount", account), ni1);
        public void cancelAllowingMultipleCancelsOfThisOrder() {
            System.out.println("cancelAllowingMultipleCancelsOfThisOrder symbol=" + symbol + " key="+key+ " id=" + this.id);
            getCache().invoke(key, ni1);
            UpdaterProcessor up = new UpdaterProcessor("setCancelSubmittedTime", Base.getSafeTimeMillis() );
            getCache().invoke(key, up);
        public void entryInserted(MapEvent mapEvent) {
        public void entryUpdated(MapEvent mapEvent) {
            Order o = (Order)mapEvent.getNewValue();
            fireStatusChange(o);
        public void entryDeleted(MapEvent mapEvent) {
        public void removeStatusChangeListener(OrderStatusChangeListener listener) {
            synchronized (statusChangeListeners) {
                statusChangeListeners.remove(listener);
                if (statusChangeListeners.size()==0) {
                    this.getCache().removeMapListener(this, statusChangeFilter);
        private transient Filter statusChangeFilter=null;
        public void addStatusChangeListener(OrderStatusChangeListener listener) {
            if (statusChangeFilter==null) {
                Filter f1 = new ValueChangeEventFilter("OrderStatus");
                Filter f2 = new EqualsFilter("Key", this.getKey());
                Filter f3 = new AndFilter(f1,f2);
                statusChangeFilter = new MapEventFilter(MapEventFilter.E_UPDATED, f3);
            System.out.println("ADD STATUS CHANGE LISTENER "+this.symbol+" "+this.getKey());
            synchronized (statusChangeListeners) {
                if (statusChangeListeners.size()==0) {
                    this.getCache().addMapListener(this , statusChangeFilter, false);
                statusChangeListeners.add(listener);
        private void fireStatusChange(Order o ) {
            System.out.println("FIRE STATUS CHANGE: starting...");
            // do not depend on the firing of a status change to mean that the
            // status did certainly change.  Use the firing of status change as a
            // trigger to examine the order's status w/getStatus().
            System.out.println("1");
            synchronized (statusChangeListeners) {
                System.out.println("2");
                List<OrderStatusChangeListener> asdf = new LinkedList<OrderStatusChangeListener>(statusChangeListeners);
                System.out.println("3");
                for (OrderStatusChangeListener x : asdf) {
                    System.out.println("4");
                    try {
                        System.out.println("FIRE STATUS CHANGE: "+x);
                        x.dispatchOrderStatusChange(o);
                    } catch (java.util.ConcurrentModificationException e) {
                        logger.error("** fireStatusChange: ConcurrentModificationException " + e.getMessage());
                        logger.error(e.getStackTrace());
                        e.printStackTrace();
            System.out.println("FIRE STATUS CHANGE: done...");
        public int compareTo(Object o) { //assumes ID allways int.
            return this.key - ((Order)o).key;
        public boolean equals(Object o) {
            return (this.key == ((Order)o).key);
        public void setStatus(OrderStatus orderStatus) {
            this.orderStatus = orderStatus;
        public OrderStatus getStatus() {
            return orderStatus;
        public Integer getKey(){
            return key;
        private Integer key;
        public Order() {
            id = generateId();
            key=new Integer(id);
        public Object clone() {
            try {
                Order order = (Order)super.clone();
                order.setId(order.generateId());
                return order;
            } catch (CloneNotSupportedException e) {
                e.printStackTrace();
            return null;
        public static int generateId() {
            idwLock.lock();
            try {
                if (nextId == flipOverId) {
                    // redo this w/a number incrementor passing in null for the member variable
    //                ValueManipulator vm=null;
    //                NumberIncrementor ni = new NumberIncrementor(vm, 1, false);
                    NamedCache omsCache = CacheFactory.getCache("oms");
                    omsCache.lock("high_order_id");
                    Integer i = (Integer)omsCache.get("high_order_id");
                    if (i==null) i=188; // change to 1 once legacy is gone
                    omsCache.put("high_order_id", ++i);
                    omsCache.unlock("high_order_id");
                    flipOverId = (i+1) * MAX_ORDERS_PER_TRADER_ID;
                    nextId = (MAX_ORDERS_PER_TRADER_ID * i)+1;
                    return nextId;
                } else {
                    return ++nextId;
            } finally {
                idwLock.unlock();
        public boolean isCancelRequestedOrIsCanceled() {
            // change to cancelrequested lock, not ack lock
            if (orderStatus==OrderStatus.CANCELED)
                return true;
            //  ValueExtractor extractor = new ReflectionExtractor("getCancelCount");
            //  int cc = (Integer)cache.invoke( this.ID , extractor );
            Order o = (Order)getCache().get(this.id);
            int cc = o.getCancelCount();
            return cc > 0 || o.orderStatus == OrderStatus.CANCELED;
        public void setId(int Id) {
            this.id = Id;
        public int getId() {
            return id;
    }

  • Java.io.NotSerializableException: com.citibank.lms.logger.Logger

    hi
    i have added a logger file to my application in the package com.citibank.
    after i run it..i get the following error.
    <Dec 14, 2004 11:13:38 PM IST> <Error> <HTTP Session> <BEA-100028> <Could not deserialize session data.
    java.io.NotSerializableException: com.citibank.lms.logger.Logger
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)
    at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1330)
    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1302)
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1245)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
    at weblogic.servlet.internal.AttributeWrapper.convertObjectToBytes(AttributeWrapper.java:136)
    at weblogic.servlet.internal.AttributeWrapper.getObject(AttributeWrapper.java:112)
    at weblogic.servlet.internal.AttributeWrapper.getObject(AttributeWrapper.java:69)
    at weblogic.servlet.internal.session.SessionData.getAttribute(SessionData.java:431)
    at jsp_servlet._resources._jsp.__commonheader._jspService(__commonheader.java:254)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
    at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
    at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:607)
    at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:400)
    at weblogic.servlet.jsp.PageContextImpl.include(PageContextImpl.java:154)
    at jsp_servlet._common.__error._jspService(__error.java:168)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
    at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
    at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:301)
    at weblogic.servlet.internal.ServletResponseImpl.sendError(ServletResponseImpl.java:523)
    at weblogic.servlet.internal.WebAppServletContext.handleException(WebAppServletContext.java:3908)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3683)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    >
    wat do i do?? please help!!!!!
    rekram

    It looks like you are attempting to save your Logger to the HttpSession and
    you are using session persistence and/or session replication. This requires
    that the Object that is being saved to the HttpSession implement the
    java.io.Serializable interface.
    Bill
    "rekha Ramakrishnan" <[email protected]> wrote in message
    news:23681277.1103090194200.JavaMail.root@jserv5...
    hi
    i have added a logger file to my application in the package com.citibank.
    after i run it..i get the following error.
    <Dec 14, 2004 11:13:38 PM IST> <Error> <HTTP Session> <BEA-100028> <Couldnot deserialize session data.
    java.io.NotSerializableException: com.citibank.lms.logger.Logger
    atjava.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)
    atjava.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1330)
    atjava.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1302)
    atjava.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1245)
    atjava.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
    atjava.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
    atweblogic.servlet.internal.AttributeWrapper.convertObjectToBytes(AttributeWra
    pper.java:136)
    atweblogic.servlet.internal.AttributeWrapper.getObject(AttributeWrapper.java:1
    12)
    atweblogic.servlet.internal.AttributeWrapper.getObject(AttributeWrapper.java:6
    9)
    atweblogic.servlet.internal.session.SessionData.getAttribute(SessionData.java:
    431)
    atjsp_servlet._resources._jsp.__commonheader._jspService(__commonheader.java:2
    54)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
    atweblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Servle
    tStubImpl.java:971)
    atweblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :402)
    atweblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :305)
    atweblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImp
    l.java:607)
    atweblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImp
    l.java:400)
    atweblogic.servlet.jsp.PageContextImpl.include(PageContextImpl.java:154)
    at jsp_servlet._common.__error._jspService(__error.java:168)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
    atweblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Servle
    tStubImpl.java:971)
    atweblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :402)
    atweblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :305)
    atweblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImp
    l.java:301)
    atweblogic.servlet.internal.ServletResponseImpl.sendError(ServletResponseImpl.
    java:523)
    atweblogic.servlet.internal.WebAppServletContext.handleException(WebAppServlet
    Context.java:3908)
    atweblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
    ntext.java:3683)
    atweblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
    :2585)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    >
    wat do i do?? please help!!!!!
    rekram

  • Com.tangosol.util.AssertionException

    Getting this exception intermittently in my storage nodes (total of 4):
    23:54:16,092 ERROR [Logger@9260286 3.6.0.2] cluster (log:3) - 2012-05-01 23:54:16.087/2394.969 Oracle Coherence GE 3.6.0.2 <Error> (thread=DistributedCache:MessageDistributedCacheService,
                   member=7): Terminating PartitionedCache due to unhandled exception: com.tangosol.util.AssertionException
    23:54:16,126 ERROR [Logger@9260286 3.6.0.2] cluster (log:3) - 2012-05-01 23:54:16.087/2394.969 Oracle Coherence GE 3.6.0.2 <Error> (thread=DistributedCache:MessageDistributedCacheService,
                   member=7):
    com.tangosol.util.AssertionException:
         at com.tangosol.coherence.Component._assertFailed(Component.CDB:12)
         at com.tangosol.coherence.Component._assert(Component.CDB:3)
         at com.tangosol.coherence.component.net.message.requestMessage.DistributedCacheRequest$Poll.onCompletion(DistributedCacheRequest.CDB:15)
         at com.tangosol.coherence.component.net.Poll.close(Poll.CDB:13)
         at com.tangosol.coherence.component.net.Poll.onResponded(Poll.CDB:32)
         at com.tangosol.coherence.component.net.Poll.onResponse(Poll.CDB:3)
         at com.tangosol.coherence.component.net.message.requestMessage.DistributedCacheRequest$Poll.onResponse(DistributedCacheRequest.CDB:16)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onMessage(Grid.CDB:26)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:33)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.PartitionedService.onNotify(PartitionedService.CDB:3)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache.onNotify(PartitionedCache.CDB:3)
         at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
         at java.lang.Thread.run(Thread.java:619)
    Version from the the manifest:
    Specification-Version: 3.6.0.2
    Implementation-Build: 18470
    This happens under the following scenario:
    I have 4 other nodes that are concurrently writing to the same cache using individual put() operations, about 200k objects in total
    Anybody have any ideas?
    Thanks

    Hi Carl,
    I guess the issue when the limit is exceeding.
    Probably you can try increasing the packet Size and run the test
    For more info:
    http://wiki.tangosol.com/display/COH33UG/Production+Checklist#ProductionChecklist-LargeClusterConfiguration
    Let me know the results.
    Thanks,
    Ashish

  • What is com.tangosol.util.Dequeue used for?

    Can I use a com.tangosol.util.Dequeue to allow one producer to be placing objects in a coherence backed dequeue while other consumers are atomically dequeueing from it?
    Thanks,
    Andrew

    snidely_whiplash wrote:
    Can I use a com.tangosol.util.Dequeue to allow one producer to be placing objects in a coherence backed dequeue while other consumers are atomically dequeueing from it?
    Thanks,
    AndrewHi Andrew,
    that class is not a queue backed by Coherence caches. It is simply a double ended queue similar to java.util.Dequeue introduced in Java 6.
    Best regards,
    Robert

  • Thread STUCK for more than 10minutes at  com.tangosol.util.SegmentedHashMap

    <[STUCK] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)' has been busy for "707" seconds working on the request "weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl@11ddce1", which is more than the configured time (StuckThreadMaxTime) of "600" seconds. Stack trace:
    java.lang.Object.wait(Native Method)
    com.tangosol.util.SegmentedHashMap.contendForSegment(SegmentedHashMap.java:1391)
    com.tangosol.util.SegmentedHashMap.lockSegment(SegmentedHashMap.java:1301)
    com.tangosol.util.SegmentedHashMap.lockBucket(SegmentedHashMap.java:1266)
    com.tangosol.util.SegmentedHashMap.invokeOnKey(SegmentedHashMap.java:1058)
    com.tangosol.util.SegmentedConcurrentMap.lock(SegmentedConcurrentMap.java:197)
    com.tangosol.net.cache.CachingMap.get(CachingMap.java:462)

    Hi,
    A 2019 ms delay could be caused by a number of things. It could be network related or more likely as the message says the WebLogic node could have been doing a GC. As your WebLogic node is a Cluster member you need to make sure that its GC is properly tuned to avoid long GC pauses as this can destabelize the whole cluster. I see you are using 3.5.3/465p8 which is an older version of Coherence and lacks the newer node death detection algorithms. I know from the project I work on that also uses 3.5.3/465p8 that long GCs on cluster members can cause other nodes in the cluster to die if you get GC pauses that are too long or too frequent.
    I doubt that this message is related to the stuck thread issue in your original post, though it is hard to tell for certain.
    JK

  • Java.lang.NoClassDefFoundError: com/sap/util/monitor/jarm/TaskMonitor

    hi all,
    i was trying to build and try a web service in my project.
    but at runtime it keeps throwing the following error(  log trace)
    i am unable to figure out the source of error.
    is it in the jco or anything else
    thanks in advance
    1.5#001143C809E500470000002E00000B8C00040CBB0F05957C#1139897457152#com.sap.engine.services.httpserver##com.sap.engine.services.httpserver#Guest#2####a9a4e0009d2011dacd42001143c809e5#SAPEngine_Application_Thread[impl:3]_16##0#0#Error#1#/System/Server#Plain###User Guest, IP address
    HTTP request processing failed. HTTP error [401] will be returned. The error is [Cannot authenticate the user.No details available].#
    #1.5#001143C809E500530000001F00000B8C00040CBB0FEBCF9E#1139897472233#com.sap.engine.services.ejb#sap.com/xappsospservicebundle~enterpriseapp#com.sap.engine.services.ejb#I020381E1#1839####b13de9b09d2011da944e001143c809e5#SAPEngine_Application_Thread[impl:3]_24##0#0#Error##Java###
    [EXCEPTION]
    #1#com.sap.engine.services.ejb.exceptions.BaseEJBException: Exception in method getRelatedReports.
         at com.sap.xapps.osp.orgmgmt.servicebundle.sbejb.OrgMgmtSBLocalLocalObjectImpl10.getRelatedReports(OrgMgmtSBLocalLocalObjectImpl10.java:121)
         at com.sap.xapps.osp.orgmgmt.servicebundle.facade.OrgMgtFacadeBean.getRelatedReports(OrgMgtFacadeBean.java:425)
         at com.sap.xapps.osp.orgmgmt.servicebundle.facade.OrgMgtFacadeLocalLocalObjectImpl10.getRelatedReports(OrgMgtFacadeLocalLocalObjectImpl10.java:103)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.sap.engine.services.webservices.runtime.EJBImplementationContainer.invokeMethod(EJBImplementationContainer.java:126)
         at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:157)
         at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:79)
         at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPost(ServletDispatcherImpl.java:92)
         at SoapServlet.doPost(SoapServlet.java:51)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Caused by: java.lang.NoClassDefFoundError: com/sap/util/monitor/jarm/TaskMonitor
         at com.sap.mw.jco.util.Jarm.getRequestMonitor(Jarm.java:57)
         at com.sap.mw.jco.JCO$Repository.getFunctionInterface(JCO.java:19069)
         at com.sap.mw.jco.JCO$BasicRepository.getFunctionTemplate(JCO.java:18151)
         at com.sap.xapps.osp.orgmgmt.servicebundle.common.OrgMgmtSBHelper.createFunction(OrgMgmtSBHelper.java:491)
         at com.sap.xapps.osp.orgmgmt.servicebundle.impl.OrgMgmtBusinessDelegate.getRelatedReports(OrgMgmtBusinessDelegate.java:1273)
         at com.sap.xapps.osp.orgmgmt.servicebundle.sbejb.OrgMgmtSBBean.getRelatedReports(OrgMgmtSBBean.java:170)
         at com.sap.xapps.osp.orgmgmt.servicebundle.sbejb.OrgMgmtSBLocalLocalObjectImpl10.getRelatedReports(OrgMgmtSBLocalLocalObjectImpl10.java:103)
         ... 27 more

    hi,
    thanks for the replies.
    well i guess that(user authentication) is not the problem.
    Coz that happens even before i start the web service.
    i guess the problem is that the appl. is not finding the TaskMonitor class ( see the last 10 lines of the log).
    does anyone have a solution for that.
    thanks

  • Java.io.NotSerializableException: com.sun.xml.tree.XmlDocument

    Hi,
    I got this error when my servlet is trying to parse a xml document:
    RuntimeRemoteException( java.io.WriteAbortedException: Writing aborted by exception; java.io.NotSerializableException: com.sun.xml.tree.XmlDocument )
    And my application runs ok when Tomcat is used as servlet container, but it runs into problem when iPlanet is used.
    Any idea?
    Thanks in advance!

    Thanks for your reply.
    The EJBs in the application are all stateless beans. The error happens at the servlet side, not the EJB side. When the servlet tries to parse the returned XML document using xalan 1.0, the error happened. However, I can not reproduce the error when I use Tomcat as servlet container.
    here is how I coded:
    XSLTProcessor processor = XSLTProcessorFactory.getProcessor(new org.apache.xalan.xpath.xdom.XercesLiaison());
    XSLTInputSource xmlSource = new XSLTInputSource(doc);
    XSLTInputSource xslSheet = new XSLTInputSource("file:"+xslFile);
    Writer out = new StringWriter();
    XSLTResultTarget xmlResult= new XSLTResultTarget(out);
    processor.process(xmlSource,xslSheet,xmlResult);

  • Error java.lang.NoClassDefFoundError: com/tangosol/net/CacheFactory

    error java.lang.NoClassDefFoundError: com/tangosol/net/CacheFactory
    could please let me know why i am getting this error. I have coherence.jar and tangosol.jar in classpath.
    Edited by: tally_15 on Jun 23, 2010 6:12 AM

    Hi,
    Is it a new setup? Is CacheFactory the only class you can't access or you can't access any Coherence class?
    Thanks,
    Wei

  • Usage of com.tangosol.util.ServiceListener

    Hi All,
    I am struggling to figure out how to register a com.tangosol.util.ServiceListener with a service in cache-configuration file?? My intention here is to perform some operation intimidate after the distributed self-service is started.
    Any info on this highly appreciated.
    Regards,
    Avinash

    user9170308 wrote:
    Hi All,
    I am struggling to figure out how to register a com.tangosol.util.ServiceListener with a service in cache-configuration file?? My intention here is to perform some operation intimidate after the distributed self-service is started.
    Any info on this highly appreciated.
    Regards,
    AvinashHi Avinash,
    I think you meant immediately... :)
    I am not sure if you can register a service listener in the configuration file, as the listener tag on the service registers a map listener.
    You can however define a partition-listener, which is invoked with a PARTITION_ASSIGNED when partitions are assigned to the senior node (starting with Coherence 3.6) upon starting up the distributed cache service on a storage-enabled node, and PARTITION_RECEIVE_BEGIN callbacks when non-senior nodes start getting their partitions so it is almost as good.
    On a storage-disabled node instantiation of a cache listener could be your clue, although that happens during configuring the service, so the service is not available at that point yet, but having a service listener for a distributed cache service on a node which is storage-disabled for the service is not typical anyway.
    You can also look at quorum policies starting with 3.6 which are invoked fairly early, too, but not necessarily on each node.
    Best regards,
    Robert

  • When is prune() called on com.tangosol.util.Cache?

    I'm trying to extend Cache as it very closely fits what I need to do with my application data expiration model. My question is: is prune() called BEFORE the cache fills up (that is, did the call that triggered the prune() succeed)?
    I have to be able to signal to the upper application layers that a prune was forced and some data may no longer be valid. If prune was called AS the cache became full (rather than just after), I can signal the application that data was removed, and there is no threat to the correctness of the app.

    Hi Kris
    A further question along these lines: is prune() the
    mechanism that is called to remove values that have
    timed out, rather than when the Cache is full? No, <tt>prune()</tt> is not what is called for timed out entries. We have a separate method that is called to remove the specific entry that has expired. This is because within the Cache you can set expiry on an entry by entry basis.
    I would also like to do periodic, timeout-based
    expirations from my cache to avoid the full hit of
    letting the cache fill all the way up before removing
    any data.The Cache currently supports timeout-based expirations. You can either have a global cache-entry-timeout set (see constructors) or set it on an entry by entry basis. If an entry has a timeout set on it and it has expired the entry will be removed during the <tt>iterator()</tt> or <tt>toArray()</tt> calls.
    Regards,
    Rob

  • Java.io.NotSerializableException when using POF over Extend

    I changed a class to use POF and it seems to work fine among TCMP cluster members but when apps connect with Extend I get an exception indicating that maybe either the extend proxy or client app is not correctly configured to use POF.
    (Wrapped) java.io.NotSerializableException: dj_quotes.DJ_Quote
            at com.tangosol.util.Base.ensureRuntimeException(Base.java:288)
            at com.tangosol.util.Base.ensureRuntimeException(Base.java:269)
            at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.send(Peer.CDB:22)
            at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.post(Peer.CDB:23)
            at com.tangosol.coherence.component.net.extend.Channel.post(Channel.CDB:25)
            at com.tangosol.coherence.component.net.extend.Channel.send(Channel.CDB:6)
            at com.tangosol.coherence.component.net.extend.Channel.receive(Channel.CDB:55)
            at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer$DaemonPool$WrapperTask.run(Peer.CDB:9)
            at com.tangosol.coherence.component.util.DaemonPool$WrapperTask.run(DaemonPool.CDB:32)
            at com.tangosol.coherence.component.util.DaemonPool$Daemon.onNotify(DaemonPool.CDB:63)
            at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
            at java.lang.Thread.run(Thread.java:662)
    Caused by: java.io.NotSerializableException: dj_quotes.DJ_Quote
            at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164)
            at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
            at com.tangosol.util.ExternalizableHelper.writeSerializable(ExternalizableHelper.java:2252)
            at com.tangosol.util.ExternalizableHelper.writeObjectInternal(ExternalizableHelper.java:2696)
            at com.tangosol.util.ExternalizableHelper.serializeInternal(ExternalizableHelper.java:2600)
            at com.tangosol.util.ExternalizableHelper.toBinary(ExternalizableHelper.java:210)
            at com.tangosol.coherence.component.net.extend.proxy.serviceProxy.CacheServiceProxy$ConverterToBinary.convert(CacheServiceProxy.CDB:3)
            at com.tangosol.util.ConverterCollections$AbstractConverterEntry.getValue(ConverterCollections.java:3547)
            at com.tangosol.io.pof.PofBufferWriter.writeMap(PofBufferWriter.java:1977)
            at com.tangosol.coherence.component.net.extend.message.Response.writeExternal(Response.CDB:23)
            at com.tangosol.coherence.component.net.extend.message.response.PartialResponse.writeExternal(PartialResponse.CDB:1)
            at com.tangosol.coherence.component.net.extend.Codec.encode(Codec.CDB:23)
            at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.encodeMessage(Peer.CDB:23)
            at com.tangosol.coherence.component.util.daemon.queueProcessor.service.peer.acceptor.TcpAcceptor.encodeMessage(TcpAcceptor.CDB:8)
            at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.send(Peer.CDB:16)
            ... 9 moreLooks like it failed while attempting default serialization, right?
    My extend proxy servers start with
    -Dtangosol.coherence.cacheconfig=cache-config-extend-proxy.xml
    here:
    <?xml version="1.0"?>
    <!DOCTYPE cache-config SYSTEM "cache-config.dtd">
    <cache-config>
         <!-- ***********  SCHEME MAPPINGS  ***********  -->
         <caching-scheme-mapping>
              <cache-mapping>
                   <cache-name>quotes.*</cache-name>
                   <scheme-name>quotes-scheme</scheme-name>
              </cache-mapping>   
         </caching-scheme-mapping>
         <!-- ******************************** -->
         <caching-schemes>
              <proxy-scheme>
          <service-name>ExtendTcpProxyService</service-name>
          <thread-count>8</thread-count>
          <acceptor-config>
            <tcp-acceptor>
              <local-address>
                <address system-property="tangosol.coherence.proxy.address">localhost</address>
                <port system-property="tangosol.coherence.proxy.port">9090</port>
              </local-address>
            </tcp-acceptor>
          </acceptor-config>
          <proxy-config>
                  <cache-service-proxy>
                    <lock-enabled>true</lock-enabled>
                  </cache-service-proxy>
                </proxy-config>
          <autostart>true</autostart>
        </proxy-scheme>
              <distributed-scheme>
                   <scheme-name>quotes-scheme</scheme-name>
                   <service-name>DistributedQuotesCacheService</service-name>
                   <serializer>
                        <class-name>com.tangosol.io.pof.ConfigurablePofContext</class-name>
                        <init-params>
              <init-param>
                <param-type>string</param-type>
                <param-value system-property="pof.config">z:/coherence/pof-config.xml</param-value>
              </init-param>
            </init-params>
                   </serializer>
                   <backing-map-scheme>
                        <local-scheme/>
                   </backing-map-scheme>
                   <autostart>true</autostart>
              </distributed-scheme>
    </caching-schemes>
    </cache-config>extend client apps start with
    -Dtangosol.coherence.cacheconfig=z:/coherence/cache-config-extend-client.xml
    here:
    <?xml version="1.0"?>
    <!DOCTYPE cache-config SYSTEM "cache-config.dtd">
    <cache-config>
         <!-- ***********  SCHEME MAPPINGS  ***********  -->
         <caching-scheme-mapping>
              <cache-mapping>
                   <cache-name>quotes.*</cache-name>
                   <scheme-name>extend-scheme</scheme-name>
              </cache-mapping>
         </caching-scheme-mapping>
         <!-- ******************************** -->
         <caching-schemes>
              <remote-cache-scheme>
                    <scheme-name>extend-scheme</scheme-name>
                    <service-name>ExtendTcpCacheService</service-name>
                    <initiator-config>
                    <tcp-initiator>
              <remote-addresses>
                 <socket-address>
                  <address>192.168.3.6</address>
                  <port>9090</port>
                </socket-address>
              </remote-addresses>
              <connect-timeout>12s</connect-timeout>
            </tcp-initiator>
            <outgoing-message-handler>
              <request-timeout>6s</request-timeout>
            </outgoing-message-handler>
          </initiator-config>
        </remote-cache-scheme>
              <!-- ALSO TRIED THIS IN PLACE OF extend-scheme -->
                    <remote-cache-scheme>
          <scheme-name>extend-scheme-pof</scheme-name>
          <service-name>ExtendPofTcpCacheService</service-name>
                   <serializer>
                        <class-name>com.tangosol.io.pof.ConfigurablePofContext</class-name>
                        <init-params>
              <init-param>
                <param-type>string</param-type>
                <param-value system-property="pof.config">z:/coherence/pof-config.xml</param-value>
              </init-param>
            </init-params>
                   </serializer>
          <initiator-config>
            <tcp-initiator>
              <remote-addresses>
                <!-- mothra -->
                 <socket-address>
                  <address>192.168.3.6</address>
                  <port>9090</port>
                </socket-address>
              </remote-addresses>
              <connect-timeout>12s</connect-timeout>
            </tcp-initiator>
            <outgoing-message-handler>
              <request-timeout>6s</request-timeout>
            </outgoing-message-handler>
          </initiator-config>
        </remote-cache-scheme>
    </caching-schemes>
    </cache-config>pof-config.xml should be fine...
    <!DOCTYPE pof-config SYSTEM "pof-config.dtd">
    <pof-config>
      <user-type-list>
        <include>coherence-pof-config.xml</include>
        <user-type>
          <type-id>10001</type-id>
          <class-name>dj_quotes.DJ_Quote</class-name>
        </user-type>
      </user-type-list>
    </pof-config>Any ideas what I missed?
    Thanks,
    Andrew

    Looks like I spoke too soon. Moving the <serializer> to the correct location in the Extend client XML config did fix the problem I was seeing but it created a new problem. It appears the Extend client wants to use POF for everything including non-POF services like the one handling the Serializable (non-POF) object oms.Order. That's what I gather from this exception
    Exception in thread "AWT-EventQueue-0" (Wrapped) java.io.IOException: unknown user type: oms.Order
            at com.tangosol.util.Base.ensureRuntimeException(Base.java:288)
            at com.tangosol.util.Base.ensureRuntimeException(Base.java:269)
            at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.send(Peer.CDB:22)
            at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.post(Peer.CDB:23)
            at com.tangosol.coherence.component.net.extend.Channel.post(Channel.CDB:25)
            at com.tangosol.coherence.component.net.extend.Channel.request(Channel.CDB:18)
            at com.tangosol.coherence.component.net.extend.Channel.request(Channel.CDB:1)
            at com.tangosol.coherence.component.net.extend.RemoteNamedCache$BinaryCache.putAll(RemoteNamedCache.CDB:10)
            at com.tangosol.util.ConverterCollections$ConverterMap.putAll(ConverterCollections.java:1702)
            at com.tangosol.coherence.component.net.extend.RemoteNamedCache.putAll(RemoteNamedCache.CDB:1)
            at com.tangosol.coherence.component.util.SafeNamedCache.putAll(SafeNamedCache.CDB:1)
            at oms.Order.sendMultiple(Order.java:357)
            at order_entry_window.OrderEntryPanel$SubmitListener.sendOrder(OrderEntryPanel.java:1307)
            at order_entry_window.OrderEntryPanel$SubmitListener.actionPerformed(OrderEntryPanel.java:1321)
            at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
            at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
            at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
            at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
            at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
            at java.awt.Component.processMouseEvent(Component.java:6504)
            at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
            at java.awt.Component.processEvent(Component.java:6269)
            at java.awt.Container.processEvent(Container.java:2229)
            at java.awt.Component.dispatchEventImpl(Component.java:4860)
            at java.awt.Container.dispatchEventImpl(Container.java:2287)
            at java.awt.Component.dispatchEvent(Component.java:4686)
            at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
            at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
            at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
            at java.awt.Container.dispatchEventImpl(Container.java:2273)
            at java.awt.Window.dispatchEventImpl(Window.java:2713)
            at java.awt.Component.dispatchEvent(Component.java:4686)
            at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:707)
            at java.awt.EventQueue.access$000(EventQueue.java:101)
            at java.awt.EventQueue$3.run(EventQueue.java:666)
            at java.awt.EventQueue$3.run(EventQueue.java:664)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
            at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
            at java.awt.EventQueue$4.run(EventQueue.java:680)
            at java.awt.EventQueue$4.run(EventQueue.java:678)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:677)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)
            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
    Caused by: java.io.IOException: unknown user type: oms.Order
            at com.tangosol.io.pof.ConfigurablePofContext.serialize(ConfigurablePofContext.java:341)
            at com.tangosol.util.ExternalizableHelper.serializeInternal(ExternalizableHelper.java:2596)
            at com.tangosol.util.ExternalizableHelper.toBinary(ExternalizableHelper.java:210)
            at com.tangosol.coherence.component.net.extend.RemoteNamedCache$ConverterToBinary.convert(RemoteNamedCache.CDB:4)
            at com.tangosol.util.ConverterCollections$AbstractConverterEntry.getValue(ConverterCollections.java:3547)
            at com.tangosol.io.pof.PofBufferWriter.writeMap(PofBufferWriter.java:1977)
            at com.tangosol.coherence.component.net.extend.messageFactory.NamedCacheFactory$PutAllRequest.writeExternal(NamedCacheFactory.CDB:3)
            at com.tangosol.coherence.component.net.extend.Codec.encode(Codec.CDB:23)
            at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.encodeMessage(Peer.CDB:23)
            at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.send(Peer.CDB:16)
            ... 47 more
    Caused by: java.lang.IllegalArgumentException: unknown user type: oms.Order
            at com.tangosol.io.pof.ConfigurablePofContext.getUserTypeIdentifier(ConfigurablePofContext.java:420)
            at com.tangosol.io.pof.ConfigurablePofContext.getUserTypeIdentifier(ConfigurablePofContext.java:409)
            at com.tangosol.io.pof.PofBufferWriter.writeUserType(PofBufferWriter.java:1660)
            at com.tangosol.io.pof.PofBufferWriter.writeObject(PofBufferWriter.java:1622)
            at com.tangosol.io.pof.ConfigurablePofContext.serialize(ConfigurablePofContext.java:335)
            ... 56 moreSo I posted a follow-up question here:
    Can an extend client use both POF and java.io.Serializable?
    Thanks,
    Andrew

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

    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}

    does the below class implement java.io.Serializable
    com.enbridge.co.ux.coherence.pojos.CommodityPojo
    if not implement serializable

  • Java.io.NotSerializableException in WL6

    All,
              I have a servlet calling a user/group manager stateless session bean.
              The same code works well in WL5.1.0.
              Recently I migrated to WL6 and found there is a serialization problem.
              Rebuild the EJB jar with WL6 ejb
              compiler did not solve the problem. Here is the detail:
              In the remote interface I have a method called assignGroups().
              public interface InfUserGroupManager extends EJBObject {
              public void assignGroups(InfIIPSession session, InfDBObjectPK userPk,
              Collection groupIds)
              throws RemoteException, InfInsufficientPrivilegeException;
              In a servlet I have code like this:
              InfUserGroupManager mgr = ....; // Gets a reference to InfUserGroupManager
              stateless session bean.
              HashMap groups = .....; // Both keys and values are java.lang.Integer
              objects.
              Collection assignedGroups = groups.values();
              mgr.assignGroups(iipSession, userPk, assignedGroups);
              java.util.HashMap and java.lang.Integer are both serializable. However, when
              trying to invoke the
              assignGroups() method on the InfUserGroupManager object will raise
              exception.
              javax.servlet.ServletException: failed to marshal
              public abstract void
              com.informatica.security.manager.InfUserGroupManager.assignGroups
              (com.informatica.session.InfIIPSession,com.informatica.repository.InfDBObjec
              tPK,java.util.Collection)
              throws
              java.rmi.RemoteException,com.informatica.util.InfInsufficientPrivilegeExcept
              ion;
              nested exception is:
              java.io.NotSerializableException: java.util.HashMap$2
              at
              com.informatica.viewer.portal.servlets.commands.InfUserCmd.assignGroups(InfU
              serCmd.java:168)
              at
              com.informatica.viewer.portal.servlets.commands.InfUserCmd.saveModel(InfUser
              Cmd.java:132)
              at
              com.informatica.servlet.command.InfAbstractMultiFormCommand.execute(InfAbstr
              actMultiFormCommand.java:100)
              at
              com.informatica.servlet.InfCommandServlet.processRequest(InfCommandServlet.j
              ava:89)
              at
              com.informatica.servlet.InfCommandServlet.doPost(InfCommandServlet.java:67)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
              at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              :208)
              at
              weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
              ntext.java:1127)
              at
              weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
              :1529)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              

    We are getting this same error. Was any resolution found?
    "Steve Rolls" <[email protected]> wrote in message
    news:[email protected]..
    When binding non-serializable objects into the JNDI tree with WL6 + SP1,
    a java.io.NotSerializableException is thrown. This is in a non-cluster
    environment and the context's replicate bindings flag is set to false.
    Here is the WL portion of the exception's stack trace
    at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1148)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
    at java.util.Hashtable.writeObject(Hashtable.java:757)
    at java.lang.reflect.Method.invoke(Native Method)
    atjava.io.ObjectOutputStream.invokeObjectWriter(ObjectOutputStream.java:1878)
    at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1210)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
    atweblogic.rmi.internal.CBVOutputStream.writeObjectInternal(CBVOutputStream.ja
    va:220)
    atweblogic.rmi.internal.CBVOutputStream.writeObject(CBVOutputStream.java:213)
    atweblogic.rmi.internal.CBVOutputStream.writeObject(CBVOutputStream.java:190)
    at weblogic.rmi.internal.ObjectIO.writeObject(ObjectIO.java:19)
    atweblogic.rmi.internal.BasicRemoteRef.marshalArgs(BasicRemoteRef.java:121)
    atweblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java
    :246)
    atweblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java
    :225)
    atweblogic.jndi.internal.ServerNamingNode_WLStub.bind(ServerNamingNode_WLStub.
    java:436)
    at weblogic.jndi.internal.WLContextImpl.bind(WLContextImpl.java:337)
    at javax.naming.InitialContext.bind(InitialContext.java:358)
    Is there some new setting in WL6 that controls this bevavior or is this abug?
    >
    thanks,
    Steve

  • Java.io.NotSerializableException WHY??? What did I do??? ;-)

    Hi Guys,
    I am getting java.io.NotSerializableException when running a query and
    passing in PersistenceCapable object via executeWithMap or
    executeWithArray. When I run the same query and pass the object in
    directly into execute()(as a single parameter), it works just fine... ???
    I am using Kodo version 2.4.2. To pass the parameters in I have tried
    HashMap as well as normal array (ArrayList.toArray()) and always got the
    problem.
    The code and full stack is bellow. Please note the test for
    PersistenceCapable. Part of the code is commented out, but it still throws
    the exception as it is.
    Any help would be greatly appretiated!!!
    Petr
    Code:
    String ql = "folderItems.contains(vfolderItem) && vfolderItem.parentFolder
    == parFolder";
              String params = "Folder parFolder";
              String variables = "FolderItem vfolderItem;";
              HashMap parValues = new HashMap();
              System.out.println("Folder PC" + (folder instanceof PersistenceCapable));
              parValues.put("parFolder", folder);
              if (createdStart != null) {
                   ql = ql + " && createdDate >= padStartDate";
                   params = params + ", java.util.Date padStartDate";
                   parValues.put("padStartDate", createdStart);
              if (createdStop != null) {
                   ql = ql + " && createdDate <= padStopDate";
                   params = params + ", java.util.Date padStopDate";
                   parValues.put("padStopDate", createdStop);
              if (receivedBy != null ) {
                   ql = ql + " && recipients.contains(vRecipient) &&
    vRecipient.recipientType == parRecipient";
                   params = params + ", CodeValue parRecipient";
                   variables = variables + "; Recipient vRecipient;";
                   parValues.put("parRecipient", receivedBy);
              if (sentBy != null) {
                   ql = ql + " && recipients.contains(vSender) && vSender.recipientType ==
    parSender";
                   params = params + ", CodeValue parSender";
                   variables = variables + "; Recipient vSender;";
                   parValues.put("parSender", sentBy);
              Collection col;
              Query q = ctx.getPersist().newQuery(ext, ql);
              q.declareVariables(variables);
              q.declareParameters(params);
              q.declareImports("import com.mallesons.servicenet.aa.folder.*;");
              q.setOrdering("createdDate ascending");
              q.compile();
              col = (Collection) q.executeWithMap(parValues);
              //col = (Collection) q.execute(folder);
    Stack:
    javax.jdo.JDOFatalUserException:
    com.mallesons.servicenet.aa.folder.Folder: java.util.HashMap
    NestedThrowables:
    java.io.NotSerializableException: com.mallesons.servicenet.aa.folder.Folder
         at
    com.solarmetric.kodo.impl.jdbc.schema.dict.AbstractDictionary.serialize(AbstractDictionary.java:684)
         at
    com.solarmetric.kodo.impl.jdbc.schema.dict.AbstractDictionary.blobToSQL(AbstractDictionary.java:384)
         at
    com.solarmetric.kodo.impl.jdbc.schema.dict.AbstractDictionary.blobToPreparedParameter(AbstractDictionary.java:1067)
         at
    com.solarmetric.kodo.impl.jdbc.schema.dict.SQLServerDictionary.blobToPreparedParameter(SQLServerDictionary.java:139)
         at
    com.solarmetric.kodo.impl.jdbc.schema.dict.AbstractDictionary.toPreparedParameter(AbstractDictionary.java:808)
         at
    com.solarmetric.kodo.impl.jdbc.sql.SQLValue.applyParameter(SQLValue.java:129)
         at
    com.solarmetric.kodo.impl.jdbc.sql.SQLBuffer.setParameters(SQLBuffer.java:239)
         at
    com.solarmetric.kodo.impl.jdbc.sql.SQLBuffer.setParameters(SQLBuffer.java:222)
         at
    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.prepareStatementInternal(SQLExecutionManagerImpl.java:824)
         at
    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executePreparedQueryInternal(SQLExecutionManagerImpl.java:761)
         at
    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executeQueryInternal(SQLExecutionManagerImpl.java:691)
         at
    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executeQuery(SQLExecutionManagerImpl.java:372)
         at
    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executeQuery(SQLExecutionManagerImpl.java:356)
         at
    com.solarmetric.kodo.impl.jdbc.ormapping.ClassMapping.selectPrimaryMappings(ClassMapping.java:1221)
         at
    com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.executeQuery(JDBCStoreManager.java:707)
         at
    com.solarmetric.kodo.impl.jdbc.runtime.JDBCQuery.executeQuery(JDBCQuery.java:93)
         at com.solarmetric.kodo.query.QueryImpl.executeWithMap(QueryImpl.java:792)
         at
    com.solarmetric.kodo.query.QueryImpl.executeWithArray(QueryImpl.java:668)
         at com.solarmetric.kodo.query.QueryImpl.execute(QueryImpl.java:609)
         at
    com.mallesons.servicenet.ta.shared.BOQuery.executeWithMap(BOQuery.java:159)
         at
    com.mallesons.servicenet.aa.folder.SearchEmailItemService.searchDirect(SearchEmailItemService.java:105)
         at
    com.mallesons.servicenet.aa.folder.SearchEmailItemService.searchIn(SearchEmailItemService.java:45)
         at
    com.mallesons.servicenet.aa.folder.test.SearchItemServiceTest.testCascadeFaxNoTime(SearchItemServiceTest.java:217)
         at java.lang.reflect.Method.invoke(Native Method)
         at junit.framework.TestCase.runTest(TestCase.java:166)
         at junit.framework.TestCase.runBare(TestCase.java:140)
         at junit.framework.TestResult$1.protect(TestResult.java:106)
         at junit.framework.TestResult.runProtected(TestResult.java:124)
         at junit.framework.TestResult.run(TestResult.java:109)
         at junit.framework.TestCase.run(TestCase.java:131)
         at junit.framework.TestSuite.runTest(TestSuite.java:173)
         at junit.framework.TestSuite.run(TestSuite.java:168)
         at
    org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:329)
         at
    org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:218)
         at
    org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:151)
    NestedThrowablesStackTrace:
    java.io.NotSerializableException: com.mallesons.servicenet.aa.folder.Folder
         at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1205)
         at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:383)
         at java.util.HashMap.writeObject(HashMap.java:825)
         at java.lang.reflect.Method.invoke(Native Method)
         at
    java.io.ObjectOutputStream.invokeObjectWriter(ObjectOutputStream.java:1925)
         at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1267)
         at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:383)
         at
    com.solarmetric.kodo.impl.jdbc.schema.dict.AbstractDictionary.serialize(AbstractDictionary.java:680)
         at
    com.solarmetric.kodo.impl.jdbc.schema.dict.AbstractDictionary.blobToSQL(AbstractDictionary.java:384)
         at
    com.solarmetric.kodo.impl.jdbc.schema.dict.AbstractDictionary.blobToPreparedParameter(AbstractDictionary.java:1067)
         at
    com.solarmetric.kodo.impl.jdbc.schema.dict.SQLServerDictionary.blobToPreparedParameter(SQLServerDictionary.java:139)
         at
    com.solarmetric.kodo.impl.jdbc.schema.dict.AbstractDictionary.toPreparedParameter(AbstractDictionary.java:808)
         at
    com.solarmetric.kodo.impl.jdbc.sql.SQLValue.applyParameter(SQLValue.java:129)
         at
    com.solarmetric.kodo.impl.jdbc.sql.SQLBuffer.setParameters(SQLBuffer.java:239)
         at
    com.solarmetric.kodo.impl.jdbc.sql.SQLBuffer.setParameters(SQLBuffer.java:222)
         at
    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.prepareStatementInternal(SQLExecutionManagerImpl.java:824)
         at
    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executePreparedQueryInternal(SQLExecutionManagerImpl.java:761)
         at
    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executeQueryInternal(SQLExecutionManagerImpl.java:691)
         at
    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executeQuery(SQLExecutionManagerImpl.java:372)
         at
    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executeQuery(SQLExecutionManagerImpl.java:356)
         at
    com.solarmetric.kodo.impl.jdbc.ormapping.ClassMapping.selectPrimaryMappings(ClassMapping.java:1221)
         at
    com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.executeQuery(JDBCStoreManager.java:707)
         at
    com.solarmetric.kodo.impl.jdbc.runtime.JDBCQuery.executeQuery(JDBCQuery.java:93)
         at com.solarmetric.kodo.query.QueryImpl.executeWithMap(QueryImpl.java:792)
         at
    com.solarmetric.kodo.query.QueryImpl.executeWithArray(QueryImpl.java:668)
         at com.solarmetric.kodo.query.QueryImpl.execute(QueryImpl.java:609)
         at
    com.mallesons.servicenet.ta.shared.BOQuery.executeWithMap(BOQuery.java:159)
         at
    com.mallesons.servicenet.aa.folder.SearchEmailItemService.searchDirect(SearchEmailItemService.java:105)
         at
    com.mallesons.servicenet.aa.folder.SearchEmailItemService.searchIn(SearchEmailItemService.java:45)
         at
    com.mallesons.servicenet.aa.folder.test.SearchItemServiceTest.testCascadeFaxNoTime(SearchItemServiceTest.java:217)
         at java.lang.reflect.Method.invoke(Native Method)
         at junit.framework.TestCase.runTest(TestCase.java:166)
         at junit.framework.TestCase.runBare(TestCase.java:140)
         at junit.framework.TestResult$1.protect(TestResult.java:106)
         at junit.framework.TestResult.runProtected(TestResult.java:124)
         at junit.framework.TestResult.run(TestResult.java:109)
         at junit.framework.TestCase.run(TestCase.java:131)
         at junit.framework.TestSuite.runTest(TestSuite.java:173)
         at junit.framework.TestSuite.run(TestSuite.java:168)
         at
    org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:329)
         at
    org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:218)
         at
    org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:151)

    OK, mystery solved. I was using a our internal wrapper around Query and
    who ever wrote it, mapped executeWithArray and executeWithMap to simple
    Query.execute.
    Damn! :-(
    Petr
    Petr Bulanek wrote:
    Hi Guys,
    I am getting java.io.NotSerializableException when running a query and
    passing in PersistenceCapable object via executeWithMap or
    executeWithArray. When I run the same query and pass the object in
    directly into execute()(as a single parameter), it works just fine... ???
    I am using Kodo version 2.4.2. To pass the parameters in I have tried
    HashMap as well as normal array (ArrayList.toArray()) and always got the
    problem.
    The code and full stack is bellow. Please note the test for
    PersistenceCapable. Part of the code is commented out, but it still throws
    the exception as it is.
    Any help would be greatly appretiated!!!
    Petr
    Code:
    String ql = "folderItems.contains(vfolderItem) && vfolderItem.parentFolder
    == parFolder";
              String params = "Folder parFolder";
              String variables = "FolderItem vfolderItem;";
              HashMap parValues = new HashMap();
              System.out.println("Folder PC" + (folder instanceof PersistenceCapable));
              parValues.put("parFolder", folder);
              if (createdStart != null) {
                   ql = ql + " && createdDate >= padStartDate";
                   params = params + ", java.util.Date padStartDate";
                   parValues.put("padStartDate", createdStart);
              if (createdStop != null) {
                   ql = ql + " && createdDate <= padStopDate";
                   params = params + ", java.util.Date padStopDate";
                   parValues.put("padStopDate", createdStop);
              if (receivedBy != null ) {
                   ql = ql + " && recipients.contains(vRecipient) &&
    vRecipient.recipientType == parRecipient";
                   params = params + ", CodeValue parRecipient";
                   variables = variables + "; Recipient vRecipient;";
                   parValues.put("parRecipient", receivedBy);
              if (sentBy != null) {
                   ql = ql + " && recipients.contains(vSender) && vSender.recipientType ==
    parSender";
                   params = params + ", CodeValue parSender";
                   variables = variables + "; Recipient vSender;";
                   parValues.put("parSender", sentBy);
              Collection col;
              Query q = ctx.getPersist().newQuery(ext, ql);
              q.declareVariables(variables);
              q.declareParameters(params);
              q.declareImports("import com.mallesons.servicenet.aa.folder.*;");
              q.setOrdering("createdDate ascending");
              q.compile();
              col = (Collection) q.executeWithMap(parValues);
              //col = (Collection) q.execute(folder);
    Stack:
    javax.jdo.JDOFatalUserException:
    com.mallesons.servicenet.aa.folder.Folder: java.util.HashMap
    NestedThrowables:
    java.io.NotSerializableException: com.mallesons.servicenet.aa.folder.Folder
         at
    com.solarmetric.kodo.impl.jdbc.schema.dict.AbstractDictionary.serialize(AbstractDictionary.java:684)
         at
    com.solarmetric.kodo.impl.jdbc.schema.dict.AbstractDictionary.blobToSQL(AbstractDictionary.java:384)
         at
    com.solarmetric.kodo.impl.jdbc.schema.dict.AbstractDictionary.blobToPreparedParameter(AbstractDictionary.java:1067)
         at
    com.solarmetric.kodo.impl.jdbc.schema.dict.SQLServerDictionary.blobToPreparedParameter(SQLServerDictionary.java:139)
         at
    com.solarmetric.kodo.impl.jdbc.schema.dict.AbstractDictionary.toPreparedParameter(AbstractDictionary.java:808)
         at
    com.solarmetric.kodo.impl.jdbc.sql.SQLValue.applyParameter(SQLValue.java:129)
         at
    com.solarmetric.kodo.impl.jdbc.sql.SQLBuffer.setParameters(SQLBuffer.java:239)
         at
    com.solarmetric.kodo.impl.jdbc.sql.SQLBuffer.setParameters(SQLBuffer.java:222)
         at
    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.prepareStatementInternal(SQLExecutionManagerImpl.java:824)
         at
    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executePreparedQueryInternal(SQLExecutionManagerImpl.java:761)
         at
    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executeQueryInternal(SQLExecutionManagerImpl.java:691)
         at
    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executeQuery(SQLExecutionManagerImpl.java:372)
         at
    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executeQuery(SQLExecutionManagerImpl.java:356)
         at
    com.solarmetric.kodo.impl.jdbc.ormapping.ClassMapping.selectPrimaryMappings(ClassMapping.java:1221)
         at
    com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.executeQuery(JDBCStoreManager.java:707)
         at
    com.solarmetric.kodo.impl.jdbc.runtime.JDBCQuery.executeQuery(JDBCQuery.java:93)
         at com.solarmetric.kodo.query.QueryImpl.executeWithMap(QueryImpl.java:792)
         at
    com.solarmetric.kodo.query.QueryImpl.executeWithArray(QueryImpl.java:668)
         at com.solarmetric.kodo.query.QueryImpl.execute(QueryImpl.java:609)
         at
    com.mallesons.servicenet.ta.shared.BOQuery.executeWithMap(BOQuery.java:159)
         at
    com.mallesons.servicenet.aa.folder.SearchEmailItemService.searchDirect(SearchEmailItemService.java:105)
         at
    com.mallesons.servicenet.aa.folder.SearchEmailItemService.searchIn(SearchEmailItemService.java:45)
         at
    com.mallesons.servicenet.aa.folder.test.SearchItemServiceTest.testCascadeFaxNoTime(SearchItemServiceTest.java:217)
         at java.lang.reflect.Method.invoke(Native Method)
         at junit.framework.TestCase.runTest(TestCase.java:166)
         at junit.framework.TestCase.runBare(TestCase.java:140)
         at junit.framework.TestResult$1.protect(TestResult.java:106)
         at junit.framework.TestResult.runProtected(TestResult.java:124)
         at junit.framework.TestResult.run(TestResult.java:109)
         at junit.framework.TestCase.run(TestCase.java:131)
         at junit.framework.TestSuite.runTest(TestSuite.java:173)
         at junit.framework.TestSuite.run(TestSuite.java:168)
         at
    org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:329)
         at
    org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:218)
         at
    org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:151)
    NestedThrowablesStackTrace:
    java.io.NotSerializableException: com.mallesons.servicenet.aa.folder.Folder
         at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1205)
         at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:383)
         at java.util.HashMap.writeObject(HashMap.java:825)
         at java.lang.reflect.Method.invoke(Native Method)
         at
    java.io.ObjectOutputStream.invokeObjectWriter(ObjectOutputStream.java:1925)
         at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1267)
         at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:383)
         at
    com.solarmetric.kodo.impl.jdbc.schema.dict.AbstractDictionary.serialize(AbstractDictionary.java:680)
         at
    com.solarmetric.kodo.impl.jdbc.schema.dict.AbstractDictionary.blobToSQL(AbstractDictionary.java:384)
         at
    com.solarmetric.kodo.impl.jdbc.schema.dict.AbstractDictionary.blobToPreparedParameter(AbstractDictionary.java:1067)
         at
    com.solarmetric.kodo.impl.jdbc.schema.dict.SQLServerDictionary.blobToPreparedParameter(SQLServerDictionary.java:139)
         at
    com.solarmetric.kodo.impl.jdbc.schema.dict.AbstractDictionary.toPreparedParameter(AbstractDictionary.java:808)
         at
    com.solarmetric.kodo.impl.jdbc.sql.SQLValue.applyParameter(SQLValue.java:129)
         at
    com.solarmetric.kodo.impl.jdbc.sql.SQLBuffer.setParameters(SQLBuffer.java:239)
         at
    com.solarmetric.kodo.impl.jdbc.sql.SQLBuffer.setParameters(SQLBuffer.java:222)
         at
    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.prepareStatementInternal(SQLExecutionManagerImpl.java:824)
         at
    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executePreparedQueryInternal(SQLExecutionManagerImpl.java:761)
         at
    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executeQueryInternal(SQLExecutionManagerImpl.java:691)
         at
    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executeQuery(SQLExecutionManagerImpl.java:372)
         at
    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executeQuery(SQLExecutionManagerImpl.java:356)
         at
    com.solarmetric.kodo.impl.jdbc.ormapping.ClassMapping.selectPrimaryMappings(ClassMapping.java:1221)
         at
    com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.executeQuery(JDBCStoreManager.java:707)
         at
    com.solarmetric.kodo.impl.jdbc.runtime.JDBCQuery.executeQuery(JDBCQuery.java:93)
         at com.solarmetric.kodo.query.QueryImpl.executeWithMap(QueryImpl.java:792)
         at
    com.solarmetric.kodo.query.QueryImpl.executeWithArray(QueryImpl.java:668)
         at com.solarmetric.kodo.query.QueryImpl.execute(QueryImpl.java:609)
         at
    com.mallesons.servicenet.ta.shared.BOQuery.executeWithMap(BOQuery.java:159)
         at
    com.mallesons.servicenet.aa.folder.SearchEmailItemService.searchDirect(SearchEmailItemService.java:105)
         at
    com.mallesons.servicenet.aa.folder.SearchEmailItemService.searchIn(SearchEmailItemService.java:45)
         at
    com.mallesons.servicenet.aa.folder.test.SearchItemServiceTest.testCascadeFaxNoTime(SearchItemServiceTest.java:217)
         at java.lang.reflect.Method.invoke(Native Method)
         at junit.framework.TestCase.runTest(TestCase.java:166)
         at junit.framework.TestCase.runBare(TestCase.java:140)
         at junit.framework.TestResult$1.protect(TestResult.java:106)
         at junit.framework.TestResult.runProtected(TestResult.java:124)
         at junit.framework.TestResult.run(TestResult.java:109)
         at junit.framework.TestCase.run(TestCase.java:131)
         at junit.framework.TestSuite.runTest(TestSuite.java:173)
         at junit.framework.TestSuite.run(TestSuite.java:168)
         at
    org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:329)
         at
    org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:218)
         at
    org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:151)

Maybe you are looking for

  • ITunes won't recognize iPod, but Windows will...

    When I plug in my iPod a Windows folder comes up, showing the folders within the iPod, but iTunes doesn't recognize that it is connected. I have the latest iTunes(5.0) and iPod software. What's going on here? Also: Are there any advantages to defragm

  • Boot Mavericks and Snow Leopard

    Is it possible to have Mavericks and Snow Leopard installed and working on the same workstation? I have three disks and VMWare Fusion already on my machine. I want to run a bunch of hardware/software no longer compatible on Mavericks.

  • Writing form data to a database - Dreamweaver CS5

    Hi guys, I am fairly new to the whole PHP, MySQL thing. I was wondering if anyone can assist me. I am trying to find a nice book/tutorial or if any of you can assist I would be greatful. I have created a form page, for explanation purposes lets make

  • Servlet calling other servlets

    hi friends, I have got a servlet with a switch case option.There are in totality 9 options. When each option is chosen, it should call a separate servlet. How do i go about doing it. I tried res.sendRedirect("Servlet1"); But it dosent seem to work. I

  • No master data info objects' attributes in infoset

    Hi All, I am trying to create an infoset out of two ODSs. When I tried to create a report on this infoset, I cannot see the attributes of the master data info objects. What to do at this point? Regards, Mike