Forum Home » Fuse Distributions » Fuse Mediation Router

Thread: Can't camel:run route working when deployed on the server

 
This question is answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 1 - Last Post: Jun 19, 2012 1:48 PM Last Post By: nicolasduminil
nicolasduminil

Posts: 87
Registered: 02/24/09
Can't camel:run route working when deployed on the server
Posted: Jun 19, 2012 1:43 PM
 
  Click to reply to this thread Reply
Greetings,

I have the following route:

<route>
<from uri="file:..."/>
<doTry>
<to uri="validator:classpath:myxsd.xsd"/>
<to uri="file:..."/>
<doCatch>
<exception>org.apache.camel.ValidationException</exception>
<to uri="file:..."/>
</doCatch>
</doTry>
</route>
It tries to pick-up an XML file and to validate it against its associated XSD. Deploying it on the Karaf server works but trying to run it with camel:run raises the following:

INFO --- camel-maven-plugin:2.9.0.fuse-7-061:run (default-cli) @ sting.routing ---
INFO Using org.apache.camel.spring.Main to initiate a CamelContext
http://pache.camel.spring.Main.main() MainSupport INFO Apache Camel 2.8.0-fuse-03-06 starting
http://pache.camel.spring.Main.main() CamelNamespaceHandler INFO OSGi environment not detected.
http://pache.camel.spring.Main.main() SpringCamelContext INFO Apache Camel 2.8.0-fuse-03-06 (CamelContext: camel-1) is starting
http://pache.camel.spring.Main.main() SpringCamelContext INFO JMX enabled. Using ManagedManagementStrategy.
http://pache.camel.spring.Main.main() AnnotationTypeConverterLoader INFO Found 3 packages with 14 @Converter classes to load
http://pache.camel.spring.Main.main() DefaultTypeConverter INFO Loaded 163 core type converters (total 163 type converters)
http://pache.camel.spring.Main.main() DefaultTypeConverter INFO Loaded additional 0 type converters (total 163 type converters) in 0.002 seconds
http://pache.camel.spring.Main.main() SpringCamelContext INFO Apache Camel 2.8.0-fuse-03-06 (CamelContext: camel-1) is shutting down
http://pache.camel.spring.Main.main() DefaultShutdownStrategy INFO Starting to graceful shutdown 0 routes (timeout 300 seconds)
http://pache.camel.spring.Main.main() DefaultShutdownStrategy INFO Graceful shutdown of 0 routes completed in 0 seconds
http://pache.camel.spring.Main.main() DefaultInflightRepository INFO Shutting down with no inflight exchanges.
http://pache.camel.spring.Main.main() SpringCamelContext INFO Uptime: 0.299 seconds
http://pache.camel.spring.Main.main() SpringCamelContext INFO Apache Camel 2.8.0-fuse-03-06 (CamelContext: camel-1) is shutdown in 0.007 seconds
http://pache.camel.spring.Main.main() MainSupport INFO Apache Camel 2.8.0-fuse-03-06 stopping
*************************************
Error occurred while running main from: org.apache.camel.spring.Main
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.camel.maven.RunMojo$1.run(RunMojo.java:440)
at java.lang.Thread.run(Thread.java:662)
Caused by: org.apache.camel.RuntimeCamelException: org.apache.camel.FailedToCreateRouteException: Failed to create route route1 at: >>> DoTry[[Tovalidator:idocOrderStatus.xsd, To, DoCatch[ null -> [To <<< in route: Route[[From[file:{{file.inbox}}?preMove=inprogress&move=../.... because of Failed to resolve endpoint: validator://idocOrderStatus.xsd due to: Current configuration of the parser doesn't allow a maxOccurs attribute value to be set greater than the value 5 000.
at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1149)
at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:110)
at org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:240)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:303)
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:911)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:428)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
at org.apache.camel.spring.Main.createDefaultApplicationContext(Main.java:185)
at org.apache.camel.spring.Main.doStart(Main.java:139)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:67)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:54)
at org.apache.camel.impl.MainSupport.run(MainSupport.java:136)
at org.apache.camel.impl.MainSupport.run(MainSupport.java:322)
at org.apache.camel.spring.Main.main(Main.java:72)
... 6 more
Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create route route1 at: >>> DoTry[[Tovalidator:idocOrderStatus.xsd, To, DoCatch[ null -> [To <<< in route: Route[[From[file:{{file.inbox}}?preMove=inprogress&move=../.... because of Failed to resolve endpoint: validator://idocOrderStatus.xsd due to: Current configuration of the parser doesn't allow a maxOccurs attribute value to be set greater than the value 5 000.
at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:820)
at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:165)
at org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:698)
at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:1696)
at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1481)
at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1373)
at org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.java:169)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:67)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:54)
at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1341)
at org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:213)
at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:108)
... 20 more
Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: validator://idocOrderStatus.xsd due to: Current configuration of the parser doesn't allow a maxOccurs attribute value to be set greater than the value 5 000.
at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:444)
at org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:48)
at org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinition.java:180)
at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:110)
at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:116)
at org.apache.camel.model.SendDefinition.resolveEndpoint(SendDefinition.java:61)
at org.apache.camel.model.SendDefinition.createProcessor(SendDefinition.java:55)
at org.apache.camel.model.ProcessorDefinition.createOutputsProcessor(ProcessorDefinition.java:385)
at org.apache.camel.model.TryDefinition.createProcessor(TryDefinition.java:77)
at org.apache.camel.model.ProcessorDefinition.makeProcessor(ProcessorDefinition.java:430)
at org.apache.camel.model.ProcessorDefinition.addRoutes(ProcessorDefinition.java:183)
at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:817)
... 31 more
Caused by: org.xml.sax.SAXParseException: Current configuration of the parser doesn't allow a maxOccurs attribute value to be set greater than the value 5 000.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:174)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:388)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaErr(XSDHandler.java:2537)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaFatalError(XSDHandler.java:2524)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSAttributeChecker.reportSchemaFatalError(XSAttributeChecker.java:1618)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSAttributeChecker.checkAttributes(XSAttributeChecker.java:1236)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSAttributeChecker.checkAttributes(XSAttributeChecker.java:996)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDElementTraverser.traverseLocal(XSDElementTraverser.java:151)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDElementTraverser.traverseLocal(XSDElementTraverser.java:121)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDAbstractParticleTraverser.traverseSeqChoice(XSDAbstractParticleTraverser.java:216)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDAbstractParticleTraverser.traverseSequence(XSDAbstractParticleTraverser.java:146)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDComplexTypeTraverser.processComplexContent(XSDComplexTypeTraverser.java:971)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDComplexTypeTraverser.traverseComplexTypeDecl(XSDComplexTypeTraverser.java:279)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDComplexTypeTraverser.traverseLocal(XSDComplexTypeTraverser.java:133)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDElementTraverser.traverseNamedElement(XSDElementTraverser.java:356)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDElementTraverser.traverseLocal(XSDElementTraverser.java:179)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.traverseLocalElements(XSDHandler.java:2049)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.parseSchema(XSDHandler.java:582)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadSchema(XMLSchemaLoader.java:552)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:519)
at com.sun.org.apache.xerces.internal.impINFO
INFO BUILD FAILURE
INFO
INFO Total time: 3.146s
l.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:485)
at com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory.newSchema(XMLSchemaFactory.java:211)
at javax.xml.validation.SchemaFactory.newSchema(SchemaFactory.java:594)
at org.apache.camel.processor.validation.ValidatingProcessor.createSchema(ValidatingProcessor.java:217)
at org.apache.camel.processor.validation.ValidatingProcessor.loadSchema(ValidatingProcessor.java:102)
at org.apache.camel.component.validator.ValidatorComponent.createEndpoint(ValidatorComponent.java:43)
at org.apache.camel.impl.DefaultComponent.createEndpoint(DefaultComponent.java:75)
at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:426)
... 42 more
*************************************
INFO Finished at: Tue Jun 19 14:59:19 CEST 2012
INFO Final Memory: 10M/25M
INFO
ERROR Failed to execute goal org.apache.camel:camel-maven-plugin:2.9.0.fuse-7-061:run (default-cli) on project sting.routing: null: MojoExecutionException: InvocationTargetException: org.apache.camel.FailedToCreateRouteException: Failed to create route route1 at: >>> DoTry[[Tovalidator:idocOrderStatus.xsd, To, DoCatch[ null -> [To <<< in route: Route[[From[file:{{file.inbox}}?preMove=inprogress&move=../.... because of Failed to resolve endpoint: validator://idocOrderStatus.xsd due to: Current configuration of the parser doesn't allow a maxOccurs attribute value to be set greater than the value 5 000. -> Help 1

Many thanks in advance for your help.

Kind regards,

Nicolas
nicolasduminil

Posts: 87
Registered: 02/24/09
Re: Can't camel:run route working when deployed on the server
Posted: Jun 19, 2012 1:48 PM   in response to: nicolasduminil in response to: nicolasduminil
 
  Click to reply to this thread Reply
Please don't take notice of this question as the answer is obvious: the associated XSD had a maxOccurs=9999999 inside. Sorry.

Nicolas