Bug 1028614

Summary: Adding FILE / THREADED_FILE Logger leads to "ava.lang.ClassNotFoundException: org.xmlpull.v1.XmlPullParserException"
Product: [JBoss] JBoss Fuse Service Works 6 Reporter: Jochen Cordes <jcordes>
Component: Rules / jBPM integrationAssignee: David Ward <dward>
Status: MODIFIED --- QA Contact: Matej Melko <mmelko>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.0.0CC: aileenc, jcordes, ldimaggi, rcernich, serviceworks, soa-p-jira, tschan+redhat
Target Milestone: ---   
Target Release: 6.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
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: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Example project none

Description Jochen Cordes 2013-11-08 21:20:43 UTC
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:

Always

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:

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

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

Downloaded http://mvnrepository.com/artifact/xmlpull/xmlpull/1.1.3.1/xmlpull-1.1.3.1.jar 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">
    <resources>
        <resource-root path="xmlpull-1.1.3.1.jar"/>
    </resources>
    <dependencies>
        <module name="javax.api"/>
    </dependencies>
</module>

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

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

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 17:13:23 UTC
Jochen - can you set the severity value for this bugzilla? Thanks!

Comment 3 Jochen Cordes 2013-11-11 17:17:52 UTC
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 18:45:59 UTC
This is likely fixed in the Drools modules. Verify.

Comment 6 Rob Cernich 2014-10-21 13:46:48 UTC
Hey David, could you please verify that this is fixed in FSW 6.1?  Thanks in advance.

Comment 7 David Ward 2015-01-13 21:22:35 UTC
Adding link to jira: SWITCHYARD-2498

Comment 8 David Ward 2015-01-14 18:10:54 UTC
Pull request with fix added to jira: SWITCHYARD-2498