camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Preben.Asmussen" <p...@dr.dk>
Subject npe in camel 2.9.1 validator
Date Tue, 06 Mar 2012 14:01:51 GMT
Hi

The new version creates a npe in validator component:

while loading eg. <to uri="validator:BroadcastMonitor.xsd"  />

from DefaultCamelContext.getEndpoint

full trace:

org.apache.camel.FailedToCreateRouteException: Failed to create route
dalet-nnp-in-Route at: >>> Transacted[] <<< in route:
Route[[From[ref:daletFolderEP]] -> [OnException[[class org.a... because of
Failed to resolve endpoint: validator://BroadcastMonitor.xsd due to: null
	at
org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:855)
	at
org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:168)
	at
org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:710)
	at
org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:1734)
	at
org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1526)
	at
org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1421)
	at
org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.java:179)
	at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:60)
	at
org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1389)
	at
org.apache.camel.test.junit4.CamelTestSupport.startCamelContext(CamelTestSupport.java:410)
	at
org.apache.camel.test.junit4.CamelTestSupport.doSetUp(CamelTestSupport.java:277)
	at
org.apache.camel.test.junit4.CamelTestSupport.setUp(CamelTestSupport.java:204)
	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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
	at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
	at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
	at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
	at
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
	at org.junit.rules.TestWatchman$1.evaluate(TestWatchman.java:48)
	at
org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
	at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
	at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
	at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
	at
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
	at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
	at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to
resolve endpoint: validator://BroadcastMonitor.xsd due to: null
	at
org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:456)
	at
org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:48)
	at
org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinition.java:183)
	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.createOutputsProcessor(ProcessorDefinition.java:381)
	at
org.apache.camel.model.ProcessorDefinition.createOutputsProcessor(ProcessorDefinition.java:130)
	at
org.apache.camel.model.ProcessorDefinition.createChildProcessor(ProcessorDefinition.java:149)
	at
org.apache.camel.model.TransactedDefinition.createProcessor(TransactedDefinition.java:145)
	at
org.apache.camel.model.ProcessorDefinition.makeProcessor(ProcessorDefinition.java:440)
	at
org.apache.camel.model.ProcessorDefinition.addRoutes(ProcessorDefinition.java:178)
	at
org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:852)
	... 38 more
Caused by: java.lang.NullPointerException
	at
org.apache.camel.util.ResourceHelper.resolveMandatoryResourceAsInputStream(ResourceHelper.java:65)
	at
org.apache.camel.component.validator.DefaultLSResourceResolver$DefaultLSInput.getByteStream(DefaultLSResourceResolver.java:88)
	at
com.sun.org.apache.xerces.internal.util.DOMEntityResolverWrapper.resolveEntity(DOMEntityResolverWrapper.java:124)
	at
com.sun.org.apache.xerces.internal.impl.XMLEntityManager.resolveEntity(XMLEntityManager.java:1100)
	at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.resolveDocument(XMLSchemaLoader.java:595)
	at
com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.resolveSchema(XSDHandler.java:1671)
	at
com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.constructTrees(XSDHandler.java:909)
	at
com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.parseSchema(XSDHandler.java:569)
	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.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:485)
	at
com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory.newSchema(XMLSchemaFactory.java:210)
	at javax.xml.validation.SchemaFactory.newSchema(SchemaFactory.java:594)
	at
org.apache.camel.processor.validation.ValidatingProcessor.createSchema(ValidatingProcessor.java:233)
	at
org.apache.camel.processor.validation.ValidatingProcessor.loadSchema(ValidatingProcessor.java:105)
	at
org.apache.camel.component.validator.ValidatorComponent.createEndpoint(ValidatorComponent.java:54)
	at
org.apache.camel.impl.DefaultComponent.createEndpoint(DefaultComponent.java:91)
	at
org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:438)
	... 51 more


--
View this message in context: http://camel.465427.n5.nabble.com/npe-in-camel-2-9-1-validator-tp5540894p5540894.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message