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 28536 - <no property editor> message in IDE run by XTest on JDK1.4.1
Summary: <no property editor> message in IDE run by XTest on JDK1.4.1
Status: VERIFIED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: xtest (show other bugs)
Version: 3.x
Hardware: All All
: P1 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords: T9Y
Depends on: 35470 36820
Blocks:
  Show dependency tree
 
Reported: 2002-11-06 16:15 UTC by Jiri Skrivanek
Modified: 2006-11-09 23:05 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screen shot (50.23 KB, image/png)
2002-11-06 16:17 UTC, Jiri Skrivanek
Details
content of class loader (2.59 KB, text/plain)
2002-11-19 15:24 UTC, Jiri Rechtacek
Details
content of class loader (81 bytes, text/plain)
2002-11-19 15:25 UTC, Jiri Rechtacek
Details
content of class loader (2.34 KB, text/plain)
2002-11-19 15:27 UTC, Jiri Rechtacek
Details
Patch for branch release35 (1.06 KB, patch)
2003-08-18 17:45 UTC, David Strupl
Details | Diff
Diagnostic patch JAR (for boot classpath) (7.92 KB, application/octet-stream)
2003-10-24 19:09 UTC, Jesse Glick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Skrivanek 2002-11-06 16:15:17 UTC
After core separation it happens that property
editors for Compiler, Debugger, Executor and so on
are not found (message <no property editor> in
property sheet - see screen shot) when IDE is run
by XTest harness on JDK1.4.1. It works well on
JDK1.3.1.
It breaks testability of IDE.
Comment 1 Jiri Skrivanek 2002-11-06 16:17:14 UTC
Created attachment 7870 [details]
Screen shot
Comment 2 Marian Mirilovic 2002-11-06 16:41:50 UTC
[nb_dev](20021106)

Jesse: Do you know something about it ?
Comment 3 Peter Zavadsky 2002-11-06 16:49:22 UTC
Additional info:
Me and Jirka has been looking at it.
The modules core/compiler core/execution are installed correctly. They
have added their seach path's to the PropertyEditorManager.

Also when tried the code (via script):

System.err.println(java.beans.PropertyEditor.findEditor(org.openide.execution.Executor.class));

it has printed the instance.

So it seems the problem has to be somewhere else.
Please investigate the sheets, why the property editors weren't
propagated there successfuly.
Comment 4 Peter Zavadsky 2002-11-06 16:50:49 UTC
Sorry, there should be:

System.err.println(java.beans.PropertyEditorManager.findEditor(org.openide.execution.Executor.class));
Comment 5 Jiri Skrivanek 2002-11-14 17:40:26 UTC
Raising the priority because it blocks some automated tests and it
seems nobody is going to resolve it.
Comment 6 Jiri Rechtacek 2002-11-19 15:21:56 UTC
There is a problem with the current thread. The context class loaders
differs between:
1) the ide run from xtest with jdk1.3 (test passes),
2) the ide run from xtest with jdk1.4 (test fails),
3) the ide run commonly from command line with jdk1.4 (the property
editors are set correctly.)
So, the ide run from xtest with jdk1.4 don't fully simulate standard
the run ide. Look at the attached contents of Thread.currentThread
().getContextClassLoader () from each type of ide.
There is no defect in openide/propertyeditors of this sort of issue I
reassigning to xtest framework. If I'm wrong then assign to classloaders.
Comment 7 Jiri Rechtacek 2002-11-19 15:24:36 UTC
Created attachment 7989 [details]
content of class loader
Comment 8 Jiri Rechtacek 2002-11-19 15:25:53 UTC
Created attachment 7990 [details]
content of class loader
Comment 9 Jiri Rechtacek 2002-11-19 15:27:14 UTC
Created attachment 7991 [details]
content of class loader
Comment 10 Jesse Glick 2002-11-20 04:17:01 UTC
Please try a Thread.dumpStack at every place in the NB code where
Thread.setContextClassLoader is called, printing also the new loader,
and see if the timing differs acc. with JDK 1.4.
Comment 11 Jesse Glick 2002-11-28 15:58:32 UTC
I can try to investigate this...
Comment 12 Jesse Glick 2002-11-28 17:55:26 UTC
There is a bug in AWT: #4786277

I have a workaround, though, which seems to work: property editors are
shown in XTest.
Comment 13 Jesse Glick 2002-11-28 19:08:50 UTC
committed     Up-To-Date  1.153       core/src/org/netbeans/core/Main.java
Comment 14 Jiri Skrivanek 2002-12-02 08:51:31 UTC
Verified in build 200212020100.
Comment 15 David Strupl 2003-08-18 17:39:28 UTC
Hi,

I am reopenning the issue. Setting the context classloader of the AWT
thread should be done on the very start of the method
Main.initializeMainWindow(). Use case: main window constructing the
main menu uses the content of the system file system for this. From
there there could be (and in my case is) a callback to my module (be
it constructor or method value). So there is a sequence calling my
code there form AWT thread without the context classloader being set
on it. And that in turn fail to load classes using JNDI (but that in
fact just references some instance using InstanceDataObject). To be
more accurate that screws the very usage of the core/naming module
because the javax.naming.InitialContext relies on the core naming
module being accessible via context classloader which in this case is
not true.
Comment 16 David Strupl 2003-08-18 17:45:01 UTC
Created attachment 11348 [details]
Patch for branch release35
Comment 17 David Strupl 2003-08-18 17:46:01 UTC
Patch attached (for release35 branch). Took me the whole day to figure
out ;-((((
Comment 18 Jesse Glick 2003-08-18 17:51:06 UTC
dstrupl:

1. Don't forget to add yourself as a CC when adding comments.

2. I still consider this bug fixed. For your case, which is somewhat
different and AFAIK does not occur in normal XTest usage, please file
a separate bug, blocking this one. I think this patch should go into
the trunk, but it is not P1 for most r35 users.

3. Use the -u switch to cvs diff; contextless diffs are very hard to
read/evaluate and apply to slightly changed sources.
Comment 19 Jesse Glick 2003-08-18 17:51:33 UTC
x
Comment 20 Jesse Glick 2003-08-18 17:51:52 UTC
x
Comment 21 David Strupl 2003-08-18 18:24:33 UTC
Jesse, what is "normal" xtest usage? I just have module depending on
core/naming (not endorsed by Sun as stable I must admit) and the
module uses JNDI to create contents of main menu. Nothing abnormal
IMHO. Ok, I will create a separate issue if you wish. But just moving
your patch couple of lines above helps to solve my problem.
Comment 22 Jesse Glick 2003-08-18 18:37:33 UTC
Fine, just in a separate issue # please... the modification is
apparently needed only for core/naming, which is not used by any
stable modules in 3.5.
Comment 23 David Strupl 2003-08-18 22:36:06 UTC
The new issue is 35470. Thanks.
Comment 24 Jiri Skrivanek 2003-08-21 09:55:13 UTC
It is fixed, isn't it? So, verifying.
Comment 25 Jesse Glick 2003-10-24 19:09:24 UTC
Created attachment 11967 [details]
Diagnostic patch JAR (for boot classpath)