validate XML config as early as possible #88

Open
koles opened this Issue Jan 5, 2011 · 0 comments

Comments

Projects
None yet
1 participant
Member

koles commented Jan 5, 2011

If user provides a semantically invalid XML config, we need to issue some reasonable warning ASAP instead of producing random NPEs later.

For example, if user does not provide the ldmType for a column record and invokes the GenerateUpdateMaql command, it will result in an exception as follows:

Exception in thread "main" java.lang.NullPointerException
at
com.gooddata.modeling.generator.MaqlGenerator$State.processColumn(MaqlGenerator.java:321)
at
com.gooddata.modeling.generator.MaqlGenerator$State.access$000(MaqlGenerator.java:307)
at
com.gooddata.modeling.generator.MaqlGenerator.generateMaqlAdd(MaqlGenerator.java:171)
at
com.gooddata.modeling.generator.MaqlGenerator.generateMaqlAdd(MaqlGenerator.java:92)
at
com.gooddata.connector.AbstractConnector.generateUpdateMaql(AbstractConnector.java:465)
at
com.gooddata.connector.AbstractConnector.processCommand(AbstractConnector.java:144)
at
com.gooddata.connector.CsvConnector.processCommand(CsvConnector.java:258)
at com.gooddata.processor.GdcDI.execute(GdcDI.java:445)
at com.gooddata.processor.GdcDI.(GdcDI.java:145)
at com.gooddata.processor.GdcDI.main(GdcDI.java:498)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment