This is an error where I have been working on for too long.
And in fact it has a very easy solution.
I was building my application that I already mentioned in a previous post.
When I tested the xsl file(in the xsl file right click and choose test), everything looked fine and no problem occurred.
But when I deployed the application into my application server and I wanted to upload the content of the csv file into the database, I always received an error.
For the solution read more…
This was the error I received:
nested exception is: ORABPEL-11616 DBWriteInteractionSpec Execute Failed Exception. insert failed. Descriptor name: [DBTank.PersonFuelCosts]. Caused by Uitzondering [TOPLINK-3001] (Oracle TopLink – 10g Release 3 (10.1.3.3.0) (Build 070608)): oracle.toplink.exceptions.ConversionException Omschrijving uitzondering: Het object [50,1], van klasse [class java.lang.String], kon niet worden geconverteerd naar [class java.math.BigDecimal]. Interne uitzondering: java.lang.NumberFormatException. at oracle.tip.adapter.fw.wsif.jca.WSIFOperation_JCA.executeRequestResponseOperation
Reading this error message I believed that there was something wrong with the translation from my csv content into the database, and that this was caused by a declaration in one of the xsd files. The type of the variable in the xsd file in the csv file was a ‘String’, but for the xsd file for the database adapter the type was ‘decimal’.
I replaced the types in the xsd files with different kinds of other types, but this didn’t changed a thing, I still received the error message.
After a lot of searching and testing I found out that, when I changed the value in the csv from 56,2 into 56.1 everything worked fine.
Strange thing is that my DB reads ‘,’ and not ‘.’ .
Ones I found this, the workaround was rather easy to find.
On my xsl file I used a function to replace the ‘,’ by a ‘.’
This function can be found in the ‘Component Palette’ where you have to choose ‘String Functions’ and select the ‘translate’ function.
Ones this was done I managed to get the data correct into my database.