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 84871 - Tests for 5.5 cannot find org/openide/awt/UndoRedo
Summary: Tests for 5.5 cannot find org/openide/awt/UndoRedo
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P1 blocker (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-14 09:31 UTC by Jaroslav Tulach
Modified: 2008-12-22 15:49 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Thread dump (5.55 KB, text/plain)
2006-09-14 09:43 UTC, Jaroslav Tulach
Details
Test jar. (2.29 KB, application/octet-stream)
2006-09-14 10:51 UTC, Jiri Skrivanek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2006-09-14 09:31:44 UTC
Something is wrong with execution of daily tests on 5.5 and jdk 1.6, see:
http://beetle.czech:8080/unittest/TestCase.jsp?issues=4077
http://beetle.czech:8080/unittest/TestCase.jsp?issues=4078
http://beetle.czech:8080/unittest/TestCase.jsp?issues=4079
http://beetle.czech:8080/unittest/TestCase.jsp?issues=4084
etc.

They seem to succeed on trunk in both 1.5 and 1.6 and succeed with 1.5 and 
release55, but not with 1.6 and release55.

The failure seems to indicate that the org-openide-awt.jar is not on classpath 
for the test execution, but it is hard to verify that. Can one of you log into 
the machines and run

ant -f core/output2/test/build.xml -verbose

and attach the output? Plus also verify that the org-openide-awt.jar exists 
and that it contains the UndoRedo class?
Comment 1 Jaroslav Tulach 2006-09-14 09:43:45 UTC
Created attachment 33931 [details]
Thread dump
Comment 2 Jaroslav Tulach 2006-09-14 09:44:26 UTC
Sorry, the previous thread dump belongs elsewhere...
Comment 3 Jiri Skrivanek 2006-09-14 10:50:06 UTC
org-openide-awt.jar is never on classpath. But there is a difference between
JDK1.5 and JDK1.6 classloading. JDK1.6 tries to load all classes which are used
in current class, but JDK1.5 not. From this follows that if you don't call
method with UndoRedo class, you don't need org-openide-awt.jar on classpath for
JDK1.5. But UndoRedo is used in TopComponent and JDK1.6 tries to load UndoRedo
class when creating instance of TopComponent.
You can simple reproduce it with attached jar. Just run 'java -jar
test84871.jar'. It passes on JDK1.5 but it fails on JDK1.6.
To fix the test you need to add org-openide-awt.jar to runtime classpath. You
can verify it on your local machine: ant -f core/output2/test/build.xml
-Djdkhome=<jdk1.6.0_home>.
Comment 4 Jiri Skrivanek 2006-09-14 10:51:05 UTC
Created attachment 33935 [details]
Test jar.
Comment 5 Jaroslav Tulach 2006-09-14 12:31:00 UTC
Excellent explanation Jirko, thanks.

"#84871: We need *.awt.jar on the classpath to run on jdk 1.6"
cvs commit: Examining .
Checking in project.properties;
/cvs/core/output2/nbproject/project.properties,v  <--  project.properties
new revision: 1.4.4.1.2.4; previous revision: 1.4.4.1.2.3
done

I am sorry I have not thought about it myself. I've got distracted by the 
difference between trunk and release55. I did not realize that the reason it 
runs in trunk and does not in release55 are all the good enhancements done by 
Petr Zajac in terms of test dependencies. Once again thanks for your 
explanation.