citrusframework / citrusframework/citrus-db

Invalid XML Data set does not throw an appropriate exception

Open
#41 0 comments 0 reactions 0 assignees View on GitHub
good first issue Prio: Medium READY Type: Enhancement
Dominant language
Java
Stars
4
Forks
2
PR merge metrics
No merged PRs in 30d

Description

If you define a XML Result set during a JDBC response, it should look like this:
```xml


value

```

If you leave out the `row` tag, the `XmlDataSetProducer` does not throw an appropriate exception, which states that the dataset specification is invalid.

Instead, a dataset with empty rows is produced causing a null pointer during data access in the result set.

This makes it hard for the user to find out, that the dataset specification is invalid.

Contributor guide

Open the contributing guide

Research direction

Start with XmlDataSetProducer, which handles the XML dataset used during a JDBC response, and trace how input without a row element is parsed. Reproduce the missing-row case and check the result-set access path; done means invalid dataset XML raises an appropriate exception instead of producing empty rows that later cause a null pointer.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
database
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.