You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Bart Molenkamp <b....@bizzdesign.nl> on 2004/06/28 16:25:41 UTC

Problems with JavaFlow and lookup of components

Hello,

I want to lookup a component in a JavaFlow class, but I get a BCEL
error. I get the following error:

org.apache.bcel.verifier.exc.StructuralCodeConstraintException:
Instruction GETSTATIC constraint violated: Class
'com.bizzdesign.cms.model.StorageUnitManager' is referenced, but cannot
be loaded and resolved: 'VERIFIED_REJECTED Number of LocalVariableTable
attributes of Code attribute '<CODE>' (method 'static void <clinit>()')
exceeds number of local variable slots '0' ('There may be no more than
one LocalVariableTable attribute per local variable in the Code
attribute.'). '. InstructionHandle: 1: getstatic[178](3) 24 Execution
Frame: Local Variables: 0:
org.apache.cocoon.samples.flow.java.CalculatorFlow 1: <unknown object>
2: <unknown object> 3: <unknown object> 4: <unknown object>
OperandStack: Slots used: 1 MaxStack: 6.
org.apache.cocoon.samples.flow.java.CalculatorFlow (Size: 1) Execution
flow: 0: aload_0 [InstructionContext] 1: getstatic 24
[InstructionContext]

I've tested on the CalculatorFlow.java sample class. I've added the line
StorageUnitManager manager = (StorageUnitManager)
getComponent(StorageUnitManager.ROLE);

The line above causes the error. What am I doing wrong?

Bart.

Re: Problems with JavaFlow and lookup of components

Posted by Stephan Michels <st...@apache.org>.
Am Mo, den 28.06.2004 schrieb Bart Molenkamp um 16:25:
> Hello,
> 
> I want to lookup a component in a JavaFlow class, but I get a BCEL
> error. I get the following error:
> 
> org.apache.bcel.verifier.exc.StructuralCodeConstraintException:
> Instruction GETSTATIC constraint violated: Class
> 'com.bizzdesign.cms.model.StorageUnitManager' is referenced, but cannot
> be loaded and resolved: 'VERIFIED_REJECTED Number of LocalVariableTable
> attributes of Code attribute '<CODE>' (method 'static void <clinit>()')
> exceeds number of local variable slots '0' ('There may be no more than
> one LocalVariableTable attribute per local variable in the Code
> attribute.'). '. InstructionHandle: 1: getstatic[178](3) 24 Execution
> Frame: Local Variables: 0:
> org.apache.cocoon.samples.flow.java.CalculatorFlow 1: <unknown object>
> 2: <unknown object> 3: <unknown object> 4: <unknown object>
> OperandStack: Slots used: 1 MaxStack: 6.
> org.apache.cocoon.samples.flow.java.CalculatorFlow (Size: 1) Execution
> flow: 0: aload_0 [InstructionContext] 1: getstatic 24
> [InstructionContext]
> 
> I've tested on the CalculatorFlow.java sample class. I've added the line
> StorageUnitManager manager = (StorageUnitManager)
> getComponent(StorageUnitManager.ROLE);

The verifier code, which comes from bcel was a bit buggy, so I removed
it in the current CVS. So, I would rather use the CVS than 2.1.5

Stephan.