Skip to Content.
Sympa Menu

mace-opensaml-users - RE: Problems initializing XML tooling in servlet (TOMCAT) environment

Subject: OpenSAML user discussion

List archive

RE: Problems initializing XML tooling in servlet (TOMCAT) environment


Chronological Thread 
  • From: "Paul Hethmon" <>
  • To: <>
  • Subject: RE: Problems initializing XML tooling in servlet (TOMCAT) environment
  • Date: Fri, 13 Jul 2007 13:06:09 -0700

Prasanna,

Are you specifying the endorsed directories location for Tomcat using
the command line option? I believe this may be the only way and
certainly preferred way.

Paul

-----Original Message-----
From: Prasanna Krishna
[mailto:]

Sent: Friday, July 13, 2007 3:56 PM
To:

Subject: Re: Problems initializing XML tooling in servlet (TOMCAT)
environment

Hello -

Further to what I stated in my mail, I tried the following:

I removed xercesImpl.jar (size:1196 KB) from apache/common/endorsed and
also
apache/..web-inf/lib to check if SUN's xerces is being picked up and
whats
the behavior.

I got the fatal message from openSAML as

---

OpenSAML requires an xml parser that supports JAXP 1.3 and DOM3.
The JVM is currently configured to use the Sun XML parser, which is
known
to be buggy and can not be used with OpenSAML. Please endorse a
functional
JAXP library(ies) such as Xerces and Xalan. For instructions on how to
endorse
a new parser see
http://java.sun.com/j2se/1.5.0/docs/guide/standards/index.html

---

This looks to me that xerces is being properly endorsed when I place the

same in endorsed folder. So my question is why then I am finding
com.sun.org.apache..... entries in my verbose output.

The place where it blows of is
at ValidatorImpl.process(DOMSource, DOMResult)
at ValidatorImpl.validate(Source,Result)
at ValidatorImpl(Validator).validate(Source)

Am I not adding any other required jar files to apache/web-inf/lib or am

missing something in the process.

Any input is greatly appreciated.

Regards
Prasanna Krishna

>From: "Prasanna Krishna"
><>
>Date: Fri, 13 Jul 2007 04:13:18 +0000
>
>Hi Chad -
>
>Probably I was not clear.
>
>When I said
>
>>>DefaultBootStrap.bootstrap but this time it wouldn't throw the
exception
>>>reported in this mail.
>
>I meant a similar thread where Perez found the exception
>https://mail.internet2.edu/wws/arc/mace-opensaml-users/2007-06/msg00019
.html
>
>I was getting this exception but once I picked up the latest xalan &
xerces
>from apache site this exception no longer occurs but when I 'step in'
in
>eclipse at bootstrap() method, it drills down till a point where
validation
>of XML is being done. Surprisingly though I have put an exception
block &
>printing stack trace nothing is reported (which earlier was being
reported
>when using older versions of xerces/xalan).
>
>I thought probably any of the libraries required may be missing but I
>wouldn't find NoClassFound too in the console.
>
>When I said it doesn't do anything I meant, it skips all the statements

>after bootstrap() statement in my method and comes out of the program
>without reporting anything.
>
>The examples I pasted in my mail is to just provide an info that xerces
&
>xalan of apache endoresed folder are indeed being picked up.
>
>My assumption is, at few places classes from apache xerces being picked
up
>but at few other places classes from sun is picked up.
>
>Hope I could provide better info.
>
>Regards
>Prasanna Krishna
>
>>From: Chad La Joie
>><>
>>Date: Thu, 12 Jul 2007 23:07:57 -0400
>>
>>JAXP is an interface, Xerces + Xalan happen to provide one
implementation
>>(the only one which we know works). Sun happens to ship a pre-alpha
>>release of a really old version of Xerces which is the
>>com.sun.org.apache.... classes. These are horribly broken and fail on

>>anything but the simplest of XML parsing use cases.
>>
>>If you see com.sun.org.apache... classes being used then Apache
released
>>and maintained versions of Xerces and Xalan are not being used.
>>
>>At the moment you seem to be providing contradictory information. You

>>said that it "just doesn't do anything" and then "looks like it fails
>>while validating". Is there some error you are seeing that you didn't

>>include? The loading of classes that you included is not a problem in
and
>>of itself, the JVM will load thousands of classes as it runs.
>>
>>
>> wrote:
>>>Hello -
>>>
>>>While working with openSAML I still have some problem at
>>>DefaultBootStrap.bootstrap but this time it wouldn't throw the
exception
>>>reported in this mail. It just doesn't do anything after reaching a
>>>specific point in the stack. But looks like it still fails while
>>>validating the XML.
>>>
>>>Also I switched on the verbose and this is what I find:
>>>First few lines:
>>>
>>>[Opened C:\apache-tomcat-5.5.17\common\endorsed\xalan.jar]
>>>[Opened C:\apache-tomcat-5.5.17\common\endorsed\xercesImpl.jar]
>>>[Opened C:\Program Files\Java\jre1.5.0_07\lib\rt.jar]
>>>.....
>>>
>>>I find many classes loaded from xerces - An exmaple
>>>[Loaded org.apache.xerces.jaxp.SAXParserFactoryImpl from
>>>C:\apache-tomcat-5.5.17\common\endorsed\xercesImpl.jar]
>>>
>>>I also find many classes loaded from xalan - An example
>>>[Loaded org.apache.xalan.processor.TransformerFactoryImpl from
>>>C:\apache-tomcat-5.5.17\common\endorsed\xalan.jar]
>>>
>>>I also find many classes loaded from rt.jar that are related to xml
>>>validation
>>>Ex:
>>>[Loaded
com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorImpl
>>>from C:\Program Files\Java\jre1.5.0_07\lib\rt.jar]
>>>[Loaded
>>>com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorImpl$1
from
>>>C:\Program Files\Java\jre1.5.0_07\lib\rt.jar]
>>>[Loaded
>>>com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorImpl$2
from
>>>C:\Program Files\Java\jre1.5.0_07\lib\rt.jar]
>>>
>>>
>>>Is this behavior correct?
>>>I read
>>>http://www.ibm.com/developerworks/xml/library/x-javaxmlvalidapi.html
that
>>>jaxp is bundled with xerces.
>>>
>>>Am I missing something which needs to be resolved?
>>>
>>>I appreciate any help.

_________________________________________________________________
Spice up your IM conversations. New, colorful and animated emoticons.
Get
chatting! http://server1.msn.co.in/SP05/emoticons/




Archive powered by MHonArc 2.6.16.

Top of Page