You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Jack Sprat <re...@yahoo.com> on 2011/11/23 22:40:26 UTC

XML APIs JAR

We have a situation in Websphere 6.1 where there is a class loading problem with an Axis2 1.5.2 web service.  The class loading is set to PARENT_LAST on the web app.  That is the first thing I always do with Axis2 web services running on Websphere.

We've determined that the class loading problem comes from the fact that classes are missing that were in prior versions of Axis2.  These were in the xml-apis-1.3.04.jar file in Axis2 version 1.4.1.  The specific class causing the problem is org.w3c.dom.Notation.  It is no longer present in the Axis2 1.5.2 WAR and causes a linkage error.


Manually adding the xml-apis-1.3.04.jar file from the Axis2 1.4.1 distribution to the Axis2 1.5.2 web application cures the problem.

Why was this JAR removed in newer versions?  How do I get around this error, apart from manually adding a JAR from a prior distribution?  There must be a better way.


Any guidance is appreciated.

Thanks,
J

Re: XML APIs JAR

Posted by Jack Sprat <re...@yahoo.com>.
Thanks for the reply.  I am certainly no expert on class loading and this information is very much appreciated.


Your note about Axis2 1.6.x excluding Xerces made me try Axis2 1.6.1.  Initial tests work fine so I am hopeful that this solves our problems.

I'm digging further into this and will report back.


Thanks,
J



________________________________
 From: Andreas Veithen <an...@gmail.com>
To: java-user@axis.apache.org 
Sent: Monday, November 28, 2011 6:39 PM
Subject: Re: XML APIs JAR
 
Jack,

The point is that the entire argument behind solving the issue by
re-adding xml-apis to the WAR is flawed. Here is why:

1)
[quote]
IBM has told us that it comes down to the fact that there are
references to the org.w3c.dom classes in the Xerces library.  These
were resolved to the classes in the xml-apis JAR file before but now
are being loaded by the JVM since they don't exist in the WAR.  This
causes the VerifyError, a subclass of LinkageError.
[/quote]

That is incorrect because the last statement is not a valid conclusion
of the first two statements. You only get this kind of linkage error
if the same class is loaded by two different class loaders and there
is code where this causes a mismatch between what the class verifier
in the JVM sees (two distinct classes) and what the Java compiler sees
(one class). Therefore the absence of the JAR that contains the
org.w3c.dom
 classes can't explain the linkage error. Instead, the
correct explanation is the presence of some of the org.w3c.dom classes
in the XmlBeans JAR.

2)
Re-adding the xml-apis JAR has the effect that all org.w3c.dom classes
are now loaded from the WAR class loader. While this may solve the
immediate problem, it is likely to cause other problems later. In
fact, the APIs in xml-apis are completely self-contained in the sense
that they don't have any dependencies except on classes in java.*.
This implies that if you remove them completely from the WAR
(including the duplicates in the XmlBeans JAR), you will never again
encounter a class loader issue involving these classes. On the other
hand, if you include them in the WAR, you will run into class loader
issues as soon as you use an API or a library that depends on DOM (or
another API included in xml-apis, such as SAX and JAXP) and that is
not loaded from the
 WAR, but from the JRE or the server runtime.

To illustrate this, consider the following: Axis2 1.5.x only contains
Xerces because Woden has a hard dependency on Xerces. This was solved
in Axis2 1.6.x and Xerces is no longer included. If you work around
the issue caused by XmlBeans by adding xml-apis to the WAR, then you
would also have to add Xerces again.


Finally, to answer your questions about the three options:
- Option 1 reproducibly solves the problem on WAS 7.0, but I don't
really know why. Therefore I'm not surprised that things are different
with WAS 6.1 or with a JVM running on a different platform. Anyway I
kept this option because I want that users upgrade to a recent fix
pack before reporting issues (to make debugging easier).
- Regarding option 2, if you use the XmlBeans data binding, then
obviously that option is not applicable.
- Option 3 is the only option that is really guaranteed to
 solve the issue.

Andreas

On Mon, Nov 28, 2011 at 22:51, Jack Sprat <re...@yahoo.com> wrote:
> Andreas,
> Thanks again for the reply.
> Please don't take my response the wrong way.  I am only trying to solve a
> very difficult problem.  I did not reject the proposed solutions in the
> "Known Issues" section.  To answer your question on the 3 options.
> 1) We are current on the fix pack so there is nothing we can change there.
> 2) I was asking a question here.  Can I remove the xmlbeans-2.3.0.jar file
> if I am using XML Beans binding?  Please let me know.
> 3) I have not tried repackaging the Xmlbeans JAR file yet.  None of the
> offending classes are in there so it does not appear to be the problem.  I'm
> certainly willing to try but it makes for
 a more complicated deployment.
