[
https://issues.apache.org/jira/browse/AMQ-5995?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15278208#comment-15278208
]
Volker Kleinschmidt commented on AMQ-5995:
------------------------------------------
At minimum there needs to be a release notes entry that tells everybody that
they must empty their message store before upgrading. And this requires no
external contributions.
> ActiveMQ exits on startup with UTFDataFormatException: bad string
> -----------------------------------------------------------------
>
> Key: AMQ-5995
> URL: https://issues.apache.org/jira/browse/AMQ-5995
> Project: ActiveMQ
> Issue Type: Bug
> Affects Versions: 5.12.0
> Reporter: Gijsbert van den Brink
>
> When upgrading from 5.11.1 to 5.12, ActiveMQ does not start and exits with an
> error (see full stack trace below). The issue occurs when ActiveMQ reads a
> message from the store (in my case an Oracle database using
> JDBCPersistenceAdapter) that was stored in 5.11.1 and tries to read in
> 5.12.0.
> Tim Bain sugested on the mailing list that maybe the Openwire format is
> incompatible between 5.11.1 and 5.12.0. One thing I noticed when debugging
> this is that 5.11.1 uses v6.MessageIdMarshaller, while 5.12.0 uses v11. Not
> sure if that has anything to do with this issue though.
> ERROR o.a.activemq.broker.BrokerService - Failed to start Apache ActiveMQ
> ([eda2e5a4c4d0, null], {})
> java.io.UTFDataFormatException: bad string
> at
> org.apache.activemq.util.DataByteArrayInputStream.readUTF(DataByteArrayInputStream.java:315)
> ~[activemq-client-5.12.0.jar:5.12.0]
> at
> org.apache.activemq.openwire.v11.BaseDataStreamMarshaller.looseUnmarshalString(BaseDataStreamMarshaller.java:571)
> ~[activemq-client-5.12.0.jar:5.12.0]
> at
> org.apache.activemq.openwire.v11.MessageIdMarshaller.looseUnmarshal(MessageIdMarshaller.java:122)
> ~[activemq-client-5.12.0.jar:5.12.0]
> at
> org.apache.activemq.openwire.OpenWireFormat.looseUnmarshalNestedObject(OpenWireFormat.java:473)
> ~[activemq-client-5.12.0.jar:5.12.0]
> at
> org.apache.activemq.openwire.v11.BaseDataStreamMarshaller.looseUnmarsalNestedObject(BaseDataStreamMarshaller.java:466)
> ~[activemq-client-5.12.0.jar:5.12.0]
> at
> org.apache.activemq.openwire.v11.MessageMarshaller.looseUnmarshal(MessageMarshaller.java:220)
> ~[activemq-client-5.12.0.jar:5.12.0]
> at
> org.apache.activemq.openwire.v11.ActiveMQMessageMarshaller.looseUnmarshal(ActiveMQMessageMarshaller.java:101)
> ~[activemq-client-5.12.0.jar:5.12.0]
> at
> org.apache.activemq.openwire.v11.ActiveMQObjectMessageMarshaller.looseUnmarshal(ActiveMQObjectMessageMarshaller.java:101)
> ~[activemq-client-5.12.0.jar:5.12.0]
> at
> org.apache.activemq.openwire.OpenWireFormat.doUnmarshal(OpenWireFormat.java:366)
> ~[activemq-client-5.12.0.jar:5.12.0]
> at
> org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:200)
> ~[activemq-client-5.12.0.jar:5.12.0]
> at
> org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.getLastMessageBrokerSequenceId(JDBCPersistenceAdapter.java:266)
> ~[activemq-jdbc-store-5.12.0.jar:5.12.0]
> at
> org.apache.activemq.broker.region.DestinationFactoryImpl.getLastMessageBrokerSequenceId(DestinationFactoryImpl.java:147)
> ~[activemq-broker-5.12.0.jar:5.12.0]
> at
> org.apache.activemq.broker.region.RegionBroker.<init>(RegionBroker.java:130)
> ~[activemq-broker-5.12.0.jar:5.12.0]
> at
> org.apache.activemq.broker.jmx.ManagedRegionBroker.<init>(ManagedRegionBroker.java:112)
> ~[activemq-broker-5.12.0.jar:5.12.0]
> at
> org.apache.activemq.broker.BrokerService.createRegionBroker(BrokerService.java:2297)
> ~[activemq-broker-5.12.0.jar:5.12.0]
> at
> org.apache.activemq.broker.BrokerService.createRegionBroker(BrokerService.java:2290)
> ~[activemq-broker-5.12.0.jar:5.12.0]
> at
> org.apache.activemq.broker.BrokerService.createBroker(BrokerService.java:2247)
> ~[activemq-broker-5.12.0.jar:5.12.0]
> at
> org.apache.activemq.broker.BrokerService.getBroker(BrokerService.java:981)
> ~[activemq-broker-5.12.0.jar:5.12.0]
> at
> org.apache.activemq.broker.BrokerService.getAdminConnectionContext(BrokerService.java:2518)
> ~[activemq-broker-5.12.0.jar:5.12.0]
> at
> org.apache.activemq.broker.BrokerService.startVirtualConsumerDestinations(BrokerService.java:2657)
> ~[activemq-broker-5.12.0.jar:5.12.0]
> at
> org.apache.activemq.broker.BrokerService.startDestinations(BrokerService.java:2509)
> ~[activemq-broker-5.12.0.jar:5.12.0]
> at
> org.apache.activemq.broker.BrokerService.doStartBroker(BrokerService.java:692)
> ~[activemq-broker-5.12.0.jar:5.12.0]
> at
> org.apache.activemq.broker.BrokerService.startBroker(BrokerService.java:684)
> ~[activemq-broker-5.12.0.jar:5.12.0]
> at
> org.apache.activemq.broker.BrokerService.start(BrokerService.java:605)
> ~[activemq-broker-5.12.0.jar:5.12.0]
> at
> org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:73)
> [activemq-spring-5.12.0.jar:5.12.0]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> ~[na:1.7.0_75]
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> ~[na:1.7.0_75]
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> ~[na:1.7.0_75]
> at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_75]
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1640)
> [spring-beans-3.2.11.RELEASE.jar:3.2.11.RELEASE]
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1581)
> [spring-beans-3.2.11.RELEASE.jar:3.2.11.RELEASE]
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1511)
> [spring-beans-3.2.11.RELEASE.jar:3.2.11.RELEASE]
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)
> [spring-beans-3.2.11.RELEASE.jar:3.2.11.RELEASE]
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
> [spring-beans-3.2.11.RELEASE.jar:3.2.11.RELEASE]
> at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
> [spring-beans-3.2.11.RELEASE.jar:3.2.11.RELEASE]
> at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
> [spring-beans-3.2.11.RELEASE.jar:3.2.11.RELEASE]
> at
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
> [spring-beans-3.2.11.RELEASE.jar:3.2.11.RELEASE]
> at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)
> [spring-beans-3.2.11.RELEASE.jar:3.2.11.RELEASE]
> at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:636)
> [spring-beans-3.2.11.RELEASE.jar:3.2.11.RELEASE]
> at
> org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:934)
> [spring-context-3.2.11.RELEASE.jar:3.2.11.RELEASE]
> at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
> [spring-context-3.2.11.RELEASE.jar:3.2.11.RELEASE]
> at
> org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:64)
> [xbean-spring-3.18.jar:3.18]
> at
> org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:52)
> [xbean-spring-3.18.jar:3.18]
> at
> org.apache.activemq.xbean.XBeanBrokerFactory$1.<init>(XBeanBrokerFactory.java:104)
> [activemq-spring-5.12.0.jar:5.12.0]
> at
> org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:104)
> [activemq-spring-5.12.0.jar:5.12.0]
> at
> org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:67)
> [activemq-spring-5.12.0.jar:5.12.0]
> at
> org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:71)
> [activemq-broker-5.12.0.jar:5.12.0]
> at
> org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:54)
> [activemq-broker-5.12.0.jar:5.12.0]
> at
> org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:87)
> [activemq-console-5.12.0.jar:5.12.0]
> at
> org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:62)
> [activemq-console-5.12.0.jar:5.12.0]
> at
> org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:154)
> [activemq-console-5.12.0.jar:5.12.0]
> at
> org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:62)
> [activemq-console-5.12.0.jar:5.12.0]
> at
> org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:104)
> [activemq-console-5.12.0.jar:5.12.0]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> ~[na:1.7.0_75]
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> ~[na:1.7.0_75]
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> ~[na:1.7.0_75]
> at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_75]
> at org.apache.activemq.console.Main.runTaskClass(Main.java:262)
> [activemq.jar:5.12.0]
> at org.apache.activemq.console.Main.main(Main.java:115)
> [activemq.jar:5.12.0]
> 2015-09-12 12:05:45,323 INFO o.a.activemq.broker.BrokerService - Apache
> ActiveMQ 5.12.0 (eda2e5a4c4d0, null) is shutting down
> 2015-09-12 12:05:45,324 INFO o.a.a.broker.TransportConnector - Connector
> openwire stopped
> See also:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-exits-on-startup-with-UTFDataFormatException-bad-string-tc4701955.html
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)