You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by "David J. M. Karlsen (JIRA)" <xm...@xml.apache.org> on 2007/05/08 18:53:15 UTC

[jira] Created: (XMLBEANS-330) javax.xml.namespace classes included in archive

javax.xml.namespace classes included in archive
-----------------------------------------------

                 Key: XMLBEANS-330
                 URL: https://issues.apache.org/jira/browse/XMLBEANS-330
             Project: XMLBeans
          Issue Type: Bug
    Affects Versions: Version 2.2
         Environment: N/A
            Reporter: David J. M. Karlsen
            Priority: Blocker


The archive at http://repo1.maven.org/maven2/xmlbeans/xbean/2.2.0/ includes javax.xml.namespace classes (QName and NamespaceContext) - which are part of the API specification - and thus should not be included in the archive.

This is especially problematic when using xbeans inside containers which also loads these classes, ending up in ClassCast exceptions, LinkageError and the likes.


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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org


[jira] Commented: (XMLBEANS-330) javax.xml.namespace classes included in archive

Posted by "Radu Preotiuc-Pietro (JIRA)" <xm...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XMLBEANS-330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12494405 ] 

Radu Preotiuc-Pietro commented on XMLBEANS-330:
-----------------------------------------------

David,

You seem to be focused on the maven release, so to speak, I am focused on the normal release that people download. XmlBeans has had releases before Maven got widely used inside Apache and the problem that I am having is that people who have XmlBeans 2.2.0 and are on JDK1.4 and want to upgrade can't have their apps break because the QName has now been removed.

Also, contrary to what you say, I have not found these classes at the location you indicate and also I have not been able to find them on java.sun.com. So there's this problem too.

Lastly, I actually would be interested in what exact error you are getting and what enviroment, like JDK version and classloader setup.
JDK >= 1.5 have this class in the JDK loaded by the bootstrap classloader and so I can't see how having the class in xbean.jar can cause a problem.


> javax.xml.namespace classes included in archive
> -----------------------------------------------
>
>                 Key: XMLBEANS-330
>                 URL: https://issues.apache.org/jira/browse/XMLBEANS-330
>             Project: XMLBeans
>          Issue Type: Bug
>    Affects Versions: Version 2.2
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>         Assigned To: Jacob Danner
>            Priority: Blocker
>
> The archive at http://repo1.maven.org/maven2/xmlbeans/xbean/2.2.0/ includes javax.xml.namespace classes (QName and NamespaceContext) - which are part of the API specification - and thus should not be included in the archive.
> This is especially problematic when using xbeans inside containers which also loads these classes, ending up in ClassCast exceptions, LinkageError and the likes.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org


[jira] Commented: (XMLBEANS-330) javax.xml.namespace classes included in archive

Posted by "David J. M. Karlsen (JIRA)" <xm...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XMLBEANS-330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12494352 ] 

David J. M. Karlsen commented on XMLBEANS-330:
----------------------------------------------

Yeah, I've removed the classes to verify the solution - but I still think it's a *very bad* solution.

There are 3 points to be made on this issue:

1)
The classes (or interfaces) are part of an API specification because they're supposed to be interoperable - and in fact an API! They are downloadable at java.sun.com and dev.java.net. We simply can't just stuff in "things" because it's handy - that's why there are specs for both APIs and JDKs. They are even available at: http://repo1.maven.org/maven2/xml-apis/xml-apis/ - so xmlbeans should instead depend on the appropiate xml-apis version. This separates implementations from specifications - which is a really good idea.

2)
If such hacks should be done, package variants with suitable maven2 <classifier> tags - so clean versions are downloadable, and "handy" jars suitable for JDK1.3 / 1.4 are available.

3) 
This essientially breaks the maven-idea, so all users have to download the original archives, remove extra classes, repackage them, and place them under their repos under different names. This again will lead to a lot of <exclude> and addition of "manual dependencies" (in our case we used axis2's xmlbeans mapping, which depends on the spoken of xmlbeans archive). This again will probably lead to less popularity of maven2 - especially in large enterprises (which could afford to contribute to maven2) - which is really sad.

I strongly encourage the xmlbeans project to change it's practice.

That said, thanks for the project... :-)

> javax.xml.namespace classes included in archive
> -----------------------------------------------
>
>                 Key: XMLBEANS-330
>                 URL: https://issues.apache.org/jira/browse/XMLBEANS-330
>             Project: XMLBeans
>          Issue Type: Bug
>    Affects Versions: Version 2.2
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>         Assigned To: Jacob Danner
>            Priority: Blocker
>
> The archive at http://repo1.maven.org/maven2/xmlbeans/xbean/2.2.0/ includes javax.xml.namespace classes (QName and NamespaceContext) - which are part of the API specification - and thus should not be included in the archive.
> This is especially problematic when using xbeans inside containers which also loads these classes, ending up in ClassCast exceptions, LinkageError and the likes.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org


