[
https://issues.apache.org/jira/browse/CAMEL-18225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17558344#comment-17558344
]
Claus Ibsen edited comment on CAMEL-18225 at 6/24/22 6:41 AM:
--------------------------------------------------------------
Ah its named customDataFormat in 3.14.x (it may be that the xml-io parser uses
that name).
Camel 3.15 onwards the data formats names have been aligned and renamed, see
the upgrade guide:
https://camel.apache.org/manual/camel-3x-upgrade-guide-3_15.html
was (Author: davsclaus):
Ah its named customDataFormat in 3.14.x
> Can't load custom dataformat
> ----------------------------
>
> Key: CAMEL-18225
> URL: https://issues.apache.org/jira/browse/CAMEL-18225
> Project: Camel
> Issue Type: Bug
> Affects Versions: 3.14.3
> Environment: Java: JDK 11 (Adoptium Temurin)
> OS: Windows 10
> Reporter: Raymond
> Priority: Minor
>
> I created a custom dataformat and call it with the XML-IO DSL like this:
> <unmarshal>
> <custom ref="myCustomDataformat"/>
> </unmarshal>
> I get the following error:
> org.apache.camel.xml.io.XmlPullParserException: Unexpected element '{}custom'
> According to the XSD I would expect the custom element to be available
> [https://camel.apache.org/schema/spring/camel-spring-3.14.3.xsd]
> Also in Camel in Action2 (page 340) there is an example of this.
>
> I load the XML with the "xml-io" library and "dataformat" is also on the
> classpath.
> On the documentation page:
> [https://camel.apache.org/components/3.14.x/dataformats/index.html]
> The 'custom' dataformat isn't listed however and there is no documentation of
> it. Is it still supported?
> Complete stacktrace:
> org.apache.camel.xml.io.XmlPullParserException: Unexpected element '{}custom'
> at
> org.apache.camel.xml.in.BaseParser.handleUnexpectedElement(BaseParser.java:187)
> at org.apache.camel.xml.in.BaseParser.doParse(BaseParser.java:107)
> at
> org.apache.camel.xml.in.ModelParser.doParseUnmarshalDefinition(ModelParser.java:1449)
> at
> org.apache.camel.xml.in.ModelParser.doParseProcessorDefinitionRef(ModelParser.java:3212)
> at
> org.apache.camel.xml.in.ModelParser.lambda$outputDefinitionElementHandler$4(ModelParser.java:132)
> at
> org.apache.camel.xml.in.ModelParser.lambda$doParseRouteDefinition$71(ModelParser.java:1031)
> at org.apache.camel.xml.in.BaseParser.doParse(BaseParser.java:106)
> at
> org.apache.camel.xml.in.ModelParser.doParseRouteDefinition(ModelParser.java:1005)
> at
> org.apache.camel.xml.in.ModelParser.parseSingleRoutesDefinition(ModelParser.java:1185)
> at
> org.apache.camel.xml.in.ModelParser.parseRoutesDefinition(ModelParser.java:1178)
> at
> org.apache.camel.dsl.xml.io.XmlRoutesBuilderLoader$1.configure(XmlRoutesBuilderLoader.java:78)
> at
> org.apache.camel.builder.RouteBuilder.checkInitialized(RouteBuilder.java:607)
> at
> org.apache.camel.builder.RouteBuilder.configureRoutes(RouteBuilder.java:553)
> at
> org.apache.camel.builder.RouteBuilder.updateRoutesToCamelContext(RouteBuilder.java:515)
> at
> org.apache.camel.spi.RoutesLoader.updateRoutes(RoutesLoader.java:105)
> at
> org.apache.camel.spi.RoutesLoader.updateRoutes(RoutesLoader.java:87)
--
This message was sent by Atlassian Jira
(v8.20.7#820007)