>
> I was hoping to get my question to #2 above answered.  I also want to know
> why the xml-apis.jar file was removed.  Including the JAR file would seem to
> avoid class loading issues.  It looks like Xerces depend on the XML APIs in
> the spec. and relying on the JVM could lead to the problems we are seeing.
>
> We asked IBM for help since we thought it was a bug on their end.  We're
> using Websphere on the IBM i (formerly AS/400) and IBM knows that best.
> We've used Axis2 here for a few years and want to stick with it.  We're tied
> to Websphere for the foreseeable future.
> Thanks,
> J
>
> ________________________________
> From: Andreas Veithen <an...@gmail.com>
> To: java-user@axis.apache.org
> Sent: Monday, November 28, 2011 3:15 PM
> Subject: Re: XML APIs JAR
>
> Jack,
>
> If I understand this correctly, you are seeing exactly the problem
> described in the "Known issues" section, but you reject the proposed
> solution on the grounds that IBM has told you that this won't fix the
> problem, and without actually having tested the solution... If for a
> problem with Axis2 you trust IBM support more than the people who are
> maintaining Axis2, then what are you still expecting from us?
>
> Andreas
>
> On Mon, Nov 28, 2011 at 19:10, Jack Sprat <re...@yahoo.com> wrote:
>> Thank you for the reply.
>> Most of that article does not apply
 to us.  The Websphere Web Service
>> feature pack is not installed.  The last paragraph entitled "Known Issues"
>> matches our problem exactly.  3 options are given:
>> 1) Upgrade to most current Websphere fix pack - We're on the most current
>> fix pack so no upgrade can be done.
>> 2) Remove the XmlBeans library.  I assume this is the xmlbeans-2.3.0.jar
>> file.  - I don't think we can remove the XML Beans jar since we're using
>> XML
>> Beans binding.  Is that right?
>>
>> 3) Remove the content from the org.w3c.dom package from the XmlBeans
>> library.  - Is this suggesting that the xmlbeans-2.3.0.jar be repackaged
>> to
>> exclude the 4 classes in the org.w3c.dom package?  This will not fix the
>> problem.  See below..
>>
>> We've had IBM dive deeply into
 this.  The Xerces XML parser
>> (xercesImpl-2.8.1.jar) includes the xml-apis. jar in its spec.  Regardless
>> of whether the JRE includes those classes, why wouldn't the Axis2
>> distribution include the JAR?
>>
>> IBM has told us that it comes down to the fact that there are references
>> to
>> the org.w3c.dom classes in the Xerces library.  These were resolved to the
>> classes in the xml-apis JAR file before but now are being loaded by the
>> JVM
>> since they don't exist in the WAR.  This causes the VerifyError, a
>> subclass
>> of LinkageError.
>> As noted in the article, the problem started with the
>> org.apache.xerces.dom.CoreDocumentImpl class.  It has a dependency on the
>> org.w3c.dom.Notation class.  This was previously included in the
>> xml-apis.jar file but is now
 missing.  It gets loaded from the JVM instead
>> and causes the Verify Error.
>>
>> What can I do to fix this problem?  We can temporarily fix the problem by
>> manually including the xml-apis-1.3.04.jar file in the WAR.  I'd rather
>> not
>> do that.  Can this JAR be re-added to the Axis2 distribution to ensure the
>> classes are loaded correctly?
>>
>> Thanks.
>> J
>>
>>
>> On 11/24/2011 4:35 AM, Andreas Veithen wrote:
>>> Axis2 requires Java 1.5 and in that version, all the APIs defined by
>>> xml-apis are already included in the JRE. Therefore xml-apis is no
>>> longer necessary. Also note that the fact that the problem disappears
>>> after adding xml-apis to the WAR doesn't necessarily mean that the
>>> removal of the JAR in Axis2 1.5.x is the cause of
 the problem.
>>>
>>> The difficulty with class loading issues is that there are so many
>>> variables that it is virtually impossible to debug them from a
>>> distance. The first thing you should do is to realign your setup with
>>> the guidelines for deployment on WebSphere given in [1].
>>>
>>> Andreas
>>>
>>> [1]
>>> https://builds.apache.org/job/Axis2/site/docs/app_server.html#WebSphere
>>>
>>> On Wed, Nov 23, 2011 at 22:40, Jack Sprat<re...@yahoo.com>  wrote:
>>>> We have a situation in Websphere 6.1 where there is a class loading
>>>> problem
>>>> with an Axis2
 1.5.2 web service.  The class loading is set to
