Discussion:
[jira] Created: (MJAXB-31) jaxb2:xjc throws "org.xml.sax.SAXParseException: 'xyz' is already defined" on schema files located in directories with embedded tilde character
John Calcote (JIRA)
2010-01-14 20:18:56 UTC
Permalink
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
Heiko Kopp (JIRA)
2010-06-08 13:42:12 UTC
Permalink
[ 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
Anders Hammar (JIRA)
2011-08-11 12:40:42 UTC
Permalink
[ https://jira.codehaus.org/browse/MJAXB-31?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=275564#comment-275564 ]

Anders Hammar commented on MJAXB-31:
------------------------------------

I wonder if this could be related to MJAXB-20?
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: https://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.
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
Anders Hammar (JIRA)
2011-08-11 19:21:42 UTC
Permalink
[ https://jira.codehaus.org/browse/MJAXB-31?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=275606#comment-275606 ]

Anders Hammar commented on MJAXB-31:
------------------------------------

I can't reproduce with v1.3 of the plugin on Mac OS (Lion) and Java 1.6.0_26. Could you please provide a test project?
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: https://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.
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
Anders Hammar (JIRA)
2011-08-11 19:25:42 UTC
Permalink
[ https://jira.codehaus.org/browse/MJAXB-31?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=275607#comment-275607 ]

Anders Hammar commented on MJAXB-31:
------------------------------------

Also, I've deployed 1.3.1-SNAPSHOT. Could you please try that and see if MJAXB-20 is the cause of this issue?
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: https://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.
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
Anders Hammar (JIRA)
2011-08-12 06:10:43 UTC
Permalink
[ https://jira.codehaus.org/browse/MJAXB-31?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=275647#comment-275647 ]

Anders Hammar commented on MJAXB-31:
------------------------------------

Can't reproduce on Windows XP with plugin v1.3 and Maven 3.0.3 and Java 1.6.0_24 either.
You need to provide a test case to reproduce this, or I'll close the ticket as not reproducible in a few weeks.
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: https://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.
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
Anders Hammar (JIRA)
2012-06-12 09:57:21 UTC
Permalink
<style>
/* Changing the layout to use less space for mobiles */
@media screen and (max-device-width: 480px), screen and (-webkit-min-device-pixel-ratio: 2) {
#email-body { min-width: 30em !important; }
#email-page { padding: 8px !important; }
#email-banner { padding: 8px 8px 0 8px !important; }
#email-avatar { margin: 1px 8px 8px 0 !important; padding: 0 !important; }
#email-fields { padding: 0 8px 8px 8px !important; }
#email-gutter { width: 0 !important; }
}
</style>
<div id="email-body">
<table id="email-wrap" align="center" border="0" cellpadding="0" cellspacing="0" style="background-color:#f0f0f0;color:#000000;width:100%;">
<tr valign="top">
<td id="email-page" style="padding:16px !important;">
<table align="center" border="0" cellpadding="0" cellspacing="0" style="background-color:#ffffff;border:1px solid #bbbbbb;color:#000000;width:100%;">
<tr valign="top">
<td bgcolor="#ffffff" style="background-color:#ffffff;color:#00AA00;font-family:Arial,FreeSans,Helvetica,sans-serif;font-size:12px;line-height:1;"><img src="Loading Image..." alt="" style="vertical-align:top;" /></td>
</tr><tr valign="top">
<td id="email-banner" style="padding:32px 32px 0 32px;">





<table align="left" border="0" cellpadding="0" cellspacing="0" width="100%" style="width:100%;">
<tr valign="top">
<td style="color:#505050;font-family:Arial,FreeSans,Helvetica,sans-serif;padding:0;">
<img id="email-avatar" src="https://jira.codehaus.org/secure/useravatar?avatarId=10232" alt="" height="48" width="48" border="0" align="left" style="padding:0;margin: 0 16px 16px 0;" />
<div id="email-action" style="padding: 0 0 8px 0;font-size:12px;line-height:18px;">
<a class="user-hover" rel="afloom" id="email_afloom" href="https://jira.codehaus.org/secure/ViewProfile.jspa?name=afloom" style="color:#005500;">Anders Hammar</a>
closed <img src="Loading Image..." height="16" width="16" border="0" align="absmiddle" alt="Bug"> <a style='color:#005500;text-decoration:none;' href='https://jira.codehaus.org/browse/MJAXB-31'>MJAXB-31</a> as <strong>Cannot Reproduce</strong>
</div>
<div id="email-summary" style="font-size:16px;line-height:20px;padding:2px 0 16px 0;">
<a style='color:#005500;text-decoration:none;' href='https://jira.codehaus.org/browse/MJAXB-31'><strong>jaxb2:xjc throws &quot;org.xml.sax.SAXParseException: &#39;xyz&#39; is already defined&quot; on schema files located in directories with embedded tilde character</strong></a>
</div>
</td>
</tr>
</table>

</td>
</tr>
<tr valign="top">
<td id="email-fields" style="padding:0 32px 32px 32px;">
<table border="0" cellpadding="0" cellspacing="0" style="padding:0;text-align:left;width:100%;" width="100%">
<tr valign="top">
<td id="email-gutter" style="width:64px;white-space:nowrap;"></td>
<td>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td style="color:#000000;font-family:Arial,FreeSans,Helvetica,sans-serif;font-size:12px;padding:0 10px 10px 0;white-space:nowrap;">
<strong style="font-weight:normal;color:#505050;">Change By:</strong>
</td>
<td style="color:#000000;font-family:Arial,FreeSans,Helvetica,sans-serif;font-size:12px;padding:0 0 10px 0;width:100%;">
<a class="user-hover" rel="afloom" id="email_afloom" href="https://jira.codehaus.org/secure/ViewProfile.jspa?name=afloom" style="color:#005500;">Anders Hammar</a>
(12/Jun/12 4:55 AM)
</td>
</tr>
<tr valign="top">
<td style="color:#000000;font-family:Arial,FreeSans,Helvetica,sans-serif;font-size:12px;padding:0 10px 10px 0;white-space:nowrap;">
<strong style="font-weight:normal;color:#505050;">Resolution:</strong>
</td>
<td style="color:#000000;font-family:Arial,FreeSans,Helvetica,sans-serif;font-size:12px;padding:0 0 10px 0;width:100%;">
<span class="diffaddedchars" style="background-color:#ddfade;">Cannot&nbsp;Reproduce</span>

</td>
</tr>
<tr valign="top">
<td style="color:#000000;font-family:Arial,FreeSans,Helvetica,sans-serif;font-size:12px;padding:0 10px 10px 0;white-space:nowrap;">
<strong style="font-weight:normal;color:#505050;">Status:</strong>
</td>
<td style="color:#000000;font-family:Arial,FreeSans,Helvetica,sans-serif;font-size:12px;padding:0 0 10px 0;width:100%;">
<span class="diffremovedchars" style="background-color:#ffe7e7;text-decoration:line-through;">Open</span>
<span class="diffaddedchars" style="background-color:#ddfade;">Closed</span>

</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>













</table>
</td><!-- End #email-page -->
</tr>
<tr valign="top">
<td style="color:#505050;font-family:Arial,FreeSans,Helvetica,sans-serif;font-size:10px;line-height:14px;padding: 0 16px 16px 16px;text-align:center;">
This message is automatically generated by JIRA.<br />
If you think it was sent incorrectly, please contact your <a style='color:#005500;' href='https://jira.codehaus.org/secure/ContactAdministrators!default.jspa'>JIRA administrators</a>.<br />
For more information on JIRA, see: <a style='color:#005500;' href='http://www.atlassian.com/software/jira'>http://www.atlassian.com/software/jira</a>
</td>
</tr>
</table><!-- End #email-wrap -->
</div><!-- End #email-body -->

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Loading...