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 153946 - J2EEValidation fails
Summary: J2EEValidation fails
Status: CLOSED FIXED
Alias: None
Product: ide
Classification: Unclassified
Component: Commit Validation (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Ivan Sidorkin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-26 14:55 UTC by Michal Zlamal
Modified: 2011-06-10 08:58 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 Michal Zlamal 2008-11-26 14:55:28 UTC
J2EEValidation test fails with message:
   [junit] org.netbeans.junit.AssertionFailedErrorException: Text "JSP Page" at http://localhost:8090/SampleWebProject
   [junit] 	at org.netbeans.jellytools.JellyTestCase.runBare(JellyTestCase.java:167)
   [junit] 	at org.netbeans.junit.NbTestCase.run(NbTestCase.java:209)
   [junit] 	at org.netbeans.junit.NbModuleSuite$S.runInRuntimeContainer(NbModuleSuite.java:522)
   [junit] 	at org.netbeans.junit.NbModuleSuite$S.run(NbModuleSuite.java:407)
   [junit]
   [junit] Nested Exception is:
   [junit] org.netbeans.jemmy.TimeoutExpiredException: Text "JSP Page" at http://localhost:8090/SampleWebProjec

So I checked what port I have set for the glassfish what I have installed and it is 8090, also server seems to be OK.
Then I looked at the ide.kit/test/qa-functional/src/org/netbeans/test/j2ee/J2EEValidation.java file and found those lines:
....
try {
   URLConnection connection = new URI("http://localhost:8080/"+urlSuffix).toURL().openConnection();
   connection.setReadTimeout(Long.valueOf(timeout).intValue());
....
public String getDescription() {
   return("Text \""+text+"\" at http://localhost:8090/"+urlSuffix);
}
....
So it says that there is problem with JSP page on port 8090 while it is looking to 8080. I'd say that this information
is very misleading (it was introduced by CS 12393ff38fda - http://hg.netbeans.org/main/rev/12393ff38fda).
However this is only part of the issue.

How it comes that the port number for the testing server is hardcoded? Can't it be obtained from IDE's glassfish node?
If not why there no configuration for it?
I'd say you can't generally predict that port 8080 is free for the testing app server.  This assumption won't at least
work for production build machine.
Comment 1 Ivan Sidorkin 2008-11-26 15:17:29 UTC
fixed
http://hg.netbeans.org/main/rev/306e7319b8ff

use -Dtest-qa-functional-sys-prop.http.port=8090
Comment 2 Marian Mirilovic 2011-06-10 08:58:14 UTC
v/c