在用于JBoss EAP 7.0.x的standalone-full.xml中,我有一个ActiveMQ资源适配器,在其中放置了ActiveMQ连接URL。我的ActiveMQ连接URL有多个选项,根据ActiveMQ语法,使用&来连接选项。例如:
故障转移:(tcp:// localhost:61616)?startupMaxReconnectAttempts = 15&jms.useCompression = true
11:13:19,593 ERROR [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0055: Caught exception during boot: org.jboss.as.controller.persistence.ConfigurationPersistenceException: WFLYCTL0085: Failed to parse configuration
at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:131)
at org.jboss.as.server.ServerService.boot(ServerService.java:362)
at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:301)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.xml.stream.XMLStreamException: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '=' (code 61); expected a semi-colon after the reference for entity 'jms.useCompression'
at [row,col {unknown-source}]: [407,107]
at org.jboss.as.connector.subsystems.resourceadapters.ResourceAdapterSubsystemParser.readElement(ResourceAdapterSubsystemParser.java:461)
at org.jboss.as.connector.subsystems.resourceadapters.ResourceAdapterSubsystemParser.readElement(ResourceAdapterSubsystemParser.java:123)
at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:110)
at org.jboss.staxmapper.XMLExtendedStreamReaderImpl.handleAny(XMLExtendedStreamReaderImpl.java:69)
at org.jboss.as.server.parsing.StandaloneXml_4.parseServerProfile(StandaloneXml_4.java:546)
at org.jboss.as.server.parsing.StandaloneXml_4.readServerElement(StandaloneXml_4.java:242)
at org.jboss.as.server.parsing.StandaloneXml_4.readElement(StandaloneXml_4.java:141)
at org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:103)
at org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:49)
at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:110)
at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:69)
at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:123)
... 3 more
Caused by: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '=' (code 61); expected a semi-colon after the reference for entity 'jms.useCompression'
at [row,col {unknown-source}]: [407,107]
at com.ctc.wstx.sr.StreamScanner.throwUnexpectedChar(StreamScanner.java:647)
at com.ctc.wstx.sr.StreamScanner.parseEntityName(StreamScanner.java:2066)
at com.ctc.wstx.sr.StreamScanner.fullyResolveEntity(StreamScanner.java:1525)
at com.ctc.wstx.sr.BasicStreamReader.readTextSecondary(BasicStreamReader.java:4701)
at com.ctc.wstx.sr.BasicStreamReader.readCoalescedText(BasicStreamReader.java:4146)
at com.ctc.wstx.sr.BasicStreamReader.getElementText(BasicStreamReader.java:683)
at org.jboss.staxmapper.XMLExtendedStreamReaderImpl.getElementText(XMLExtendedStreamReaderImpl.java:144)
at org.jboss.as.connector.util.AbstractParser.rawElementText(AbstractParser.java:61)
at org.jboss.as.connector.subsystems.resourceadapters.CommonIronJacamarParser.parseConfigProperties(CommonIronJacamarParser.java:121)
at org.jboss.as.connector.subsystems.resourceadapters.ResourceAdapterParser.parseResourceAdapter(ResourceAdapterParser.java:311)
at org.jboss.as.connector.subsystems.resourceadapters.ResourceAdapterParser.parseResourceAdapters(ResourceAdapterParser.java:138)
at org.jboss.as.connector.subsystems.resourceadapters.ResourceAdapterParser.parse(ResourceAdapterParser.java:104)
at org.jboss.as.connector.subsystems.resourceadapters.ResourceAdapterSubsystemParser.readElement(ResourceAdapterSubsystemParser.java:452)
... 14 more
我想知道是否有人遇到并解决了这个问题?
答案 0 :(得分:0)
您需要使用&
而不是仅使用'&',如下所示:
failover:(tcp://localhost:61616)?startupMaxReconnectAttempts=15&jms.useCompression=true