You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by "Lawrence Jones (JIRA)" <xm...@xml.apache.org> on 2005/08/03 23:02:39 UTC

[jira] Commented: (XMLBEANS-133) XmlBeans ant tasks should provide more error details

    [ http://issues.apache.org/jira/browse/XMLBEANS-133?page=comments#action_12317540 ] 

Lawrence Jones commented on XMLBEANS-133:
-----------------------------------------

I suspect the NPE you were seeing was this:

java.lang.NullPointerException
        at org.apache.xmlbeans.impl.schema.StscState.get(StscState.java:1214)
        at org.apache.xmlbeans.impl.config.BindingConfigImpl.error(BindingConfig
Impl.java:289)
        at org.apache.xmlbeans.impl.config.InterfaceExtensionImpl.validateMethod
(InterfaceExtensionImpl.java:141)
        at org.apache.xmlbeans.impl.config.InterfaceExtensionImpl.validateMethod
s(InterfaceExtensionImpl.java:113)
        at org.apache.xmlbeans.impl.config.InterfaceExtensionImpl.newInstance(In
terfaceExtensionImpl.java:58)
        at org.apache.xmlbeans.impl.config.BindingConfigImpl.recordExtensionSett
ing(BindingConfigImpl.java:234)
        at org.apache.xmlbeans.impl.config.BindingConfigImpl.<init>(BindingConfi
gImpl.java:109)
        at org.apache.xmlbeans.impl.config.BindingConfigImpl.forConfigDocuments(
BindingConfigImpl.java:69)
        at org.apache.xmlbeans.impl.tool.SchemaCompiler.loadTypeSystem(SchemaCom
piler.java:944)
        at org.apache.xmlbeans.impl.tool.SchemaCompiler.compile(SchemaCompiler.j
ava:1072)
        at org.apache.xmlbeans.impl.tool.XMLBean.execute(XMLBean.java:238)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:341)
        at org.apache.tools.ant.Target.performTasks(Target.java:369)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
        at org.apache.tools.ant.Main.runBuild(Main.java:673)
        at org.apache.tools.ant.Main.startAnt(Main.java:188)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)

The NPE is not the intended output. Much more useful error messages are already being generated. Unfortunately when we try and store those errors so that later we can print them out, we're calling into a state object that has not been properly initialized - or put another way we're calling StscState.get() before StscState.start() has been called.

I'll be checking something in soon to fix this.

> XmlBeans ant tasks should provide more error details
> ----------------------------------------------------
>
>          Key: XMLBEANS-133
>          URL: http://issues.apache.org/jira/browse/XMLBEANS-133
>      Project: XMLBeans
>         Type: Improvement
>   Components: Compiler
>     Versions: Version 2 Beta 1
>     Reporter: Roshan Punnoose
>     Assignee: Lawrence Jones
>     Priority: Minor
>      Fix For: TBD

>
> I think that the ant task should provide better error messages. For example, I wrote a handler for one of my interfaces, but I miss spelled a function name. The ant task only provided me with a NullPointerException. In addition, if I don't have a handler present at all, it still gives a NullPointerException error. I think it would be very useful to have more informative error messages.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org