You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by xweber <xw...@googlemail.com> on 2007/07/04 20:02:34 UTC

[cocoon-2.2.x] - How to trace what is going on

Hello,

Is there a way to "trace" how the http request is proceed inside sitemap &
co? Something like a debugger setting "verbose" or so to see with lines are
proceeded.

I have read about a profiler, but this one seems not to exists in 2.2 (so
far). Maybe there is also another way.

Thanks in advance

Alex
-- 
View this message in context: http://www.nabble.com/-cocoon-2.2.x----How-to-trace-what-is-going-on-tf4025801.html#a11435169
Sent from the Cocoon - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: [cocoon-2.2.x] - How to trace what is going on

Posted by xweber <xw...@googlemail.com>.

Grzegorz Kossakowski-3 wrote:
> 
>> 
>> I also noticed some exceptions on running  (but only visible in log) ->
>> btpool0-1 DEBUG xml.DefaultNamespaceHandlerResolver - Ignoring handler
>> [org.springframework.ejb.config.JeeNamespaceHandler]: class not found
>> java.lang.ClassNotFoundException:
>> org.springframework.ejb.config.JeeNamespaceHandler
>> ....
>> btpool0-1 DEBUG xml.DefaultNamespaceHandlerResolver - Ignoring handler
>> [org.springframework.transaction.config.TxNamespaceHandler]: class not
>> found
>> java.lang.ClassNotFoundException:
>> org.springframework.transaction.config.TxNamespaceHandler
>> ....
>> btpool0-1 DEBUG xml.DefaultNamespaceHandlerResolver - Ignoring handler
>> [org.springframework.scripting.config.LangNamespaceHandler]: class not
>> found
>> java.lang.ClassNotFoundException:
>> org.springframework.scripting.config.LangNamespaceHandler
>> 
>> is it something I have to worry about?
> 
> If it's only visible at DEBUG-level it probably is not harmful that much.
> I only wonder if class not found exceptions would not become a 
> performance bottleneck but I'm not really sure. If someone is going to
> investigate a performance problems it is a thing to look at.
> 
All this 3 execptions will happen on each click - from timestaps they will
not consume that much time, but maybe it would be better if a property
setting will adjust what classes has to be looked at and which not. So the
whole lookup part could be run faster. 



>> PS: just for the record:
>> First I tried to get debug logging enabled in "block" with using the
>> spring-configurator. Having this configured as it would be done in
>> "webapp"
>> will let mvn jetty:run to stuck at startup. Is it normal behavior or
>> should
>> this work and this is a possible bug?
> 
> I don't know what you mean by saying "having this configured as it would
> be done in webapp". Could you explain?
> 

webapp for me is maven archtype=webapp. Then the steps described here:
http://cocoon.zones.apache.org/daisy/cdocs-spring-configurator/g1/1303.html

So what i did was with a archetype=block I have put in the
myBlock1/target/classes/META-INF/cocoon/spring/servlet-service.xml
 those lines.

Now a "mvn jetty:run" will stuck right before the line "INFO:  Apache Cocoon
Spring Configurator v1.0.0 is running in mode 'dev'."

Alex
-- 
View this message in context: http://www.nabble.com/-cocoon-2.2.x----How-to-trace-what-is-going-on-tf4025801.html#a11463684
Sent from the Cocoon - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: [cocoon-2.2.x] - How to trace what is going on

Posted by Joerg Heinicke <jo...@gmx.de>.
On 06.07.2007 13:29, Grzegorz Kossakowski wrote:

>> I also noticed some exceptions on running  (but only visible in log) ->
>> btpool0-1 DEBUG xml.DefaultNamespaceHandlerResolver - Ignoring handler
>> [org.springframework.ejb.config.JeeNamespaceHandler]: class not found
>> java.lang.ClassNotFoundException:
>> org.springframework.ejb.config.JeeNamespaceHandler
>> ....
>> btpool0-1 DEBUG xml.DefaultNamespaceHandlerResolver - Ignoring handler
>> [org.springframework.transaction.config.TxNamespaceHandler]: class not 
>> found
>> java.lang.ClassNotFoundException:
>> org.springframework.transaction.config.TxNamespaceHandler
>> ....
>> btpool0-1 DEBUG xml.DefaultNamespaceHandlerResolver - Ignoring handler
>> [org.springframework.scripting.config.LangNamespaceHandler]: class not 
>> found
>> java.lang.ClassNotFoundException:
>> org.springframework.scripting.config.LangNamespaceHandler
>>
>> is it something I have to worry about?
> 
> If it's only visible at DEBUG-level it probably is not harmful that 
> much. I only wonder if class not found exceptions would not become a 
> performance bottleneck but I'm not really sure. If someone is going to 
> investigate a performance problems it is a thing to look at.

Spring comes with a spring.handlers file in spring-beans.jar/META-INF 
which holds the references to those files mentioned above. If other 
module jars like ejb and tx are not included the exception is thrown. 
That issue is only fixed on 2.1 branch of Spring:
http://opensource.atlassian.com/projects/spring/browse/SPR-2813

Joerg

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: [cocoon-2.2.x] - How to trace what is going on

Posted by Grzegorz Kossakowski <gk...@apache.org>.
xweber pisze:
> 
> Ok, I got something to look up for. Docs are not that clear for me (in the
> first time), so here is a howto for whoever may want to get in same problem:
> 
> create a "properties" subfolder in your block:
> myBlock1/src/main/resources/META-INF/cocoon/properties
> 
> create a new file in that folder that should have as ending ".properties"
> e.g.
>  settings.properties 
> 
> inside that file let's have the line:
> org.apache.cocoon.log4j.loglevel=debug
> 
> That's it - too easy once you know it.
> 
> now you will have really detailed information in:
> myBlock1/target/work/log/log4j.log

Thanks for sharing the instructions. I must admit that I did know precisely how to configure logging. I put your instructions here:
http://cocoon.zones.apache.org/daisy/cdocs-core/g6/1399.html

> 
> I also noticed some exceptions on running  (but only visible in log) ->
> btpool0-1 DEBUG xml.DefaultNamespaceHandlerResolver - Ignoring handler
> [org.springframework.ejb.config.JeeNamespaceHandler]: class not found
> java.lang.ClassNotFoundException:
> org.springframework.ejb.config.JeeNamespaceHandler
> ....
> btpool0-1 DEBUG xml.DefaultNamespaceHandlerResolver - Ignoring handler
> [org.springframework.transaction.config.TxNamespaceHandler]: class not found
> java.lang.ClassNotFoundException:
> org.springframework.transaction.config.TxNamespaceHandler
> ....
> btpool0-1 DEBUG xml.DefaultNamespaceHandlerResolver - Ignoring handler
> [org.springframework.scripting.config.LangNamespaceHandler]: class not found
> java.lang.ClassNotFoundException:
> org.springframework.scripting.config.LangNamespaceHandler
> 
> is it something I have to worry about?

If it's only visible at DEBUG-level it probably is not harmful that much. I only wonder if class not found exceptions would not become a 
performance bottleneck but I'm not really sure. If someone is going to investigate a performance problems it is a thing to look at.

> PS: just for the record:
> First I tried to get debug logging enabled in "block" with using the
> spring-configurator. Having this configured as it would be done in "webapp"
> will let mvn jetty:run to stuck at startup. Is it normal behavior or should
> this work and this is a possible bug?

I don't know what you mean by saying "having this configured as it would be done in webapp". Could you explain?

-- 
Grzegorz Kossakowski
http://reflectingonthevicissitudes.wordpress.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: [cocoon-2.2.x] - How to trace what is going on

Posted by xweber <xw...@googlemail.com>.

Grzegorz Kossakowski-3 wrote:
> 
> xweber pisze:
>> Hello,
>> 
>> Is there a way to "trace" how the http request is proceed inside sitemap
>> &
>> co? Something like a debugger setting "verbose" or so to see with lines
>> are
>> proceeded.
> 
> Cocoon has very robust logging that will give you even more you usually
> need. Setting log-level to DEBUG enable detailed logging.
> 

Ok, I got something to look up for. Docs are not that clear for me (in the
first time), so here is a howto for whoever may want to get in same problem:

create a "properties" subfolder in your block:
myBlock1/src/main/resources/META-INF/cocoon/properties

create a new file in that folder that should have as ending ".properties"
e.g.
 settings.properties 

inside that file let's have the line:
org.apache.cocoon.log4j.loglevel=debug

That's it - too easy once you know it.

now you will have really detailed information in:
myBlock1/target/work/log/log4j.log



I also noticed some exceptions on running  (but only visible in log) ->
btpool0-1 DEBUG xml.DefaultNamespaceHandlerResolver - Ignoring handler
[org.springframework.ejb.config.JeeNamespaceHandler]: class not found
java.lang.ClassNotFoundException:
org.springframework.ejb.config.JeeNamespaceHandler
....
btpool0-1 DEBUG xml.DefaultNamespaceHandlerResolver - Ignoring handler
[org.springframework.transaction.config.TxNamespaceHandler]: class not found
java.lang.ClassNotFoundException:
org.springframework.transaction.config.TxNamespaceHandler
....
btpool0-1 DEBUG xml.DefaultNamespaceHandlerResolver - Ignoring handler
[org.springframework.scripting.config.LangNamespaceHandler]: class not found
java.lang.ClassNotFoundException:
org.springframework.scripting.config.LangNamespaceHandler

is it something I have to worry about?

Alex

PS: just for the record:
First I tried to get debug logging enabled in "block" with using the
spring-configurator. Having this configured as it would be done in "webapp"
will let mvn jetty:run to stuck at startup. Is it normal behavior or should
this work and this is a possible bug?

-- 
View this message in context: http://www.nabble.com/-cocoon-2.2.x----How-to-trace-what-is-going-on-tf4025801.html#a11461980
Sent from the Cocoon - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: [cocoon-2.2.x] - How to trace what is going on

Posted by Grzegorz Kossakowski <gk...@apache.org>.
xweber pisze:
> Hello,
> 
> Is there a way to "trace" how the http request is proceed inside sitemap &
> co? Something like a debugger setting "verbose" or so to see with lines are
> proceeded.

Cocoon has very robust logging that will give you even more you usually need. Setting log-level to DEBUG enable detailed logging.

> I have read about a profiler, but this one seems not to exists in 2.2 (so
> far). Maybe there is also another way.

Profiler does exist in trunk, see: http://svn.apache.org/repos/asf/cocoon/trunk/blocks/cocoon-profiler/
I don't know if it works, though.

-- 
Grzegorz Kossakowski
http://reflectingonthevicissitudes.wordpress.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org