Return-Path: Delivered-To: apmail-camel-dev-archive@www.apache.org Received: (qmail 42835 invoked from network); 21 Sep 2009 06:17:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 21 Sep 2009 06:17:17 -0000 Received: (qmail 96527 invoked by uid 500); 21 Sep 2009 06:17:17 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 96473 invoked by uid 500); 21 Sep 2009 06:17:17 -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 96463 invoked by uid 500); 21 Sep 2009 06:17:16 -0000 Delivered-To: apmail-activemq-camel-dev@activemq.apache.org Received: (qmail 96460 invoked by uid 99); 21 Sep 2009 06:17:16 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Sep 2009 06:17:16 +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.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Sep 2009 06:17:14 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id D663F234C044 for ; Sun, 20 Sep 2009 23:16:52 -0700 (PDT) Message-ID: <2137686939.1253513812860.JavaMail.jira@brutus> Date: Sun, 20 Sep 2009 23:16:52 -0700 (PDT) From: "Claus Ibsen (JIRA)" To: camel-dev@activemq.apache.org Subject: [jira] Commented: (CAMEL-1788) camel-flatpack does not work inside of an OSGi bundle in ServiceMix 4 In-Reply-To: <543817561.1246569006997.JavaMail.jira@brutus> 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-1788?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=54366#action_54366 ] Claus Ibsen commented on CAMEL-1788: ------------------------------------ Have you raised this issue at Flatpack as well? > camel-flatpack does not work inside of an OSGi bundle in ServiceMix 4 > --------------------------------------------------------------------- > > Key: CAMEL-1788 > URL: https://issues.apache.org/activemq/browse/CAMEL-1788 > Project: Apache Camel > Issue Type: Bug > Components: camel-flatpack > Affects Versions: 1.6.0 > Environment: Flatpack 3.1.1 > Fuse ESB 4.1.0.0 (Apache Servicemix) > Camel 1.6.0.0-fuse > Reporter: Scott Parkerson > > The following code will not work under Servicemix, but works fine in standalone Camel: > {code:java} > FlatpackDataFormat fpdf = new FlatpackDataFormat(); > fpdf.setDefinition(new ClassPathResource("dataspecs/mypzmap.xml")); > fpdf.setFixed(false); > fpdf.setDelimiter('|'); > fpdf.setIgnoreFirstRecord(false); > from("activemq:" + incomingQueueName).convertBodyTo(String.class).unmarshal(fpdf).to("activemq:input_to_call"); > {code} > This NPEs when attempting to unmarshal under SMX 4, but works fine in Camel 1.6.x. I've traced down the problem to this code in Flatpack: > {code:title=net/sf/flatpack/util/ParseUtils.java} > public static Properties loadConvertProperties() throws IOException { > final Properties pzConvertProps = new Properties(); > final URL url = ParserUtils.class.getClassLoader().getResource("fpconvert.properties"); > pzConvertProps.load(url.openStream()); > return pzConvertProps; > } > {code} > The classloader under SMX is the bundle's classloader, which (of course) cannot find fpconvert.properties, which makes url null, and then causes pzConvertProps.load(...) to raise an NPE. > I know that this isn't strictly a bug in Camel or SMX, but I thought I'd file it here as an action item to either change upstream flatpack or note a possible workaround on the wiki. > I suspect that this is a problem with all versions of Camel + SMX including the latest version. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.