[ http://jira.codehaus.org/browse/MJAXB-31?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=224565#action_224565 ]
Heiko Kopp commented on MJAXB-31:
---------------------------------
I got the same error. The compilation process files with something like this:
com.sun.istack.SAXParseException2: "file:/C:/workspaces/testworkspace/PAS~2010.2.0_zmbfts4/PAS/pas/pas-schema/src/jaxws/common.xsd" is not a part of this compilation. Is this a mistake for "file:/C:/workspaces/testworkspace/PAS~2010.2.0_zmbfts4/PAS/pas/pas-schema/src/jaxws/common.xml"?
at com.sun.tools.xjc.reader.internalizer.Internalizer.reportError(Internalizer.java:598)
at com.sun.tools.xjc.reader.internalizer.Internalizer.reportError(Internalizer.java:592)
at com.sun.tools.xjc.reader.internalizer.Internalizer.buildTargetNodeMap(Internalizer.java:246)
at com.sun.tools.xjc.reader.internalizer.Internalizer.transform(Internalizer.java:136)
at com.sun.tools.xjc.reader.internalizer.Internalizer.transform(Internalizer.java:98)
at com.sun.tools.xjc.reader.internalizer.DOMForest.transform(DOMForest.java:447)
at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:221)
at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:85)
at com.sun.tools.ws.processor.modeler.wsdl.JAXBModelBuilder.bind(JAXBModelBuilder.java:134)
at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.buildJAXBModel(WSDLModeler.java:2264)
at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.internalBuildModel(WSDLModeler.java:187)
at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.buildModel(WSDLModeler.java:133)
at com.sun.tools.ws.wscompile.WsimportTool.run(WsimportTool.java:185)
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.mojo.jaxws.WsImportMojo.wsImport(WsImportMojo.java:288)
at org.codehaus.mojo.jaxws.WsImportMojo.processLocalWsdlFiles(WsImportMojo.java:246)
at org.codehaus.mojo.jaxws.WsImportMojo.execute(WsImportMojo.java:206)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:105)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:133)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:77)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:69)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:82)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:54)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.singleThreadedBuild(DefaultLifecycleExecutor.java:218)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:190)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:246)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:95)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:430)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:160)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:124)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[ERROR] "file:/C:/workspaces/testworkspace/PAS~2010.2.0_zmbfts4/PAS/pas/pas-schema/src/jaxws/common.xsd" is not a part of this compilation. Is this a mistake for "file:/C:/workspaces/testworkspace/PAS~2010.2.0_zmbfts4/PAS/pas/pas-schema/src/jaxws/common.xml"?
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:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
line 7 of file:/C:/workspaces/testworkspace/PAS%7E2010.2.0_zmbfts4/PAS/pas/pas-schema/src/jaxws/common.xml
You see the tilde is in the very last line escaped via %7E which is ok, but now xjc seems to get confused because of the difference between ~ and %7E and doesn't consider both files as the same.
The problem can be solved when using a schemaLocation in the binding file like this:
schemaLocation="file:/C:/workspaces/testworkspace/PAS%7E2010.2.0_zmbfts4/PAS/pas/pas-schema/src/jaxws/common.xml"
However, this is not sufficient, as absolute paths are seldomly helpful for build systems.
I added a comment about this to the JAX-WS forum. Did not yet get any help on this though.
Post by John Calcote (JIRA)jaxb2:xjc throws "org.xml.sax.SAXParseException: 'xyz' is already defined" on schema files located in directories with embedded tilde character
-----------------------------------------------------------------------------------------------------------------------------------------------
Key: MJAXB-31
URL: http://jira.codehaus.org/browse/MJAXB-31
Project: Maven 2.x JAXB 2.1 Plugin
Issue Type: Bug
Affects Versions: 1.3
Environment: Windows or Linux - all versions that I've tested
Maven 2.2.1
Java 1.6.0_17/18
Reporter: John Calcote
When I execute mvn jaxb2:xjc on a project (configured with the jaxb2 plugin) in a project directory where in the path to that directory contains at least one tilde character (~), a SAXParseException is thrown as in the summary above.
The easiest way to reproduce this is to rename "project" directory to "proj~ect", cd into that directory and then run mvn jaxb2:xjc.
If it works without the tilde, it fails with it.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email