>>>> PARENT_LAST
>>>> on
>>>> the web app.  That is the first thing I always do with Axis2 web
>>>> services
>>>> running on Websphere.
>>>> We've determined that the class loading problem comes from the fact that
>>>> classes are missing that were in prior versions of Axis2.  These were in
>>>> the
>>>> xml-apis-1.3.04.jar file in Axis2 version 1.4.1.  The specific class
>>>> causing
>>>> the problem is org.w3c.dom.Notation.  It is no longer present in the
>>>> Axis2
>>>> 1.5.2 WAR and causes a linkage error.
>>>>
>>>> Manually adding the xml-apis-1.3.04.jar file from the Axis2 1.4.1
>>>> distribution to the Axis2 1.5.2 web application cures the
 problem.
>>>> Why was this JAR removed in newer versions?  How do I get around this
>>>> error,
>>>> apart from manually adding a JAR from a prior distribution?  There must
>>>> be a
>>>> better way.
>>>>
>>>> Any guidance is appreciated.
>>>> Thanks,
>>>> J
>>

Re: XML APIs JAR

Posted by Andreas Veithen <an...@gmail.com>.
Jack,

The point is that the entire argument behind solving the issue by
re-adding xml-apis to the WAR is flawed. Here is why:

1)
[quote]
IBM has told us that it comes down to the fact that there are
references to the org.w3c.dom classes in the Xerces library.  These
were resolved to the classes in the xml-apis JAR file before but now
are being loaded by the JVM since they don't exist in the WAR.  This
causes the VerifyError, a subclass of LinkageError.
[/quote]

That is incorrect because the last statement is not a valid conclusion
of the first two statements. You only get this kind of linkage error
if the same class is loaded by two different class loaders and there
is code where this causes a mismatch between what the class verifier
in the JVM sees (two distinct classes) and what the Java compiler sees
(one class). Therefore the absence of the JAR that contains the
org.w3c.dom classes can't explain the linkage error. Instead, the
correct explanation is the presence of some of the org.w3c.dom classes
in the XmlBeans JAR.

2)
Re-adding the xml-apis JAR has the effect that all org.w3c.dom classes
are now loaded from the WAR class loader. While this may solve the
immediate problem, it is likely to cause other problems later. In
fact, the APIs in xml-apis are completely self-contained in the sense
that they don't have any dependencies except on classes in java.*.
This implies that if you remove them completely from the WAR
(including the duplicates in the XmlBeans JAR), you will never again
encounter a class loader issue involving these classes. On the other
hand, if you include them in the WAR, you will run into class loader
issues as soon as you use an API or a library that depends on DOM (or
another API included in xml-apis, such as SAX and JAXP) and that is
not loaded from the WAR, but from the JRE or the server runtime.

To illustrate this, consider the following: Axis2 1.5.x only contains
Xerces because Woden has a hard dependency on Xerces. This was solved
in Axis2 1.6.x and Xerces is no longer included. If you work around
the issue caused by XmlBeans by adding xml-apis to the WAR, then you
would also have to add Xerces again.


Finally, to answer your questions about the three options:
- Option 1 reproducibly solves the problem on WAS 7.0, but I don't
really know why. Therefore I'm not surprised that things are different
with WAS 6.1 or with a JVM running on a different platform. Anyway I
kept this option because I want that users upgrade to a recent fix
pack before reporting issues (to make debugging easier).
- Regarding option 2, if you use the XmlBeans data binding, then
obviously that option is not applicable.
- Option 3 is the only option that is really guaranteed to solve the issue.

Andreas