[jira] Commented: (XMLBEANS-330) javax.xml.namespace classes included in archive

Posted by "David J. M. Karlsen (JIRA)" <xm...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XMLBEANS-330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12497677 ] 

David J. M. Karlsen commented on XMLBEANS-330:
----------------------------------------------

And it's also here (that single class!):
ftp://ibiblio.org/pub/packages/maven2/wsdl4j/wsdl4j-qname/1.6.1/

browse repo:
http://mvnrepository.com/artifact/wsdl4j/wsdl4j-qname

> javax.xml.namespace classes included in archive
> -----------------------------------------------
>
>                 Key: XMLBEANS-330
>                 URL: https://issues.apache.org/jira/browse/XMLBEANS-330
>             Project: XMLBeans
>          Issue Type: Bug
>    Affects Versions: Version 2.2
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>         Assigned To: Jacob Danner
>            Priority: Blocker
>
> The archive at http://repo1.maven.org/maven2/xmlbeans/xbean/2.2.0/ includes javax.xml.namespace classes (QName and NamespaceContext) - which are part of the API specification - and thus should not be included in the archive.
> This is especially problematic when using xbeans inside containers which also loads these classes, ending up in ClassCast exceptions, LinkageError and the likes.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org


[jira] Resolved: (XMLBEANS-330) javax.xml.namespace classes included in archive

Posted by "Jacob Danner (JIRA)" <xm...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XMLBEANS-330?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacob Danner resolved XMLBEANS-330.
-----------------------------------

    Resolution: Duplicate
      Assignee: Jacob Danner

Looks like another case of:
http://issues.apache.org/jira/browse/XMLBEANS-324

The issue has a solution (removing the class from the jar) but also some explanation as to why XmlBeans contains that class.

'''
Problem is XmlBeans is designed to work with JDK1.4 and JDK1.4 doesn't have this class if I am not mistaken. Having that class in the jar allows users of both JDK1.4 and JDK1.5 and above to use XmlBeans without having to worry about a dependency that really is not available anywhere for download.

What environment are you in that makes this error happen? Is it possible for you to remove this class from the jar? 
'''

> javax.xml.namespace classes included in archive
> -----------------------------------------------
>
>                 Key: XMLBEANS-330
>                 URL: https://issues.apache.org/jira/browse/XMLBEANS-330
>             Project: XMLBeans
>          Issue Type: Bug
>    Affects Versions: Version 2.2
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>         Assigned To: Jacob Danner
>            Priority: Blocker
>
> The archive at http://repo1.maven.org/maven2/xmlbeans/xbean/2.2.0/ includes javax.xml.namespace classes (QName and NamespaceContext) - which are part of the API specification - and thus should not be included in the archive.
> This is especially problematic when using xbeans inside containers which also loads these classes, ending up in ClassCast exceptions, LinkageError and the likes.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org


[jira] Closed: (XMLBEANS-330) javax.xml.namespace classes included in archive

Posted by "David J. M. Karlsen (JIRA)" <xm...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XMLBEANS-330?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David J. M. Karlsen closed XMLBEANS-330.
----------------------------------------


Closing as this is a duplicate

> javax.xml.namespace classes included in archive
> -----------------------------------------------
>
>                 Key: XMLBEANS-330
>                 URL: https://issues.apache.org/jira/browse/XMLBEANS-330
>             Project: XMLBeans
>          Issue Type: Bug
>    Affects Versions: Version 2.2
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Assignee: Jacob Danner
>            Priority: Blocker
>
> The archive at http://repo1.maven.org/maven2/xmlbeans/xbean/2.2.0/ includes javax.xml.namespace classes (QName and NamespaceContext) - which are part of the API specification - and thus should not be included in the archive.
> This is especially problematic when using xbeans inside containers which also loads these classes, ending up in ClassCast exceptions, LinkageError and the likes.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org


[jira] Commented: (XMLBEANS-330) javax.xml.namespace classes included in archive

Posted by "David Jencks (JIRA)" <xm...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XMLBEANS-330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12495337 ] 

David Jencks commented on XMLBEANS-330:
---------------------------------------

re lack of qname class in maven repos... Geronimo had to deal with this problem for the j2ee 1.4 releases and have maven-published a jar containing the qname  class at org.apache.geronimo.specs:geronimo-qname_1.1_spec:1.1:jar or http://repo1.maven.org/maven2/org/apache/geronimo/specs/geronimo-qname_1.1_spec/1.1/geronimo-qname_1.1_spec-1.1.jar.  This is part of the geronimo j2ee-1.4 certified releases.

