Bug 1128756 - Camel bindy crashing, depending on packaging
Summary: Camel bindy crashing, depending on packaging
Alias: None
Product: JBoss Fuse Service Works 6
Classification: JBoss
Component: 3rd Party, SwitchYard, Camel
Version: 6.0.0 GA
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: ---
Assignee: Tomohisa Igarashi
QA Contact: Matej Melko
Depends On:
TreeView+ depends on / blocked
Reported: 2014-08-11 13:35 UTC by gbonocor
Modified: 2019-05-20 11:15 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1132969 (view as bug list)
Last Closed:
Type: Bug

Attachments (Terms of Use)
reproducer sources (34.04 KB, application/zip)
2014-08-11 13:35 UTC, gbonocor
no flags Details
infile (324 bytes, text/plain)
2014-08-22 12:57 UTC, gbonocor
no flags Details
Another reproducer (war version) (10.65 KB, application/zip)
2015-04-01 06:56 UTC, Tadayoshi Sato
no flags Details

System ID Priority Status Summary Last Updated
JBoss Issue Tracker SWITCHYARD-2626 Major Resolved JBoss7PackageScanClassResolver doesn't look into war archive 2015-11-02 09:12:47 UTC

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):


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]

Comment 2 Tadayoshi Sato 2015-04-01 06:54:28 UTC
This should be the root cause:

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

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