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 254277

Summary: A lot of Netbeans tests fail with IllegalArgumentException with JDK9
Product: java Reporter: lothe
Component: ClasspathAssignee: Tomas Zezula <tzezula>
Status: NEW ---    
Severity: normal CC: jskrivanek
Priority: P3    
Version: 8.1   
Hardware: PC   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description lothe 2015-08-11 15:56:25 UTC
A lot of Netbeans tests fail with IllegalArgumentException with JDK9
Exception message is: "Exception java.lang.IllegalArgumentException: file:... is not a valid classpath entry; it must end with a slash." 

Used for testing:
- JDK9 b73
- the latest NB9 for JDK9 build (not sure if it is based on 8.1, please fix affected version accordingly)

An example of error goes below:

java.lang.IllegalArgumentException: file:/F:/JDK9-b75/lib/modules/bootmodules.jimage is not a valid classpath entry; it must end with a slash.
	at org.netbeans.modules.java.classpath.SimplePathResourceImplementation.verify(SimplePathResourceImplementation.java:113)
	at org.netbeans.modules.java.classpath.SimplePathResourceImplementation.verify(SimplePathResourceImplementation.java:68)
	at org.netbeans.modules.java.classpath.SimplePathResourceImplementation.&lt;init&gt;(SimplePathResourceImplementation.java:131)
	at org.netbeans.spi.java.classpath.support.ClassPathSupport.createResource(ClassPathSupport.java:77)
	at org.netbeans.spi.java.classpath.support.ClassPathSupport.createClassPath(ClassPathSupport.java:147)
	at org.netbeans.modules.java.source.parsing.TestJavaPlatformProviderImpl$DefaultPlatform.getBootClassPath(TestJavaPlatformProviderImpl.java:127)
	at org.netbeans.modules.java.source.parsing.TestJavaPlatformProviderImpl$DefaultPlatform.getBootstrapLibraries(TestJavaPlatformProviderImpl.java:133)
	at org.netbeans.modules.java.platform.classpath.PlatformClassPathProvider.findClassPath(PlatformClassPathProvider.java:96)
	at org.netbeans.api.java.classpath.ClassPath.getClassPath(ClassPath.java:675)
	at org.netbeans.api.java.source.ClasspathInfo.create(ClasspathInfo.java:293)
	at org.netbeans.api.java.source.ClasspathInfo.create(ClasspathInfo.java:272)
	at org.netbeans.modules.java.source.parsing.JavacParser.init(JavacParser.java:272)
	at org.netbeans.modules.java.source.parsing.JavacParser.parseImpl(JavacParser.java:407)
	at org.netbeans.modules.java.source.parsing.JavacParser.parse(JavacParser.java:350)
	at org.netbeans.modules.parsing.impl.TaskProcessor.callParse(TaskProcessor.java:621)
	at org.netbeans.modules.parsing.impl.SourceCache.getResult(SourceCache.java:251)
	at org.netbeans.modules.parsing.api.ResultIterator.getParserResult(ResultIterator.java:138)
	at org.netbeans.api.java.source.JavaSource$MultiTask.run(JavaSource.java:471)
	at org.netbeans.modules.parsing.impl.TaskProcessor.callUserTask(TaskProcessor.java:609)
	at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:153)
	at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:137)
	at org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:204)
	at org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:201)
	at org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager.priorityIO(FileChangedManager.java:176)
	at org.netbeans.modules.masterfs.providers.ProvidedExtensions.priorityIO(ProvidedExtensions.java:360)
	at org.netbeans.modules.parsing.nb.DataObjectEnvFactory.runPriorityIO(DataObjectEnvFactory.java:141)
	at org.netbeans.modules.parsing.impl.Utilities.runPriorityIO(Utilities.java:88)
	at org.netbeans.modules.parsing.impl.TaskProcessor.runUserTask(TaskProcessor.java:201)
	at org.netbeans.modules.parsing.api.ParserManager.parse(ParserManager.java:104)
	at org.netbeans.api.java.source.JavaSource.runUserActionTaskImpl(JavaSource.java:429)
	at org.netbeans.api.java.source.JavaSource.runUserActionTask(JavaSource.java:400)
	at org.netbeans.api.java.source.JavaSource.runModificationTask(JavaSource.java:646)
	at org.netbeans.api.java.source.CommentCollectorTest.testCollector(CommentCollectorTest.java:262)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:504)
	at junit.framework.TestCase.runTest(TestCase.java:176)
	at org.netbeans.junit.NbTestCase.access$200(NbTestCase.java:102)
	at org.netbeans.junit.NbTestCase$2.doSomething(NbTestCase.java:478)
	at org.netbeans.junit.NbTestCase$1Guard.run(NbTestCase.java:404)
	at org.netbeans.junit.NbTestCase.runBare(NbTestCase.java:497)
	at junit.framework.TestResult$1.protect(TestResult.java:122)
	at junit.framework.TestResult.runProtected(TestResult.java:142)
	at junit.framework.TestResult.run(TestResult.java:125)
	at junit.framework.TestCase.run(TestCase.java:129)
	at org.netbeans.junit.NbTestCase.run(NbTestCase.java:293)
	at junit.framework.TestSuite.runTest(TestSuite.java:252)
	at junit.framework.TestSuite.run(TestSuite.java:247)
	at junit.framework.TestSuite.runTest(TestSuite.java:252)
	at junit.framework.TestSuite.run(TestSuite.java:247)
	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:518)
	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1052)
	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:906)