> javax.xml.namespace classes included in archive
> -----------------------------------------------
>
>                 Key: XMLBEANS-330
>                 URL: https://issues.apache.org/jira/browse/XMLBEANS-330
>             Project: XMLBeans
>          Issue Type: Bug
>    Affects Versions: Version 2.2
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>         Assigned To: Jacob Danner
>            Priority: Blocker
>
> The archive at http://repo1.maven.org/maven2/xmlbeans/xbean/2.2.0/ includes javax.xml.namespace classes (QName and NamespaceContext) - which are part of the API specification - and thus should not be included in the archive.
> This is especially problematic when using xbeans inside containers which also loads these classes, ending up in ClassCast exceptions, LinkageError and the likes.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org


[jira] Commented: (XMLBEANS-330) javax.xml.namespace classes included in archive

Posted by "David J. M. Karlsen (JIRA)" <xm...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XMLBEANS-330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12494558 ] 

David J. M. Karlsen commented on XMLBEANS-330:
----------------------------------------------

Yes - I'm focusing a little on the "maven release" - beacuse it can save me so much time to automate building++

The stack trace:

   Delegation Mode: PARENT_LAST
   [1] com.ibm.ws.classloader.ProtectionClassLoader@1ad3fba
   [2] com.ibm.ws.bootstrap.ExtClassLoader@16dfa45
   [3] org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader@1060478
   [4] sun.misc.Launcher$AppClassLoader@169e11
   [5] sun.misc.Launcher$ExtClassLoader@e39a3e
---Original exception---
java.lang.LinkageError: Class javax/xml/namespace/QName violates loader constraints
        at java.lang.ClassLoader.defineClass1&#40;Native Method&#41;
        at java.lang.ClassLoader.defineClass&#40;ClassLoader.java:620&#41;
        at java.security.SecureClassLoader.defineClass&#40;SecureClassLoader.java:124&#41;
        at com.ibm.ws.classloader.CompoundClassLoader._defineClass&#40;CompoundClassLoader.java:526&#41;
        at com.ibm.ws.classloader.CompoundClassLoader.findClass&#40;CompoundClassLoader.java:477&#41;
        at com.ibm.ws.classloader.CompoundClassLoader.loadClass&#40;CompoundClassLoader.java:382&#41;
        at java.lang.ClassLoader.loadClass&#40;ClassLoader.java:251&#41;
        at java.lang.ClassLoader.loadClassInternal&#40;ClassLoader.java:319&#41;


I'll do a search for the classes in API jars.

We need parent_last delegation (using the application classloader before appsrv classloader) because we need newer aspectj libraries than the ones included in the appserver (WebSphere 6.1 / JDK 1.5)

> javax.xml.namespace classes included in archive
> -----------------------------------------------
>
>                 Key: XMLBEANS-330
>                 URL: https://issues.apache.org/jira/browse/XMLBEANS-330
>             Project: XMLBeans
>          Issue Type: Bug
>    Affects Versions: Version 2.2
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>         Assigned To: Jacob Danner
>            Priority: Blocker
>
> The archive at http://repo1.maven.org/maven2/xmlbeans/xbean/2.2.0/ includes javax.xml.namespace classes (QName and NamespaceContext) - which are part of the API specification - and thus should not be included in the archive.
> This is especially problematic when using xbeans inside containers which also loads these classes, ending up in ClassCast exceptions, LinkageError and the likes.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org


[jira] Commented: (XMLBEANS-330) javax.xml.namespace classes included in archive

Posted by "Radu Preotiuc-Pietro (JIRA)" <xm...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XMLBEANS-330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12494844 ] 

Radu Preotiuc-Pietro commented on XMLBEANS-330:
-----------------------------------------------

I guess I hadn't realized that parent_last delegation would skip not only the appsrv CL but also the bootstrap CL, since QName is in the JDK 1.5 API


> javax.xml.namespace classes included in archive
> -----------------------------------------------
>
>                 Key: XMLBEANS-330
>                 URL: https://issues.apache.org/jira/browse/XMLBEANS-330
>             Project: XMLBeans
>          Issue Type: Bug
>    Affects Versions: Version 2.2
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>         Assigned To: Jacob Danner
>            Priority: Blocker
>
> The archive at http://repo1.maven.org/maven2/xmlbeans/xbean/2.2.0/ includes javax.xml.namespace classes (QName and NamespaceContext) - which are part of the API specification - and thus should not be included in the archive.
> This is especially problematic when using xbeans inside containers which also loads these classes, ending up in ClassCast exceptions, LinkageError and the likes.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org