cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephan Coboos <cromo...@gmx.net>
Subject Problem using JavaFlow and exceptions
Date Sat, 12 Jun 2004 21:41:51 GMT
Hello,

I'am sorry but I have another problem using JavaFlow. I want to use my 
own Exceptions in JavaFlow. One Exception contains a long type as 
parameter. But if so, the flows will not load at startup. Please have a 
look into my source code example:

package foo.bar;

import org.apache.cocoon.components.flow.java.AbstractContinuable;

public class TestFlow extends AbstractContinuable {

    public void doTest() throws Exception {
       
        while(true) {
           
            this.sendPageAndWait("test.jxt");
            throw new FooException("test", 123);
        }
    }
}

The class FooException:

package foo.bar;

public class FooException extends java.lang.Exception {
   
    private long id = 0;

    public FooException() {
    }

    public FooException(String msg) {
        super(msg);
    }
   
    public FooException(String msg, long id) {
   
       ...
        this.id = id;
    }
}

If I use the parameter id, at first call of the corresponding url I got 
the following error output into the logs of tomcat and flows will not work:

java.lang.VerifyError: (class: foo/bar/TestFlow, method: doTest 
signature: ()V) Attempt to split long or double on the stack
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:1647)
    at java.lang.Class.privateGetPublicMethods(Class.java:1770)
    at java.lang.Class.getMethods(Class.java:824)
    at 
org.apache.cocoon.components.flow.java.JavaInterpreter.initialize(JavaInterpreter.java:119)
    at 
org.apache.cocoon.components.flow.java.JavaInterpreter.callFunction(JavaInterpreter.java:153)
    at 
org.apache.cocoon.components.treeprocessor.sitemap.CallFunctionNode.invoke(CallFunctionNode.java:130)
    at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:49)
    at 
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:130)
    at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:72)
    at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:126)
    at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:72)
    at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:101)
    at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:336)
    at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:277)
    at 
org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:103)
    at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:49)
    at 
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:130)
    at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:72)
    at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:126)
    at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:72)
    at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:101)
    at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:336)
    at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:277)
    at org.apache.cocoon.Cocoon.process(Cocoon.java:619)
    at 
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1073)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
    at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
    at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
    at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at 
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
    at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
    at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
    at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
    at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
    at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
    at 
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
    at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:793)
    at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:702)
    at 
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:571)
    at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:644)
    at java.lang.Thread.run(Thread.java:534)

If I remove the parameter id all works fine? Is it another bug?

PS: Dear JavaFlow developers, I hope you are not angry about my many 
postings/questions about JavaFlow ;-)

Regards
Stephan

Mime
View raw message