Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Developer
26filip
Posts: 232
Registered: ‎01-30-2011
My Device: Dev Alpha C, Z10 LE

BlackBerry Packager error - java.lang.NullPointerException

Hi,

 

at 11am I package my application without any errors. After six houres (about 5pm :smileywink: I want again package my application. But I got an error.

 

C:\Program Files\Research In Motion\BlackBerry 10 WebWorks SDK 1.0.2.9>"C:\Program Files\Research In Motion\BlackBerry 10 WebWorks SDK 1.0.2.9\dependencies\node\node.exe" "C:\Program Files\Research In Motion\BlackBerry 10 WebWorks SDK 1.0.2.9\lib\bbwp.js" C:\xampp\htdocs\RippleSites\app.zip -d C:\xampp\htdocs\RippleSites\debug.bar -o C:\xampp\htdocs\RippleSites\ 
[INFO]    Populating application source
[INFO]    Parsing config.xml
[INFO]    Generating output files
[WARN]    Failed to find debug token
[INFO]    java.lang.NullPointerException
[INFO]    	at com.qnx.bbt.packager.Asset.setSourcePath(Asset.java:88)	at com.qnx.bbt.packager.Asset.<init>(Asset.java:75)	at com.qnx.bbt.xml.BbtExtensionXml.getAsset(BbtExtensionXml.java:571)	at com.qnx.bbt.xml.BbtExtensionXml.getAssets(BbtExtensionXml.java:541)	at com.qnx.bbt.packager.BbtBarValueProvider.getAssets(BbtBarValueProvider.java:202)	at com.qnx.bbt.bar.BARPackager.getAssets(BARPackager.java:71)
[INFO]    	at com.qnx.bbt.bar.BARPackager.findAsset(BARPackager.java:233)	at com.qnx.bbt.bar.BARPackager.associateSourceAssets(BARPackager.java:227)	at com.qnx.bbt.packager.AbstractPackager.parseDescriptorAndCreateBarManifest(AbstractPackager.java:577)	at com.qnx.bbt.packager.AbstractPackager.doRun(AbstractPackager.java:238)
[INFO]    	at com.qnx.bbt.packager.AbstractPackager.runPackager(AbstractPackager.java:164)	at com.qnx.bbt.nativepackager.BarNativePackager.main(BarNativePackager.java:61)
[ERROR]   Error: null
[ERROR]   Native Packager exception occurred
[WARN]    Failed to find debug token
[INFO]    java.lang.NullPointerException
[INFO]    	at com.qnx.bbt.packager.Asset.setSourcePath(Asset.java:88)	at com.qnx.bbt.packager.Asset.<init>(Asset.java:75)	at com.qnx.bbt.xml.BbtExtensionXml.getAsset(BbtExtensionXml.java:571)	at com.qnx.bbt.xml.BbtExtensionXml.getAssets(BbtExtensionXml.java:541)	at com.qnx.bbt.packager.BbtBarValueProvider.getAssets(BbtBarValueProvider.java:202)	at com.qnx.bbt.bar.BARPackager.getAssets(BARPackager.java:71)
[INFO]    	at com.qnx.bbt.bar.BARPackager.findAsset(BARPackager.java:233)	at com.qnx.bbt.bar.BARPackager.associateSourceAssets(BARPackager.java:227)	at com.qnx.bbt.packager.AbstractPackager.parseDescriptorAndCreateBarManifest(AbstractPackager.java:577)	at com.qnx.bbt.packager.AbstractPackager.doRun(AbstractPackager.java:238)	at com.qnx.bbt.packager.AbstractPackager.runPackager(AbstractPackager.java:164)	at com.qnx.bbt.nativepackager.BarNativePackager.main(BarNativePackager.java:61)
[ERROR]   Error: null
[ERROR]   Native Packager exception occurred

 

I nothing change in my WebWorks SDKs folder and in my deploy batch script too.

 

I have no idea, what is wrong and what to do...

 

All time online :smileyvery-happy:
Please use plain text.
BlackBerry Development Advisor
twindsor
Posts: 831
Registered: ‎07-15-2008
My Device: Passport
My Carrier: Bell

Re: BlackBerry Packager error - java.lang.NullPointerException

You seem to be missing some sort of resources. Can you show what is in the source zip?

 

Also, are you adding this part to the command line?

C:\xampp\htdocs\RippleSites\debug.bar
Tim Windsor
Open Source Technical Lead
Please use plain text.
Developer
26filip
Posts: 232
Registered: ‎01-30-2011
My Device: Dev Alpha C, Z10 LE

Re: BlackBerry Packager error - java.lang.NullPointerException

I have small script, which create package:

 

set folder=app
"C:\Program Files\7-Zip\7z.exe" a %folder%.zip C:\xampp\htdocs\RippleSites\%folder%\* -r -tzip > C:\xampp\htdocs\RippleSites\%folder%.txt
cd "C:\Program Files\Research In Motion\BlackBerry 10 WebWorks SDK 1.0.2.9\"
bbwp C:\xampp\htdocs\RippleSites\%folder%.zip -d C:\xampp\htdocs\RippleSites\debug.bar -o C:\xampp\htdocs\RippleSites\ >> C:\xampp\htdocs\RippleSites\%folder%.txt

 My app.zip file is correct - I can show, what is in file.

All time online :smileyvery-happy:
Please use plain text.
BlackBerry Development Advisor
twindsor
Posts: 831
Registered: ‎07-15-2008
My Device: Passport
My Carrier: Bell

Re: BlackBerry Packager error - java.lang.NullPointerException

is debug.bar your debug token?

 

It should be placed in the main directory of your WebWorks SDK and renamed to debugtoken.bar, and not included in your command line.

 

Can I also suggest using our Ant Build Script as an alternative script for building your application? 

https://github.com/blackberry/BB10-WebWorks-Community-Samples/tree/master/Ant-Build-Script

Tim Windsor
Open Source Technical Lead
Please use plain text.
Developer
26filip
Posts: 232
Registered: ‎01-30-2011
My Device: Dev Alpha C, Z10 LE

Re: BlackBerry Packager error - java.lang.NullPointerException


twindsor wrote:

is debug.bar your debug token?

 

It should be placed in the main directory of your WebWorks SDK and renamed to debugtoken.bar, and not included in your command line.


Yes, debug.bar is my debug token. It is placed in the main directory of my WebWorks SDK and is renamed to debugtoken.bar.

Now I didn't include it in my command line, but I got the same errors...

All time online :smileyvery-happy:
Please use plain text.
BlackBerry Development Advisor
twindsor
Posts: 831
Registered: ‎07-15-2008
My Device: Passport
My Carrier: Bell

Re: BlackBerry Packager error - java.lang.NullPointerException

I'm not sure what it's failing on then. Can you send me your zip file and I'll debug it here?

 

email: twindsor@rim.com

Tim Windsor
Open Source Technical Lead
Please use plain text.
Developer
26filip
Posts: 232
Registered: ‎01-30-2011
My Device: Dev Alpha C, Z10 LE

Re: BlackBerry Packager error - java.lang.NullPointerException

Just sent.
All time online :smileyvery-happy:
Please use plain text.
New Developer
hellosw
Posts: 15
Registered: ‎04-22-2012
My Device: Playbook

Re: BlackBerry Packager error - java.lang.NullPointerException

Please try to use a computer with a English Version of Windows OS. Then this kind of problem may dispear.

Please use plain text.
BlackBerry Development Advisor
twindsor
Posts: 831
Registered: ‎07-15-2008
My Device: Passport
My Carrier: Bell

Re: BlackBerry Packager error - java.lang.NullPointerException

Sorry, should have updated the thread.

 

We found the issue. In the current WebWorks SDK, it creates a temporary "src" directory when building the application. If you have a directory named this already it will fail. The WebWorks SDK is going to be updated to use a different temporary directory.

Tim Windsor
Open Source Technical Lead
Please use plain text.
New Developer
sterlingwes
Posts: 5
Registered: ‎05-30-2012
My Device: Z10

Re: BlackBerry Packager error - java.lang.NullPointerException

FYI - This still hasn't been fixed.

Please use plain text.