This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 72807 - When same package exists in two jars, only one jar is read
Summary: When same package exists in two jars, only one jar is read
Status: VERIFIED DUPLICATE of bug 71524
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-19 09:37 UTC by kitfox
Modified: 2006-03-07 09:54 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kitfox 2006-02-19 09:37:59 UTC
I'm writing a module that depends on another jar.  I've created a suite, added
my jar to this suite as a wrapped libraray module, and also added the module I'm
developing to this suite.  I've also added this jar as a library in the
properties editor dialog of my module's project.

In my library is a class which will be exposed as a property on some BeanNodes I
am creating.  Because I want it to have slightly different behavior in my
module, I've created a class which extends it in NetBeans.  I've also created a
PropertyEditor which provides a means for it to be displayed and updated in the
PropertySheet.  Also, initially, these classes were all in the same package.

So:

Wrapped Library Jar:

    package com.kitfox.properties;
    public class MyClass { ... }

Module:

    package com.kitfox.properties;
    public class MyClassNB extends MyClass { ... }
    public class MyClassEditor extends PropertyEditorSupport {
        public MyClass aMethod()
        {
            return new MyClassNB();
        }
    }

For some reason, creating a new instance of MyClassNB causes a ClassNotFound
exception to be thrown, even though the compiler has no problems finding both
MyClass and MyClassNB.  I experimented a little removing and adding the module
and the wrapped library from my suite.  Depending which was added last, I would
get a ClassNotFound exception called on either MyClass or MyClassNB.  

However, when I moved MyClassNB to a separate package, the problem disappeared.
Comment 1 Jesse Glick 2006-02-20 18:53:42 UTC
NB does not support packages being "split" across modules.

*** This issue has been marked as a duplicate of 71524 ***
Comment 2 Tomas Danek 2006-03-07 09:54:00 UTC
verified duplicate