I tried to remove it from one of them but it still didn't work.

Which one did you remove it from ?

You should remove from stax-api-1.0.1.jar 

    javax/xml/XMLConstants.class 
    javax/xml/namespace/NamespaceContext.class 
    javax/xml/namespace/QName.class 

I have done this and do not have any conflict.

============================================================================

The jar file stax-api-1.0.1,jar contains classes that are also defined in
xml-api-1.3.03.jar 

stax-api-1.0.1.jar 

    javax/xml/XMLConstants.class 
    javax/xml/namespace/NamespaceContext.class 
    javax/xml/namespace/QName.class 

xml-apis-1.3.03.jar 

    javax/xml/XMLConstants.class 
    javax/xml/namespace/NamespaceContext.class 
    javax/xml/namespace/QName.class 
    javax/xml/namespace/QName$1.class 

================================================= 

The XMLConstants class shipped in stax-api-1.0.1.jar does not contain all of
the constant fields. 

stax-api-1.0.1.jar 

javax.xml.XMLConstants 

        DEFAULT_NS_PREFIX 
        XML_NS_PREFIX 
        XML_NS_URI 
        XMLNS_ATTRIBUTE 
        XMLNS_ATTRIBUTE_NS_URI 

================================================= 

xml-apis-1.3.03.jar 

javax.xml.XMLConstants 

        NULL_NS_URI 
        DEFAULT_NS_PREFIX 
        XML_NS_URI 
        XML_NS_PREFIX 
        XMLNS_ATTRIBUTE_NS_URI 
        XMLNS_ATTRIBUTE 
        W3C_XML_SCHEMA_NS_URI 
        W3C_XML_SCHEMA_INSTANCE_NS_URI 
        W3C_XPATH_DATATYPE_NS_URI 
        XML_DTD_NS_URI 
        RELAXNG_NS_URI 
        FEATURE_SECURE_PROCESSING 

http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/XMLConstants.html 

http://java.sun.com/javase/6/docs/api/javax/xml/XMLConstants.html 

================================================= 

java -cp .;xml-apis-1.3.03.jar Test > xml-api.txt 

java -cp .;stax-api-1.0.1.jar Test > stax-api.txt 

import java.lang.reflect.* ; 

public class Test 
{ 
    public static void main ( String[] args ) throws Exception 
    { 
        Class clazz = Class.forName ( "javax.xml.XMLConstants" ) ; 

        Field[] fieldArray = clazz.getFields () ; 

        for ( int i=0; i < fieldArray.length; i++ ) 
        { 
            System.out.println ( fieldArray[i].getName () ) ; 
        } 
    } 
} 

================================================= 


-----Original Message-----
From: Qureshi, Affan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 15 April 2008 9:06 AM
To: '[email protected]'
Subject: [Axis2] QName conflict - present in two jar files


Hi,

I am trying to build my project but I am getting a strange error. The
compiler complains about not finding certain methods of
javax.xml.namespace.QName class in the generated Stub. I found that this
class is present in two jar files: stax-api.jar and xml-api.jar.

I tried to remove it from one of them but it still didn't work.

Btw the same set up worked in a standalone application but once I integrated
the code into my web-app it started giving me this error.

Any ideas what I am doing wrong?

Thanks!

Affan


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to