Bug 1028614 - Adding FILE / THREADED_FILE Logger leads to "ava.lang.ClassNotFoundException: org.xmlpull.v1.XmlPullParserException"
Adding FILE / THREADED_FILE Logger leads to "ava.lang.ClassNotFoundException:...
Product: JBoss Fuse Service Works 6
Classification: JBoss
Component: Rules / jBPM integration (Show other bugs)
Unspecified Unspecified
unspecified Severity medium
: ---
: 6.1.0
Assigned To: David Ward
Matej Melko
Depends On:
  Show dependency treegraph
Reported: 2013-11-08 16:20 EST by Jochen Cordes
Modified: 2015-11-02 03:03 EST (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
If you add a THREADED_FILE or FILE Logger to a rule service, an "ava.lang.ClassNotFoundException: org.xmlpull.v1.XmlPullParserException" is recorded in the log file when you attempt to process your rules. There is a detailed workaround available on the bug ticket.
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Example project (2.27 KB, application/x-gzip)
2013-11-08 16:20 EST, Jochen Cordes
no flags Details

External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker SWITCHYARD-2498 Major Resolved Adding FILE / THREADED_FILE Logger leads to "ava.lang.ClassNotFoundException: org.xmlpull.v1.XmlPullParserException" 2015-07-08 05:02:19 EDT

  None (edit)
Description Jochen Cordes 2013-11-08 16:20:43 EST
Created attachment 821781 [details]
Example project

Description of problem:

When adding a THREADED_FILE or FILE Logger to a Rule Service I get a "ava.lang.ClassNotFoundException: org.xmlpull.v1.XmlPullParserException" during processing

Version-Release number of selected component (if applicable):

FSW 6.0.0 Beta

How reproducible:


Steps to Reproduce:
1. In the attached project change the log path by going to the Rules Compent -> Properties -> Advanced -> Loggers and modify the value in the log column
2. mkdir inbox
3. Deploy the attached project
3. cp src/test/resources/test.csv inbox/

Actual results:

An error is shown in the console:

13:26:54,959 ERROR [org.drools.core.audit.WorkingMemoryFileLogger] (Thread-124) error: java.lang.NoClassDefFoundError: org/xmlpull/v1/XmlPullParserException
	at com.thoughtworks.xstream.XStream.<init>(XStream.java:336)
	at org.drools.core.audit.WorkingMemoryFileLogger.writeToDisk(WorkingMemoryFileLogger.java:124) [drools-core-6.0.0-redhat-4.jar:6.0.0-redhat-4]
	at org.drools.core.audit.ThreadedWorkingMemoryFileLogger.writeToDisk(ThreadedWorkingMemoryFileLogger.java:54) [drools-core-6.0.0-redhat-4.jar:6.0.0-redhat-4]
	at org.drools.core.audit.ThreadedWorkingMemoryFileLogger$Writer.run(ThreadedWorkingMemoryFileLogger.java:69) [drools-core-6.0.0-redhat-4.jar:6.0.0-redhat-4]
	at java.lang.Thread.run(Thread.java:679) [rt.jar:1.6.0_24]
Caused by: java.lang.ClassNotFoundException: org.xmlpull.v1.XmlPullParserException from [Module "com.thoughtworks.xstream:main" from local module loader @21aed5f9 (finder: local module finder @5d61dfb5 (roots: /NotBackedUp/jcordes/fsw/jboss-eap-6.1/modules,/NotBackedUp/jcordes/fsw/jboss-eap-6.1/modules/system/layers/soa,/NotBackedUp/jcordes/fsw/jboss-eap-6.1/modules/system/layers/sramp,/NotBackedUp/jcordes/fsw/jboss-eap-6.1/modules/system/layers/base))]
	at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:196) [jboss-modules.jar:1.2.0.Final-redhat-1]
	at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:444) [jboss-modules.jar:1.2.0.Final-redhat-1]
	at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:432) [jboss-modules.jar:1.2.0.Final-redhat-1]
	at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:399) [jboss-modules.jar:1.2.0.Final-redhat-1]
	at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:374) [jboss-modules.jar:1.2.0.Final-redhat-1]
	at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:119) [jboss-modules.jar:1.2.0.Final-redhat-1]

Expected results:

Rule is executed without errors and result is logged

Additional info:

I have fixed this by adding a module and changing the xstream one:


<module xmlns="urn:jboss:module:1.0" name="com.thoughtworks.xstream">
        <resource-root path="xstream-1.4.3.jar"/>
        <module name="javax.api"/>

Downloaded http://mvnrepository.com/artifact/xmlpull/xmlpull/ into modules/system/layers/soa/org/xmlpull/main

Created modules/system/layers/soa/org/xmlpull/main/module.xml

<module xmlns="urn:jboss:module:1.0" name="org.xmlpull">
        <resource-root path="xmlpull-"/>
        <module name="javax.api"/>

Changed modules/system/layers/soa/com/thoughtworks/xstream/main/module.xml

<module xmlns="urn:jboss:module:1.0" name="com.thoughtworks.xstream">
        <resource-root path="xstream-1.4.3.jar"/>
        <module name="javax.api"/>
 	<module name="org.xmlpull"/>

Afterwards the error disappeared and information appeared in the log.

There is a similar issue reported here: https://bugzilla.redhat.com/show_bug.cgi?id=991526. This one may propose a different fix for EAP 6.2
Comment 2 Len DiMaggio 2013-11-11 12:13:23 EST
Jochen - can you set the severity value for this bugzilla? Thanks!
Comment 3 Jochen Cordes 2013-11-11 12:17:52 EST
I have set it to medium as a workaround exist. However IMO this is really needed for debugging rules component in FSW.
Comment 5 Anne-Louise Tangring 2014-06-19 14:45:59 EDT
This is likely fixed in the Drools modules. Verify.
Comment 6 Rob Cernich 2014-10-21 09:46:48 EDT
Hey David, could you please verify that this is fixed in FSW 6.1?  Thanks in advance.
Comment 7 David Ward 2015-01-13 16:22:35 EST
Adding link to jira: SWITCHYARD-2498
Comment 8 David Ward 2015-01-14 13:10:54 EST
Pull request with fix added to jira: SWITCHYARD-2498

Note You need to log in before you can comment on or make changes to this bug.