camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oscar Picasso <oscarpica...@gmail.com>
Subject NullPointerException on diplaying routes
Date Sat, 18 Jun 2011 11:48:02 GMT
Hi,

I created a basic war / camel project with the maven archetype (see command
used below). I started the camel webapp with jetty:run on port 8081.
It started with no errors. I can go to the web console and see the
endpoints, can send message to the endpoints.

However, when I try to display the routes I have a NullPointerException (see
trace from the shell console below).
I suspected, that maybe some route was badly configured, but actually I can
send messages to the endpoints and the messages are routed correctly.

Any idea on why I can't display the routes?

Oscar Picasso


== command used to create the project ==
mvn archetype:create -DarchetypeGroupId=org.apache.camel.archetypes \
     -DarchetypeArtifactId=camel-archetype-java \
     -DarchetypeVersion=2.5.0 -DgroupId=camelinaction \
     -DartifactId=order-routermvn archetype:create \
     -DarchetypeGroupId=org.apache.camel.archetypes
     -DarchetypeArtifactId=camel-archetype-war \
     -DarchetypeVersion=2.5.0 \
     -DgroupId=camelinaction \
     -DartifactId=war-order-router

== trace ==
2011-06-18 07:30:17.466:WARN::/routes
com.sun.jersey.api.container.ContainerException:
java.lang.NullPointerException
    at
org.fusesource.scalate.jersey.ScalateTemplateProcessor.writeToUsingServletTemplateEngine(ScalateTemplateProcessor.scala:172)
    at
org.fusesource.scalate.jersey.ScalateTemplateProcessor.writeTo(ScalateTemplateProcessor.scala:130)
    at
org.fusesource.scalate.jersey.ScalateTemplateProcessor.writeTo(ScalateTemplateProcessor.scala:40)
    at
com.sun.jersey.spi.template.ResolvedViewable.writeTo(ResolvedViewable.java:103)
    at
com.sun.jersey.server.impl.template.ViewableMessageBodyWriter.writeTo(ViewableMessageBodyWriter.java:83)
    at
com.sun.jersey.server.impl.template.ViewableMessageBodyWriter.writeTo(ViewableMessageBodyWriter.java:62)
    at
com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.java:299)
    at
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1326)
    at
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1239)
    at
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1229)
    at
com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:420)
    at
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:497)
    at
com.sun.jersey.spi.container.servlet.ServletContainer.doFilter(ServletContainer.java:855)
    at
com.sun.jersey.spi.container.servlet.ServletContainer.doFilter(ServletContainer.java:828)
    at
com.sun.jersey.spi.container.servlet.ServletContainer.doFilter(ServletContainer.java:789)
    at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1187)
    at
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:421)
    at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
    at
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:493)
    at
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:225)
    at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:930)
    at
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:358)
    at
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183)
    at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:866)
    at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
    at
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:245)
    at
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126)
    at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:113)
    at org.eclipse.jetty.server.Server.handle(Server.java:351)
    at
org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:594)
    at
org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:1042)
    at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:549)
    at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:211)
    at
org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:424)
    at
org.eclipse.jetty.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:506)
    at
org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:436)
    at java.lang.Thread.run(Thread.java:619)
Caused by:
java.lang.NullPointerException
    at
org.apache.camel.web.resources.$_scalate_$RoutesResource_index_ssp$$anonfun$$_scalate_$render$1.apply(RoutesResource.index.ssp.scala:30)
    at
org.apache.camel.web.resources.$_scalate_$RoutesResource_index_ssp$$anonfun$$_scalate_$render$1.apply(RoutesResource.index.ssp.scala:21)
    at scala.collection.Iterator$class.foreach(Iterator.scala:631)
    at
scala.collection.JavaConversions$JIteratorWrapper.foreach(JavaConversions.scala:474)
    at scala.collection.IterableLike$class.foreach(IterableLike.scala:79)
    at
scala.collection.JavaConversions$JListWrapper.foreach(JavaConversions.scala:521)
    at
org.apache.camel.web.resources.$_scalate_$RoutesResource_index_ssp$.$_scalate_$render(RoutesResource.index.ssp.scala:21)
    at
org.apache.camel.web.resources.$_scalate_$RoutesResource_index_ssp.render(RoutesResource.index.ssp.scala:73)
    at
org.fusesource.scalate.DefaultRenderContext.capture(DefaultRenderContext.scala:88)
    at
