Many thanks, I have found my error: Even I have defined the abstract base class and more mappings to extend them, the XML document had an additional <Expression> element but the corrresponding <sturcture name="Expression"> for my <FunctionDefinition> element was missing.
Cheers Reiner > I've used recursive structures without a problem. From the error message > it looks like you've got an <Expression> element in the XML, which is > not defined by the binding. What's your actual XML document? > > - Dennis > > Reiner Nix wrote: > >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_bindin > >>gExpression_access.unmarshal() at > >> com.macd.xConnect.gateway.snmp.management.lang.FunctionDefinition.JiBX_u > >>nmarshalling_binding_unmarshal_1_0(FunctionDefinition.java) at > >> com.macd.xConnect.gateway.snmp.management.lang.JiBX_unmarshalling_bindin > >>gFunctionDefinition_access.unmarshal() at > >> com.macd.xConnect.gateway.snmp.management.JiBX_MungeAdapter.JiBX_unmarsh > >>alling_binding_unmarshal_1_1() at > >> com.macd.xConnect.gateway.snmp.management.ManagedConfig.JiBX_unmarshalli > >>ng_binding_unmarshal_1_0(ManagedConfig.java) at > >> com.macd.xConnect.gateway.snmp.management.JiBX_unmarshalling_bindingMana > >>gedConfig_access.unmarshal() at > >> org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(Unmarshallin > >>gContext.java:2614) at > >> org.jibx.runtime.impl.UnmarshallingContext.unmarshalDocument(Unmarshalli > >>ngContext.java:2782) at > >> com.macd.xConnect.gateway.snmp.management.ManagedConfig.read(ManagedConf > >>ig.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 -- Reiner B. Nix IT-Architect [EMAIL PROTECTED] http://www.macd.com Tel.: +49 (0)241 44597-23 Macdonald Associates GmbH Fax : +49 (0)241 44597-10 Lothringer Str. 52, D-52070 Aachen ------------------------------------------------------- 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
