Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPE when band orientation is not set #112

Closed
ShokReD opened this issue May 18, 2019 · 0 comments
Closed

NPE when band orientation is not set #112

ShokReD opened this issue May 18, 2019 · 0 comments
Assignees
Labels
state: fixed Fixed by the developer type: bug Something isn't working ver: 2.1.7
Milestone

Comments

@ShokReD
Copy link

ShokReD commented May 18, 2019

I have such xml:

...
<rootBand name="Root" orientation="H">
  <bands>
    <band name="Header"/>
  </bands>
</rootBand>
...

When I try to create a document:

@Override
public void generateReport(DataSource dataSource, String xml, String location) throws IOException {
    com.haulmont.yarg.structure.Report report = new DefaultXmlReader()
            .parseXml(xml);

    Reporting reporting = new Reporting();
    reporting.setFormatterFactory(new DefaultFormatterFactory());
    reporting.setLoaderFactory(
            new DefaultLoaderFactory().setSqlDataLoader(
                    new SqlDataLoader(dataSource)
            )
    );

    reporting.runReport(new RunParams(report), new FileOutputStream(location));
}

I get NPE:

java.lang.NullPointerException: null
	at com.haulmont.yarg.structure.xml.impl.DefaultXmlReader.parseChildBandDefinitions(DefaultXmlReader.java:170)
	at com.haulmont.yarg.structure.xml.impl.DefaultXmlReader.parseXml(DefaultXmlReader.java:73)
@jreznot jreznot added the type: bug Something isn't working label May 19, 2019
@andreysubbotin andreysubbotin added this to the Release 2.1 milestone Jul 8, 2019
@haulmont-git haulmont-git added the ver: 2.1.6 ver: 2.1.6 label Aug 9, 2019
@andreysubbotin andreysubbotin added the state: fixed Fixed by the developer label Aug 16, 2019
@andreysubbotin andreysubbotin added ver: 2.1.7 and removed ver: 2.1.6 ver: 2.1.6 labels Aug 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: fixed Fixed by the developer type: bug Something isn't working ver: 2.1.7
Projects
None yet
Development

No branches or pull requests

6 participants