legsem / legstar

Automatically exported from code.google.com/p/legstar
0 stars 2 forks source link

COBOL bindubg runtime does not support mapping COBOL numerics to java Enum class members #143

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Have a COBOL-annotated JAXB class with a field defined like so:

    @CobolElement(cobolName = "MYVALUE", type = CobolType.BINARY_ITEM, levelNumber = 5, isSigned = false, totalDigits = 4, picture = "9(4)", usage = "BINARY", srceLine = 2)
    protected MyValueOption myvalue;

2. Generate COBOL Transformers
3. Run the Transformer toHost method

You get an exception like so:

Caused by: Attempt to set binding Myvalue from an incompatible value ONE
    at com.legstar.coxb.impl.AbstractNumericBinding.setObjectValue(AbstractNumericBinding.java:190)
    at com.legstar.test.coxb.level88.bind.DfhcommareaBinding.setChildrenValues(DfhcommareaBinding.java:145)
    at com.legstar.coxb.impl.visitor.CobolMarshalVisitor.visit(CobolMarshalVisitor.java:81)
    at com.legstar.coxb.common.CComplexBinding.accept(CComplexBinding.java:75)
    at com.legstar.coxb.transform.AbstractJavaToHostTransformer.transform(AbstractJavaToHostTransformer.java:173)

Original issue reported on code.google.com by fady.mou...@gmail.com on 5 Apr 2011 at 12:34

GoogleCodeExporter commented 9 years ago

Original comment by fady.mou...@gmail.com on 9 Apr 2011 at 4:17

GoogleCodeExporter commented 9 years ago

Original comment by fady.mou...@gmail.com on 22 Jul 2011 at 10:18

GoogleCodeExporter commented 9 years ago

Original comment by fady.mou...@gmail.com on 23 Jul 2011 at 5:27