On Mon, Nov 28, 2011 at 22:51, Jack Sprat <re...@yahoo.com> wrote:
> Andreas,
> Thanks again for the reply.
> Please don't take my response the wrong way.  I am only trying to solve a
> very difficult problem.  I did not reject the proposed solutions in the
> "Known Issues" section.  To answer your question on the 3 options.
> 1) We are current on the fix pack so there is nothing we can change there.
> 2) I was asking a question here.  Can I remove the xmlbeans-2.3.0.jar file
> if I am using XML Beans binding?  Please let me know.
> 3) I have not tried repackaging the Xmlbeans JAR file yet.  None of the
> offending classes are in there so it does not appear to be the problem.  I'm
> certainly willing to try but it makes for a more complicated deployment.
>
> I was hoping to get my question to #2 above answered.  I also want to know
> why the xml-apis.jar file was removed.  Including the JAR file would seem to
> avoid class loading issues.  It looks like Xerces depend on the XML APIs in
> the spec. and relying on the JVM could lead to the problems we are seeing.
>
> We asked IBM for help since we thought it was a bug on their end.  We're
> using Websphere on the IBM i (formerly AS/400) and IBM knows that best.
> We've used Axis2 here for a few years and want to stick with it.  We're tied
> to Websphere for the foreseeable future.
> Thanks,
> J
>
> ________________________________
> From: Andreas Veithen <an...@gmail.com>
> To: java-user@axis.apache.org
> Sent: Monday, November 28, 2011 3:15 PM
> Subject: Re: XML APIs JAR
>
> Jack,
>
> If I understand this correctly, you are seeing exactly the problem
> described in the "Known issues" section, but you reject the proposed
> solution on the grounds that IBM has told you that this won't fix the
> problem, and without actually having tested the solution... If for a
> problem with Axis2 you trust IBM support more than the people who are
> maintaining Axis2, then what are you still expecting from us?
>
> Andreas
>
> On Mon, Nov 28, 2011 at 19:10, Jack Sprat <re...@yahoo.com> wrote:
>> Thank you for the reply.
>> Most of that article does not apply to us.  The Websphere Web Service
>> feature pack is not installed.  The last paragraph entitled "Known Issues"
>> matches our problem exactly.  3 options are given:
>> 1) Upgrade to most current Websphere fix pack - We're on the most current
>> fix pack so no upgrade can be done.
>> 2) Remove the XmlBeans library.  I assume this is the xmlbeans-2.3.0.jar
>> file.  - I don't think we can remove the XML Beans jar since we're using
>> XML
>> Beans binding.  Is that right?
>>
>> 3) Remove the content from the org.w3c.dom package from the XmlBeans
>> library.  - Is this suggesting that the xmlbeans-2.3.0.jar be repackaged
>> to
>> exclude the 4 classes in the org.w3c.dom package?  This will not fix the
>> problem.  See below..
>>
>> We've had IBM dive deeply into this.  The Xerces XML parser
>> (xercesImpl-2.8.1.jar) includes the xml-apis. jar in its spec.  Regardless
>> of whether the JRE includes those classes, why wouldn't the Axis2
>> distribution include the JAR?
>>
>> IBM has told us that it comes down to the fact that there are references
>> to
>> the org.w3c.dom classes in the Xerces library.  These were resolved to the
>> classes in the xml-apis JAR file before but now are being loaded by the
>> JVM
>> since they don't exist in the WAR.  This causes the VerifyError, a
>> subclass
>> of LinkageError.
>> As noted in the article, the problem started with the
>> org.apache.xerces.dom.CoreDocumentImpl class.  It has a dependency on the
>> org.w3c.dom.Notation class.  This was previously included in the
>> xml-apis.jar file but is now missing.  It gets loaded from the JVM instead
>> and causes the Verify Error.
>>
>> What can I do to fix this problem?  We can temporarily fix the problem by
>> manually including the xml-apis-1.3.04.jar file in the WAR.  I'd rather
>> not
>> do that.  Can this JAR be re-added to the Axis2 distribution to ensure the
>> classes are loaded correctly?
>>
>> Thanks.
>> J
>>
>>
>> On 11/24/2011 4:35 AM, Andreas Veithen wrote:
>>> Axis2 requires Java 1.5 and in that version, all the APIs defined by
>>> xml-apis are already included in the JRE. Therefore xml-apis is no
>>> longer necessary. Also note that the fact that the problem disappears
>>> after adding xml-apis to the WAR doesn't necessarily mean that the
>>> removal of the JAR in Axis2 1.5.x is the cause of the problem.
>>>
>>> The difficulty with class loading issues is that there are so many
>>> variables that it is virtually impossible to debug them from a
>>> distance. The first thing you should do is to realign your setup with
>>> the guidelines for deployment on WebSphere given in [1].
>>>
>>> Andreas
>>>
>>> [1]
>>> https://builds.apache.org/job/Axis2/site/docs/app_server.html#WebSphere
>>>
>>> On Wed, Nov 23, 2011 at 22:40, Jack Sprat<re...@yahoo.com>  wrote:
>>>> We have a situation in Websphere 6.1 where there is a class loading
>>>> problem
>>>> with an Axis2 1.5.2 web service.  The class loading is set to
>>>> PARENT_LAST
>>>> on
>>>> the web app.  That is the first thing I always do with Axis2 web
>>>> services
>>>> running on Websphere.
>>>> We've determined that the class loading problem comes from the fact that
>>>> classes are missing that were in prior versions of Axis2.  These were in
>>>> the
>>>> xml-apis-1.3.04.jar file in Axis2 version 1.4.1.  The specific class
>>>> causing
>>>> the problem is org.w3c.dom.Notation.  It is no longer present in the
>>>> Axis2
>>>> 1.5.2 WAR and causes a linkage error.
>>>>
>>>> Manually adding the xml-apis-1.3.04.jar file from the Axis2 1.4.1
>>>> distribution to the Axis2 1.5.2 web application cures the problem.
>>>> Why was this JAR removed in newer versions?  How do I get around this
>>>> error,
>>>> apart from manually adding a JAR from a prior distribution?  There must
>>>> be a
>>>> better way.
>>>>
>>>> Any guidance is appreciated.
>>>> Thanks,
>>>> J
>>
>
>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org


