1 Reply Latest reply: Jun 19, 2012 9:48 AM by nicolas duminil RSS

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

    nicolas duminil Expert

      Greetings,

       

      I have the following 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:

       

      --- camel-maven-plugin:2.9.0.fuse-7-061:run (default-cli) @ sting.routing ---

      Using org.apache.camel.spring.Main to initiate a CamelContext

      MainSupport                    INFO  Apache Camel 2.8.0-fuse-03-06 starting

      CamelNamespaceHandler          INFO  OSGi environment not detected.

      SpringCamelContext             INFO  Apache Camel 2.8.0-fuse-03-06 (CamelContext: camel-1) is starting

      SpringCamelContext             INFO  JMX enabled. Using ManagedManagementStrategy.

      AnnotationTypeConverterLoader  INFO  Found 3 packages with 14 @Converter classes to load

      DefaultTypeConverter           INFO  Loaded 163 core type converters (total 163 type converters)

      DefaultTypeConverter           INFO  Loaded additional 0 type converters (total 163 type converters) in 0.002 seconds

      SpringCamelContext             INFO  Apache Camel 2.8.0-fuse-03-06 (CamelContext: camel-1) is shutting down

      DefaultShutdownStrategy        INFO  Starting to graceful shutdown 0 routes (timeout 300 seconds)

      DefaultShutdownStrategy        INFO  Graceful shutdown of 0 routes completed in 0 seconds

      DefaultInflightRepository      INFO  Shutting down with no inflight exchanges.

      SpringCamelContext             INFO  Uptime: 0.299 seconds

      SpringCamelContext             INFO  Apache Camel 2.8.0-fuse-03-06 (CamelContext: camel-1) is shutdown in 0.007 seconds

      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[[To[validator:idocOrderStatus.xsd], To[file:{{file.outbox.valid}}], DoCatch[ null -> [To[file:{{file.outbox.invalid}}]]]]]  [To[file:{{file.outbox.invalid}}]]]]] <<< 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.imp[INFO] -


      BUILD FAILURE

      -


      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

      *************************************

      Finished at: Tue Jun 19 14:59:19 CEST 2012

      Final Memory: 10M/25M

      -


      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[[To[validator:idocOrderStatus.xsd], To[file:{{file.outbox.valid}}], DoCatch[ null -> [To[file:{{file.outbox.invalid}}]]]]] <<< 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. ->

       

      Many thanks in advance for your help.

       

      Kind regards,

       

      Nicolas