2 Replies Latest reply on Aug 23, 2010 2:24 PM by cvancal

    com.blackbear.flatworm inside of OSGI

    cvancal

      I have created a camel project that looks for a file located in a directory and passes it to flatworm to dissect the file contents.  The file contents is a flat file but each record has a different layout depending on the type of info it contains.  I use flatworm to help parse this out.

       

      The issue I am having is when I include the flatworm.jar file in the bundle-classpath I start getting flatworm errors when I run in OSGI.  So I retrieved the source for flatworm and copied it directly into my project and removed the bundle-classpath.  I installed it into OSGI and it runs perfectly.  Even though I am getting a flatworm error(com.blackbear.flatworm.errors.FlatwormConversionException: Couldn't Find Class), it seems like an OSGI issue, because when i have the source inside my project everything works.  Am I missing anything?

       

      my servicemix version is : apache-servicemix-4.2.0-fuse-02-00

       

      Here is my manifest.mf with flatworm as the bundle-classpath

       

      Manifest-Version: 1.0

       

      Export-Package: com.blackbear.flatworm;uses:="com.blackbear.flatworm.e

      rrors",com.blackbear.flatworm.converters;uses:="com.blackbear.flatwor

      m.errors",com.blackbear.flatworm.errors,com.patientrx;uses:="groovy.l

      ang,org.apache.camel,org.codehaus.groovy.runtime.callsite"

       

      Bundle-ClassPath: .,flatworm-2.0.1.jar

       

      Bundle-Version: 1.0.0

       

      Include-Resource: src/main/resources

       

      Bundle-ManifestVersion: 2

       

      Import-Package: groovy.lang,javax.xml.parsers,org.apache.camel,org.apa

      che.commons.beanutils,org.apache.commons.lang,org.apache.commons.logg

      ing,org.codehaus.groovy.reflection,org.codehaus.groovy.runtime,org.co

      dehaus.groovy.runtime.callsite,org.codehaus.groovy.runtime.typehandli

      ng,org.w3c.dom,org.xml.sax

       

      Bundle-SymbolicName: com.mytestcamelproject

       

       

      Thanks in advance.

       

      Edited by: cvancal on Aug 3, 2010 6:34 PM

        • 1. Re: com.blackbear.flatworm inside of OSGI
          cvancal

          I am using groovy 1.7.0 and when I take out the groovy code, it works in OSGI.  I have the Groovy 1.7.0 bundle installed and active, but not sure why my app is not running when I have groovy code.  In my previous post I thought it was due to the flatworm.jar that I was using but now I can get it to work without groovy.  Any ideas?

          • 2. Re: com.blackbear.flatworm inside of OSGI
            cvancal

            The issue I was having with groovy was because I had installed artifact id of groovy version 1.7.0, in lieu of groovy-all 1.7.0.  Once I removed groovy and installed groovy-all I was working again.

             

            Edited by: cvancal on Aug 23, 2010 6:23 PM