Re: XML APIs JAR

Posted by Jack Sprat <re...@yahoo.com>.
Andreas,

Thanks again for the reply.

Please don't take my response the wrong way.  I am only trying to solve a very difficult problem.  I did not reject the proposed solutions in the "Known Issues" section.  To answer your question on the 3 options.

1) We are current on the fix pack so there is nothing we can change there.
2) I was asking a question here.  Can I remove the xmlbeans-2.3.0.jar file if I am using XML Beans binding?  Please let me know.
3) I have not tried repackaging the Xmlbeans JAR file yet.  None of the offending classes are in there so it does not appear to be the problem.  I'm certainly willing to try but it makes for a more complicated deployment.


I was hoping to get my question to #2 above answered.  I also want to know why the xml-apis.jar file was removed.  Including the JAR file would seem to avoid class loading issues.  It looks like Xerces depend on the XML APIs in the spec. and relying on the JVM could lead to the problems we are seeing.


We asked IBM for help since we thought it was a bug on their end.  We're using Websphere on the IBM i (formerly AS/400) and IBM knows that best.  We've used Axis2 here for a few years and want to stick with it.  We're tied to Websphere for the foreseeable future.

Thanks,
J



________________________________
 From: Andreas Veithen <an...@gmail.com>
To: java-user@axis.apache.org 
Sent: Monday, November 28, 2011 3:15 PM
Subject: Re: XML APIs JAR
 
Jack,

If I understand this correctly, you are seeing exactly the problem
described in the "Known issues" section, but you reject the proposed
solution on the grounds that IBM has told you that this won't fix the
problem, and without actually having tested the solution... If for a
problem with Axis2 you trust IBM support more than the people who are
maintaining Axis2, then what are you still expecting from us?

Andreas

