Hi, I'd like to implement a flexible configuration which uses JiBX to configure somewhat flexible expressions. It uses a recursiive definition for an expression. Compilation of the binding works well but on unmarshalling, a failure is detected:
Does anybody have a hint what is going wrong? Does anybody successfully used recursion? Many thanks for any hint, Reiner Nix > Element "Expression" has no mapping that extends > com.macd.xConnect.gateway.snmp.management.lang.Expression > org.jibx.runtime.JiBXException: Element "Expression" has no mapping that > extends com.macd.xConnect.gateway.snmp.management.lang.Expression > at > com.macd.xConnect.gateway.snmp.management.lang.JiBX_unmarshalling_bindingExpression_access.unmarshal() > at > com.macd.xConnect.gateway.snmp.management.lang.FunctionDefinition.JiBX_unmarshalling_binding_unmarshal_1_0(FunctionDefinition.java) > at > com.macd.xConnect.gateway.snmp.management.lang.JiBX_unmarshalling_bindingFunctionDefinition_access.unmarshal() > at > com.macd.xConnect.gateway.snmp.management.JiBX_MungeAdapter.JiBX_unmarshalling_binding_unmarshal_1_1() > at > com.macd.xConnect.gateway.snmp.management.ManagedConfig.JiBX_unmarshalling_binding_unmarshal_1_0(ManagedConfig.java) > at > com.macd.xConnect.gateway.snmp.management.JiBX_unmarshalling_bindingManagedConfig_access.unmarshal() > at > org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(UnmarshallingContext.java:2614) > at > org.jibx.runtime.impl.UnmarshallingContext.unmarshalDocument(UnmarshallingContext.java:2782) > at > com.macd.xConnect.gateway.snmp.management.ManagedConfig.read(ManagedConfig.java:115) > First, I have defined: > <mapping class="com.macd.xConnect.gateway.snmp.management.lang.Expression" > abstract="true" /> > > <mapping name="And" > class="com.macd.xConnect.gateway.snmp.management.lang.And" > > extends="com.macd.xConnect.gateway.snmp.management.lang.Expression"> > > <collection field="expressionList" > > item-type="com.macd.xConnect.gateway.snmp.management.lang.Expression" > usage="required"/> > </mapping> > > <mapping name="Or" > class="com.macd.xConnect.gateway.snmp.management.lang.Or" > > extends="com.macd.xConnect.gateway.snmp.management.lang.Expression"> > > <collection field="expressionList" > > item-type="com.macd.xConnect.gateway.snmp.management.lang.Expression" > usage="required"/> > </mapping> > > <mapping name="FunctionDefinition" > > class="com.macd.xConnect.gateway.snmp.management.lang.FunctionDefinition"> > > <value style="attribute" name="name" field="name" usage="required" > ident="def"/> > <structure field="argumentDefinitionList" usage="required"/> > <structure field="expression" usage="required"/> > </mapping> > and some other elements. The JIbX binding is created well: > mapping class com.macd.xConnect.gateway.snmp.management.lang.Expression > object binding for > com.macd.xConnect.gateway.snmp.management.lang.Expression > structure ordered > mapping class com.macd.xConnect.gateway.snmp.management.lang.And to element > And > element wrapper And > object binding for com.macd.xConnect.gateway.snmp.management.lang.And > structure ordered > component property expressionList (java.util.ArrayList) > object binding for java.util.ArrayList > collection ordered > mapping reference to > com.macd.xConnect.gateway.snmp.management.lang.Expression using property from > collection (com.macd.xConnect.gateway.snmp.management.lang.Expression) > mapping class com.macd.xConnect.gateway.snmp.management.lang.Or to element > Or > element wrapper Or > object binding for com.macd.xConnect.gateway.snmp.management.lang.Or > structure ordered > component property expressionList (java.util.ArrayList) > object binding for java.util.ArrayList > collection ordered > mapping reference to > com.macd.xConnect.gateway.snmp.management.lang.Expression using property from > collection (com.macd.xConnect.gateway.snmp.management.lang.Expression) > mapping class > com.macd.xConnect.gateway.snmp.management.lang.FunctionDefinition to element > FunctionDefinition > element wrapper FunctionDefinition > object binding for > com.macd.xConnect.gateway.snmp.management.lang.FunctionDefinition > structure ordered > attribute name from property name (java.lang.String) > mapping reference to > com.macd.xConnect.gateway.snmp.management.lang.ArgumentDefinitionList using > property argumentDefinitionList > (com.macd.xConnect.gateway.snmp.management.lang.ArgumentDefinitionList) > mapping reference to > com.macd.xConnect.gateway.snmp.management.lang.Expression using property > expression (com.macd.xConnect.gateway.snmp.management.lang.Expression) > ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ _______________________________________________ jibx-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jibx-users
