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 270109

Summary: Java project with Existing sources cannot run
Product: java Reporter: Maksim Khramov <mkhramov>
Component: ProjectAssignee: Tomas Zezula <tzezula>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: Dev   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:

Description Maksim Khramov 2017-03-17 11:11:10 UTC
Product Version: NetBeans IDE Dev (Build 201703160002)
Java: 1.8.0_111; Java HotSpot(TM) 64-Bit Server VM 25.111-b09

Steps to reproduce:
Create new Java project with existed sources
Try to run it
IDE prints exception in Output window:
C:\Users\mkhramov\AppData\Local\NetBeans\Cache\dev\executor-snippets\run.xml:48: 
java.lang.IllegalArgumentException: Root cannot be null.
	at org.netbeans.modules.java.classpath.SimplePathResourceImplementation.verify(SimplePathResourceImplementation.java:85)
	at org.netbeans.modules.java.classpath.SimplePathResourceImplementation.verify(SimplePathResourceImplementation.java:68)
	at org.netbeans.api.java.queries.SourceForBinaryQuery.findSourceRoots2(SourceForBinaryQuery.java:122)
	at org.netbeans.modules.java.source.ant.TranslateClassPath.translateEntry(TranslateClassPath.java:145)
	at org.netbeans.modules.java.source.ant.TranslateClassPath.translate(TranslateClassPath.java:107)
	at org.netbeans.modules.java.source.ant.TranslateClassPath.execute(TranslateClassPath.java:96)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
	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:498)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.Target.execute(Target.java:435)
	at org.apache.tools.ant.Target.performTasks(Target.java:456)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405)
	at org.apache.tools.ant.Project.executeTarget(Project.java:1376)
	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1260)
	at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:286)
	at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:555)
	at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)

At least in Build 201703130002 this was works OK.
Comment 1 Tomas Zezula 2017-03-17 11:16:33 UTC
Should be fixed http://hg.netbeans.org/jet-main/rev/9fa8d4c2b48c