On Mon, Nov 28, 2011 at 19:10, Jack Sprat <re...@yahoo.com> wrote:
> Thank you for the reply.
> Most of that article does not apply to us.  The Websphere Web Service
> feature pack is not installed.  The last paragraph entitled "Known Issues"
> matches our problem exactly.  3 options are given:
> 1) Upgrade to most current Websphere fix pack - We're on the most current
> fix pack so no upgrade can be done.
> 2) Remove the XmlBeans library.  I assume this is the xmlbeans-2.3.0.jar
> file.  - I don't think we can remove the XML Beans jar since we're using XML
> Beans binding.  Is that right?
>
> 3) Remove the content from the org.w3c.dom package from the XmlBeans
> library.  - Is this suggesting that the xmlbeans-2.3.0.jar be repackaged to
> exclude the 4 classes in the org.w3c.dom package?  This will not fix the
> problem.  See below..
>
> We've had IBM dive deeply into this.  The Xerces XML parser
> (xercesImpl-2.8.1.jar) includes the xml-apis. jar in its spec.  Regardless
> of whether the JRE includes those classes, why wouldn't the Axis2
> distribution include the JAR?
>
> IBM has told us that it comes down to the fact that there are references to
> the org.w3c.dom classes in the Xerces library.  These were resolved to the
> classes in the xml-apis JAR file before but now are being loaded by the JVM
> since they don't exist in the WAR.  This causes the VerifyError, a subclass
> of LinkageError.
> As noted in the article, the problem started with the
> org.apache.xerces.dom.CoreDocumentImpl class.  It has a dependency on the
> org.w3c.dom.Notation class.  This was previously included in the
> xml-apis.jar file but is now missing.  It gets loaded from the JVM instead
> and causes the Verify Error.
>
> What can I do to fix this problem?  We can temporarily fix the problem by
> manually including the xml-apis-1.3.04.jar file in the WAR.  I'd rather not
> do that.  Can this JAR be re-added to the Axis2 distribution to ensure the
> classes are loaded correctly?
>
> Thanks.
> J
>
>
> On 11/24/2011 4:35 AM, Andreas Veithen wrote:
>> Axis2 requires Java 1.5 and in that version, all the APIs defined by
>> xml-apis are already included in the JRE. Therefore xml-apis is no
>> longer necessary. Also note that the fact that the problem disappears
>> after adding xml-apis to the WAR doesn't necessarily mean that the
>> removal of the JAR in Axis2 1.5.x is the cause of the problem.
>>
>> The difficulty with class loading issues is that there are so many
>> variables that it is virtually impossible to debug them from a
>> distance. The first thing you should do is to realign your setup with
>> the guidelines for deployment on WebSphere given in [1].
>>
>> Andreas
>>
>> [1]
>> https://builds.apache.org/job/Axis2/site/docs/app_server.html#WebSphere
>>
>> On Wed, Nov 23, 2011 at 22:40, Jack Sprat<re...@yahoo.com>  wrote:
>>> We have a situation in Websphere 6.1 where there is a class loading
>>> problem
>>> with an Axis2 1.5.2 web service.  The class loading is set to PARENT_LAST
>>> on
>>> the web app.  That is the first thing I always do with Axis2 web services
>>> running on Websphere.
>>> We've determined that the class loading problem comes from the fact that
>>> classes are missing that were in prior versions of Axis2.  These were in
>>> the
>>> xml-apis-1.3.04.jar file in Axis2 version 1.4.1.  The specific class
>>> causing
>>> the problem is org.w3c.dom.Notation.  It is no longer present in the
>>> Axis2
>>> 1.5.2 WAR and causes a linkage error.
>>>
>>> Manually adding the xml-apis-1.3.04.jar file from the Axis2 1.4.1
>>> distribution to the Axis2 1.5.2 web application cures the problem.
>>> Why was this JAR removed in newer versions?  How do I get around this
>>> error,
>>> apart from manually adding a JAR from a prior distribution?  There must
>>> be a
>>> better way.
>>>
>>> Any guidance is appreciated.
>>> Thanks,
>>> J
>

Re: XML APIs JAR

Posted by Andreas Veithen <an...@gmail.com>.
Jack,

If I understand this correctly, you are seeing exactly the problem
described in the "Known issues" section, but you reject the proposed
solution on the grounds that IBM has told you that this won't fix the
problem, and without actually having tested the solution... If for a
problem with Axis2 you trust IBM support more than the people who are
maintaining Axis2, then what are you still expecting from us?

Andreas

