Return-Path: Delivered-To: apmail-camel-dev-archive@www.apache.org Received: (qmail 31093 invoked from network); 29 Jan 2009 12:03:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Jan 2009 12:03:20 -0000 Received: (qmail 83924 invoked by uid 500); 29 Jan 2009 12:03:20 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 83900 invoked by uid 500); 29 Jan 2009 12:03:20 -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 83889 invoked by uid 500); 29 Jan 2009 12:03:20 -0000 Delivered-To: apmail-activemq-camel-dev@activemq.apache.org Received: (qmail 83886 invoked by uid 99); 29 Jan 2009 12:03:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Jan 2009 04:03:20 -0800 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.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Jan 2009 12:03:19 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 58845234C48B for ; Thu, 29 Jan 2009 04:02:59 -0800 (PST) Message-ID: <658998598.1233230579348.JavaMail.jira@brutus> Date: Thu, 29 Jan 2009 04:02:59 -0800 (PST) From: "Claus Ibsen (JIRA)" To: camel-dev@activemq.apache.org Subject: [jira] Commented: (CAMEL-1301) NPE in FactoryFinder.findClass when context classloader is null In-Reply-To: <1910471758.1233193980540.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/activemq/browse/CAMEL-1301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=49016#action_49016 ] Claus Ibsen commented on CAMEL-1301: ------------------------------------ Trev, could you paste the stacktrace please. FactoryFinder delegates its classloading to ObjectHelper.loadClass and it looks like it handles the null. So a stacktrace is needed. > NPE in FactoryFinder.findClass when context classloader is null > --------------------------------------------------------------- > > Key: CAMEL-1301 > URL: https://issues.apache.org/activemq/browse/CAMEL-1301 > Project: Apache Camel > Issue Type: Bug > Components: camel-core > Affects Versions: 1.5.0 > Environment: JRE 1.6.0_11, Commons Daemon 1.0.1, MS Windows XP > Reporter: Trev > > My program works fine, when I run it as a normal Windows app. But when I try to run it as a service, it throws a "Could not auto create component: http" which is caused by a NullPointerException which is caused by Thread.currentThread().getContextClassLoader() returning null. > A quick search found this ActiveMQ bug: http://issues.apache.org/activemq/browse/AMQ-1229 which is essentially identical. If it's been fixed in ActiveMQ, probably you can just merge the fix from org.apache.activemq.util.FactoryFinder into org.apache.camel.util.FactoryFinder. > Incidentally, the fact that the context classloader is null has also been reported as a bug: http://issues.apache.org/jira/browse/DAEMON-100 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.