You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by "Geert Schuring (JIRA)" <ji...@apache.org> on 2010/08/12 01:13:47 UTC

[jira] Created: (SM-1970) Schema location is incorrect for servicemix-quartz-2010.01.0-fuse-02-00.xsd in servicemix-quartz archetype

Schema location is incorrect for servicemix-quartz-2010.01.0-fuse-02-00.xsd in servicemix-quartz archetype
----------------------------------------------------------------------------------------------------------

                 Key: SM-1970
                 URL: https://issues.apache.org/activemq/browse/SM-1970
             Project: ServiceMix
          Issue Type: Bug
          Components: archetypes
    Affects Versions: archetypes-2010.01
            Reporter: Geert Schuring


after project generation using the archetype, the xbean.xml contains:

[...]
xsi:schemaLocation="
       		http://servicemix.apache.org/quartz/1.0 http://servicemix.apache.org/schema/servicemix-quartz-2010.01.0-fuse-02-00.xsd
       		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
[...]

The URL http://servicemix.apache.org/schema/servicemix-quartz-2010.01.0-fuse-02-00.xsd is unresolveable, and results in the XML editor claiming validation errors.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SM-1970) Schema location is incorrect for servicemix-quartz-2010.01.0-fuse-02-00.xsd in servicemix-quartz archetype

Posted by "Freeman Fang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61173#action_61173 ] 

Freeman Fang commented on SM-1970:
----------------------------------

The current schemaLocation IS valid with spring.shcemas, that's exactly how redirect works. :-)
And for smx, we always ship local xsd files and customer shouldn't rely on the online xsd access.

For your xml editor, I think you can import local xsd files and validate the xml.

Freeman

> Schema location is incorrect for servicemix-quartz-2010.01.0-fuse-02-00.xsd in servicemix-quartz archetype
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: SM-1970
>                 URL: https://issues.apache.org/activemq/browse/SM-1970
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: archetypes
>    Affects Versions: archetypes-2010.01
>            Reporter: Geert Schuring
>            Assignee: Freeman Fang
>
> after project generation using the archetype, the xbean.xml contains:
> [...]
> xsi:schemaLocation="
>        		http://servicemix.apache.org/quartz/1.0 http://servicemix.apache.org/schema/servicemix-quartz-2010.01.0-fuse-02-00.xsd
>        		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
> [...]
> The URL http://servicemix.apache.org/schema/servicemix-quartz-2010.01.0-fuse-02-00.xsd is unresolveable, and results in the XML editor claiming validation errors.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SM-1970) Schema location is incorrect for servicemix-quartz-2010.01.0-fuse-02-00.xsd in servicemix-quartz archetype

Posted by "Freeman Fang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61169#action_61169 ] 

Freeman Fang commented on SM-1970:
----------------------------------

Hi Geert,

I don't think we need fix it in smx.
As redirect xsd in spring is  very common usecase,  I think the xml editor you used should support this feature.

Freeman

> Schema location is incorrect for servicemix-quartz-2010.01.0-fuse-02-00.xsd in servicemix-quartz archetype
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: SM-1970
>                 URL: https://issues.apache.org/activemq/browse/SM-1970
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: archetypes
>    Affects Versions: archetypes-2010.01
>            Reporter: Geert Schuring
>            Assignee: Freeman Fang
>
> after project generation using the archetype, the xbean.xml contains:
> [...]
> xsi:schemaLocation="
>        		http://servicemix.apache.org/quartz/1.0 http://servicemix.apache.org/schema/servicemix-quartz-2010.01.0-fuse-02-00.xsd
>        		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
> [...]
> The URL http://servicemix.apache.org/schema/servicemix-quartz-2010.01.0-fuse-02-00.xsd is unresolveable, and results in the XML editor claiming validation errors.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (SM-1970) Schema location is incorrect for servicemix-quartz-2010.01.0-fuse-02-00.xsd in servicemix-quartz archetype

Posted by "Freeman Fang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SM-1970?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Freeman Fang reassigned SM-1970:
--------------------------------

    Assignee: Freeman Fang

