It looks to me like you are embedding the org.osgi.core classes inside
your bundle. That doesn't sound like a good idea...

regards,

Karl

On Mon, Sep 19, 2011 at 11:36 PM, Eamonn Maguire
<[email protected]> wrote:
> The full error there was:
>
> [ERROR] Error building bundle 
> org.isatools.plugins:isavalidatorconvert:bundle:1.0 : Exception: Not a valid 
> class file (no CAFEBABE header)
> [ERROR] Error building bundle 
> org.isatools.plugins:isavalidatorconvert:bundle:1.0 : Invalid class file: 
> *.class
>
> For some reason, not everything copied. This is what you get when working 
> late :)
>
> Eamonn
>
> On 19 Sep 2011, at 22:35, Eamonn Maguire wrote:
>
>> Hi,
>>
>> Thank you for your prompt response. So, I tried that and the following 
>> problems have come up.
>>
>> [ERROR] Error building bundle 
>> org.isatools.plugins:isavalidatorconvert:bundle:1.0 : Exception: Not a valid 
>> class file (no CAFEBABE header)
>>
>> The edited pom.xml file I'm using is here: https://gist.github.com/1227576
>>
>> Eamonn
>>
>>
>> On 19 Sep 2011, at 22:22, 
>> <[email protected]<mailto:[email protected]>> wrote:
>>
>>
>>
>> Eamonn,
>>
>>
>>
>> The dependencies section is only really used to build your .jar file when 
>> you have pakcages external to your bundle included in the Export-Package 
>> section of your maven-bundle plugin.  I believe the reason that you're 
>> experiencing the bundling of your .jar file with your bundle is because of 
>> your maven-assembly-plugin implementation.
>>
>>
>> What I would suggest you do is change your packaging type to "bundle", 
>> comment out your maven-assembly-plugin section and attempt to compile again. 
>> The maven-bundle-plugin will take care of most of the stuff you're trying to 
>> do in your maven-assembly-plugin and is a cleaner approach. This will also 
>> ensure that you don't get erroneous dependant .jar files compiled in with 
>> your application.
>>
>>
>>
>> The dependancy is still needed if you have references to that external 
>> library in your Import-Package section of your maven-bundle-plugin 
>> implementation.
>>
>>
>>
>> So, in short, keep the dependancy, and comment out your 
>> maven-assembly-plugin code.
>>
>>
>>
>> Please let me know if that helps!
>>
>>
>>
>>
>>
>>
>> ----- Original Message -----
>>
>>
>> From: "Eamonn Maguire" 
>> <[email protected]<mailto:[email protected]>>
>> To: [email protected]<mailto:[email protected]>
>> Sent: Monday, September 19, 2011 5:06:24 PM
>> Subject: Re: Dependencies, Exports and Imports Query
>>
>> Ah, I should have mentioned that BIIObjectStore is in the 
>> org.isatools.tablib.utils package.
>>
>> Thanks again,
>>
>> Eamonn
>>
>> On 19 Sep 2011, at 21:58, Eamonn Maguire wrote:
>>
>> Hi all,
>>
>> I'm new to OSGi, I just started implementing before the weekend and although 
>> the process was relatively pain free, I'm having some problems with getting 
>> plugins to work without having all my dependencies in the host project.
>>
>> For the plugin I'm using, the pom.xml file can be seen here: 
>> https://gist.github.com/1227576
>>
>> For the dependencies:
>>
>> 1) The ISAcreator dependency is the actual host program, where the plugins 
>> are to be deployed.
>> 2) The import_layer artifact is used for validation and conversion, which 
>> the plugin does and contains a class called BIIObjectStore (this becomes 
>> relevant below). It is NOT an OSGi module.
>>
>>
>> The problem
>> Everything is working as long as the import_layer dependency is in the host 
>> pom.xml dependencies, but this defeats the purpose of the plugin. But when 
>> it's not included, I get a classnotfoundexception when I attempt to execute 
>> the code in the plugin (there are no complaints when felix starts and the 
>> plugin is loaded). I'm not totally sure why it's not working since the 
>> resulting jar produced when I run mvn clean install contains the class. It's 
>> just not being 'seen' when it is executed.
>>
>> The plugin configuration as seen in the file is probably not doing something 
>> right, and as you can see, the current version of that file is doing 
>> everything.
>>
>> Any help would be greatly appreciated. I feel like I'm banging my head 
>> against a brick wall on this one.
>>
>> Many thanks,
>>
>> Eamonn Maguire
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>



-- 
Karl Pauls
[email protected]
http://twitter.com/karlpauls
http://www.linkedin.com/in/karlpauls
https://profiles.google.com/karlpauls

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to