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 258304

Summary: Classpath for tests too long on windows
Product: apisupport Reporter: Jiri Skrivanek <jskrivanek>
Component: HarnessAssignee: pgebauer <pgebauer>
Status: NEW ---    
Severity: normal CC: anebuzelsky, jkovalsky, tzezula
Priority: P2    
Version: 8.2   
Hardware: PC   
OS: Windows 8.1   
Issue Type: DEFECT Exception Reporter:
Attachments: Logs for successful and failed run.
Try to pass classpath using jar file manifest attribute.

Description Jiri Skrivanek 2016-03-10 10:33:07 UTC
Created attachment 158805 [details]
Logs for successful and failed run.

Since commit 1cb189c0c8ab our tests on Windows started to fail because command line length was exceeded. Maybe the commit is correct but it somehow influenced test harness. Could you look at it? To reproduce:

- on Windows have NetBeans repository
- ant bootstrap (in case you did changes to ParseProjectXml.java)
- ant -f j2ee.kit test-qa-functional -Dtest.includes=**/J2EEValidation.class -Dnetbeans.dest.dir=C:\netbeans -verbose

It does not start NetBeans. See attached test.properties and logs for successful and failed run.

http://hg.netbeans.org/main-silver/rev/1cb189c0c8ab
description: Wrong extension class path for modules with no deps.
Comment 1 Tomas Zezula 2016-03-10 10:44:12 UTC
In fact the commit is correct.
Before the commit the command line was shorter, but incorrect as it was missing the extra module classpath elements which was causing that tests depending on nb-javacapi did not work.
Comment 2 Tomas Zezula 2016-03-21 12:45:34 UTC
Created attachment 158946 [details]
Try to pass classpath using jar file manifest attribute.
Comment 3 Jiri Skrivanek 2016-03-24 08:56:14 UTC
I tried but if NetBeans are on other disk than repository it fails during build:

BUILD FAILED
D:\hg\core-main\j2ee.kit\register_server.xml:6: The following error occurred while executing this line:
D:\hg\core-main\nbbuild\templates\common.xml:717: The following error occurred while executing this line:
D:\hg\core-main\nbbuild\templates\common.xml:774: The following error occurred while executing this line:
D:\hg\core-main\nbbuild\templates\common.xml:746: No suitable relative path from D:\hg\core-main\j2ee.kit\build\test\qa-functional\results to C:\netbeans\platform\modules\org-netbeans-libs-junit4.jar

If we are on the same disk it fails loading WatchProjects class:

java.lang.NoClassDefFoundError: org/netbeans/test/ide/WatchProjects
at org.netbeans.test.j2ee.J2EEValidation.testWebApplication(J2EEValidation.java:159)
Comment 4 Jiri Kovalsky 2016-04-13 17:44:35 UTC
Petře, any update on this? Thanks!