> Schema location is incorrect for servicemix-quartz-2010.01.0-fuse-02-00.xsd in servicemix-quartz archetype
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: SM-1970
>                 URL: https://issues.apache.org/activemq/browse/SM-1970
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: archetypes
>    Affects Versions: archetypes-2010.01
>            Reporter: Geert Schuring
>            Assignee: Freeman Fang
>
> after project generation using the archetype, the xbean.xml contains:
> [...]
> xsi:schemaLocation="
>        		http://servicemix.apache.org/quartz/1.0 http://servicemix.apache.org/schema/servicemix-quartz-2010.01.0-fuse-02-00.xsd
>        		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
> [...]
> The URL http://servicemix.apache.org/schema/servicemix-quartz-2010.01.0-fuse-02-00.xsd is unresolveable, and results in the XML editor claiming validation errors.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (SM-1970) Schema location is incorrect for servicemix-quartz-2010.01.0-fuse-02-00.xsd in servicemix-quartz archetype

Posted by "Freeman Fang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SM-1970?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Freeman Fang resolved SM-1970.
------------------------------

    Resolution: Working as Designed

Hi,

Actually we always ship local xsd files in component jar, so http://servicemix.apache.org/schema/servicemix-quartz-2010.01.0-fuse-02-00.xsd redirect(through spring.shcemas) to local xsd files inside servicemix-quartz-2010.01.0-fuse-02-00.jar, it doesn't matter if url http://servicemix.apache.org/schema/servicemix-quartz-2010.01.0-fuse-02-00.xsd really exist or not.

If you extract servicemix-quartz-2010.01.0-fuse-02-00.jar, you will see a file META-INF/spring.schemas, and in this file, you can find
http\://servicemix.apache.org/schema/servicemix-quartz-2010.01.0-fuse-02-00.xsd=servicemix-quartz.xsd
Also there's a local servicemix-quartz.xsd inside servicemix-quartz-2010.01.0-fuse-02-00.jar, so it will always find the local xsd files.

Freeman

> Schema location is incorrect for servicemix-quartz-2010.01.0-fuse-02-00.xsd in servicemix-quartz archetype
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: SM-1970
>                 URL: https://issues.apache.org/activemq/browse/SM-1970
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: archetypes
>    Affects Versions: archetypes-2010.01
>            Reporter: Geert Schuring
>            Assignee: Freeman Fang
>
> after project generation using the archetype, the xbean.xml contains:
> [...]
> xsi:schemaLocation="
>        		http://servicemix.apache.org/quartz/1.0 http://servicemix.apache.org/schema/servicemix-quartz-2010.01.0-fuse-02-00.xsd
>        		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
> [...]
> The URL http://servicemix.apache.org/schema/servicemix-quartz-2010.01.0-fuse-02-00.xsd is unresolveable, and results in the XML editor claiming validation errors.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SM-1970) Schema location is incorrect for servicemix-quartz-2010.01.0-fuse-02-00.xsd in servicemix-quartz archetype

Posted by "Geert Schuring (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61180#action_61180 ] 

Geert Schuring commented on SM-1970:
------------------------------------

Maybe for clarity you could remove the double names in the IRC conversation, so that its clear who says what.

> Schema location is incorrect for servicemix-quartz-2010.01.0-fuse-02-00.xsd in servicemix-quartz archetype
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: SM-1970
>                 URL: https://issues.apache.org/activemq/browse/SM-1970
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: archetypes
>    Affects Versions: archetypes-2010.01
>            Reporter: Geert Schuring
>            Assignee: Freeman Fang
>
> after project generation using the archetype, the xbean.xml contains:
> [...]
> xsi:schemaLocation="
>        		http://servicemix.apache.org/quartz/1.0 http://servicemix.apache.org/schema/servicemix-quartz-2010.01.0-fuse-02-00.xsd
>        		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
> [...]
> The URL http://servicemix.apache.org/schema/servicemix-quartz-2010.01.0-fuse-02-00.xsd is unresolveable, and results in the XML editor claiming validation errors.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SM-1970) Schema location is incorrect for servicemix-quartz-2010.01.0-fuse-02-00.xsd in servicemix-quartz archetype

Posted by "Freeman Fang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61179#action_61179 ] 

Freeman Fang commented on SM-1970:
----------------------------------

Just paste the conversation from irc with Geert.

ffang: Geert: can't your xmleditor just add some classpath which include smx component jars, and the local xsd files is available for you?
[4:15pm] Geert: ffang: It's Eclipse in my case. And yes that would probably be possible. But is that the way you and other developers do it?
[4:15pm] ffang: Geert: I believe there's no mandatory rule that we must publish xsd files online
[4:16pm] ffang: Geert: honestly I never use xml editor to write the xml files for smx endpoint
[4:17pm] Geert: ffang: That's correct, but if you use xmlschemalocation, then you should use a valid URL. Otherwise there's no need for a schemalocation at all and you could just create a namespace handler in spring
[4:18pm] Geert: ffang: I think many potential customers will use tools like Eclipse, Netbeans, and XmlSpy, and all of those will tell the user that the XML coming out of the archetype is invalid
[4:18pm] ffang: Geert: I do think xml editor should support the case that we use local xsd files, as this is a valid usecase, let's say, add some classpath for xmleditor, so that the local xsd and spring.schemas are both available
[4:19pm] ffang: Geert: The point that it's a valid URL with spring.schemas, isn't it?
[4:23pm] Geert: ffang: I understand your argument, but my understanding is that an XML document should be valid as-is, without the need for other files.
[4:25pm] Geert: ffang: spring.schemas is not part of the XML spec, so the document should be validate-able without it.
[4:26pm] Geert: ffang: as mentioned earlier, XML namespaces can be used to link documents to schema's, you don't need to 'abuse' xmlSchemaLocation for that
[4:26pm] ffang: Geert: but what we are talking about the spring configuration file, right?
[4:26pm] ffang: Geert: maybe you need a spring editor which support this case
[4:27pm] ffang: Geert: the problem is that you are using xml editor to edit a spring file, which is more than a xml, right?
[4:28pm] Geert: ffang: No, I've used spring files many times and they're normal XML files, that should comply to normal XML specification
[4:30pm] ffang: Geert: think about catalog.xml for xml, it's also something like redirect for the schema location, so you can't say a xml should be valid as-is
[4:31pm] Geert: ffang: catalog.xml is a nice example of a way to couple schema's based on their namespace. The XML file should then only define the namespace and not define a schemaLocation
[4:32pm] Geert: ffang: That would be valid, although still not very user friendly. Which is why Eclipse only uses the catalog.xml to cache schema's it downloaded
[4:36pm] ffang: Geert: I think some spring file editor should support the case that we use local xsd files, as it's a popular case we use with spring, just add some classpath, and it can parse spring.schemas from classpath
[4:47pm] Geert: ffang: I think you are mistaking about the popularity of using local schemas instead of resolvable URLs. All of Springs schemas are downloadable on the URL mentioned in the xmlSchemaLocation attribute. In short: you can use local schema's, but they are not a replacement for the online versions.


> Schema location is incorrect for servicemix-quartz-2010.01.0-fuse-02-00.xsd in servicemix-quartz archetype
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: SM-1970
>                 URL: https://issues.apache.org/activemq/browse/SM-1970
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: archetypes
>    Affects Versions: archetypes-2010.01
>            Reporter: Geert Schuring
>            Assignee: Freeman Fang
>
> after project generation using the archetype, the xbean.xml contains:
> [...]
> xsi:schemaLocation="
>        		http://servicemix.apache.org/quartz/1.0 http://servicemix.apache.org/schema/servicemix-quartz-2010.01.0-fuse-02-00.xsd
>        		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
> [...]
> The URL http://servicemix.apache.org/schema/servicemix-quartz-2010.01.0-fuse-02-00.xsd is unresolveable, and results in the XML editor claiming validation errors.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SM-1970) Schema location is incorrect for servicemix-quartz-2010.01.0-fuse-02-00.xsd in servicemix-quartz archetype

Posted by "Geert Schuring (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61170#action_61170 ] 

Geert Schuring commented on SM-1970:
------------------------------------

As far as I know , redirect XSD in spring is used to prevent the application from having to download the schema and instread load it from a local location. However the schemalocation mentioned in the XML should be valid non the less, so that other applications (like IDE's) that can't use the redirect feature because they have neither the schema nor the spring config can still validate the document.

> Schema location is incorrect for servicemix-quartz-2010.01.0-fuse-02-00.xsd in servicemix-quartz archetype
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: SM-1970
>                 URL: https://issues.apache.org/activemq/browse/SM-1970
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: archetypes
>    Affects Versions: archetypes-2010.01
>            Reporter: Geert Schuring
>            Assignee: Freeman Fang
>
> after project generation using the archetype, the xbean.xml contains:
> [...]
> xsi:schemaLocation="
>        		http://servicemix.apache.org/quartz/1.0 http://servicemix.apache.org/schema/servicemix-quartz-2010.01.0-fuse-02-00.xsd
>        		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
> [...]
> The URL http://servicemix.apache.org/schema/servicemix-quartz-2010.01.0-fuse-02-00.xsd is unresolveable, and results in the XML editor claiming validation errors.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (SM-1970) Schema location is incorrect for servicemix-quartz-2010.01.0-fuse-02-00.xsd in servicemix-quartz archetype

Posted by "Geert Schuring (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SM-1970?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Geert Schuring reopened SM-1970:
--------------------------------


Thanks for commenting!

But my point was not that it didn't work in servicemix, because it does, like you describe. My point is that XML editors can't assist me because they can't find the schema. This makes it difficult to create configurations beyond the examples.
Eclipse for instance show a red cross icon in front of the filename because of the schema resolution error.

I would strongly recommend to make the schema's available via URLs and to use those URLs in the schemaLocation attribute.

> Schema location is incorrect for servicemix-quartz-2010.01.0-fuse-02-00.xsd in servicemix-quartz archetype
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: SM-1970
>                 URL: https://issues.apache.org/activemq/browse/SM-1970
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: archetypes
>    Affects Versions: archetypes-2010.01
>            Reporter: Geert Schuring
>            Assignee: Freeman Fang
>
> after project generation using the archetype, the xbean.xml contains:
> [...]
> xsi:schemaLocation="
>        		http://servicemix.apache.org/quartz/1.0 http://servicemix.apache.org/schema/servicemix-quartz-2010.01.0-fuse-02-00.xsd
>        		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
> [...]
> The URL http://servicemix.apache.org/schema/servicemix-quartz-2010.01.0-fuse-02-00.xsd is unresolveable, and results in the XML editor claiming validation errors.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SM-1970) Schema location is incorrect for servicemix-quartz-2010.01.0-fuse-02-00.xsd in servicemix-quartz archetype

Posted by "Geert Schuring (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61174#action_61174 ] 

Geert Schuring commented on SM-1970:
------------------------------------

But that means the XML can only be validated by ServiceMix, which means that there is no way of knowing whether a config is correct until servicemix logs errors on deploy-time, or works without logging any errors. You can't be serious that I should manually extract all servicemix component XSD's and load them into my IDE. That was never the intention of the spring.schemas mechanism.

See http://static.springsource.org/spring/docs/2.0.x/reference/extensible-xml.html#extensible-xml-registration-spring-schemas

"The properties file called 'spring.schemas' contains a mapping of XML Schema locations (referred to along with the schema declaration in XML files that use the schema as part of the 'xsi:schemaLocation' attribute) to classpath resources. This file is needed to prevent Spring from absolutely having to use a default EntityResolver that requires Internet access to retrieve the schema file."

> Schema location is incorrect for servicemix-quartz-2010.01.0-fuse-02-00.xsd in servicemix-quartz archetype
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: SM-1970
>                 URL: https://issues.apache.org/activemq/browse/SM-1970
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: archetypes
>    Affects Versions: archetypes-2010.01
>            Reporter: Geert Schuring
>            Assignee: Freeman Fang
>
> after project generation using the archetype, the xbean.xml contains:
> [...]
> xsi:schemaLocation="
>        		http://servicemix.apache.org/quartz/1.0 http://servicemix.apache.org/schema/servicemix-quartz-2010.01.0-fuse-02-00.xsd
>        		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
> [...]
> The URL http://servicemix.apache.org/schema/servicemix-quartz-2010.01.0-fuse-02-00.xsd is unresolveable, and results in the XML editor claiming validation errors.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.