> [ERROR] Error building bundle > org.isatools.plugins:isavalidatorconvert:bundle:1.0 : Invalid class file: > *.class
^ It's actually due to the fact that an actual file called *.class is being embedded into the final bundle. I had this problem before with another project, and it wasn't anything to do with OSGi. It was actually down to a maven plugin not working properly. I think it was maven-assembly but I can't rightly remember at present. I will try and find the trace I made about the problem and get back to you on this. I'll remove the osgi framework from the bundle. now and see what happens with that. Thanks, Eamonn On 20 Sep 2011, at 00:31, <[email protected]> <[email protected]> wrote: > > > This is a tough one, and my answer may be wrong, so I hope that other smart > developers on this list will read this and correct it if possible. A > "CAFEBABE" header is a hexadecimal string Ja va uses to identify ava > bytecode. So, what this is tellling me is that Java is unable to recognize > the .class file referred to hear as Java Bytecode. Where are you pulling > this file from? Also, what version of Java are you using? What version of > Java is required by the isatools plugins? > > > > v/r, > > > > Mike Van > > > > ----- Original Message ----- > > > From: "Eamonn Maguire" <[email protected]> > To: [email protected] > Sent: Monday, September 19, 2011 5:36:45 PM > Subject: Re: Dependencies, Exports and Imports Query > > 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] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

