Created attachment 994622 [details] Reproducer Description of problem: There is a problem when I want create Switchyard rules component from Decision Table which is in CSV format. Builder thinks that file's format is XLS and try it parses. The consequence is thrown exception: java.lang.IllegalArgumentException: Your InputStream was neither an OLE2 stream, nor an OOXML stream at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:75)[368:org.apache.servicemix.bundles.poi:3.9.0.2] at org.drools.decisiontable.parser.xls.ExcelParser.parseFile(ExcelParser.java:82)[369:org.drools.decisiontables:6.1.0.20140801-1612] ... Version-Release number of selected component (if applicable): JBoss Fuse 6.1.0.redhat-379 + Switchyard 2.0.0.Aplha3 (community version) How reproducible: Attached maven project with a reproducer (100%). Steps to Reproduce: Build attached maven project by command: mvn clean install. Deploy the reproducer on JBoss Fuse: 1. features:addurl mvn:com.example.switchyard/switchyard-dtables/0.0.1-SNAPSHOT/xml/features 2. features:install switchyard-dtables 3. log:display Actual results: Unable to start switchyard for bundle com.example.switchyard.switchyard-dtables. Full error log is enclosed. Expected results: Switchyard application is successfully deployed. Additional info: Expected problem is in function compileStream of class DecisionTableProviderImpl which passed parameter DecisionTableConfiguration configuration is null instead of a correct configuration with input type CSV.
Created attachment 994625 [details] error log
I tested this example in the switchyard 2.0.1-ER1 version and it was working. YOu can take a look to my comment, and to the code i used here: https://issues.jboss.org/browse/SWITCHYARD-2583
Created attachment 997826 [details] Reproducer-2.0.1-ER1
I looked at it and I found that this problem exists also in SW 2.0.1-ER1. Example does not throw an error because it is waiting for the CSA component, which I forgot to add to features.xml. I modified the example to make it correctly working. See the attachments. Steps to reproduce: 1. mvn clean install 2. Deploy in karaf: a. features:addurl mvn:com.example.switchyard/switchyard-dtables/0.0.1-SNAPSHOT/xml/features b. features:install switchyard-dtables 3. mvn exec:java
I got it now. It seems that It is an error in drools. I am checking with one of the drools developers. It is getting throw when it is called: _runtimeEnvironment.addAsset(asset, type); The asset is a Resource that points to the csv file and the type is DecisionTable.
The problem is in how jbpm adds a csv resource to the drools knowldge builder. I sent a pull request to the jbpm project that should fix this problem: https://github.com/droolsjbpm/jbpm/pull/238
I have verified that issue id fixed for: switchyard version = 2.0.1.redhat-621084 Integration pack version = 1.3.0.redhat-002 I had to apply a small patch (patch.diff) on reproducer "Reproducer-2.0.1-ER1". I will attach it.
Created attachment 1106338 [details] Patch for Reproducer-2.0.1-ER1
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.