[JIRA] Issue Comment Edited: (JAXB-942) Catalog with PUBLIC definition fails when using an episode

  • From: "phax (JIRA)" <jira-no-reply@...>
  • To: issues@...
  • Subject: [JIRA] Issue Comment Edited: (JAXB-942) Catalog with PUBLIC definition fails when using an episode
  • Date: Wed, 19 Jun 2013 13:47:59 +0000 (UTC)
  • Auto-submitted: auto-generated


    [ 
https://java.net/jira/browse/JAXB-942?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=365560#action_365560
 ] 

phax edited comment on JAXB-942 at 6/19/13 1:47 PM:
----------------------------------------------------

I'm having the same problem in 2.2.7.
I was tracing it down to AbstractReferenceFinderImpl.startElement

The call to abstract method "findExternalResource" only returns the specified 
XSD path but totally ignores the publicID of the item (if present). The 
implementation to this method is in 
com.sun.tools.xjc.reader.xmlschema.parser.XMLSchemaInternalizationLogic$ReferenceFinder

And afterwards it seems to me, that the resolution of the artifact does not 
consider a catalog!
-> In my case this leads to the problem that the catalog file must contain an 
absolute path instead of a relative path!

      was (Author: phax):
    I'm having the same problem.
I was tracing it down to AbstractReferenceFinderImpl.startElement

The call to abstract method "findExternalResource" only returns the specified 
XSD path but totally ignores the publicID of the item (if present). The 
implementation to this method is in 
com.sun.tools.xjc.reader.xmlschema.parser.XMLSchemaInternalizationLogic$ReferenceFinder

And afterwards it seems to me, that the resolution of the artifact does not 
consider a catalog!
-> In my case this leads to the problem that the catalog file must contain an 
absolute path instead of a relative path!
  
> Catalog with PUBLIC definition fails when using an episode
> ----------------------------------------------------------
>
>                 Key: JAXB-942
>                 URL: https://java.net/jira/browse/JAXB-942
>             Project: jaxb
>          Issue Type: Bug
>          Components: xjc
>    Affects Versions: 2.2.6
>            Reporter: lexi
>            Assignee: Iaroslav Savytskyi
>
> This issue is a result of analysis for [MAVEN_JAXB2_PLUGIN-53].
> The problem is that using a catalog with PUBLIC definition fails when 
> episode is used as well.
> I have a schema b.xsd which imports a schema a.xsd:
> {code}
> <xsd:import namespace="http://maven-jaxb2-plugin/samples/episode/a" ;
> schemaLocation="a.xsd"/>
> {code}
> The schema a.xsd is, however placed in a/a.xsd. This can be handled with 
> the following catalog entry:
> {code}
> PUBLIC "http://maven-jaxb2-plugin/samples/episode/a" "a/a.xsd";
> {code}
> This works fine:
> {code}
> xjc -catalog catalog.cat b.xsd
> {code}
> Now assume we also have an episode JAR:
> {code:title=a.jar!/META-INF/sun-jaxb.episode}
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <bindings version="2.1" xmlns="http://java.sun.com/xml/ns/jaxb";>
>   <bindings scd="x-schema::tns" 
> xmlns:tns="http://maven-jaxb2-plugin/samples/episode/a";>
>     <schemaBindings map="false">
>       <package name="maven_jaxb2_plugin.samples.episode.a"/>
>     </schemaBindings>
>     <bindings scd="~tns:AType">
>       <class ref="maven_jaxb2_plugin.samples.episode.a.AType"/>
>     </bindings>
>     <bindings scd="~tns:A1Type">
>       <class ref="maven_jaxb2_plugin.samples.episode.a.A1Type"/>
>     </bindings>
>     <bindings scd="~tns:A2EnumType">
>       <typesafeEnumClass 
> ref="maven_jaxb2_plugin.samples.episode.a.A2EnumType"/>
>     </bindings>
>   </bindings>
> </bindings>
> {code}
> Now this fails:
> {code}xjc -extension -catalog catalog.cat b.xsd a.jar{code}
> The catalog does not work:
> {code}
> xjc -extension -catalog catalog.cat b.xsd a.jar
> parsing a schema...
> [ERROR] ...\test\a.xsd (Das System kann die angegebene Datei nicht finden) 
> (eng. Could not find the file)
> unknown location
> Failed to parse a schema.{code}
> I can provide a minimal test project which reproduces this. Attachments do 
> not work. Via mail? (Please ping me: valikov at gmx.net)

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

        


[JIRA] Issue Comment Edited: (JAXB-942) Catalog with PUBLIC definition fails when using an episode

phax (JIRA) 06/19/2013

<Possible follow-up(s)>

[JIRA] Issue Comment Edited: (JAXB-942) Catalog with PUBLIC definition fails when using an episode

phax (JIRA) 06/19/2013
Terms of Use; Privacy Policy; Copyright ©2013-2015 (revision 20150226.965aeb8)
 
 
Close
loading
Please Confirm
Close