JDK-4378087 : Regression: test/java/awt/dnd/DnDAcceptanceTest.html fails
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.4.0
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2000-10-10
  • Updated: 2001-02-27
  • Resolved: 2001-02-27
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.4.0 betaFixed
Related Reports
Relates :  
Description
Launch the regression test test/java/awt/dnd/DnDAcceptanceTest.html twice from
separate shells. As the very first DnD transfer, drag a Button from one process
to the other. The following exception is thrown:

Exception "java.lang.ClassNotFoundException: DnDSource"while constructing 
DataFlavor for: application/x-java-serialized-object; class=DnDSource

The transfer occurs normally on subsequent inter-JVM transfers, or if an in-
process transfer is performed as the first transfer.

Regression from kestrel on both Windows and Solaris.

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: merlin-beta FIXED IN: merlin-beta INTEGRATED IN: merlin-beta
14-06-2004

EVALUATION Commit to fix in merlin. Regression. david.mendenhall@east 2000-10-10 Name: dsR10078 Date: 10/14/2000 ###@###.### ClassNotFoundException is thrown when we try to load DnDSource class to create a DataFlavor for the received native format. We do this on the EventDispatchThread of the applet. The cause of failure is that the the context ClassLoader for this Thread equals to the system ClassLoader, while it should be the applet ClassLoader. The system ClassLoader is unaware of the classpath of the applet and thus is unable to load the class. This regression is introduced with the fix for 4030718. It postpones creation of EventDispatchThread until the first event to be dispatched appears in the associated EventQueue. So the postponed creation usually happens on the Toolkit thread which uses the system ClassLoader as its context ClassLoader and EventDispatchThread inherits the context ClassLoader of the Toolkit thread. Before the fix EventDispatchThread was created when the associated EventQueue is created. The applet EventQueue is created on the AppContextCreator which uses AppletClassLoader as its context ClassLoader. ======================================================================
11-06-2004

SUGGESTED FIX Name: dsR10078 Date: 10/14/2000 ###@###.### Keep the reference to the applet ClassLoader for a particular EventQueue and set this loader as a context ClassLoader when creating EventDispatchThreads associated with this queue. --- EventQueue.java Sat Oct 14 14:22:17 2000 *************** *** 109,114 **** --- 109,116 ---- private final ThreadGroup threadGroup = Thread.currentThread().getThreadGroup(); + private final ClassLoader classLoader = + Thread.currentThread().getContextClassLoader(); /* * Debugging flag -- set true and recompile to enable checking. *************** *** 565,570 **** --- 567,573 ---- new EventDispatchThread(threadGroup, name, EventQueue.this); + t.setContextClassLoader(classLoader); t.setPriority(Thread.NORM_PRIORITY + 1); t.setDaemon(false); return t; ======================================================================
11-06-2004