me again,
On Sun, Mar 17, 2002 at 11:15:26PM +0100, Thomas Linden wrote:
> Exception in thread "main" java.lang.NoClassDefFoundError:
>org/apache/commons/logging/LogFactory
> at org.apache.poi.util.POILogFactory.<clinit>(POILogFactory.java:76)
> at org.apache.poi.hssf.usermodel.HSSFWorkbook.<clinit>(HSSFWorkbook.java:113)
> at Jzeff.<init>(Jzeff.java:116)
> at Jzeff.main(Jzeff.java:368)
>
> Hm, I stressed find, grep and others, but I didn't find this in the source
> tree. So I still need to install log4j.
finally I tried to install log4j. I used the latest CVS version too (1.2beta5).
It compiled successfully and it resulted in a jar file dist/lib/log4j-1.2beta5.jar.
I added this .jar to my CLASSPATH, but I still get the same message as
above.
Some coffees later I found lib/core/commons-logging-1.0.jar, which seemed
to be an older release of log4j. I added it to my CLASSPATH and my Jzeff
runs. But now I am getting much more error messages.
In short, the classes wanted to open the following files, which (of course)
do not exist:
build/poifs.log
build/util.log
build/hdf.log
build/hpsf.log
Here is such a message for 1 file only:
log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: build/hpsf.log (No such file or directory)
at java.io.FileOutputStream.openAppend(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:174)
at java.io.FileOutputStream.<init>(FileOutputStream.java:102)
at org.apache.log4j.FileAppender.setFile(FileAppender.java:276)
at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:157)
at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:249)
at
org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:125)
at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:89)
at
org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:644)
at
org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:602)
at
org.apache.log4j.PropertyConfigurator.parseCatsAndRenderers(PropertyConfigurator.java:527)
at
org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:411)
at
org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:435)
at
org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:454)
at org.apache.log4j.LogManager.<clinit>(LogManager.java:145)
at org.apache.log4j.Category.getInstance(Category.java:534)
at
org.apache.commons.logging.impl.Log4JCategoryLog.<init>(Log4JCategoryLog.java:97)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:487)
at
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:285)
at org.apache.poi.util.POILogFactory.getLogger(POILogFactory.java:121)
at org.apache.poi.util.POILogFactory.getLogger(POILogFactory.java:100)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<clinit>(HSSFWorkbook.java:113)
at Jzeff.<init>(Jzeff.java:116)
at Jzeff.main(Jzeff.java:368)
Well, I also compiled and read the documentation of POI, which came along
with the CVS download. It states:
".. By default we turn this off because it results in unnecessary
performance degradation when fully turned on! .."
This is not true. By default it is turned on, and it wants to write to 4 (or more)
logfiles.
On another place the docu (the how-to) states, that if it cannot find the log files,
I will not get any logging (which is what I want). But this not an error, it is my
will, so it should not print out so many error messages, it should just accept it.
However - there seems still some work to be done on this. If I can help
you, let me know...
regards, Tom
regards, Tom