Return-Path: Delivered-To: apmail-camel-dev-archive@www.apache.org Received: (qmail 41921 invoked from network); 23 Nov 2010 12:03:18 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 23 Nov 2010 12:03:18 -0000 Received: (qmail 67362 invoked by uid 500); 23 Nov 2010 12:03:49 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 67297 invoked by uid 500); 23 Nov 2010 12:03:49 -0000 Mailing-List: contact dev-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list dev@camel.apache.org Received: (qmail 67289 invoked by uid 500); 23 Nov 2010 12:03:49 -0000 Delivered-To: apmail-activemq-camel-dev@activemq.apache.org Received: (qmail 67286 invoked by uid 99); 23 Nov 2010 12:03:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Nov 2010 12:03:49 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Nov 2010 12:03:46 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id oANC3OTJ003973 for ; Tue, 23 Nov 2010 12:03:25 GMT Message-ID: <24406059.10431290513804860.JavaMail.jira@thor> Date: Tue, 23 Nov 2010 07:03:24 -0500 (EST) From: "Claus Ibsen (JIRA)" To: camel-dev@activemq.apache.org Subject: [jira] Commented: (CAMEL-3350) Camel context not started although the start() method succeeded In-Reply-To: <31925390.9051290275004597.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: ae95407df07c98740808b2ef9da0087c X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/activemq/browse/CAMEL-3350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=63459#action_63459 ] Claus Ibsen commented on CAMEL-3350: ------------------------------------ Yeah calling start will now fail fast in case any of the lifecycle strategy fails such as the JMX. > Camel context not started although the start() method succeeded > --------------------------------------------------------------- > > Key: CAMEL-3350 > URL: https://issues.apache.org/activemq/browse/CAMEL-3350 > Project: Apache Camel > Issue Type: Improvement > Components: camel-core > Affects Versions: 2.5.0 > Reporter: Bengt Rodehav > Assignee: Claus Ibsen > Fix For: 2.6.0 > > > I accidentally set the name of the context to null. and got the exception below: > \\ > \\ > {code} > 2010-11-17 11:32:34,456 | WARN | guration Updater | DefaultCamelContext | e.camel.impl.DefaultCamelContext 1278 | Cannot start lifecycle strategy: org.apache.camel.management.DefaultManagementLifecycleStrategy@1060ee9. This strategy will be removed. Cause: java.lang.NullPointerException > org.apache.camel.RuntimeCamelException: java.lang.NullPointerException > at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1140) > at org.apache.camel.management.DefaultManagementLifecycleStrategy.onContextStart(DefaultManagementLifecycleStrategy.java:161) > at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1270) > at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1213) > at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:65) > at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:52) > at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1191) > at se.digia.connect.core.service.RouteServiceBase.doStart(RouteServiceBase.java:51) > at se.digia.connect.core.service.ServiceBase.start(ServiceBase.java:50) > at se.digia.connect.services.skandia.filetransfer.FileTransferService.__start(FileTransferService.java:63) > at se.digia.connect.services.skandia.filetransfer.FileTransferService.start(FileTransferService.java) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.6.0_07] > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[:1.6.0_07] > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[:1.6.0_07] > at java.lang.reflect.Method.invoke(Method.java:597)[:1.6.0_07] > at org.apache.felix.ipojo.util.Callback.call(Callback.java:237)[77:org.apache.felix.ipojo:1.7.0.SNAPSHOT] > at org.apache.felix.ipojo.util.Callback.call(Callback.java:193)[77:org.apache.felix.ipojo:1.7.0.SNAPSHOT] > at org.apache.felix.ipojo.handlers.lifecycle.callback.LifecycleCallback.call(LifecycleCallback.java:86)[77:org.apache.felix.ipojo:1.7.0.SNAPSHOT] > at org.apache.felix.ipojo.handlers.lifecycle.callback.LifecycleCallbackHandler.__stateChanged(LifecycleCallbackHandler.java:162)[77:org.apache.felix.ipojo:1.7.0.SNAPSHOT] > at org.apache.felix.ipojo.handlers.lifecycle.callback.LifecycleCallbackHandler.stateChanged(LifecycleCallbackHandler.java)[77:org.apache.felix.ipojo:1.7.0.SNAPSHOT] > at org.apache.felix.ipojo.InstanceManager.setState(InstanceManager.java:441)[77:org.apache.felix.ipojo:1.7.0.SNAPSHOT] > at org.apache.felix.ipojo.InstanceManager.start(InstanceManager.java:322)[77:org.apache.felix.ipojo:1.7.0.SNAPSHOT] > at org.apache.felix.ipojo.InstanceManager.reconfigure(InstanceManager.java:1169)[77:org.apache.felix.ipojo:1.7.0.SNAPSHOT] > at org.apache.felix.ipojo.IPojoFactory.reconfigure(IPojoFactory.java:481)[77:org.apache.felix.ipojo:1.7.0.SNAPSHOT] > at org.apache.felix.ipojo.IPojoFactory.updated(IPojoFactory.java:648)[77:org.apache.felix.ipojo:1.7.0.SNAPSHOT] > at org.apache.felix.cm.impl.ConfigurationManager$UpdateConfiguration.run(ConfigurationManager.java:1460)[5:org.apache.felix.configadmin:1.2.4] > at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:88)[5:org.apache.felix.configadmin:1.2.4] > Caused by: java.lang.NullPointerException > at javax.management.ObjectName.quote(ObjectName.java:1846)[:1.6.0_07] > at org.apache.camel.management.DefaultManagementNamingStrategy.getObjectNameForCamelContext(DefaultManagementNamingStrategy.java:95) > at org.apache.camel.management.DefaultManagementLifecycleStrategy.onContextStart(DefaultManagementLifecycleStrategy.java:128) > ... 25 more > {code} > \\ > The above exception was however caught and not rethrown which fooled me to believe that the context was successfully started while it in fact wasn't. > Immediately after the call to the context's start() method I check if the context is started using the getStatus() method. It is then reported as started despite the fact that it failed (due to the exception above). > I then started jconsole to see via JMX if the context is considered to be started but it's not. Sounds a lot like a bug to me. There should be a safe (and simple) way to find out (after having attempted to start the context) whether the context was successfully started or not. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.