NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

[platform-dev] Module Installer NoClassDefFoundError referencing class in OSGi bundle

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Platform Users
View previous topic :: View next topic  
Author Message
spdann
Posted via mailing list.





PostPosted: Mon Jul 23, 2012 4:29 pm    Post subject: [platform-dev] Module Installer NoClassDefFoundError referencing class in OSGi bundle Reply with quote

Hi,

I have an OSGi Bundle that contains an interface and an associated
implementation and I have another Netbeans NBM Module that has been
configured with a module installer in the manifest file. I'm trying to call
a method on the interface in the OSGi module from within my overridden
ModuleInstall.restored() method but I'm getting the following
java.lang.NoClassDefFoundError when I launch my application:

org.netbeans.InvalidException:
StandardModule:com.mycompany.osgi.maven.project.sample jarFile:
C:\OSGiTest\osgi-maven-project\application\target\osgi_maven_project\idap\modules\com-mycompany-osgi-maven-project-sample.jar:
java.lang.NoClassDefFoundError: com/mycompany/osgibundle2/Interface2

I have set the <useOSGiDependencies> flag to TRUE in the nbm-maven-plugin
configuration and have added the OSGi bundle as a dependency in the POM, but
it is still failing to find the class at runtime. Can anyone help me
understand why this is the case and what I need to do to fix it?

I have attached a test system that can be used to reproduce the problem.
Running the "osgi-maven-project-app" module will display a dialog containing
the error.

I am using Netbeans 7.1 and maven 3.0.4.

http://netbeans-org.1045718.n5.nabble.com/file/n5712099/OSGiTest.zip
OSGiTest.zip

Thanks,
Steve



--
View this message in context: http://netbeans-org.1045718.n5.nabble.com/Module-Installer-NoClassDefFoundError-referencing-class-in-OSGi-bundle-tp5712099.html
Sent from the Netbeans RCP/Platform Users (Open API) mailing list archive at Nabble.com.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Platform Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo