You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Grzegorz Kossakowski <gr...@tuffmail.com> on 2008/08/01 16:29:33 UTC

Re: Cocoon 2.2 flowscipt debugger possible?

Hugh Sparks pisze:
> I read a few posts that suggest that this is impossible, but I decided
> to try the flowscript debugger anyway. I'm running under Tomcat, so
> I copied the file cocoon-flowscipt.xconf from the cocoon 2.2 svn truck
> to this directory in my Tomcat installation:
> 
>    webapps\cocoon\WEB-INF\classes\META-INF\cocoon\avalon
> 
> I edited the file to enable the debugger and started Tomcat.
> When I ran my cocoon flowscript application, the debugger
> window appeared, but the application crashes. Here are some
> highlights from the traceback:
> 
>        description The server encountered an internal error ()
>        that prevented it from fulfilling this request.
> 
>        org.apache.avalon.framework.service.ServiceException:
>        Exception during lookup of component with
>        'org.apache.cocoon.components.flow.Interpreter/javascript'.
>        (Key='AvalonServiceManager')
> 
>        org.springframework.beans.factory.BeanCreationException:
>        Error creating bean with name
>        'org.apache.cocoon.components.flow.Interpreter/javascript':
>        Initialization of bean failed; nested exception is
>        org.springframework.beans.factory.BeanCreationException:
>        Unable to initialize Avalon component with role
>        org.apache.cocoon.components.flow.Interpreter/javascript;
>        nested exception is java.lang.IllegalStateException
> 
> If I remove the cocoon-flowscript.xconf file, the application works 
> normally.
> 
> I realized that Avalon is on the way out, but should this work?
> What is the current best practice to use the debugger in its present form?
> 
> Thanks to all,

Hi Hugh,

This has been fixed in trunk, see:
http://article.gmane.org/gmane.text.xml.cocoon.cvs/27138

If you want to use this fixed version, you will need to checkout trunk and build it. Then just add 
SNAPSHOT dependency to your pom (of your project). There is no need to switch with all Cocoon 
dependencies to SNAPSHOT versions.

Also, you might be interested in following commit:
http://article.gmane.org/gmane.text.xml.cocoon.cvs/27140

-- 
Best regards,
Grzegorz Kossakowski

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


Re: Cocoon 2.2 flowscipt debugger possible?

Posted by Robin Wyles <ro...@robinwyles.com>.
Hi Grzegorz,

I get many errors like this:

Exception in thread "AWT-EventQueue-0"  
java.lang.ArrayIndexOutOfBoundsException: No such child: 1
	at java.awt.Container.getComponent(Container.java:280)
	at org.mozilla.javascript.tools.debugger.FileWindow.updateToolTip 
(SwingGui.java:2181)
	at org.mozilla.javascript.tools.debugger.FileWindow.<init> 
(SwingGui.java:2161)
	at org.mozilla.javascript.tools.debugger.SwingGui.createFileWindow 
(SwingGui.java:486)
	at org.mozilla.javascript.tools.debugger.SwingGui.showFileWindow 
(SwingGui.java:455)
	at org.mozilla.javascript.tools.debugger.SwingGui.showStopLine 
(SwingGui.java:435)
	at org.mozilla.javascript.tools.debugger.SwingGui.enterInterruptImpl 
(SwingGui.java:583)
	at org.mozilla.javascript.tools.debugger.RunProxy.run(SwingGui.java: 
3531)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
	at java.awt.EventDispatchThread.pumpOneEventForHierarchy 
(EventDispatchThread.java:269)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy 
(EventDispatchThread.java:190)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java: 
184)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java: 
176)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

Also, sometimes flow execution just stops as if it has reached a  
breakpoint - seems to be no way to continue so I have to restart the  
app. There also appears to be issues of cocoon.redirectTo() not  
working when called from flow with the debugger enabled. Please bear  
in minda, that these observations are all based on my five minutes of  
frustration this morning before I managed to disable it - they may  
not be wholly accurate!

I do think the FlowDebugger should not be enabled by default for dev  
mode though - disabling requires you specifically have to add a dev  
properties folder to your blocks, and also have to think hard about  
the sometimes head-bending (but powerful!) property cascading with  
respect to property file names etc.

Robin



On 4 Aug 2008, at 12:22, Grzegorz Kossakowski wrote:

> Robin Wyles pisze:
>> Hi,
>
> Hi Robin,
>
>> I just noticed this change this morning when I updated to latest  
>> trunk... lo and behold the flowscript debugger started up when I  
>> ran my app which seemed to cause all sorts of issues when testing  
>> in Eclipse, and using mvn jetty:run...  So my question.... should  
>> the FlowScript debugger really be enabled by default for dev mode?
>
> Could you elaborate on these issues you face? If there are some  
> serious problems then I think we'll switch it off again.
>
> Actually, you can do it yourself very easily but still defaults are  
> important.
>
> -- 
> Grzegorz Kossakowski
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>


Re: Cocoon 2.2 flowscipt debugger possible?

Posted by Hugh Sparks <hu...@csparks.com>.
> > Robin Wyles writes:
>> [...] So my question.... should the FlowScript  debugger really be
>> enabled by default for dev mode?
>
> Grzegorz Kossakowski replies:
> Could you elaborate on these issues you face? If there are some serious
> problems then I think we'll switch it off again.
> Actually, you can do it yourself very easily but still defaults are important.

Joy! (It works.) 

It is so easy to turn on and off now, I prefer to see it off by default even in
dev mode. It is more trouble to fuss with the mode because you have to edit the
pom and rebuild. But the property can can be changed after the webapp is
deployed if needed. I tend to leave my jetty setup in mode dev all the time and
the javaflow debugger is rather intrusive when not wanted.

Thanks for the fix!
I think this resolves JIRA COCOON-2221

-Hugh Sparks



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


Re: Cocoon 2.2 flowscipt debugger possible?

Posted by Grzegorz Kossakowski <gr...@tuffmail.com>.
Robin Wyles pisze:
> Hi,

Hi Robin,

> I just noticed this change this morning when I updated to latest 
> trunk... lo and behold the flowscript debugger started up when I ran my 
> app which seemed to cause all sorts of issues when testing in Eclipse, 
> and using mvn jetty:run...  So my question.... should the FlowScript 
> debugger really be enabled by default for dev mode?

Could you elaborate on these issues you face? If there are some serious problems then I think we'll 
switch it off again.

Actually, you can do it yourself very easily but still defaults are important.

-- 
Grzegorz Kossakowski

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


Re: Cocoon 2.2 flowscipt debugger possible?

Posted by Robin Wyles <ro...@robinwyles.com>.
Hi,

I just noticed this change this morning when I updated to latest  
trunk... lo and behold the flowscript debugger started up when I ran  
my app which seemed to cause all sorts of issues when testing in  
Eclipse, and using mvn jetty:run...  So my question.... should the  
FlowScript debugger really be enabled by default for dev mode?

Robin






On 1 Aug 2008, at 15:29, Grzegorz Kossakowski wrote:

> Hugh Sparks pisze:
>> I read a few posts that suggest that this is impossible, but I  
>> decided
>> to try the flowscript debugger anyway. I'm running under Tomcat, so
>> I copied the file cocoon-flowscipt.xconf from the cocoon 2.2 svn  
>> truck
>> to this directory in my Tomcat installation:
>>    webapps\cocoon\WEB-INF\classes\META-INF\cocoon\avalon
>> I edited the file to enable the debugger and started Tomcat.
>> When I ran my cocoon flowscript application, the debugger
>> window appeared, but the application crashes. Here are some
>> highlights from the traceback:
>>        description The server encountered an internal error ()
>>        that prevented it from fulfilling this request.
>>        org.apache.avalon.framework.service.ServiceException:
>>        Exception during lookup of component with
>>        'org.apache.cocoon.components.flow.Interpreter/javascript'.
>>        (Key='AvalonServiceManager')
>>        org.springframework.beans.factory.BeanCreationException:
>>        Error creating bean with name
>>        'org.apache.cocoon.components.flow.Interpreter/javascript':
>>        Initialization of bean failed; nested exception is
>>        org.springframework.beans.factory.BeanCreationException:
>>        Unable to initialize Avalon component with role
>>        org.apache.cocoon.components.flow.Interpreter/javascript;
>>        nested exception is java.lang.IllegalStateException
>> If I remove the cocoon-flowscript.xconf file, the application  
>> works normally.
>> I realized that Avalon is on the way out, but should this work?
>> What is the current best practice to use the debugger in its  
>> present form?
>> Thanks to all,
>
> Hi Hugh,
>
> This has been fixed in trunk, see:
> http://article.gmane.org/gmane.text.xml.cocoon.cvs/27138
>
> If you want to use this fixed version, you will need to checkout  
> trunk and build it. Then just add SNAPSHOT dependency to your pom  
> (of your project). There is no need to switch with all Cocoon  
> dependencies to SNAPSHOT versions.
>
> Also, you might be interested in following commit:
> http://article.gmane.org/gmane.text.xml.cocoon.cvs/27140
>
> -- 
> Best regards,
> Grzegorz Kossakowski
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>