On Mon, Nov 28, 2011 at 19:10, Jack Sprat <re...@yahoo.com> wrote:
> Thank you for the reply.
> Most of that article does not apply to us.  The Websphere Web Service
> feature pack is not installed.  The last paragraph entitled "Known Issues"
> matches our problem exactly.  3 options are given:
> 1) Upgrade to most current Websphere fix pack - We're on the most current
> fix pack so no upgrade can be done.
> 2) Remove the XmlBeans library.  I assume this is the xmlbeans-2.3.0.jar
> file.  - I don't think we can remove the XML Beans jar since we're using XML
> Beans binding.  Is that right?
>
> 3) Remove the content from the org.w3c.dom package from the XmlBeans
> library.  - Is this suggesting that the xmlbeans-2.3.0.jar be repackaged to
> exclude the 4 classes in the org.w3c.dom package?  This will not fix the
> problem.  See below..
>
> We've had IBM dive deeply into this.  The Xerces XML parser
> (xercesImpl-2.8.1.jar) includes the xml-apis. jar in its spec.  Regardless
> of whether the JRE includes those classes, why wouldn't the Axis2
> distribution include the JAR?
>
> IBM has told us that it comes down to the fact that there are references to
> the org.w3c.dom classes in the Xerces library.  These were resolved to the
> classes in the xml-apis JAR file before but now are being loaded by the JVM
> since they don't exist in the WAR.  This causes the VerifyError, a subclass
> of LinkageError.
> As noted in the article, the problem started with the
> org.apache.xerces.dom.CoreDocumentImpl class.  It has a dependency on the
> org.w3c.dom.Notation class.  This was previously included in the
> xml-apis.jar file but is now missing.  It gets loaded from the JVM instead
> and causes the Verify Error.
>
> What can I do to fix this problem?  We can temporarily fix the problem by
> manually including the xml-apis-1.3.04.jar file in the WAR.  I'd rather not
> do that.  Can this JAR be re-added to the Axis2 distribution to ensure the
> classes are loaded correctly?
>
> Thanks.
> J
>
>
> On 11/24/2011 4:35 AM, Andreas Veithen wrote:
>> Axis2 requires Java 1.5 and in that version, all the APIs defined by
>> xml-apis are already included in the JRE. Therefore xml-apis is no
>> longer necessary. Also note that the fact that the problem disappears
>> after adding xml-apis to the WAR doesn't necessarily mean that the
>> removal of the JAR in Axis2 1.5.x is the cause of the problem.
>>
>> The difficulty with class loading issues is that there are so many
>> variables that it is virtually impossible to debug them from a
>> distance. The first thing you should do is to realign your setup with
>> the guidelines for deployment on WebSphere given in [1].
>>
>> Andreas
>>
>> [1]
>> https://builds.apache.org/job/Axis2/site/docs/app_server.html#WebSphere
>>
>> On Wed, Nov 23, 2011 at 22:40, Jack Sprat<re...@yahoo.com>  wrote:
>>> We have a situation in Websphere 6.1 where there is a class loading
>>> problem
>>> with an Axis2 1.5.2 web service.  The class loading is set to PARENT_LAST
>>> on
>>> the web app.  That is the first thing I always do with Axis2 web services
>>> running on Websphere.
>>> We've determined that the class loading problem comes from the fact that
>>> classes are missing that were in prior versions of Axis2.  These were in
>>> the
>>> xml-apis-1.3.04.jar file in Axis2 version 1.4.1.  The specific class
>>> causing
>>> the problem is org.w3c.dom.Notation.  It is no longer present in the
>>> Axis2
>>> 1.5.2 WAR and causes a linkage error.
>>>
>>> Manually adding the xml-apis-1.3.04.jar file from the Axis2 1.4.1
>>> distribution to the Axis2 1.5.2 web application cures the problem.
>>> Why was this JAR removed in newer versions?  How do I get around this
>>> error,
>>> apart from manually adding a JAR from a prior distribution?  There must
>>> be a
>>> better way.
>>>
>>> Any guidance is appreciated.
>>> Thanks,
>>> J
>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org


Re: XML APIs JAR

Posted by Jack Sprat <re...@yahoo.com>.
Thank you for the reply.

Most of that article does not apply to us.  The Websphere Web Service feature pack is not installed.  The last paragraph entitled "Known Issues" matches our problem exactly.  3 options are given:

1) Upgrade to most current Websphere fix pack - We're on the most current fix pack so no upgrade can be done.

2) Remove the XmlBeans library.  I assume this is the xmlbeans-2.3.0.jar file.  - I don't think we can remove the XML Beans jar since we're using XML Beans binding.  Is that right?


3) Remove the content from the org.w3c.dom package from the XmlBeans library.  - Is this suggesting that the xmlbeans-2.3.0.jar be repackaged to exclude the 4 classes in the org.w3c.dom package?  This will not fix the problem.  See below..


We've had IBM dive deeply into this.  The Xerces XML parser (xercesImpl-2.8.1.jar) includes the xml-apis. jar in its spec.  Regardless of whether the JRE includes those classes, why wouldn't the Axis2 distribution include the JAR?


IBM has told us that it comes down to the fact that there are references to the org.w3c.dom classes in the Xerces library.  These were resolved to the classes in the xml-apis JAR file before but now are being loaded by the JVM since they don't exist in the WAR.  This causes the VerifyError, a subclass of LinkageError.

As noted in the article, the problem started with the org.apache.xerces.dom.CoreDocumentImpl class.  It has a dependency on the org.w3c.dom.Notation class.  This was previously included in the xml-apis.jar file but is now missing.  It gets loaded from the JVM instead and causes the Verify Error.


What can I do to fix this problem?  We can temporarily fix the problem by manually including the xml-apis-1.3.04.jar file in the WAR.  I'd rather not do that.  Can this JAR be re-added to the Axis2 distribution to ensure the classes are loaded correctly?


Thanks.
J



