You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Glen Stampoultzis <gs...@iprimus.com.au> on 2002/05/29 15:43:50 UTC

Re: POI HSSF / commons-logging problem on Tomcat 3.2.4 under Unix

Well ironically it's common's logging that's supposed to disable logging if
no logging implementation is found.

Since I'm on Windows this will be tough for me to look into.  Andy:  Can you
check this one out? (Or any other unix committers that might be listening).
I'm forwarding this to the commons list.  Maybe someone there might be able
to help also.

--
Glen Stampoultzis  (TriNexus Pty Ltd)
Fixed:+61 3 9753-6850     Mob:+61 (0)402 835 458
ICQ:  62722370    EMail:  glens@apache.org


> Hi Glen,
>
> I have had those two POI jars put in WEB-INF/lib.
> Yesterday I found out where the problem originated.
>
> In commons-logging.jar there is a lot of calls to ClassLoader
> where the class name is given with it's package. In our Tomcat setup
> the ClassLoader on Unix had failed to locate those classes by name.
>
>
>
>
> It would be nice to have a feature, where we could call HSSFWorkbook
> constructor with one extra parameter,
> say a boolean variable, where we could set it to false if we don't want
> logging, or to true if we do want it.
>
> I had looked up the javadocs for jdk1.3 on how the ClassLoader works under
> Windows and under Unix and it says
> there that Unix class loader has a different default root directory set,
so
> that could be a reason why it cannot
> locate those classes.
>
> Is there any other quick way to disable logging without importing all the
> code from POI SRC and Commons logging into the project?
>
>
> Thanks
>
> -----Original Message-----
> From: Glen Stampoultzis [mailto:gstamp@iprimus.com.au]
> Sent: Tuesday, May 28, 2002 7:36 PM
> To: Paradizov, Konstantin; poi-dev@jakarta.apache.org
> Subject: Re: POI HSSF / commons-logging problem on Tomcat 3.2.4 under
> Unix
>
>
>
> Which lib directory are you putting them under?  WEB-INF/lib or
tomcat/lib?
>
> The best place for it should be the WEB-INF/lib for your webapp.
>
> Glen Stampoultzis  (TriNexus Pty Ltd)
> Fixed:+61 3 9753-6850     Mob:+61 (0)402 835 458
> ICQ:  62722370    EMail:  glens@apache.org
>
>
> ----- Original Message -----
> From: "Paradizov, Konstantin" <ko...@merck.com>
> To: <ac...@apache.org>; <po...@jakarta.apache.org>;
<gl...@apache.org>;
> <ni...@apache.org>
> Sent: Wednesday, May 29, 2002 1:01 AM
> Subject: POI HSSF / commons-logging problem on Tomcat 3.2.4 under Unix
>
>
> > Hello Everyone,
> >
> > I apologize for e-mailing you directly like this. I couldn't subscribe
to
> > POI-Users mailing list for some reason.
> >
> > I have written a small application that has a servlet which creates
> > HSSFWorkbook from an existing Excel template (which only has column
> headers)
> > and populates it with data from Oracle database and then spits it out to
> the
> > client web browser.
> >
> > The java project uses these two JAR files:
> > commons-logging.jar (v1.0)
> > jakarta-poi-1.5.0-FINAL-20020506.jar
> >
> > I created the application in JBuilder 5.0 under Windows NT, added these
> two
> > JARs into the CLASSPATH via project properties/required libraries
> > and everything works fine. JBuilder runs Tomcat 3.2.1
> >
> > When I migrated the code to Unix development web server, which runs
Tomcat
> > 3.2.4 and added these two JARs to the lib directory, changed mode to
> > 775 for all files recursively, I get the following exception when I try
to
> > call the constructor HSSFWorkbook(poifsFile); :
> >
> > Error: 500
> > Location: /fislbvm/com.merck.fis.bvm.lr1d.bvm_lr1d
> > Internal Servlet Error:
> > java.lang.ExceptionInInitializerError:
> > org.apache.commons.logging.LogConfigurationException:
> > java.lang.ClassNotFoundException:
> > org.apache.commons.logging.impl.LogFactoryImpl
> > at
> > org.apache.commons.logging.LogFactory.newFactory(LogFactory.java:497)
> > at
> > org.apache.commons.logging.LogFactory.getFactory(LogFactory.java:350)
> > at org.apache.poi.util.POILogFactory.(POILogFactory.java:76)
> > at
> > org.apache.poi.hssf.usermodel.HSSFWorkbook.(HSSFWorkbook.java:113)
> > at
> > com.merck.fis.bvm.lr1d.BvmRetrieve.beginHere(BvmRetrieve.java:205)
> > at com.merck.fis.bvm.lr1d.GFISCommon.doFactory(GFISCommon.java:968)
> > at
> > com.merck.fis.bvm.lr1d.GFISCommon.objectNavigation(GFISCommon.java:943)
> > at com.merck.fis.bvm.lr1d.bvm_lr1d.service(bvm_lr1d.java:71)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > at
> > org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
> > at org.apache.tomcat.core.Handler.service(Handler.java:287)
> > at
> > org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
> > at
> >
>
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:80
> > 6)
> > at
> > org.apache.tomcat.core.ContextManager.service(ContextManager.java:752)
> > at
> >
>
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection
> > (Ajp12ConnectionHandler.java:166)
> > at
> >
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
> > at
> >
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
> > at java.lang.Thread.run(Unknown Source)
> >
> > I have tried to extract all the data from these two JARs and to put the
> > actual org/apache/... directory with all te classes under my default
root
> > directory on the Unix
> > web server and still I got the same exception.
> >
> > I don't know why the logger is being used, if I can't fix this, what can
I
> > do to avoid using this commons-logging.jar ?
> > Is there one POI jar which would have all the required component inside
> it?
> >
> > Please help...
> >
> >
> > Thank you
> >
> > Konstantin Paradizov
> > Subsidiary Systems
> > Financial Information Services
> > Merck & Co.
> > Tel. (908) 423-4051 / Fax (908) 735-1178
> > Mail WS1B-10
> >
> >
> >
>
> --------------------------------------------------------------------------
> ----
> > Notice: This e-mail message, together with any attachments, contains
> information of Merck & Co., Inc. (Whitehouse Station, New Jersey, USA)
that
> may be confidential, proprietary copyrighted and/or legally privileged,
and
> is intended solely for the use of the individual or entity named on this
> message. If you are not the intended recipient, and have received this
> message in error, please immediately return this by e-mail and then delete
> it.
> >
> >
>
============================================================================
> ==
> >
> >
>
>
>
> --------------------------------------------------------------------------
----
> Notice: This e-mail message, together with any attachments, contains
information of Merck & Co., Inc. (Whitehouse Station, New Jersey, USA) that
may be confidential, proprietary copyrighted and/or legally privileged, and
is intended solely for the use of the individual or entity named on this
message. If you are not the intended recipient, and have received this
message in error, please immediately return this by e-mail and then delete
it.
>
>
============================================================================
==
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>