Modello

Not possible to read older version of xml file if there is an unrecognized tag even if "strict" is set to false

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.1
  • Component/s: modello-plugin-stax
  • Labels:
    None
  • Complexity:
    Intermediate
  • Number of attachments :
    4

Description

StaxReader is throwing "Received non-all-whitespace CHARACTERS or CDATA event in nextTag()" when strict is set to false.

  1. MODELLLO-200.patch
    16/Jun/09 12:42 AM
    9 kB
    Maria Catherine Tan
  2. MODELLO-200-modello-plugin-stax.patch
    26/Jul/09 6:56 PM
    10 kB
    Maria Catherine Tan
  3. MODELLO-200-unit-test.patch
    26/Jul/09 8:20 PM
    7 kB
    Maria Catherine Tan
  4. MODELLO-200-with-fixed-unit-test.patch
    13/Aug/09 7:22 PM
    14 kB
    Maria Catherine Tan

Issue Links

Activity

Hide
Maria Catherine Tan added a comment -

Attached patch

Show
Maria Catherine Tan added a comment - Attached patch
Hide
Brett Porter added a comment -

unfortunately this patch no longer applies. Are you able to update it for the current SVN?

Show
Brett Porter added a comment - unfortunately this patch no longer applies. Are you able to update it for the current SVN?
Hide
Maria Catherine Tan added a comment -

Attached updated patch.
Thanks!

Show
Maria Catherine Tan added a comment - Attached updated patch. Thanks!
Hide
Maria Catherine Tan added a comment -

It seems this has been already fixed in the trunk.

Attaching the unit tests I used for unrecognized tag separately.

Show
Maria Catherine Tan added a comment - It seems this has been already fixed in the trunk. Attaching the unit tests I used for unrecognized tag separately.
Hide
Herve Boutemy added a comment -

how is this unit test different from verifyWrongElement() method added in r996?

this unit-test was added before Modello 1.0 was released: with which Modello version did your problem occur?

Show
Herve Boutemy added a comment - how is this unit test different from verifyWrongElement() method added in r996? this unit-test was added before Modello 1.0 was released: with which Modello version did your problem occur?
Hide
Maria Catherine Tan added a comment -

My mistake, this is not yet fixed in the trunk

The unit test is not correct that's why I thought it is already fixed. Will need to fix it.

Show
Maria Catherine Tan added a comment - My mistake, this is not yet fixed in the trunk The unit test is not correct that's why I thought it is already fixed. Will need to fix it.
Hide
Maria Catherine Tan added a comment -

Here is the error i'm getting. Tried this from version 1.0 till trunk r1300.

Exception in thread "main" org.apache.maven.continuum.management.DataManagementException: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[192,27]
Message: expected XMLStreamConstants.START_ELEMENT or XMLStreamConstants.END_ELEMENT not CHARACTERS
at org.apache.maven.continuum.management.JdoDataManagementTool.restoreDatabase(JdoDataManagementTool.java:249)
at org.apache.maven.continuum.management.DataManagementCli.processDatabase(DataManagementCli.java:289)
at org.apache.maven.continuum.management.DataManagementCli.main(DataManagementCli.java:180)
Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[192,27]
Message: expected XMLStreamConstants.START_ELEMENT or XMLStreamConstants.END_ELEMENT not CHARACTERS
at com.bea.xml.stream.MXParser.nextTag(MXParser.java:1220)
at org.apache.maven.continuum.model.project.io.stax.ContinuumStaxReader.parseProject(ContinuumStaxReader.java:1927)
at org.apache.maven.continuum.model.project.io.stax.ContinuumStaxReader.parseProjectGroup(ContinuumStaxReader.java:2265)
at org.apache.maven.continuum.model.project.io.stax.ContinuumStaxReader.parseContinuumDatabase(ContinuumStaxReader.java:1178)
at org.apache.maven.continuum.model.project.io.stax.ContinuumStaxReader.read(ContinuumStaxReader.java:2849)
at org.apache.maven.continuum.management.JdoDataManagementTool.restoreDatabase(JdoDataManagementTool.java:245)
... 2 more

Show
Maria Catherine Tan added a comment - Here is the error i'm getting. Tried this from version 1.0 till trunk r1300. Exception in thread "main" org.apache.maven.continuum.management.DataManagementException: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[192,27] Message: expected XMLStreamConstants.START_ELEMENT or XMLStreamConstants.END_ELEMENT not CHARACTERS at org.apache.maven.continuum.management.JdoDataManagementTool.restoreDatabase(JdoDataManagementTool.java:249) at org.apache.maven.continuum.management.DataManagementCli.processDatabase(DataManagementCli.java:289) at org.apache.maven.continuum.management.DataManagementCli.main(DataManagementCli.java:180) Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[192,27] Message: expected XMLStreamConstants.START_ELEMENT or XMLStreamConstants.END_ELEMENT not CHARACTERS at com.bea.xml.stream.MXParser.nextTag(MXParser.java:1220) at org.apache.maven.continuum.model.project.io.stax.ContinuumStaxReader.parseProject(ContinuumStaxReader.java:1927) at org.apache.maven.continuum.model.project.io.stax.ContinuumStaxReader.parseProjectGroup(ContinuumStaxReader.java:2265) at org.apache.maven.continuum.model.project.io.stax.ContinuumStaxReader.parseContinuumDatabase(ContinuumStaxReader.java:1178) at org.apache.maven.continuum.model.project.io.stax.ContinuumStaxReader.read(ContinuumStaxReader.java:2849) at org.apache.maven.continuum.management.JdoDataManagementTool.restoreDatabase(JdoDataManagementTool.java:245) ... 2 more
Hide
Maria Catherine Tan added a comment -

Attached patch created against r1300 of trunk with fixed unit test "MODELLO-200-with-fixed-unit-test.patch"

Show
Maria Catherine Tan added a comment - Attached patch created against r1300 of trunk with fixed unit test "MODELLO-200-with-fixed-unit-test.patch"
Hide
Herve Boutemy added a comment -

ok, I understand now: the invalid element in your test is not directly under root element but deeper.

patch applied in r1301, with modifications:

  • only the first half of StaxReaderGenerator was useful
  • I extended features unit-tests instead of creating a new one specific to StaX (now, I need to check if other XML plugins have the same issue...)

thank you

Show
Herve Boutemy added a comment - ok, I understand now: the invalid element in your test is not directly under root element but deeper. patch applied in r1301, with modifications:
  • only the first half of StaxReaderGenerator was useful
  • I extended features unit-tests instead of creating a new one specific to StaX (now, I need to check if other XML plugins have the same issue...)
thank you

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: