Skip to main content

maven-jaxb2-plugin NullPointerException in ClasspathCatalogResolver

2 replies [Last post]
pouncilt
Offline
Joined: 2006-05-22

Hello,

I am getting a NullPointerException when I use the maven-jaxb2-plugin for version 0.6.1, 0.6.2, and 0.7.1. Based on the error message below does any one know why I am getting this error? Upon request I can uploaded the complete stack trace, xsd files, and pom.xml.

Thanks!

---------------------------------------------------
java.lang.NullPointerException
at java.net.URI$Parser.parse(URI.java:3003)
at java.net.URI.(URI.java:578)
at org.jvnet.jaxb2.maven2.resolver.tools.ClasspathCatalogResolver.getResolvedEntity(ClasspathCatalogResolver.java:17)
at com.sun.org.apache.xml.internal.resolver.tools.CatalogResolver.resolveEntity(CatalogResolver.java:192)
at com.sun.tools.xjc.reader.xmlschema.parser.SchemaConstraintChecker$1.resolveResource(SchemaConstraintChecker.java:86)
at com.sun.org.apache.xerces.internal.util.DOMEntityResolverWrapper.resolveEntity(DOMEntityResolverWrapper.java:106)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.resolveEntity(XMLEntityManager.java:1100)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.resolveDocument(XMLSchemaLoader.java:595)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.resolveSchema(XSDHandler.java:1671)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.constructTrees(XSDHandler.java:909)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.parseSchema(XSDHandler.java:569)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadSchema(XMLSchemaLoader.java:552)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:519)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:485)
at com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory.newSchema(XMLSchemaFactory.java:210)
at com.sun.tools.xjc.reader.xmlschema.parser.SchemaConstraintChecker.check(SchemaConstraintChecker.java:101)
at com.sun.tools.xjc.ModelLoader.loadXMLSchema(ModelLoader.java:357)
at com.sun.tools.xjc.ModelLoader.load(ModelLoader.java:167)
at com.sun.tools.xjc.ModelLoader.load(ModelLoader.java:113)
at org.jvnet.jaxb2.maven2.XJC2Mojo.runXJC(XJC2Mojo.java:1116)
at org.jvnet.jaxb2.maven2.XJC2Mojo.execute(XJC2Mojo.java:718)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:579)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:498)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmentForProject(DefaultLifecycleExecutor.java:265)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:191)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:149)
at org.apache.maven.DefaultMaven.execute_aroundBody0(DefaultMaven.java:223)
at org.apache.maven.DefaultMaven.execute_aroundBody1$advice(DefaultMaven.java:304)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:1)
at org.apache.maven.embedder.MavenEmbedder.execute_aroundBody2(MavenEmbedder.java:904)
at org.apache.maven.embedder.MavenEmbedder.execute_aroundBody3$advice(MavenEmbedder.java:304)
at org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:1)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:176)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:63)
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:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:408)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:351)
at org.codehaus.classworlds.Launcher.main(Launcher.java:31)

Message was edited by: pouncilt

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
tastle
Offline
Joined: 2009-11-10

I just ran into the exact same issue. I was compiling the OGC Schemas using Java 6. It's strange because I have no problem getting it to work with KML, but I am encountering this with OWS 1.1.0.

Any tips on where I should start looking would be appreciated. Until then, I'll keep guessing as to what is causing the NPE.

davidl340
Offline
Joined: 2007-11-29

Did you ever figure out what was causing your error?