Bug 1128756

Summary: Camel bindy crashing, depending on packaging
Product: [JBoss] JBoss Fuse Service Works 6 Reporter: gbonocor
Component: 3rd Party, SwitchYard, CamelAssignee: Tomohisa Igarashi <toigaras>
Status: MODIFIED --- QA Contact: Matej Melko <mmelko>
Severity: high Docs Contact:
Priority: high    
Version: 6.0.0 GACC: aileenc, ganandan, gbonocor, kejohnso, soa-p-jira, tasato, tcunning
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1132969 (view as bug list) 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
reproducer sources
none
infile
none
Another reproducer (war version) none

Description gbonocor 2014-08-11 13:35:16 UTC
Created attachment 925758 [details]
reproducer sources

Description of problem:

In a simple camel route, that use bindy for unmarshalling CSV to Pojo, unmarshal fails if @CsvRecord annotated classes are deployed in a different JAR from the one containing the route (while both are deployed inside an EAR)camel-bindy-2.10.0.redhat-60024.jar

If everything got packaged in the same jar, the same code works

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

camel-bindy-2.10.0.redhat-60024


How reproducible:

Deploy attached EAR inside an FSW 6.0 with bindy module.
Or create a new route that use bindy to unmarshal CSV to pojo, then deploy it keeping @CSVRecord annotated classes in a different JAR from the one containing Camel route.


Steps to Reproduce:
1. Add the bindy module (version 2.10.0.redhat-60024) to FSW
2. Start FSW
3. Deploy the attached EAR 
4. Put the attached csv "infile" in /tmp folder
5. Check the log for errors

Actual results:

the unmarshal fails with errors similar to:

14:15:24,741 WARN  [com.redhat.CamelServiceRoute] (Camel (camel-1) thread #1 - file:///tmp) Failed to handle infile: java.lang.IllegalArgumentException: The separator has not been defined in the annotation @CsvRecord or not instantiated during initModel. must be specified
	at org.apache.camel.util.ObjectHelper.notNull(ObjectHelper.java:295) [camel-core-2.10.0.redhat-60061.jar:2.10.0.redhat-60061]
	at org.apache.camel.dataformat.bindy.csv.BindyCsvDataFormat.unmarshal(BindyCsvDataFormat.java:125) [camel-bindy-2.10.0.redhat-60024.jar:2.10.0.redhat-60024]


Expected results:

Unmarshal successful

Additional info:

Comment 1 gbonocor 2014-08-22 12:57:24 UTC
Created attachment 929584 [details]
infile

Comment 2 Tadayoshi Sato 2015-04-01 06:54:28 UTC
This should be the root cause:
https://issues.jboss.org/browse/SWITCHYARD-2626

Comment 3 Tadayoshi Sato 2015-04-01 06:56:56 UTC
Created attachment 1009504 [details]
Another reproducer (war version)