claeis / ili2db

interlis import/export to relational databases
30 stars 30 forks source link

ili2pg error xml document structures must start and end within the same entity #499

Open dmunozcastro opened 1 year ago

dmunozcastro commented 1 year ago

when I executes an update to postgres using ili2pg-4.9.1 and ili2pg-4.9.0 from a xtf that pass all the validations, the jar generates the error: xml document structures must start and end within the same entity.

I attach the logs generated, the xtf was the same and it is 1.023.282 KB

ili4.9.0.log

ili4.9.1.log

If you have any idea I thanks too much.

edigonzales commented 1 year ago

Did you check if the error - that the xml parser reports - is real? If so it would be a bug in ilivalidator.

dmunozcastro commented 1 year ago

Tx for your quik anwer.

Yes, I reviewed all the xtf, all the tags are well, in aditión the row and the column that indicates don´t have any difference with its predecessors and successors so it seems don´t have any sense.

I attach some lines of the xtf.

image

some extract from full xtf from line 1220300 to line 1220308:

TIA
sjib commented 1 year ago

Use an xml checker to see if it is well formatted https://stackoverflow.com/questions/37116985/error-xml-document-structures-must-start-and-end-within-the-same-entity

e.g. https://codebeautify.org/xmlvalidator

dmunozcastro commented 1 year ago

I used a desktop solution because the size of the xtf is too big, this was the result:

image

The result was 0 errors 0 warnings as we spect.

I don´t know any schema (W3C or RelaxNG) that I can give to program I used so it can do a deeper validation, if you know some I will appreciate it too much.

edigonzales commented 1 year ago

Can you try to delete the line / object in the file where it throws the error?

dmunozcastro commented 1 year ago

Yes I can, I'm going to try it and share with you the result.

dmunozcastro commented 1 year ago

In this try the xtf load correctly, I attach the log.

At this point I don't understand anything, for me this don't have any sensse, if the xtf pass the validation, how can I identify what is going on whit the line I sended previusly?, if that line is deleted it mades the update runs with out any problem, the line don't seems to have any sintax or relational error.

If you have any idea I appreciate that you share it with me. This librarys pretends to work in a unatended environment.

ili4.9.0_II.log

sjib commented 1 year ago

Do you get the error when you just leave the line in the data file that creates the error?Then you would have identified the error, else the error is somewhere else.

dmunozcastro commented 1 year ago

Yes, when the line is in the xtf file the error arise. I all ready compared this line with the other of the same object, no structure differences on it. I really don´t know how can I find the error somewhere else.