In 1.2.0 RC2, the
com.babeldoc.conversion.flatfile.digester.DigesterConvers
ionUnmarshaller.java class references Field.addCsvField()
on (or about) line 481. The Field class has no such
method.
This should be Field.addCsvFields() instead (note the
plural).
Logged In: YES
user_id=547388
Please confirm this on the 1.2.0 release... I see no such method
on the class com.babeldoc.conversion.flatfile.digester.Field class.
Logged In: YES
user_id=737852
Confirming, this is in 1.2.0 RC2.
However, the problem is associated with the addCsvFields()
method on:
com.babeldoc.conversion.flatfile.digester.LineSegment.java
Sorry for the bogus indirection. My mistake.
-Mitch
Logged In: YES
user_id=547388
Huh - now I am really confused.
The LineSegment class has these methods:
addCsvField (line 239)
setCsvFields (line 112)
Try to explain again for slow minds or, even better, supply a patch.
regards,
Bruce.
Logged In: YES
user_id=737852
Actually, I'd prefer to supply a patch, but I must admit I don't
know how (can you point me to some instructions?)
Your on the right track though. As you state, the
LineSegment class only contains addCsvFields (line 239, note
the plural).
Now, if you look at
com.babeldoc.conversion.flatfile.digester.DigesterConversionU
nmarshaller.java, line 478, you'll see a reference to
addCsvField (no plural). *This* is the problem. There is a
second reference on line 486.
It may seem confusing because this reference is nowhere
near a LineSegment object. However, digester.addSetNext()
looks for the specified pattern in the XML document and calls
the specified method (addCsvField) on the "top - 1" object on
the object stack. If you look back at
DigesterConversionUnmarshaller line 445 you'll see a
LineSegment object is pushed on the stack. Now, when the
Digester sees the following pattern in the XML document:
"conversion/line-segments/segment/csv-fields/field"
it attempts to call addCsvField (no plural) on the top-1 object
on the stack (a LineSegment object) resulting in a
NoSuchMethod runtime exception.
To reproduce, you will need to process a segmented-line CSV
file. This problem doesn't affect a positional (non-CSV)
segmented-line file.
I hope this helps.
P.S. Are there any instructions for integrating the BabelDoc
source into an IDE (specifically Eclipse)? I haven't had time
to figure out how to use the IDE's incremental build with the
BabelDoc source.