You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Brian Purvis <bp...@bellsouth.net> on 2003/06/06 08:21:54 UTC

CNFException(s) not logged anywhere and causing confusion for all users

morning all, 

concerning:
- linux Redhat 8.0 (kernel 2.4.19)
- SUN jdk1.4.2 (and even back to 1.4.0)
- cocoon 2.1m2 (and even back to early 2.1 CVS snapshots)

i have found that when cocoon is missing classes (and all other things
being setup correctly) it doesn't generate any logged exception that i
can find. The result is a very puzzling situation. I post because ive
found many people with the same situation (many relating to the
xalan.jar and $TOMCAT_HOME/lib/endorsed fiasco, but this is just a
common example of the problem). Ive turned all the logging levels down
to DEBUG with no visible evidence of the fact that my app was missing
classes. Ive even checked the tomcat log files and found nothing.
Nothing output to stdout either. 

Ive run into this in 2 similiar situations both leading me to believe
its a situation where classes are missing from the classpath. 

1 - the classic xalanXXX.jar problem with the older libraries pointing
to non-existent classes. In this case i get nothing but blank screens
when trying to request uri(s) that are perfectly sound. 

2 - when certain custom actions were missing SUPPORTING class files. 

by dropping the correct classes in /WEB-INF/classes or jars in
/WEB-INF/lib the problem is solved and all the uris load properly. These
missing classes seem to disable any map:match in the sitemap regardless
of whether the match is affected by the missing classes. I dont even get
ANY output from the requested uris. (i.e. not even empty <html></html>
tags from a match terminated with an HTMLSerializer.)

so the question then concerns whether this is a bug or not ? I know i
have wasted more time than i would have liked coming to this
realization. Ive also seen MANY people with similar problems that have
resulted in no exceptions in the logs and no output on requests. 

at the very least shouldnt this be documented somewhere so its a bit
less confusing. 

have i missed something ?

					BP




Re: CNFException(s) not logged anywhere and causing confusion for all users

Posted by Joerg Heinicke <jo...@gmx.de>.
Hello Brian,

I tested the current Cocoon 2.1m3 CVS. I removed jakarta-poi.jar after 
building Cocoon. Now requesting a page serialized to Excel file format I 
get the following exception logged:

14:57:48.875 WARN!! Error for /samples/poi/hello.xls
java.lang.NoClassDefFoundError: 
org/apache/poi/poifs/filesystem/POIFSFileSystem
         at 
org.apache.cocoon.serialization.POIFSSerializer.<init>(POIFSSerializer.java:89)
         at 
org.apache.cocoon.serialization.HSSFSerializer.<init>(HSSFSerializer.java:77)
         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 java.lang.Class.newInstance0(Class.java:306)
         at java.lang.Class.newInstance(Class.java:259)
         at 
org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:212)
         at 
org.apache.avalon.excalibur.component.DefaultComponentHandler.doGet(DefaultComponentHandler.java:169)
         at 
org.apache.avalon.excalibur.component.ComponentHandler.get(ComponentHandler.java:408)
         at 
org.apache.avalon.excalibur.component.ExcaliburComponentSelector.select(ExcaliburComponentSelector.java:244)
         at 
org.apache.cocoon.components.ExtendedComponentSelector.select(ExtendedComponentSelector.java:299)
         at 
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.setSerializer(AbstractProcessingPipeline.java:315)
         at 
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.setSerializer(AbstractCachingProcessingPipeline.java:199)...
...


But it's only logged to console, not to error.log. The reason can be 
that ExcaliburComponentSelector only catches Exceptions, not Errors, so 
I guess nobody cares about Errors. For ClassNotFoundExceptions 
everything should be ok, because ExcaliburComponentSelector rethrows 
ComponentException and these are handled in the Cocoon pipeline code.

Can somebody with a deeper knowledge have a look on it.

Joerg


Brian Purvis wrote:
> morning all, 
> 
> concerning:
> - linux Redhat 8.0 (kernel 2.4.19)
> - SUN jdk1.4.2 (and even back to 1.4.0)
> - cocoon 2.1m2 (and even back to early 2.1 CVS snapshots)
> 
> i have found that when cocoon is missing classes (and all other things
> being setup correctly) it doesn't generate any logged exception that i
> can find. The result is a very puzzling situation. I post because ive
> found many people with the same situation (many relating to the
> xalan.jar and $TOMCAT_HOME/lib/endorsed fiasco, but this is just a
> common example of the problem). Ive turned all the logging levels down
> to DEBUG with no visible evidence of the fact that my app was missing
> classes. Ive even checked the tomcat log files and found nothing.
> Nothing output to stdout either. 
> 
> Ive run into this in 2 similiar situations both leading me to believe
> its a situation where classes are missing from the classpath. 
> 
> 1 - the classic xalanXXX.jar problem with the older libraries pointing
> to non-existent classes. In this case i get nothing but blank screens
> when trying to request uri(s) that are perfectly sound. 
> 
> 2 - when certain custom actions were missing SUPPORTING class files. 
> 
> by dropping the correct classes in /WEB-INF/classes or jars in
> /WEB-INF/lib the problem is solved and all the uris load properly. These
> missing classes seem to disable any map:match in the sitemap regardless
> of whether the match is affected by the missing classes. I dont even get
> ANY output from the requested uris. (i.e. not even empty <html></html>
> tags from a match terminated with an HTMLSerializer.)
> 
> so the question then concerns whether this is a bug or not ? I know i
> have wasted more time than i would have liked coming to this
> realization. Ive also seen MANY people with similar problems that have
> resulted in no exceptions in the logs and no output on requests. 
> 
> at the very least shouldnt this be documented somewhere so its a bit
> less confusing. 
> 
> have i missed something ?
> 
> 					BP