[
https://jira.jboss.org/browse/JBESB-3517?page=com.atlassian.jira.plugin.s...
]
Kevin Conner commented on JBESB-3517:
-------------------------------------
There are a couple of issues with this test.
The XML file is being parsed and decoded (on your system) using the cp1252 character set,
part of which is to replace the 0x85 characters with ellipsis, i.e. 0x2026. When this
string reaches the groovy script it is then being converted into bytes, at which point the
0x2026 character is truncated to 0x26 (&). It is this truncation, coupled with the
original encoding, that is causing the error as reported.
To get this to parse correctly it should be sufficient to change the groovy script to
def messageText = message.getBody().get();
def soaRequest = new XmlParser().parseText(messageText);
However this does *not* mean that the string reflects the original file contents due to
the cp1252 encoding.
Also, the 0x85 character is not a valid UTF-8 character sequence and should be replaced by
0xc2 0x82 if you require that character within your XML.
NELL(0x85) character causes exception with groovy XML Parser in ESB
5.0 GA7cp
-----------------------------------------------------------------------------
Key: JBESB-3517
URL:
https://jira.jboss.org/browse/JBESB-3517
Project: JBoss ESB
Issue Type: Bug
Security Level: Public(Everyone can see)
Affects Versions: 4.7 CP1
Environment: RHEL 64bit
Reporter: Dave Siracusa
Priority: Minor
Attachments: boot.log, helloworld.NELL.zip, server.log
The script below fails with a legal UTF-8 document.
Parsing from a custom Java action works just fine (workaround).
Perusal of apache.xerces site indicates that an earlier version of the parser had
problems with NELL, and other characters. I'm not sure this is related.
--------------------------------------------------------------------------------------
org.jboss.soa.esb.actions.ActionProcessingException: Error executing Groovy script.
at
org.jboss.soa.esb.actions.scripting.GroovyActionProcessor.process(GroovyActionProcessor.java:161)
at sun.reflect.GeneratedMethodAccessor719.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.yellowbook.soa.esb.actions.proxy.ActionProxy.process(ActionProxy.java:244)
at sun.reflect.GeneratedMethodAccessor506.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.jboss.soa.esb.listeners.message.ActionProcessorMethodInfo.processMethods(ActionProcessorMethodInfo.java:102)
at
org.jboss.soa.esb.listeners.message.OverriddenActionLifecycleProcessor.process(OverriddenActionLifecycleProcessor.java:74)
at
org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.processPipeline(ActionProcessingPipeline.java:634)
at
org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.processPipeline(ActionProcessingPipeline.java:588)
at
org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.process(ActionProcessingPipeline.java:419)
at
org.jboss.soa.esb.listeners.message.MessageAwareListener$TransactionalRunner.run(MessageAwareListener.java:540)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.xml.sax.SAXParseException: The entity name must immediately follow the
'&' in the entity reference.
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at groovy.util.XmlParser.parse(XmlParser.java:172)
at groovy.util.XmlParser.parseText(XmlParser.java:205)
at sun.reflect.GeneratedMethodAccessor721.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:226)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:899)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:740)
at org.codehaus.groovy.runtime.InvokerHelper.invokePojoMethod(InvokerHelper.java:765)
at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:753)
at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:167)
at Script1.run(Script1.groovy:5)
at
org.jboss.soa.esb.actions.scripting.GroovyActionProcessor.process(GroovyActionProcessor.java:150)
... 16 more
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira