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 258990 - Can't create Cordova Project
Summary: Can't create Cordova Project
Status: REOPENED
Alias: None
Product: web
Classification: Unclassified
Component: Cordova (show other bugs)
Version: 8.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Tomas Stupka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-23 18:43 UTC by AFuchs
Modified: 2017-04-09 18:02 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
messages.log from my attempts to create a project (54.87 KB, text/x-log)
2016-04-23 18:43 UTC, AFuchs
Details
Error log for java.lang.NullPointerException (1.41 KB, text/x-log)
2017-04-09 18:01 UTC, clemaez
Details

Note You need to log in before you can comment on or make changes to this bug.
Description AFuchs 2016-04-23 18:43:58 UTC
Created attachment 159411 [details]
messages.log from my attempts to create a project

I assume this to be a bug in the Cordova Plugin, but couldn't find a better place to file the bug report.

java.lang.NullPointerException
        at org.netbeans.modules.cordova.CordovaPerformer.createScript(CordovaPerformer.java:465)
        at org.netbeans.modules.cordova.wizard.CordovaSampleIterator.instantiate(CordovaSampleIterator.java:203)
        at org.openide.loaders.TemplateWizard$InstantiatingIteratorBridge.instantiate(TemplateWizard.java:1051)
(full stack trace in messages.log, see attachment)

After installing NetBeans 8.1 from the debian archives, installing the Cordova Plugin and trying to create a new Project ('Cordova Maps Sample'), a new folder is created for the project.
Then the creation wizard says: "Project folder already exists and is not empty."

When I try to create a 'Cordova Application' Project, the save dialog first states that: 'The target filesystem or folder does not exist' after selecting any file in the Dialog the error changes to: 'The file /path/to/project already exists.' This message gets update for each folder I select, but does not change if I change the name in the Filename input or the project name.

Creating other projects works as expected (I've tried 'Java Application', 'Client Editor' Example and 'Maven Project'.

The creation dialog seems to correctly detect already existing projectfolders and increments a number at the end of the Project name automatically, so I can be 100% certain that the target folder did not exist prior to creation of the project.

I tried removing my .netbeans folder from my home dir. After that I reinstalled the Cordova Plugin and the problem appeared. Running updates or restarting the IDE did not change the behavior.

messages.log is attached.
Comment 1 AFuchs 2016-04-23 18:54:15 UTC
Various system informations:

Product Version: NetBeans IDE 8.1 (Build 20151231-debian-8.1)
Updates: NetBeans IDE is updated to version NetBeans 8.1 Patch 1
Java: 1.8.0_45; Java HotSpot(TM) 64-Bit Server VM 25.45-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_45-b14
System: Linux version 3.16.0-4-amd64 running on amd64; UTF-8; de_DE (nb)
User directory: /home/mor/.netbeans/8.1
Cache directory: /home/mor/.cache/netbeans/8.1

Cordova Support Plugin: Version: 1.33.1

$ dpkg -l | grep jdk
ii  openjdk-7-jre:amd64                      7u95-2.6.4-1~deb8u1                  amd64        OpenJDK Java runtime, using Hotspot JIT
ii  openjdk-7-jre-headless:amd64             7u95-2.6.4-1~deb8u1                  amd64        OpenJDK Java runtime, using Hotspot JIT (headless)
ii  openjdk-8-doc                            8u77-b03-3                           all          OpenJDK Development Kit (JDK) documentation
ii  openjdk-8-jdk:amd64                      8u77-b03-3+b1                        amd64        OpenJDK Development Kit (JDK)
ii  openjdk-8-jdk-headless:amd64             8u77-b03-3+b1                        amd64        OpenJDK Development Kit (JDK) (headless)
ii  openjdk-8-jre:amd64                      8u77-b03-3+b1                        amd64        OpenJDK Java runtime, using Hotspot JIT
ii  openjdk-8-jre-headless:amd64             8u77-b03-3+b1                        amd64        OpenJDK Java runtime, using Hotspot JIT (headless)

$ dpkg -l | grep nodejs
ii  nodejs                                   0.10.29~dfsg-2                       amd64        evented I/O for V8 javascript
ii  nodejs-dev                               0.10.29~dfsg-2                       amd64        evented I/O for V8 javascript (development files)

$ cordova -v
6.1.1

$ java -version
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)

$ ls -hal /etc/alternatives/java
lrwxrwxrwx 1 root root 39 Apr 18 16:54 /etc/alternatives/java -> /usr/lib/jvm/java-8-oracle/jre/bin/java
Comment 2 AFuchs 2016-04-24 16:03:15 UTC
Missed one thing in System Informations:

$ dpkg -l | grep oracle
ii  oracle-java7-installer                   7u80+7u60arm-0~webupd8~1             all          Oracle Java(TM) Development Kit (JDK) 7
ii  oracle-java8-installer                   8u45+8u33arm-1~webupd8~1             all          Oracle Java(TM) Development Kit (JDK) 8
Comment 3 Tomas Stupka 2016-07-06 12:39:10 UTC
could not reproduce with NetBeans IDE Dev (Build 20160706-4699949c5225)
feel free to reopen if this still happens to you with a current dev build
Comment 4 clemaez 2017-04-09 18:01:20 UTC
Created attachment 164057 [details]
Error log for java.lang.NullPointerException
Comment 5 clemaez 2017-04-09 18:02:08 UTC
Hi,

I have the same problem here with NetBeans 8.2