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 238933 - NullPointerException: The execute.file or work.dir parameter cannot be null
Summary: NullPointerException: The execute.file or work.dir parameter cannot be null
Status: RESOLVED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.0
Hardware: All All
: P3 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-28 13:44 UTC by Vladimir Riha
Modified: 2015-04-02 13:12 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 150467


Attachments
stacktrace (3.56 KB, text/plain)
2013-11-28 13:44 UTC, Vladimir Riha
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Riha 2013-11-28 13:44:42 UTC
Build: NetBeans IDE Dev (Build 201311280002)
VM: Java HotSpot(TM) Client VM, 25.0-b59, Java(TM) SE Runtime Environment, 1.8.0-ea-b117
OS: Linux

User Comments:
vriha: I had opened editor tab <eval>.js from previous project debugging. This NPE popped out when I tried to debug this "file" from context menu




Stacktrace: 
java.lang.NullPointerException: The execute.file or work.dir parameter cannot be null
   at org.openide.util.Parameters.notNull(Parameters.java:89)
   at org.netbeans.modules.java.source.ant.ProjectRunnerImpl.computeProperties(ProjectRunnerImpl.java:159)
   at org.netbeans.modules.java.source.ant.ProjectRunnerImpl.execute(ProjectRunnerImpl.java:131)
   at org.netbeans.api.java.project.runner.JavaRunner.execute(JavaRunner.java:315)
   at org.netbeans.modules.nashorn.execution.JSExecutor.run(JSExecutor.java:78)
   at org.netbeans.modules.nashorn.execution.actions.DebugJSAction.exec(DebugJSAction.java:82)
Comment 1 Vladimir Riha 2013-11-28 13:44:43 UTC
Created attachment 142680 [details]
stacktrace
Comment 2 Vladimir Riha 2013-11-28 13:46:56 UTC
The <eval>.js is "created" if you are debugging evaluated script in Java Project and use Step Into

...
 ScriptEngineManager factory = new ScriptEngineManager();
 ScriptEngine engine = factory.getEngineByName("nashorn");
 engine.eval("function hi(){\nvar a = 'PROSPER'.toLowerCase(); \nmiddle(); \nprint('Live long and' + a)}\n function middle(){\n var b = 1; for(var i=0, max = 5; i<max;i++){\nb++;\n}\n print('b is '+b);}hi();");
...
Comment 3 Tomas Zezula 2014-03-28 15:29:09 UTC
The problem is in org.netbeans.modules.nashorn.execution.JSExecutor.run(JSExecutor.java:78)
which calls JavaRunner with wrong arguments, missing execute.file or work.dir parameters.


Not sure where the org.netbeans.modules.nashorn.execution belongs, feel free to reassign.
Comment 4 Petr Pisl 2015-04-02 13:12:43 UTC
Should be already fixed.