Hi,
I found the POI project, which seems to be the thing I was always
looking for :-) Thanks for this great classes!
But I have one problem with the software. It complains about some
classes which I do not have installed here:
scip@monster: $ ./jzeff
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/Category
at
net.sourceforge.poi.hssf.usermodel.HSSFWorkbook.<clinit>(HSSFWorkbook.java:127)
at Jzeff.<init>(Jzeff.java:115)
at Jzeff.main(Jzeff.java:367)
After downloading the source I found that HSSF uses a thing called POILogger
to log things, for whatever reason. POILogger imports org/apache/log4j/Category
and org/apache/log4j/Priority - both are not in the package nor do I have them
installed.
I assume this stuff is part of jakarta or something, I don't know.
The problem is, that my project is a swing gui application, it has nothing
to do with java server pages or apache webserver things. Because of this I don't
want to include the whole jakarta engine into my project to get the creation
of excel files work (beside: how shall I explain this to my users?).
So my simple questions are:
1. How do I get rid of the whole logging stuff without completely
rewriting or patching POI?
or, if the above is not possible:
2. How can I get POI working without installing jakarta (and possibly
more stuff) ?
and, finally, just because I'm interested:
Why does a class library log informations to somewhere? If I had the
org/apache/log4j/Category installed I would not know that. IMHO a
class library should not log things. It should be completely silent.
The only thing it is allowed to do is it's purpose: Do it's job, throw
exceptions in case of errors and/or return the appropriate values
back to the application that uses it. The application then is responsible
to log errors or whatever it decides to log.
^^^^
Thanks in advance,
- Tom
--
$_=`perl -v`;s;^.*ll;;s;$^=unpack"u","'8V]D;')E<```";s;\W;;gs;$/=7*
($^=~s;.;;g);%^=map{$_=>1}split//,lc;$_=join$\,(sort keys(%^))[map{
ord($_)-$/}split//,'1I7E13?@E:7C1A7C=1:35<7C'];s"0(.)" \U$1"g;print;