Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 99431 invoked from network); 14 Feb 2009 18:44:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Feb 2009 18:44:46 -0000 Received: (qmail 40190 invoked by uid 500); 14 Feb 2009 18:44:45 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 40162 invoked by uid 500); 14 Feb 2009 18:44:45 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 40150 invoked by uid 99); 14 Feb 2009 18:44:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 14 Feb 2009 10:44:45 -0800 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 14 Feb 2009 18:44:37 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1LYPUt-00060v-L3 for dev@activemq.apache.org; Sat, 14 Feb 2009 10:44:15 -0800 Message-ID: <22015587.post@talk.nabble.com> Date: Sat, 14 Feb 2009 10:44:15 -0800 (PST) From: "rstacy@zcorum.com" To: dev@activemq.apache.org Subject: Re: [jira] Created: (AMQ-2083) java.io.OptionalDataException when getting a deeply nested HashMap from an ObjectMessage In-Reply-To: <998116609.1232533259459.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: rstacy@zcorum.com References: <998116609.1232533259459.JavaMail.jira@brutus> X-Virus-Checked: Checked by ClamAV on apache.org I get this error as well but my hashmap is not deeply nested and there are no primitive values in it. It happen very rarely though. Maybe 1 in 20,000 plus messages. Any insights into fixes or workarounds available? -Rob JIRA jira@apache.org wrote: > > java.io.OptionalDataException when getting a deeply nested HashMap from an > ObjectMessage > ---------------------------------------------------------------------------------------- > > Key: AMQ-2083 > URL: https://issues.apache.org/activemq/browse/AMQ-2083 > Project: ActiveMQ > Issue Type: Bug > Affects Versions: 5.2.0 > Environment: JRE 1.5.0_12 > Reporter: Martin Haslinger > > > In rare occasions getting a HashMap from an ObjectMessage leads to the > following error: > > javax.jms.JMSException: Failed to build body from bytes. Reason: > java.io.OptionalDataException > at > org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:35) > at > org.apache.activemq.command.ActiveMQObjectMessage.getObject(ActiveMQObjectMessage.java:183) > Caused by: java.io.OptionalDataException > at java.io.ObjectInputStream.readObject0(Unknown Source) > at java.io.ObjectInputStream.readObject(Unknown Source) > at java.util.HashMap.readObject(Unknown Source) > at sun.reflect.GeneratedMethodAccessor57.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > at java.lang.reflect.Method.invoke(Unknown Source) > at java.io.ObjectStreamClass.invokeReadObject(Unknown Source) > at java.io.ObjectInputStream.readSerialData(Unknown Source) > at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source) > at java.io.ObjectInputStream.readObject0(Unknown Source) > at java.io.ObjectInputStream.readObject(Unknown Source) > at java.util.HashMap.readObject(Unknown Source) > at sun.reflect.GeneratedMethodAccessor57.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > at java.lang.reflect.Method.invoke(Unknown Source) > at java.io.ObjectStreamClass.invokeReadObject(Unknown Source) > at java.io.ObjectInputStream.readSerialData(Unknown Source) > at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source) > at java.io.ObjectInputStream.readObject0(Unknown Source) > at java.io.ObjectInputStream.readObject(Unknown Source) > at java.util.HashMap.readObject(Unknown Source) > at sun.reflect.GeneratedMethodAccessor57.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > at java.lang.reflect.Method.invoke(Unknown Source) > at java.io.ObjectStreamClass.invokeReadObject(Unknown Source) > at java.io.ObjectInputStream.readSerialData(Unknown Source) > at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source) > at java.io.ObjectInputStream.readObject0(Unknown Source) > at java.io.ObjectInputStream.readObject(Unknown Source) > at > org.apache.activemq.command.ActiveMQObjectMessage.getObject(ActiveMQObjectMessage.java:177) > ... 8 more > > The only difference in the testing application to all other messages is > that the object is a deeply nested map, it is: HashMap HashMap>> > > Alltough the OptionalDataException indicates some primitive values being > written somewhere, there are absolute no primitive values around there. > > -- > This message is automatically generated by JIRA. > - > You can reply to this email to add a comment to the issue online. > > > -- View this message in context: http://www.nabble.com/-jira--Created%3A-%28AMQ-2083%29-java.io.OptionalDataException-when-getting-a-deeply-nested-HashMap-from-an-ObjectMessage-tp21580409p22015587.html Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.