You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Jorge Moya <jo...@gmail.com> on 2010/06/16 20:20:29 UTC

xercesImpl & xercesImpl-2.9.1 issues with POI-3.6

Hello guys.

I'm new to the userlist and I specifically joined because I'm having a
problem with the xercesImpl & xercesImpl-2.9.1 .jar files the company's
webserive has running in Tomcat and and POI excel .xml info extraction. I'm
going to be as clear and thorough as possible since I feel the problem
relies on xerces and/or priorities in Tomcat, and I'd like to fix this as
soon as possible.

One part of the webservice I'm updating (not coded by me -- i'm a recent
intern) is to extract excel files and upload that information. Now, it works
perfectly extracting .xls files, but my task is to update the program to
load .xlsx files as well. I've successfully changed the code (using POI 3.6)
and it runs perfectly in my local environment using tomcat and a simple .jsp
code I made, however, the webservice requires more complex functions, which
in turn use both xercesImpl.jar and xercesImpl-2.9.1.

For the last couple of days, whenever I tried running the webapp on the
server, POI made an exception stating that they couldn't load the .xlsx file
(problems with .xml). My assumption was that some other .class was
conflicting with POI's classes.

Today I noticed that the server's tomcat\common\endorsed folder contained
xerces classes, and I tried removing xercesImpl.jar and lo and behold, the
code now extracts the information. If I run a simple .jsp on the server, it
extracts the info without a hitch. However, my objective is to use the
webservice, and when I try to run the webservice it extracts the code, but I
get errors in the code due to the removal of xercesImpl.jar (I've noticed I
need both xercesImpl and xercesImpl-2.9.1 for my webservice to function
"properly" [minus the .xlsx problem]).

Do you guys have any idea of how to resolve this? Do I need to move the
classes around? I feel I DO need both xercesImpl and xercesImpl-2.9.1, but
how can I make POI classes work in conjunction?

Thanks in advance.

Re: xercesImpl & xercesImpl-2.9.1 issues with POI-3.6

Posted by Michael Glavassevich <mr...@ca.ibm.com>.
Hi Jorge,

It seems like you're carrying around multiple copies of Xerces, possibly
different versions. You should only have one xercesImpl.jar in your
classpath. If you're including more than one you may run into problems
(depending on how you order the jars) with conflicts.

Thanks.

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org

Jorge Moya <jo...@gmail.com> wrote on 06/16/2010 02:20:29 PM:

> Hello guys.
>
> I'm new to the userlist and I specifically joined because I'm having
> a problem with the xercesImpl & xercesImpl-2.9.1 .jar files the
> company's webserive has running in Tomcat and and POI excel .xml
> info extraction. I'm going to be as clear and thorough as possible
> since I feel the problem relies on xerces and/or priorities in
> Tomcat, and I'd like to fix this as soon as possible.
>
> One part of the webservice I'm updating (not coded by me -- i'm a
> recent intern) is to extract excel files and upload that
> information. Now, it works perfectly extracting .xls files, but my
> task is to update the program to load .xlsx files as well.
> I've successfully changed the code (using POI 3.6) and it runs
> perfectly in my local environment using tomcat and a simple .jsp
> code I made, however, the webservice requires more complex
> functions, which in turn use both xercesImpl.jar and xercesImpl-2.9.1.
>
> For the last couple of days, whenever I tried running the webapp on
> the server, POI made an exception stating that they couldn't load
> the .xlsx file (problems with .xml). My assumption was that some
> other .class was conflicting with POI's classes.
>
> Today I noticed that the server's tomcat\common\endorsed folder
> contained xerces classes, and I tried removing xercesImpl.jar and lo
> and behold, the code now extracts the information. If I run a simple
> .jsp on the server, it extracts the info without a hitch. However,
> my objective is to use the webservice, and when I try to run the
> webservice it extracts the code, but I get errors in the code due to
> the removal of xercesImpl.jar (I've noticed I need both xercesImpl
> and xercesImpl-2.9.1 for my webservice to function "properly" [minus
> the .xlsx problem]).
>
> Do you guys have any idea of how to resolve this? Do I need to move
> the classes around? I feel I DO need both xercesImpl and
> xercesImpl-2.9.1, but how can I make POI classes work in conjunction?
>
> Thanks in advance.