Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.5
-
None
-
None
Description
I'm using the xjc ant task to generate the java classes for a DTD file but i'm getting this error when running the task:
C:\java\projectos\TapestryPlugin\src\main\dtd\Tapestry_4_0.dtd: java.lang.NullPointerException
at org.apache.ws.jaxme.generator.XJCTask.execute(XJCTask.java:1031)
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.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.apache.tools.ant.Main.runBuild(Main.java:668)
at org.apache.tools.ant.Main.startAnt(Main.java:187)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.intellij.rt.ant.execution.AntMain2.main(AntMain2.java:17)
Caused by: java.lang.NullPointerException
at org.apache.ws.jaxme.xs.util.DTDParser.createAttribute(DTDParser.java:617)
at org.apache.ws.jaxme.xs.util.DTDParser.createElement(DTDParser.java:737)
at org.apache.ws.jaxme.xs.util.DTDParser.parse(DTDParser.java:761)
at org.apache.ws.jaxme.xs.util.DTDParser.parse(DTDParser.java:779)
at org.apache.ws.jaxme.generator.sg.impl.JAXBSchemaReader.parse(JAXBSchemaReader.java:129)
at org.apache.ws.jaxme.generator.impl.GeneratorImpl.generate(GeneratorImpl.java:125)
at org.apache.ws.jaxme.generator.impl.GeneratorImpl.generate(GeneratorImpl.java:154)
at org.apache.ws.jaxme.generator.XJCTask.execute(XJCTask.java:1004)
... 17 more
— Nested Exception —
java.lang.NullPointerException
at org.apache.ws.jaxme.xs.util.DTDParser.createAttribute(DTDParser.java:617)
at org.apache.ws.jaxme.xs.util.DTDParser.createElement(DTDParser.java:737)
at org.apache.ws.jaxme.xs.util.DTDParser.parse(DTDParser.java:761)
at org.apache.ws.jaxme.xs.util.DTDParser.parse(DTDParser.java:779)
at org.apache.ws.jaxme.generator.sg.impl.JAXBSchemaReader.parse(JAXBSchemaReader.java:129)
at org.apache.ws.jaxme.generator.impl.GeneratorImpl.generate(GeneratorImpl.java:125)
at org.apache.ws.jaxme.generator.impl.GeneratorImpl.generate(GeneratorImpl.java:154)
at org.apache.ws.jaxme.generator.XJCTask.execute(XJCTask.java:1004)
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.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.apache.tools.ant.Main.runBuild(Main.java:668)
at org.apache.tools.ant.Main.startAnt(Main.java:187)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.intellij.rt.ant.execution.AntMain2.main(AntMain2.java:17)
C:\java\projectos\TapestryPlugin\jaxme.xml:14: C:\java\projectos\TapestryPlugin\src\main\dtd\Tapestry_4_0.dtd: java.lang.NullPointerException
at org.apache.ws.jaxme.generator.XJCTask.execute(XJCTask.java:1031)
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.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.apache.tools.ant.Main.runBuild(Main.java:668)
at org.apache.tools.ant.Main.startAnt(Main.java:187)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.intellij.rt.ant.execution.AntMain2.main(AntMain2.java:17)
Caused by: java.lang.NullPointerException
at org.apache.ws.jaxme.xs.util.DTDParser.createAttribute(DTDParser.java:617)
at org.apache.ws.jaxme.xs.util.DTDParser.createElement(DTDParser.java:737)
at org.apache.ws.jaxme.xs.util.DTDParser.parse(DTDParser.java:761)
at org.apache.ws.jaxme.xs.util.DTDParser.parse(DTDParser.java:779)
at org.apache.ws.jaxme.generator.sg.impl.JAXBSchemaReader.parse(JAXBSchemaReader.java:129)
at org.apache.ws.jaxme.generator.impl.GeneratorImpl.generate(GeneratorImpl.java:125)
at org.apache.ws.jaxme.generator.impl.GeneratorImpl.generate(GeneratorImpl.java:154)
at org.apache.ws.jaxme.generator.XJCTask.execute(XJCTask.java:1004)
... 17 more
— Nested Exception —
java.lang.NullPointerException
at org.apache.ws.jaxme.xs.util.DTDParser.createAttribute(DTDParser.java:617)
at org.apache.ws.jaxme.xs.util.DTDParser.createElement(DTDParser.java:737)
at org.apache.ws.jaxme.xs.util.DTDParser.parse(DTDParser.java:761)
at org.apache.ws.jaxme.xs.util.DTDParser.parse(DTDParser.java:779)
at org.apache.ws.jaxme.generator.sg.impl.JAXBSchemaReader.parse(JAXBSchemaReader.java:129)
at org.apache.ws.jaxme.generator.impl.GeneratorImpl.generate(GeneratorImpl.java:125)
at org.apache.ws.jaxme.generator.impl.GeneratorImpl.generate(GeneratorImpl.java:154)
at org.apache.ws.jaxme.generator.XJCTask.execute(XJCTask.java:1004)
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.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.apache.tools.ant.Main.runBuild(Main.java:668)
at org.apache.tools.ant.Main.startAnt(Main.java:187)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.intellij.rt.ant.execution.AntMain2.main(AntMain2.java:17)
C:\java\projectos\TapestryPlugin\jaxme.xml:14: C:\java\projectos\TapestryPlugin\src\main\dtd\Tapestry_4_0.dtd: java.lang.NullPointerException
at org.apache.ws.jaxme.generator.XJCTask.execute(XJCTask.java:1031)
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.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.apache.tools.ant.Main.runBuild(Main.java:668)
at org.apache.tools.ant.Main.startAnt(Main.java:187)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.intellij.rt.ant.execution.AntMain2.main(AntMain2.java:17)
Caused by: java.lang.NullPointerException
at org.apache.ws.jaxme.xs.util.DTDParser.createAttribute(DTDParser.java:617)
at org.apache.ws.jaxme.xs.util.DTDParser.createElement(DTDParser.java:737)
at org.apache.ws.jaxme.xs.util.DTDParser.parse(DTDParser.java:761)
at org.apache.ws.jaxme.xs.util.DTDParser.parse(DTDParser.java:779)
at org.apache.ws.jaxme.generator.sg.impl.JAXBSchemaReader.parse(JAXBSchemaReader.java:129)
at org.apache.ws.jaxme.generator.impl.GeneratorImpl.generate(GeneratorImpl.java:125)
at org.apache.ws.jaxme.generator.impl.GeneratorImpl.generate(GeneratorImpl.java:154)
at org.apache.ws.jaxme.generator.XJCTask.execute(XJCTask.java:1004)
... 17 more
— Nested Exception —
java.lang.NullPointerException
at org.apache.ws.jaxme.xs.util.DTDParser.createAttribute(DTDParser.java:617)
at org.apache.ws.jaxme.xs.util.DTDParser.createElement(DTDParser.java:737)
at org.apache.ws.jaxme.xs.util.DTDParser.parse(DTDParser.java:761)
at org.apache.ws.jaxme.xs.util.DTDParser.parse(DTDParser.java:779)
at org.apache.ws.jaxme.generator.sg.impl.JAXBSchemaReader.parse(JAXBSchemaReader.java:129)
at org.apache.ws.jaxme.generator.impl.GeneratorImpl.generate(GeneratorImpl.java:125)
at org.apache.ws.jaxme.generator.impl.GeneratorImpl.generate(GeneratorImpl.java:154)
at org.apache.ws.jaxme.generator.XJCTask.execute(XJCTask.java:1004)
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.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.apache.tools.ant.Main.runBuild(Main.java:668)
at org.apache.tools.ant.Main.startAnt(Main.java:187)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.intellij.rt.ant.execution.AntMain2.main(AntMain2.java:17)
I've configured the ant task like this:
<target name="generate.java">
<xjc schema="src/main/dtd/Tapestry_4_0.dtd" target="${output.dir}">
<dtd/>
</xjc>
</target>
I'm attaching the DTD file.
Thanks.