DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=31297>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=31297 Javaflow can't call inherited methods Summary: Javaflow can't call inherited methods Product: Cocoon 2 Version: Current CVS 2.1 Platform: PC OS/Version: Linux Status: NEW Severity: Normal Priority: Other Component: Flowscript AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] A class named FlowHandler contains this method: public void doInvokeMain() { try { setParent(null); doInvoke(); } catch (CommandException e) { // Because we are the top level handler, something bad // must have happened throw new RuntimeException("Unhandled command: " + e.getCommand()); } } MenuBarHandler is a class inherited from FlowHandler. The following does *not* work (from sitemap.xmap): <map:flow language="java"> <map:script src="org.rath.votra.MenuBarHandler"/> </map:flow> [...] <map:match pattern="start"> <map:call function="invokeMain" /> </map:match> When accessing the start URI, cocoon produces an InstantiationException. When I add the doInvokeMain method directly to the MenuBarHandler class, everything works fine: /* If we do not define this method here, we get an java.lang.InstantiationException from cocoon. Seems to be a bug. */ public void doInvokeMain() { super.doInvokeMain(); } It seems that cocoon can't call inherited methods as flow handlers.
