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=29547>.
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=29547

can't use singleton classes in Continuable

           Summary: can't use singleton classes in Continuable
           Product: Cocoon 2
           Version: 2.1.5
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: Major
          Priority: Other
         Component: blocks
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


When using a singleton class in a continuation the error below occurs. I tried 
to save the instance of the singleton class in the context and retrieve it in 
the continuable, but the same error occurs. I tried to work with the latest 
bcel jar, but this is not compliant with the current javaflow implementation.

I use cocoon 2.1.5 (built from source)
Tomcat 5.0.18
JDK 1.4.2_04

Message: Instruction INVOKEVIRTUAL constraint violated: 
Class 'com.mypackage.security.SecurityFactory' is referenced, but cannot be 
loaded and resolved: 'VERIFIED_REJECTED Number of LocalVariableTable attributes 
of Code attribute '' (method 'public static 
com.mypackage.security.SecurityFactory getInstance()') exceeds number of local 
variable slots '0' ('There may be no more than one LocalVariableTable attribute 
per local variable in the Code attribute.'). '. InstructionHandle: 33: 
invokevirtual[182](3) 55 Execution Frame: Local Variables: 0: 
com.mypackage.cocoon.security.AuthenticationHandler 1: 2: 3: OperandStack: 
Slots used: 1 MaxStack: 4. com.mypackage.cocoon.ResourceHelper (Size: 1) 
Execution flow: 0: aload_0 [InstructionContext] 1: getfield 22 
[InstructionContext] 4: invokevirtual 31 [InstructionContext] 7: ifne -> 104 
[InstructionContext] 10: aload_0 [InstructionContext] 11: invokevirtual 35 
[InstructionContext] 14: ldc 37 [InstructionContext] 16: invokeinterface 43 
[InstructionContext] 21: ldc 45 [InstructionContext] 23: invokevirtual 51 
[InstructionContext] 26: ifeq -> 98 [InstructionContext] 29: aload_0 
[InstructionContext] 30: getfield 22 [InstructionContext] 33: invokevirtual 55 
[InstructionContext]

Description: org.apache.bcel.verifier.exc.StructuralCodeConstraintException: 
Instruction INVOKEVIRTUAL constraint violated: 
Class 'com.mypackage.security.SecurityFactory' is referenced, but cannot be 
loaded and resolved: 'VERIFIED_REJECTED Number of LocalVariableTable attributes 
of Code attribute '' (method 'public static 
com.mypackage.security.SecurityFactory getInstance()') exceeds number of local 
variable slots '0' ('There may be no more than one LocalVariableTable attribute 
per local variable in the Code attribute.'). '. InstructionHandle: 33: 
invokevirtual[182](3) 55 Execution Frame: Local Variables: 0: 
com.mypackage.cocoon.security.AuthenticationHandler 1: 2: 3: OperandStack: 
Slots used: 1 MaxStack: 4. com.mypackage.cocoon.ResourceHelper (Size: 1) 
Execution flow: 0: aload_0 [InstructionContext] 1: getfield 22 
[InstructionContext] 4: invokevirtual 31 [InstructionContext] 7: ifne -> 104 
[InstructionContext] 10: aload_0 [InstructionContext] 11: invokevirtual 35 
[InstructionContext] 14: ldc 37 [InstructionContext] 16: invokeinterface 43 
[InstructionContext] 21: ldc 45 [InstructionContext] 23: invokevirtual 51 
[InstructionContext] 26: ifeq -> 98 [InstructionContext] 29: aload_0 
[InstructionContext] 30: getfield 22 [InstructionContext] 33: invokevirtual 55 
[InstructionContext]

Sender: org.apache.cocoon.servlet.CocoonServlet

Source: Cocoon Servlet

Request URI

edit/general/test

cause

org.apache.bcel.verifier.exc.StructuralCodeConstraintException: Instruction 
INVOKEVIRTUAL constraint violated: 
Class 'com.mypackage.security.SecurityFactory' is referenced, but cannot be 
loaded and resolved: 'VERIFIED_REJECTED
Number of LocalVariableTable attributes of Code attribute '' (method 'public 
static com.mypackage.security.SecurityFactory getInstance()') exceeds number of 
local variable slots '0' ('There may be no more than one LocalVariableTable 
attribute per local variable in the Code attribute.').
'.
InstructionHandle:   33: invokevirtual[182](3) 55

Execution Frame:
Local Variables:
0: com.mypackage.cocoon.security.AuthenticationHandler
1: 
2: 
3: 
OperandStack:
Slots used: 1 MaxStack: 4.
com.mypackage.cocoon.ResourceHelper (Size: 1)
Execution flow:
   0: aload_0   [InstructionContext]
   1: getfield 22       [InstructionContext]
   4: invokevirtual 31  [InstructionContext]
   7: ifne -> 104       [InstructionContext]
  10: aload_0   [InstructionContext]
  11: invokevirtual 35  [InstructionContext]
  14: ldc 37    [InstructionContext]
  16: invokeinterface 43        [InstructionContext]
  21: ldc 45    [InstructionContext]
  23: invokevirtual 51  [InstructionContext]
  26: ifeq -> 98        [InstructionContext]
  29: aload_0   [InstructionContext]
  30: getfield 22       [InstructionContext]
  33: invokevirtual 55  [InstructionContext]

request-uri

/edit/general/test

stacktrace

org.apache.bcel.verifier.exc.StructuralCodeConstraintException: Instruction 
INVOKEVIRTUAL constraint violated: 
Class 'com.mypackage.security.SecurityFactory' is referenced, but cannot be 
loaded and resolved: 'VERIFIED_REJECTED
Number of LocalVariableTable attributes of Code attribute '' (method 'public 
static com.mypackage.security.SecurityFactory getInstance()') exceeds number of 
local variable slots '0' ('There may be no more than one LocalVariableTable 
attribute per local variable in the Code attribute.').
'.
InstructionHandle:   33: invokevirtual[182](3) 55

Execution Frame:
Local Variables:
0: com.mypackage.cocoon.security.AuthenticationHandler
1: 
2: 
3: 
OperandStack:
Slots used: 1 MaxStack: 4.
com.mypackage.cocoon.ResourceHelper (Size: 1)
Execution flow:
   0: aload_0   [InstructionContext]
   1: getfield 22       [InstructionContext]
   4: invokevirtual 31  [InstructionContext]
   7: ifne -> 104       [InstructionContext]
  10: aload_0   [InstructionContext]
  11: invokevirtual 35  [InstructionContext]
  14: ldc 37    [InstructionContext]
  16: invokeinterface 43        [InstructionContext]
  21: ldc 45    [InstructionContext]
  23: invokevirtual 51  [InstructionContext]
  26: ifeq -> 98        [InstructionContext]
  29: aload_0   [InstructionContext]
  30: getfield 22       [InstructionContext]
  33: invokevirtual 55  [InstructionContext]
        at 
org.apache.bcel.verifier.structurals.InstConstraintVisitor.constraintViolated
(InstConstraintVisitor.java:148)
        at 
org.apache.bcel.verifier.structurals.InstConstraintVisitor.visitINVOKEVIRTUAL
(InstConstraintVisitor.java:1917)
        at org.apache.bcel.generic.INVOKEVIRTUAL.accept(INVOKEVIRTUAL.java:110)
        at org.apache.bcel.generic.InstructionHandle.accept
(InstructionHandle.java:282)
        at 
org.apache.bcel.verifier.structurals.ControlFlowGraph$InstructionContextImpl.exe
cute(ControlFlowGraph.java:229)
        at 
org.apache.cocoon.components.flow.java.ContinuationClassLoader.analyse
(ContinuationClassLoader.java:234)
        at 
org.apache.cocoon.components.flow.java.ContinuationClassLoader.transform
(ContinuationClassLoader.java:146)
        at 
org.apache.cocoon.components.flow.java.ContinuationClassLoader.loadClass
(ContinuationClassLoader.java:114)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
        at org.apache.cocoon.components.flow.java.JavaInterpreter.initialize
(JavaInterpreter.java:93)
        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.invokeNo
des(AbstractParentProcessingNode.java:49)
        at 
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke
(PreparableMatchNode.java:130)
        at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNo
des(AbstractParentProcessingNode.java:72)
        at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke
(PipelineNode.java:126)
        at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNo
des(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.invokeNo
des(AbstractParentProcessingNode.java:49)
        at 
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke
(PreparableMatchNode.java:130)
        at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNo
des(AbstractParentProcessingNode.java:72)
        at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke
(PipelineNode.java:126)
        at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNo
des(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:639)
        at org.apache.cocoon.servlet.CocoonServlet.service
(CocoonServlet.java:1098)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:284)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:204)
        at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:257)
        at org.apache.catalina.core.StandardValveContext.invokeNext
(StandardValveContext.java:151)
        at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:564)
        at org.apache.catalina.core.StandardContextValve.invokeInternal
(StandardContextValve.java:245)
        at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:199)
        at org.apache.catalina.core.StandardValveContext.invokeNext
(StandardValveContext.java:151)
        at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:564)
        at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:195)
        at org.apache.catalina.core.StandardValveContext.invokeNext
(StandardValveContext.java:151)
        at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:164)
        at org.apache.catalina.core.StandardValveContext.invokeNext
(StandardValveContext.java:149)
        at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:564)
        at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:156)
        at org.apache.catalina.core.StandardValveContext.invokeNext
(StandardValveContext.java:151)
        at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:564)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
        at org.apache.coyote.tomcat5.CoyoteAdapter.service
(CoyoteAdapter.java:206)
        at org.apache.coyote.http11.Http11Processor.process
(Http11Processor.java:828)
        at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnectio
n(Http11Protocol.java:700)
        at org.apache.tomcat.util.net.TcpWorkerThread.runIt
(PoolTcpEndpoint.java:584)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
(ThreadPool.java:683)
        at java.lang.Thread.run(Thread.java:534)

Reply via email to