Description of problem:
Audit View fails to open logs which include a ruleflow and multibyte chars in the XML (e.g. property of a fact). And it throws the Exception.
So far this is only reproducibe with the combination of UTF-8 log + ruleflow + JBDS on MS932 Windows.
====
!ENTRY org.drools.eclipse 4 120 2014-09-01 15:42:43.313
!MESSAGE Internal error in Drools Plugin:
!STACK 0
com.thoughtworks.xstream.converters.ConversionException: : end tag name </org.drools.core.audit.event.ActivationLogEvent> must match start tag name <rule> from line 118 (position: TEXT seen ...ctHandleIds>\n </org.drools.core.audit.event.ActivationLogEvent>... @122:54) : : end tag name </org.drools.core.audit.event.ActivationLogEvent> must match start tag name <rule> from line 118 (posi\
tion: TEXT seen ...ctHandleIds>\n </org.drools.core.audit.event.ActivationLogEvent>... @122:54)
---- Debugging information ----
message : : end tag name </org.drools.core.audit.event.ActivationLogEvent> must match start tag name <rule> from line 118 (position: TEXT seen ...ctHandleIds>\n </org.drools.core.audit.event.ActivationLogEvent>... @122:54)
cause-exception : com.thoughtworks.xstream.io.StreamException
cause-message : : end tag name </org.drools.core.audit.event.ActivationLogEvent> must match start tag name <rule> from line 118 (position: TEXT seen ...ctHandleIds>\n </org.drools.core.audit.event.ActivationLogEvent>... @122:54)
class : org.drools.core.audit.event.ActivationLogEvent
required-type : org.drools.core.audit.event.ActivationLogEvent
converter-type : com.thoughtworks.xstream.converters.reflection.ReflectionConverter
path : /org.drools.core.audit.WorkingMemoryLog/events/org.drools.core.audit.event.ActivationLogEvent[4]/rule
line number : 122
class[1] : java.util.ArrayList
converter-type[1] : com.thoughtworks.xstream.converters.collections.CollectionConverter
class[2] : org.drools.core.audit.WorkingMemoryLog
version : 1.4.7
-------------------------------
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:79)
at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.readItem(AbstractCollectionConverter.java:71)
at com.thoughtworks.xstream.converters.collections.CollectionConverter.addCurrentElementToCollection(CollectionConverter.java:98)
at com.thoughtworks.xstream.converters.collections.CollectionConverter.populateCollection(CollectionConverter.java:91)
at com.thoughtworks.xstream.converters.collections.CollectionConverter.populateCollection(CollectionConverter.java:85)
at com.thoughtworks.xstream.converters.collections.CollectionConverter.unmarshal(CollectionConverter.java:80)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshallField(AbstractReflectionConverter.java:474)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:406)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:257)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:134)
at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)
at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1185)
at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1157)
at com.thoughtworks.xstream.XStream$4.readFromStream(XStream.java:1851)
at com.thoughtworks.xstream.core.util.CustomObjectInputStream.readObjectOverride(CustomObjectInputStream.java:120)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:344)
at org.drools.eclipse.debug.AuditView.refresh(AuditView.java:123)
at org.drools.eclipse.debug.AuditView.setLogFile(AuditView.java:104)
at org.drools.eclipse.debug.actions.FileAuditDropAdapter.performDrop(FileAuditDropAdapter.java:39)
at org.eclipse.jface.viewers.ViewerDropAdapter.drop(ViewerDropAdapter.java:276)
at org.eclipse.swt.dnd.DNDListener.handleEvent(DNDListener.java:90)
...
Caused by: com.thoughtworks.xstream.io.StreamException: : end tag name </org.drools.core.audit.event.ActivationLogEvent> must match start tag name <rule> from line 118 (position: TEXT seen ...ctHandleIds>\n </org.drools.core.audit.event.ActivationLogEvent>... @122:54)
at com.thoughtworks.xstream.io.xml.XppReader.pullNextEvent(XppReader.java:124)
at com.thoughtworks.xstream.io.xml.AbstractPullReader.readRealEvent(AbstractPullReader.java:148)
at com.thoughtworks.xstream.io.xml.AbstractPullReader.readEvent(AbstractPullReader.java:141)
at com.thoughtworks.xstream.io.xml.AbstractPullReader.move(AbstractPullReader.java:118)
at com.thoughtworks.xstream.io.xml.AbstractPullReader.moveUp(AbstractPullReader.java:113)
at com.thoughtworks.xstream.io.ReaderWrapper.moveUp(ReaderWrapper.java:40)
at com.thoughtworks.xstream.io.path.PathTrackingReader.moveUp(PathTrackingReader.java:42)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:454)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:257)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
... 68 more
Caused by: org.xmlpull.v1.XmlPullParserException: end tag name </org.drools.core.audit.event.ActivationLogEvent> must match start tag name <rule> from line 118 (position: TEXT seen ...ctHandleIds>\n </org.drools.core.audit.event.ActivationLogEvent>... @122:54)
at org.xmlpull.mxp1.MXParser.parseEndTag(MXParser.java:1689)
at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1131)
at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)
at com.thoughtworks.xstream.io.xml.XppReader.pullNextEvent(XppReader.java:109)
... 77 more
====
Steps to Reproduce:
1. Open "Audit" View
2. Copy the attached ruleflow_2_utf8.log to your JBDS project
3. Drag&Drop ruleflow_1_ascii.log to the "Audit" View (Openning the log via "Open Log" button has the same result)
Actual results:
"Audit" View has no effect.
java.util.EmptyStackException is logged in ${WORKSPACE}/.metadata/.log
Expected results:
"Audit" View opens the log.
Additional info:
It can be worked around this issue by setting -Dfile.encoding=UTF-8 for JBDS (jbdevstudio.ini). Consecutively you will hit BZ1135925 but it is out of scope of this BZ.
- is blocked by
-
RHBPMS-1364 Audit log can't be opened when Business Rule Task is used
- Verified