Re: [BUG] Registering of JavaFlow fails (was: [JavaFlow] java.lang.VerifyException)
Stephan Michels wrote: Am Do, den 03.06.2004 schrieb Stephan Michels um 15:00: Am Di, den 01.06.2004 schrieb Stephan Coboos um 20:23: Hello, I have a problem using Objects in JavaFlow before a while loop. Please see my first posting [JavaFlow] java.lang.VerifyException. In my opinion it can be a bug in the JavaFlow block. Because my fist posting was not so clear, I had tried to reproduce the error for a while and I had discovered the following code which creates such an error (you need the packages of Lucene): java.lang.VerifyError: (class: foo/bar/TestFlow, method: doTest signature: ()V) Incompatible object argument for function call Is it really a bug? Why is it not possible to declare these three line within the method doTest? What can I do? Yes, it seems to be a bug. I guess its a problem the following line query = QueryParser.parse("foo", "bar", new StandardAnalyzer()); I had many problem in the past with uninitialized objects and saving the continuation. I will take a look into it. It was a problem with null objects, which were stored into the continuation. If the frame will be restored, the null object cannot be casted into the right type. So, at the end the correct signatur couldn't be found. Hits hits; IndexSearcher searcher = null; sendPageAndWait("foo"); hits = searcher.search(query); I have fixed it now. Stephan. Wow, what a quick work! Thank you very much! Regards Stephan
Re: [BUG] Registering of JavaFlow fails (was: [JavaFlow] java.lang.VerifyException)
Am Do, den 03.06.2004 schrieb Stephan Michels um 15:00: > Am Di, den 01.06.2004 schrieb Stephan Coboos um 20:23: > > Hello, > > > > I have a problem using Objects in JavaFlow before a while loop. Please > > see my first posting [JavaFlow] java.lang.VerifyException. In my opinion > > it can be a bug in the JavaFlow block. > > > > Because my fist posting was not so clear, I had tried to reproduce the > > error for a while and I had discovered the following code which creates > > such an error (you need the packages of Lucene): > > > > java.lang.VerifyError: (class: foo/bar/TestFlow, method: doTest > > signature: ()V) Incompatible object argument for function call > > > > Is it really a bug? Why is it not possible to declare these three line > > within the method doTest? What can I do? > > Yes, it seems to be a bug. I guess its a problem the following line > > query = QueryParser.parse("foo", "bar", new StandardAnalyzer()); > > I had many problem in the past with uninitialized objects and saving the > continuation. I will take a look into it. It was a problem with null objects, which were stored into the continuation. If the frame will be restored, the null object cannot be casted into the right type. So, at the end the correct signatur couldn't be found. Hits hits; IndexSearcher searcher = null; sendPageAndWait("foo"); hits = searcher.search(query); I have fixed it now. Stephan.
Re: [BUG] Registering of JavaFlow fails (was: [JavaFlow] java.lang.VerifyException)
Am Di, den 01.06.2004 schrieb Stephan Coboos um 20:23: > Hello, > > I have a problem using Objects in JavaFlow before a while loop. Please > see my first posting [JavaFlow] java.lang.VerifyException. In my opinion > it can be a bug in the JavaFlow block. > > Because my fist posting was not so clear, I had tried to reproduce the > error for a while and I had discovered the following code which creates > such an error (you need the packages of Lucene): > > java.lang.VerifyError: (class: foo/bar/TestFlow, method: doTest > signature: ()V) Incompatible object argument for function call > > Is it really a bug? Why is it not possible to declare these three line > within the method doTest? What can I do? Yes, it seems to be a bug. I guess its a problem the following line query = QueryParser.parse("foo", "bar", new StandardAnalyzer()); I had many problem in the past with uninitialized objects and saving the continuation. I will take a look into it. Stephan.
[BUG] Registering of JavaFlow fails (was: [JavaFlow] java.lang.VerifyException)
Hello, I have a problem using Objects in JavaFlow before a while loop. Please see my first posting [JavaFlow] java.lang.VerifyException. In my opinion it can be a bug in the JavaFlow block. Because my fist posting was not so clear, I had tried to reproduce the error for a while and I had discovered the following code which creates such an error (you need the packages of Lucene): package foo.bar; import org.apache.cocoon.components.flow.java.AbstractContinuable; import org.apache.lucene.queryParser.*; import org.apache.lucene.search.*; import org.apache.lucene.analysis.standard.StandardAnalyzer; public class TestFlow extends AbstractContinuable { public void doTest() throws Exception { // This causes an error -> The class can not be registered at first call!!! Query query = null; Hits hits; IndexSearcher searcher = null; // end while(true) { this.sendPageAndWait("foo"); query = QueryParser.parse("foo", "bar", new StandardAnalyzer()); hits = searcher.search(query); } } } If you test this error you can see that the first call of any (!) url of the corresponding cocoon app causes in a empty page. The flow-log shows as last entry the following line: registered java class "foo.bar.TestFlow" for flow Then, Cocoon stops working and displays a empty page. In the logs of my servlet container Tomcat I can see the follwing error message: 2004-06-01 19:58:33 StandardWrapperValve[Cocoon]: Servlet.service() for servlet Cocoon threw exception java.lang.VerifyError: (class: foo/bar/TestFlow, method: doTest signature: ()V) Incompatible object argument for function call 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:96) at org.apache.cocoon.components.flow.java.JavaInterpreter.callFunction(JavaInterpreter.java:130) 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.handleCocoonRedirect(TreeProcessor.java:382) at org.apache.cocoon.components.treeprocessor.TreeProcessor.access$000(TreeProcessor.java:66) at org.apache.cocoon.components.treeprocessor.TreeProcessor$TreeProcessorRedirector.cocoonRedirect(TreeProcessor.java:543) at org.apache.cocoon.environment.ForwardRedirector.redirect(ForwardRedirector.java:58) at org.apache.cocoon.components.treeprocessor.sitemap.RedirectToURINode.invoke(RedirectToURINode.java:69) 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.treepro