Re: module dependency problems

"Marini, Joseph - 1004 - MITLL" <[email protected]>
Newsgroups gmane.comp.java.netbeans.modules.openide.devel
Message-ID <A0768AF6487CDB4790DDBDADD1015D5D1F48060E@LLE2K10-MBX01.mitll.ad.local>
I have seen this sometimes in Netbeans when I add additional API’s or libraries to a dependency module.

Sometimes I need to remove the modules dependency re-add it.

You could try removing your C module dependency from both A and B and re-add it.
So launch properties for the module
Remove the dependency
Close properties for the module
Open the properties on the module
Add back the dependency.

Not sure why this happens however the above approach has fixed some module dependency issues.
Also I know you have said that all API’s for the dependency module are exposed, but just recheck.

/Joe


From: Tim Boudreau [mailto:[email protected]]
Sent: Thursday, January 28, 2016 9:08 PM
To: [email protected]
Subject: [platform-dev] Re: module dependency problems

A needs a dependency on C.  The NetBeans module system's dependencies are explicit, not transitive.

In a test, you are not loading the classes using the module system's classloaders.

-Tim

On Thu, Jan 28, 2016 at 5:10 AM, jaejong <[email protected]<mailto:[email protected]>> wrote:
I am developing app using IDE 8.1.
I have three modules in my app module A,B and C.
modules C is utility module so module A and B depend on C.
module A is top level, so have dependency of B and C.
When module A use class in module B,  java.lang.NoClassDefFoundError is found about class in module C.

Of cause, Packages in module B and C are exported as public.

When I am doing unit test, this error is not found.
The error is found when I run in IDE.
Am I wrong? or Is there any solution?
Thanks!!






--
http://timboudreau.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.