org.fusesource.scalate.layout.DefaultLayoutStrategy.layout(DefaultLayoutStrategy.scala:41)
    at
org.fusesource.scalate.TemplateEngine$$anonfun$layout$1$$anonfun$apply$mcV$sp$1.apply$mcV$sp(TemplateEngine.scala:465)
    at
org.fusesource.scalate.TemplateEngine$$anonfun$layout$1$$anonfun$apply$mcV$sp$1.apply(TemplateEngine.scala:465)
    at
org.fusesource.scalate.TemplateEngine$$anonfun$layout$1$$anonfun$apply$mcV$sp$1.apply(TemplateEngine.scala:465)
    at
org.fusesource.scalate.RenderContext$class.withUri(RenderContext.scala:414)
    at
org.fusesource.scalate.DefaultRenderContext.withUri(DefaultRenderContext.scala:29)
    at
org.fusesource.scalate.TemplateEngine$$anonfun$layout$1.apply$mcV$sp(TemplateEngine.scala:464)
    at
org.fusesource.scalate.TemplateEngine$$anonfun$layout$1.apply(TemplateEngine.scala:461)
    at
org.fusesource.scalate.TemplateEngine$$anonfun$layout$1.apply(TemplateEngine.scala:461)
    at org.fusesource.scalate.RenderContext$.using(RenderContext.scala:49)
    at
org.fusesource.scalate.TemplateEngine.layout(TemplateEngine.scala:461)
    at
org.fusesource.scalate.RenderContext$$anonfun$include$1.apply$mcV$sp(RenderContext.scala:261)
    at
org.fusesource.scalate.RenderContext$$anonfun$include$1.apply(RenderContext.scala:258)
    at
org.fusesource.scalate.RenderContext$$anonfun$include$1.apply(RenderContext.scala:258)
    at
org.fusesource.scalate.RenderContext$class.withUri(RenderContext.scala:414)
    at
org.fusesource.scalate.DefaultRenderContext.withUri(DefaultRenderContext.scala:29)
    at
org.fusesource.scalate.RenderContext$class.include(RenderContext.scala:258)
    at
org.fusesource.scalate.DefaultRenderContext.include(DefaultRenderContext.scala:29)
    at
org.fusesource.scalate.RenderContext$class.include(RenderContext.scala:248)
    at
org.fusesource.scalate.DefaultRenderContext.include(DefaultRenderContext.scala:29)
    at
org.fusesource.scalate.servlet.TemplateEngineServlet$.render(TemplateEngineServlet.scala:54)
    at
org.fusesource.scalate.jersey.ScalateTemplateProcessor.render$1(ScalateTemplateProcessor.scala:144)
    at
org.fusesource.scalate.jersey.ScalateTemplateProcessor.writeToUsingServletTemplateEngine(ScalateTemplateProcessor.scala:147)
    at
org.fusesource.scalate.jersey.ScalateTemplateProcessor.writeTo(ScalateTemplateProcessor.scala:130)
    at
org.fusesource.scalate.jersey.ScalateTemplateProcessor.writeTo(ScalateTemplateProcessor.scala:40)
    at
com.sun.jersey.spi.template.ResolvedViewable.writeTo(ResolvedViewable.java:103)
    at
com.sun.jersey.server.impl.template.ViewableMessageBodyWriter.writeTo(ViewableMessageBodyWriter.java:83)
    at
com.sun.jersey.server.impl.template.ViewableMessageBodyWriter.writeTo(ViewableMessageBodyWriter.java:62)
    at
com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.java:299)
    at
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1326)
    at
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1239)
    at
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1229)
    at
com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:420)
    at
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:497)
    at
com.sun.jersey.spi.container.servlet.ServletContainer.doFilter(ServletContainer.java:855)
    at
com.sun.jersey.spi.container.servlet.ServletContainer.doFilter(ServletContainer.java:828)
    at
com.sun.jersey.spi.container.servlet.ServletContainer.doFilter(ServletContainer.java:789)
    at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1187)
    at
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:421)
    at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
    at
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:493)
    at
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:225)
    at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:930)
    at
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:358)
    at
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183)
    at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:866)
    at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
    at
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:245)
    at
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126)
    at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:113)
    at org.eclipse.jetty.server.Server.handle(Server.java:351)
    at
org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:594)
    at
org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:1042)
    at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:549)
    at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:211)
    at
org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:424)
    at
org.eclipse.jetty.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:506)
    at
org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:436)
    at java.lang.Thread.run(Thread.java:619)

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message