On 11/24/2011 4:35 AM, Andreas Veithen wrote:
> Axis2 requires Java 1.5 and in that version, all the APIs defined by
> xml-apis are already included in the JRE. Therefore xml-apis is no
> longer necessary. Also note that the fact that the problem disappears
> after adding xml-apis to the WAR doesn't necessarily mean that the
> removal of the JAR in Axis2 1.5.x is the cause of the problem.
>
> The difficulty with class loading issues is that there are so many
> variables that it is virtually impossible to debug them from a
> distance. The first thing you should do is to realign your setup with
> the guidelines for deployment on WebSphere given in [1].
>
> Andreas
>
> [1] https://builds.apache.org/job/Axis2/site/docs/app_server.html#WebSphere
>
> On Wed, Nov 23, 2011 at 22:40, Jack Sprat<re...@yahoo.com>  wrote:
>> We have a situation in Websphere 6.1 where there is a class loading problem
>> with an Axis2 1.5.2 web service.  The class loading is set to PARENT_LAST on
>> the web app.  That is the first thing I always do with Axis2 web services
>> running on Websphere.
>> We've determined that the class loading problem comes from the fact that
>> classes are missing that were in prior versions of Axis2.  These were in the
>> xml-apis-1.3.04.jar file in Axis2 version 1.4.1.  The specific class causing
>> the problem is org.w3c.dom.Notation.  It is no longer present in the Axis2
>> 1.5.2 WAR and causes a linkage error.
>>
>> Manually adding the xml-apis-1.3.04.jar file from the Axis2 1.4.1
>> distribution to the Axis2 1.5.2 web application cures the problem.
>> Why was this JAR removed in newer versions?  How do I get around this error,
>> apart from manually adding a JAR from a prior distribution?  There must be a
>> better way.
>>
>> Any guidance is appreciated.
>> Thanks,
>> J

Re: XML APIs JAR

Posted by Andreas Veithen <an...@gmail.com>.
Axis2 requires Java 1.5 and in that version, all the APIs defined by
xml-apis are already included in the JRE. Therefore xml-apis is no
longer necessary. Also note that the fact that the problem disappears
after adding xml-apis to the WAR doesn't necessarily mean that the
removal of the JAR in Axis2 1.5.x is the cause of the problem.

The difficulty with class loading issues is that there are so many
variables that it is virtually impossible to debug them from a
distance. The first thing you should do is to realign your setup with
the guidelines for deployment on WebSphere given in [1].

Andreas

[1] https://builds.apache.org/job/Axis2/site/docs/app_server.html#WebSphere

On Wed, Nov 23, 2011 at 22:40, Jack Sprat <re...@yahoo.com> wrote:
> We have a situation in Websphere 6.1 where there is a class loading problem
> with an Axis2 1.5.2 web service.  The class loading is set to PARENT_LAST on
> the web app.  That is the first thing I always do with Axis2 web services
> running on Websphere.
> We've determined that the class loading problem comes from the fact that
> classes are missing that were in prior versions of Axis2.  These were in the
> xml-apis-1.3.04.jar file in Axis2 version 1.4.1.  The specific class causing
> the problem is org.w3c.dom.Notation.  It is no longer present in the Axis2
> 1.5.2 WAR and causes a linkage error.
>
> Manually adding the xml-apis-1.3.04.jar file from the Axis2 1.4.1
> distribution to the Axis2 1.5.2 web application cures the problem.
> Why was this JAR removed in newer versions?  How do I get around this error,
> apart from manually adding a JAR from a prior distribution?  There must be a
> better way.
>
> Any guidance is appreciated.
> Thanks,
> J
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org


AW: XML APIs JAR

Posted by Stadelmann Josef <jo...@axa-winterthur.ch>.
I cannot answer your questions. BUT

I suggest you: Migrate to Axis2-1.6.1 ! we just did so, leaving
Axis2-1.2 behind us and all works well on Tomcat.

There are so many bugs fixed, so much work done in between all this
releases, at least worth to look at it.

Josef

 

Von: Jack Sprat [mailto:rexclaimer2@yahoo.com] 
Gesendet: Mittwoch, 23. November 2011 22:40
An: axis-user@ws.apache.org
Betreff: XML APIs JAR

 

We have a situation in Websphere 6.1 where there is a class loading
problem with an Axis2 1.5.2 web service.  The class loading is set to
PARENT_LAST on the web app.  That is the first thing I always do with
Axis2 web services running on Websphere.

 

We've determined that the class loading problem comes from the fact that
classes are missing that were in prior versions of Axis2.  These were in
the xml-apis-1.3.04.jar file in Axis2 version 1.4.1.  The specific class
causing the problem is org.w3c.dom.Notation.  It is no longer present in
the Axis2 1.5.2 WAR and causes a linkage error.

 

Manually adding the xml-apis-1.3.04.jar file from the Axis2 1.4.1
distribution to the Axis2 1.5.2 web application cures the problem.

 

Why was this JAR removed in newer versions?  How do I get around this
error, apart from manually adding a JAR from a prior distribution?
There must be a better way.

 

Any guidance is appreciated.

 

Thanks,

J