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 231897 - Unable to create PhoneGap project - NPE at org.openide.filesystems.FileUtil.copyFile
Summary: Unable to create PhoneGap project - NPE at org.openide.filesystems.FileUtil.c...
Status: VERIFIED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: Cordova (show other bugs)
Version: 7.4
Hardware: All All
: P1 normal (vote)
Assignee: Jan Becicka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-27 07:26 UTC by Vladimir Riha
Modified: 2013-07-03 09:15 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 201722


Attachments
stacktrace (1.45 KB, text/plain)
2013-06-27 07:26 UTC, Vladimir Riha
Details
stacktrace (1.45 KB, text/plain)
2013-06-27 17:38 UTC, lehel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Riha 2013-06-27 07:26:36 UTC
Build: NetBeans IDE Dev (Build 201306262301)
VM: Java HotSpot(TM) Client VM, 23.7-b01, Java(TM) SE Runtime Environment, 1.7.0_15-b03
OS: Windows 7

User Comments:
vriha: Creating new PhoneGap project




Stacktrace: 
java.lang.NullPointerException
   at org.openide.filesystems.FileUtil.copyFile(FileUtil.java:647)
   at org.netbeans.modules.cordova.wizard.CordovaTemplate$CordovaExtender.apply(CordovaTemplate.java:192)
   at org.netbeans.modules.web.clientproject.ui.wizard.ClientSideProjectWizardIterator$NewProjectWizard.instantiate(ClientSideProjectWizardIterator.java:475)
   at org.netbeans.modules.web.clientproject.ui.wizard.ClientSideProjectWizardIterator.instantiate(ClientSideProjectWizardIterator.java:154)
   at org.openide.loaders.TemplateWizard$InstantiatingIteratorBridge.instantiate(TemplateWizard.java:1044)
   at org.openide.loaders.TemplateWizard.handleInstantiate(TemplateWizard.java:605)
Comment 1 Vladimir Riha 2013-06-27 07:26:37 UTC
Created attachment 136375 [details]
stacktrace
Comment 2 Vladimir Riha 2013-06-27 07:42:08 UTC
This seems to be caused by change of structure of PhoneGap SDK, in e.g. version 2.5, there is file

phonegap-2.5.0/lib/android/cordova-2.5.0.js

in new version 2.9 (and maybe older), version is omitted from file name

phonegap-2.9.0/lib/android/cordova.js


As a result, you cannot create PhoneGap project. I'm making this P1 because it really should be fixed for beta. New users will most probably download always latest version of PhoneGap
Comment 3 Vladimir Riha 2013-06-27 08:22:24 UTC
fyi introduced with 2.8

https://github.com/phonegap/phonegap/blob/2.8.0/changelog
Comment 4 lehel 2013-06-27 17:38:21 UTC
Created attachment 136423 [details]
stacktrace

Creating a HTML5 phonegap application
Comment 5 Jan Becicka 2013-07-02 14:48:09 UTC
Changeset: b3f704169d70
Author:    Jan Becicka <jbecicka@netbeans.org>
Date:      2013-07-02 16:16
Message:
Comment 6 Quality Engineering 2013-07-03 02:28:34 UTC
Integrated into 'main-silver', will be available in build *201307022300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/b3f704169d70
User: Jan Becicka <jbecicka@netbeans.org>
Log: Issue #231897 - Unable to create PhoneGap project - NPE at org.openide.filesystems.FileUtil.copyFile
Comment 7 Vladimir Riha 2013-07-03 09:15:43 UTC
I tried to create & run project with PhoneGap 2.6.0 and 2.9.0, everything was OK. Thanks



Product Version: NetBeans IDE Dev (Build 201307022300)
Updates: Updates available
Java: 1.7.0_25; Java HotSpot(TM) Client VM 23.25-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_25-b15
System: Linux version 3.2.0-48-generic-pae running on i386; UTF-8; en_US (nb)