Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C04A66289 for ; Sat, 18 Jun 2011 13:45:11 +0000 (UTC) Received: (qmail 62027 invoked by uid 500); 18 Jun 2011 13:45:11 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 61985 invoked by uid 500); 18 Jun 2011 13:45:11 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 61977 invoked by uid 99); 18 Jun 2011 13:45:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 18 Jun 2011 13:45:11 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of oscarpicasso@gmail.com designates 209.85.160.173 as permitted sender) Received: from [209.85.160.173] (HELO mail-gy0-f173.google.com) (209.85.160.173) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 18 Jun 2011 13:45:06 +0000 Received: by gyg10 with SMTP id 10so74324gyg.32 for ; Sat, 18 Jun 2011 06:44:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=fet610oRnVnhgDEULGrvj0IIV9Y6uqcdUy/iQTzNwZA=; b=Irg/XOjMSXbQgOxQtKI0nLpdCSZTnHTPCf7M2WZgIupf5kYQl/HrguAYq6mfyuGdW9 yds/Q7fnEey7ngKqoiKskNkEVrzlEk1peGRhGRa8MTr2G7o8QtefQGulAWipkR75f8Dt iXCS8IfpMgPD04vFo0VKQ/wRzxQkyhfUVO5+o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=F2HMBCQwf048Omj2SeWCZj2jFq+Th74v2xfHH9nROd4wq5BscwPuLNEP4WCndhSv9O W+E8/36hUHa01nyqseCBFc+9G4LqrPqYYOpX3qDA5Z+Lyy85iJgCg9aRIV9Qez70d+lx 8KaGNl3hjuNC3YGBYSbEzJo2h7C4nc1B2NkhE= MIME-Version: 1.0 Received: by 10.91.3.17 with SMTP id f17mr3655469agi.199.1308404685510; Sat, 18 Jun 2011 06:44:45 -0700 (PDT) Received: by 10.90.92.7 with HTTP; Sat, 18 Jun 2011 06:44:45 -0700 (PDT) In-Reply-To: References: Date: Sat, 18 Jun 2011 09:44:45 -0400 Message-ID: Subject: Re: NullPointerException on diplaying routes From: Oscar Picasso To: users@camel.apache.org Content-Type: multipart/alternative; boundary=0016363b81ac80987b04a5fcb438 --0016363b81ac80987b04a5fcb438 Content-Type: text/plain; charset=ISO-8859-1 Just to be clear. The NullPointerException only appears when clicking in the routes link. The endpoints etc. are visible. On Sat, Jun 18, 2011 at 9:42 AM, Oscar Picasso wrote: > I did as you suggested and created a web console project > with camel-archetype-webconsole version 2.7.2. > > I can now browse the web console but I still have the same > NullPointerException I mentioned on my first post. > > > On Sat, Jun 18, 2011 at 9:26 AM, Claus Ibsen wrote: > >> Hi >> >> Look at the Camel documentation >> http://camel.apache.org/camel-maven-archetypes.html >> >> The archetypes has been slightly renamed. If you want the web console, >> you need to use >> camel-archetype-webconsole >> >> Instead of typing all the long maven command line. I usually just type >> >> mvn archetype:generate >> >> And its in an interactive mode. Then you can type a number to pick the >> archetype you want. >> And then it ask for the version and so forth. Usually easier to do. >> >> >> >> On Sat, Jun 18, 2011 at 3:16 PM, Oscar Picasso >> wrote: >> > I tried to update the camel version in the pom.xml generated from the >> war >> > archetype (camel-archetype-*war 2.5.0)* in the previous post, but on >> jetty >> > startup I got a javax/jms/JMSException >> > >> > Then I tried to create a new war project with: >> > mvn archetype:create >> > -DarchetypeGroupId=org.apache.camel.archetypes >> > -DarchetypeArtifactId=camel-archetype-*web* >> > -DarchetypeVersion=2.7.2 >> > -DgroupId=camelinaction >> > -DartifactId=web-order-router >> > >> > but when running the mvn command I got: >> > Embedded error: The META-INF/maven/archetype.xml descriptor cannot be >> found. >> > Same with the web archetype version 2.7.1. >> > >> > The last camel-archetype-*war *archetype is version 2.6.0 but when >> running >> > jetty on a project created with this archetype and trying to browse the >> web >> > console it actually just displays the filesystem hierachy of the >> project. >> > >> > Is there some web/war camel maven archetype that is known to work >> > out-of-the-box? >> > >> > >> > On Sat, Jun 18, 2011 at 7:52 AM, Claus Ibsen >> wrote: >> > >> >> Hi >> >> >> >> Try to update your Camel version. >> >> >> >> >> >> On Sat, Jun 18, 2011 at 1:48 PM, Oscar Picasso > > >> >> wrote: >> >> > 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) >> >> > >> >> >> >> >> >> >> >> -- >> >> Claus Ibsen >> >> ----------------- >> >> FuseSource >> >> Email: cibsen@fusesource.com >> >> Web: http://fusesource.com >> >> Twitter: davsclaus, fusenews >> >> Blog: http://davsclaus.blogspot.com/ >> >> Author of Camel in Action: http://www.manning.com/ibsen/ >> >> >> > >> >> >> >> -- >> Claus Ibsen >> ----------------- >> FuseSource >> Email: cibsen@fusesource.com >> Web: http://fusesource.com >> Twitter: davsclaus, fusenews >> Blog: http://davsclaus.blogspot.com/ >> Author of Camel in Action: http://www.manning.com/ibsen/ >> > > --0016363b81ac80987b04a5fcb438--