原谅这个问题的标题,我甚至不确定如何用它来表达。我的问题是我正在研究一个传统的骆驼项目,并希望将它从骆驼2.9.2推进到骆驼2.13.2。遗留项目使用的是ant,而不是maven,它中有一堆骆驼(和其他)罐子(其中许多实际上并不需要我可以收集的),但无论如何它确实有效。我创建了一个maven构建文件(pom.xml)并尝试重新创建必要的依赖项,以便我可以为camel-2.13.2下载相应的版本。它建立得很好。但是,当我部署它时,当我启动时,我在xsd验证器上出现错误,该验证器以前在旧版本中工作正常。我的日志中没有看到任何其他错误。
道歉,但它是一个很长的堆栈跟踪:
09/10/2014 13:11 ERROR [main] (?:?) - &&& CamelManager exception
org.apache.camel.RuntimeCamelException: org.apache.camel.FailedToCreateRouteException: Failed to create route EFileBatchRequestValidate at: >>> DoTry[[To[properties:{{validator.efilebatch.TRACSEFileBatch}}], To[properties:{{queue.efilebatch.request.validatedtracsxsd}}], DoCatch[ null -> [To[exceptionResponseProcessor], To[properties:{{queue.efilebatch.request.rejected}}], To[properties:{{queue.efilebatch.response}}]]]]] <<< in route: Route(EFileBatchRequestValidate)[[From[properties:{{queue.ef... because of Failed to resolve endpoint: properties://%7B%7Bvalidator.efilebatch.TRACSEFileBatch%7D%7D due to: Failed to resolve endpoint: validator://http://tomcat-test:8080/ecitationinternal/xsd/Odyssey/current/NM/NMEFileBatch.xsd due to: protocol = http host = null
at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1363)
at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:122)
at org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:318)
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:217)
at org.apache.camel.spring.Main.doStart(Main.java:157)
at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
at org.apache.camel.main.MainSupport.run(MainSupport.java:147)
at gov.nmcourts.camelvm.CamelManager.start(Unknown Source)
at gov.nmcourts.camelvm.CamelManager.main(Unknown Source)
Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create route EFileBatchRequestValidate at: >>> DoTry[[To[properties:{{validator.efilebatch.TRACSEFileBatch}}], To[properties:{{queue.efilebatch.request.validatedtracsxsd}}], DoCatch[ null -> [To[exceptionResponseProcessor], To[properties:{{queue.efilebatch.request.rejected}}], To[properties:{{queue.efilebatch.response}}]]]]] <<< in route: Route(EFileBatchRequestValidate)[[From[properties:{{queue.ef... because of Failed to resolve endpoint: properties://%7B%7Bvalidator.efilebatch.TRACSEFileBatch%7D%7D due to: Failed to resolve endpoint: validator://http://tomcat-test:8080/ecitationinternal/xsd/Odyssey/current/NM/NMEFileBatch.xsd due to: protocol = http host = null
at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:910)
at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:175)
at org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:780)
at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:2068)
at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1816)
at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1683)
at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1651)
at org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:254)
at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:120)
... 13 more
Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: properties://%7B%7Bvalidator.efilebatch.TRACSEFileBatch%7D%7D due to: Failed to resolve endpoint: validator://http://tomcat-test:8080/ecitationinternal/xsd/Odyssey/current/NM/NMEFileBatch.xsd due to: protocol = http host = null
at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:534)
at org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:71)
at org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinition.java:190)
at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:106)
at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:112)
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.createProcessor(ProcessorDefinition.java:459)
at org.apache.camel.model.ProcessorDefinition.createOutputsProcessor(ProcessorDefinition.java:428)
at org.apache.camel.model.TryDefinition.createProcessor(TryDefinition.java:73)
at org.apache.camel.model.ProcessorDefinition.makeProcessor(ProcessorDefinition.java:499)
at org.apache.camel.model.ProcessorDefinition.addRoutes(ProcessorDefinition.java:212)
at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:907)
... 22 more
Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: validator://http://tomcat-test:8080/ecitationinternal/xsd/Odyssey/current/NM/NMEFileBatch.xsd due to: protocol = http host = null
at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:534)
at org.apache.camel.component.properties.PropertiesComponent.createEndpoint(PropertiesComponent.java:113)
at org.apache.camel.impl.DefaultComponent.createEndpoint(DefaultComponent.java:123)
at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:514)
... 34 more
Caused by: java.lang.IllegalArgumentException: protocol = http host = null
at sun.net.spi.DefaultProxySelector.select(DefaultProxySelector.java:170)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:926)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:850)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1300)
at org.apache.camel.util.ResourceHelper.resolveResourceAsInputStream(ResourceHelper.java:118)
at org.apache.camel.util.ResourceHelper.resolveMandatoryResourceAsInputStream(ResourceHelper.java:87)
at org.apache.camel.component.validator.DefaultLSResourceResolver$DefaultLSInput.getInputUri(DefaultLSResourceResolver.java:108)
at org.apache.camel.component.validator.DefaultLSResourceResolver$DefaultLSInput.<init>(DefaultLSResourceResolver.java:101)
at org.apache.camel.component.validator.DefaultLSResourceResolver$DefaultLSInput.<init>(DefaultLSResourceResolver.java:88)
at org.apache.camel.component.validator.DefaultLSResourceResolver.resolveResource(DefaultLSResourceResolver.java:85)
at com.sun.org.apache.xerces.internal.util.DOMEntityResolverWrapper.resolveEntity(DOMEntityResolverWrapper.java:109)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.resolveEntity(XMLEntityManager.java:1070)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.resolveDocument(XMLSchemaLoader.java:659)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.resolveSchemaSource(XSDHandler.java:2105)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.constructTrees(XSDHandler.java:1088)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.parseSchema(XSDHandler.java:620)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadSchema(XMLSchemaLoader.java:616)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:574)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:540)
at com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory.newSchema(XMLSchemaFactory.java:252)
at javax.xml.validation.SchemaFactory.newSchema(SchemaFactory.java:627)
at org.apache.camel.processor.validation.ValidatingProcessor.createSchema(ValidatingProcessor.java:364)
at org.apache.camel.processor.validation.ValidatingProcessor.loadSchema(ValidatingProcessor.java:187)
at org.apache.camel.component.validator.ValidatorComponent.createEndpoint(ValidatorComponent.java:60)
at org.apache.camel.impl.DefaultComponent.createEndpoint(DefaultComponent.java:123)
at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:514)
... 37 more
Exception in thread "main" java.lang.RuntimeException: Problem launching or running Camel
at gov.nmcourts.camelvm.CamelManager.main(Unknown Source)
Caused by: org.apache.camel.RuntimeCamelException: org.apache.camel.FailedToCreateRouteException: Failed to create route EFileBatchRequestValidate at: >>> DoTry[[To[properties:{{validator.efilebatch.TRACSEFileBatch}}], To[properties:{{queue.efilebatch.request.validatedtracsxsd}}], DoCatch[ null -> [To[exceptionResponseProcessor], To[properties:{{queue.efilebatch.request.rejected}}], To[properties:{{queue.efilebatch.response}}]]]]] <<< in route: Route(EFileBatchRequestValidate)[[From[properties:{{queue.ef... because of Failed to resolve endpoint: properties://%7B%7Bvalidator.efilebatch.TRACSEFileBatch%7D%7D due to: Failed to resolve endpoint: validator://http://tomcat-test:8080/ecitationinternal/xsd/Odyssey/current/NM/NMEFileBatch.xsd due to: protocol = http host = null
at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1363)
at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:122)
at org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:318)
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:217)
at org.apache.camel.spring.Main.doStart(Main.java:157)
at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
at org.apache.camel.main.MainSupport.run(MainSupport.java:147)
at gov.nmcourts.camelvm.CamelManager.start(Unknown Source)
... 1 more
Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create route EFileBatchRequestValidate at: >>> DoTry[[To[properties:{{validator.efilebatch.TRACSEFileBatch}}], To[properties:{{queue.efilebatch.request.validatedtracsxsd}}], DoCatch[ null -> [To[exceptionResponseProcessor], To[properties:{{queue.efilebatch.request.rejected}}], To[properties:{{queue.efilebatch.response}}]]]]] <<< in route: Route(EFileBatchRequestValidate)[[From[properties:{{queue.ef... because of Failed to resolve endpoint: properties://%7B%7Bvalidator.efilebatch.TRACSEFileBatch%7D%7D due to: Failed to resolve endpoint: validator://http://tomcat-test:8080/ecitationinternal/xsd/Odyssey/current/NM/NMEFileBatch.xsd due to: protocol = http host = null
at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:910)
at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:175)
at org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:780)
at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:2068)
at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1816)
at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1683)
at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1651)
at org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:254)
at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:120)
... 13 more
Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: properties://%7B%7Bvalidator.efilebatch.TRACSEFileBatch%7D%7D due to: Failed to resolve endpoint: validator://http://tomcat-test:8080/ecitationinternal/xsd/Odyssey/current/NM/NMEFileBatch.xsd due to: protocol = http host = null
at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:534)
at org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:71)
at org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinition.java:190)
at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:106)
at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:112)
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.createProcessor(ProcessorDefinition.java:459)
at org.apache.camel.model.ProcessorDefinition.createOutputsProcessor(ProcessorDefinition.java:428)
at org.apache.camel.model.TryDefinition.createProcessor(TryDefinition.java:73)
at org.apache.camel.model.ProcessorDefinition.makeProcessor(ProcessorDefinition.java:499)
at org.apache.camel.model.ProcessorDefinition.addRoutes(ProcessorDefinition.java:212)
at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:907)
... 22 more
Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: validator://http://tomcat-test:8080/ecitationinternal/xsd/Odyssey/current/NM/NMEFileBatch.xsd due to: protocol = http host = null
at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:534)
at org.apache.camel.component.properties.PropertiesComponent.createEndpoint(PropertiesComponent.java:113)
at org.apache.camel.impl.DefaultComponent.createEndpoint(DefaultComponent.java:123)
at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:514)
... 34 more
Caused by: java.lang.IllegalArgumentException: protocol = http host = null
at sun.net.spi.DefaultProxySelector.select(DefaultProxySelector.java:170)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:926)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:850)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1300)
at org.apache.camel.util.ResourceHelper.resolveResourceAsInputStream(ResourceHelper.java:118)
at org.apache.camel.util.ResourceHelper.resolveMandatoryResourceAsInputStream(ResourceHelper.java:87)
at org.apache.camel.component.validator.DefaultLSResourceResolver$DefaultLSInput.getInputUri(DefaultLSResourceResolver.java:108)
at org.apache.camel.component.validator.DefaultLSResourceResolver$DefaultLSInput.<init>(DefaultLSResourceResolver.java:101)
at org.apache.camel.component.validator.DefaultLSResourceResolver$DefaultLSInput.<init>(DefaultLSResourceResolver.java:88)
at org.apache.camel.component.validator.DefaultLSResourceResolver.resolveResource(DefaultLSResourceResolver.java:85)
at com.sun.org.apache.xerces.internal.util.DOMEntityResolverWrapper.resolveEntity(DOMEntityResolverWrapper.java:109)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.resolveEntity(XMLEntityManager.java:1070)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.resolveDocument(XMLSchemaLoader.java:659)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.resolveSchemaSource(XSDHandler.java:2105)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.constructTrees(XSDHandler.java:1088)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.parseSchema(XSDHandler.java:620)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadSchema(XMLSchemaLoader.java:616)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:574)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:540)
at com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory.newSchema(XMLSchemaFactory.java:252)
at javax.xml.validation.SchemaFactory.newSchema(SchemaFactory.java:627)
at org.apache.camel.processor.validation.ValidatingProcessor.createSchema(ValidatingProcessor.java:364)
at org.apache.camel.processor.validation.ValidatingProcessor.loadSchema(ValidatingProcessor.java:187)
at org.apache.camel.component.validator.ValidatorComponent.createEndpoint(ValidatorComponent.java:60)
at org.apache.camel.impl.DefaultComponent.createEndpoint(DefaultComponent.java:123)
at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:514)
... 37 more
我没有改变路线的工作时间。我只更改了jar文件/版本/依赖项/等。 (并且还从java-1.6升级到java 1.7)。该路线看起来像:
... etc
<doTry>
<to id="tracsValidator" uri="properties:{{validator.efilebatch.TRACSEFileBatch}}" />
<to uri="properties:{{queue.efilebatch.request.validatedtracsxsd}}" />
<doCatch>
... etc
其中validator属性定义为:
validator.efilebatch.TRACSEFileBatch=validator://http://tomcat-test:8080/ecitationinternal/xsd/Odyssey/current/NM/NMEFileBatch.xsd
我可以从包装盒中找到相关主机和网址。从命令行,我可以发出一个wget并成功检索xsd文件。 xsd文件也没有从以前的(工作)版本更改。到目前为止,谷歌搜索,戳戳和刺激使我找到了解决方案。建议欢迎。