Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id C210E200BB7 for ; Wed, 9 Nov 2016 12:07:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id C0B56160AFD; Wed, 9 Nov 2016 11:07:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 1458B160AEE for ; Wed, 9 Nov 2016 12:06:59 +0100 (CET) Received: (qmail 52598 invoked by uid 500); 9 Nov 2016 11:06:54 -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 52581 invoked by uid 99); 9 Nov 2016 11:06:53 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Nov 2016 11:06:53 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id E9AD118396C for ; Wed, 9 Nov 2016 11:06:52 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.992 X-Spam-Level: X-Spam-Status: No, score=0.992 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001, URI_HEX=1.313] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 5bdVJPCEs659 for ; Wed, 9 Nov 2016 11:06:49 +0000 (UTC) Received: from mail-qt0-f178.google.com (mail-qt0-f178.google.com [209.85.216.178]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id C5AC15F1A1 for ; Wed, 9 Nov 2016 11:06:48 +0000 (UTC) Received: by mail-qt0-f178.google.com with SMTP id n6so124560261qtd.1 for ; Wed, 09 Nov 2016 03:06:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=iB0kDjn6c58j/nhjzXa/tO1ZK4JT72XttOt5WrjvEsM=; b=Gdw4mLHALgxjRmnqqO3pmSCP+0lVPX7IkH7swAARB8buUQJCsSKDLqRlixtRKx5xxy ckpnQ5jMBHxBc2YOy4H1VSoecd2OtEDdob30z+ToUJYqMCpO+7rvjDAK2LWifBlmCP7d 08H66PgLUZ4sByvDRpsga8e8DRcv6l/DxfC7MvqTkllWddv0XhuRcSOn0+eyA7tp5W/D fwmyNC7k3sQJbK8zCBou/qFLRh0zitLpa7WCLIzeYOPGDjlW1lvdicrH4Kvp78dKduba g+FWTkF0KW5cfxoArQPYQTzotySbQQLqJND0nK0utkELJUtLmlJErJ5OJFOc8H9S88BO jqDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=iB0kDjn6c58j/nhjzXa/tO1ZK4JT72XttOt5WrjvEsM=; b=aMfmElqWRD0bvcoz6T2iHRlabHiXwpV74Nc0nYDwPXd7TkR30X3iGw11mtsQFwzrhH Fj7g8+K5C5LATtbSPABuFKV71bGb64qhckkiHv+1+/hmrb7qCKf4SHPxHtUsrtFmqV8a 6DBEACoQwe69abNrOgbkTBoNL6nPKBly9SUom44RP+90OAEwwPZYAaH5anF8ZyxVcuFU ATUZ8tVCA3o/T3sFwWszGDFQEc1e65w5O60RETVU0p7eUZAZ3AuJlntQ898nc+t1Gs1N 3cPpe7pAoLCVM/f8DgUkYwAJrhggOSgGTMP+58CL7jYDWQOaY4dREHwafye5swQ5u4Ql JSAg== X-Gm-Message-State: ABUngvfgJ32mkGPMn/W7dQlLM6lFLrPAv/OmDJta4/ZLY1dk/+ejTCFCg9Zdz5MVp66xZBqTNH2uqHLvYAo8AQ== X-Received: by 10.200.53.69 with SMTP id z5mr18194886qtb.64.1478689607743; Wed, 09 Nov 2016 03:06:47 -0800 (PST) MIME-Version: 1.0 Received: by 10.237.62.141 with HTTP; Wed, 9 Nov 2016 03:06:27 -0800 (PST) In-Reply-To: <1478689389884-5789943.post@n5.nabble.com> References: <1478689389884-5789943.post@n5.nabble.com> From: Claus Ibsen Date: Wed, 9 Nov 2016 12:06:27 +0100 Message-ID: Subject: Re: MetricsMessageHistoryFactory.java:138 Generate a NPE To: "users@camel.apache.org" Content-Type: text/plain; charset=UTF-8 archived-at: Wed, 09 Nov 2016 11:07:00 -0000 Hi Ah thanks for reporting. You are welcome to log a JIRA and provide a patch or better as a github PR. http://camel.apache.org/support.html On Wed, Nov 9, 2016 at 12:03 PM, PhilG wrote: > Hello Guys, > > I'm trying to play with Spring-boot camel and metrics to expose dashboard. > > Hawtio is a great tools to check what it's going on at runtime but no > persistence is done. We would like to persist statistics in prometheus by > example. > > I configure camel context with MetricsMessageHistoryFactory as: > > > MetricsMessageHistoryFactory metricsMessageHistoryFactory = new > MetricsMessageHistoryFactory(); > metricsMessageHistoryFactory.setMetricsRegistry(metricRegistry); > camelContext.setMessageHistoryFactory(metricsMessageHistoryFactory); > > where metricRegistry is injected with: > /** > * Srping Boot metrics > */ > @Autowired > private MetricRegistry metricRegistry; > > > Everything is ok until I passed in OnExceptionRoute. It seems that the > routeId is set to Null in this case and generate a NPE (line > MetricsMessageHistoryFactory:138) in the exception route. Route causing the > NPE:$ > > onException(NoAttachmentToProcessException.class) > .routeId(RouteIds.TECHNICAL_ERROR_HANDLING.routeId()) > .log(LoggingLevel.ERROR,"TECHNICAL ERROR: > ${exchangeProperty.CamelExceptionCaught}") > > > Any reason why routeId on log component is null ? > > Thanks, > Phil > > > > > > > -- > View this message in context: http://camel.465427.n5.nabble.com/MetricsMessageHistoryFactory-java-138-Generate-a-NPE-tp5789943.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2