Welcome to the Official BlackBerry® Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Web and WebWorks Development

Reply
Developer
eblade
Posts: 132
Registered: 02-08-2012
My Carrier: None yet

exception while packaging

Attempting to package using Ripple, to deploy to emulator, I get a rather unhelpful "AIR Exception" message, and not much else. 

 

Turning to the command line tools, I get:

 

[INFO] Parsing command line options
[INFO] Parsing bbwp.properties
[INFO] Validating WebWorks archive
[INFO] Parsing config.xml
[WARNING] Failed to find the <author> element
[INFO] Populating application source
[INFO] Compiling WebWorks application
Error loading: c:\android\jdk1.7.0_02\jre\bin\server\jvm.dll
[INFO] Packaging the bar file
javax.imageio.IIOException: Can't read input file!
at javax.imageio.ImageIO.read(Unknown Source)
at net.rim.tumbler.airpackager.AirPackager.createSplashscreen(AirPackage
r.java:723)
at net.rim.tumbler.airpackager.AirPackager.run(AirPackager.java:191)
at net.rim.tumbler.WidgetPackager.go(WidgetPackager.java:152)
at net.rim.tumbler.WidgetPackager.main(WidgetPackager.java:77)
[ERROR] Air Packager exception occurred

 

... help?

 

 

Please use plain text.
BlackBerry Development Advisor
oros
Posts: 410
Registered: 04-12-2010
My Carrier: Rogers

Re: exception while packaging

Hi there,

 

This one can happen for a number of reasons and unfortunately will require a bit of a shotgun approach.

 

The first thing to double-check is that you have installed the JDK, specifically version 1.6 and 32-bit. You can check the installed JDK versions in the default folder:

- C:\Program Files\Java; or

- C:\Program Files (x86)\Java

 

You should only have one JDK (and corresponding JRE) installed on your PC. The next step is to ensure that your PATH system environment variable includes the 'bin' sub-folder. Example:

C:\Program Files\Java\jdk1.6.0_23\bin

 

If the above change is made, it is best to restart your PC fully before proceeding.

 

From there, please ensure you are using the most recent WebWorks-TabletOS SDK and AIR SDK. Can you please confirm the versions you have installed?

 

Finally, can you please provide the full command-line action you are executing, as well as your OS version (i.e. Windows XP) and format (32-bit or 64-bit.)

 

Erik Oros

BlackBerry Development Advisor

Erik Oros
BlackBerry Development Advisor
@WaterlooErik
Please use plain text.
Developer
eblade
Posts: 132
Registered: 02-08-2012
My Carrier: None yet

Re: exception while packaging

hi there! thanks for the advice.

It appears to be blowing up on the following section of config.xml:


<rim:loadingScreen backgroundImage="mainApp/images/google-voice-icon256.png"
foregroundImage="mainApp/images/google-voice-icon64.png"
onLocalPageLoad="true">
<rim:transitionEffect type="zoomIn"/>
</rim:loadingScreen>


when I remove this section, then the packaging works.. (after i set my JAVA_HOME var to the RIM supplied Java, instead of the Java that I use for -all other- development)
Please use plain text.
BlackBerry Development Advisor
oros
Posts: 410
Registered: 04-12-2010
My Carrier: Rogers

Re: exception while packaging

Interesting. Let me compare that section against our docs and I'll get back to you in a little bit. I'll try to reproduce this issue as well with my tools.

 

Erik Oros

BlackBerry Development Advisor

Erik Oros
BlackBerry Development Advisor
@WaterlooErik
Please use plain text.
Developer
eblade
Posts: 132
Registered: 02-08-2012
My Carrier: None yet

Re: exception while packaging

Originally, it was pointing to "example.png" and "example.gif" i think, was from the example on the dev website. Obviously, those did not exist, so I just attempted to replace them with png files that I did have lying around, not really sure what is supposed to go in those spots. Thanks :smileyhappy:
Please use plain text.
BlackBerry Development Advisor
oros
Posts: 410
Registered: 04-12-2010
My Carrier: Rogers

Re: exception while packaging

The attributes themselves are optional, so it may be worth taking them out and adding them back in one-by-one to see if it's a specific one causing the break.

 

Also, to confirm, is your config.xml contained within the mainApp folder or is mainApp a sub-folder from your config.xml?

 

I'm not sure how clear that is.

 

Basically, what does the structure of your project look like? Your config.xml should be contained at the root, so what sub-folders do you have from there?

 

Erik Oros

BlackBerry Development Advisor

Erik Oros
BlackBerry Development Advisor
@WaterlooErik
Please use plain text.
BlackBerry Development Advisor
oros
Posts: 410
Registered: 04-12-2010
My Carrier: Rogers

Re: exception while packaging

I have a feeling the backgroundImage and foregroundImage should look like this:

 

<rim:loadingScreen	backgroundImage="images/google-voice-icon256.png"
					foregroundImage="images/google-voice-icon64.png"
					onLocalPageLoad="true">
	<rim:transitionEffect type="zoomIn" />
</rim:loadingScreen>

 

My guess is that mainApp is your actual root folder, so all relative paths will be referenced from there, meaning you need to start with images when referencing those files.

 

I was able to produce the packaging error if my paths were specified improperly (i.e. the sub-folder does not actually exist.)

 

Erik Oros

BlackBerry Development Advisor

Erik Oros
BlackBerry Development Advisor
@WaterlooErik
Please use plain text.
Developer
eblade
Posts: 132
Registered: 02-08-2012
My Carrier: None yet

Re: exception while packaging

ok, say the root is:

c:\src

the config.xml is in c:\src, the images are in c:\src\mainApp\images. The images display properly when accessed from the application, as well as working properly specified as the application's Icon in the config.xml.

Is there a page with documentation on this particular tag? a brief glance with google didn't locate anything for me .. sorry if that's obvious somewhere I should know, I'm new here yesterday, and still waiting for email back on my dev account.
Please use plain text.
BlackBerry Development Advisor
oros
Posts: 410
Registered: 04-12-2010
My Carrier: Rogers

Re: exception while packaging

In that case, the path you specified should be fine it seems.

 

Full docs on config.xml and its components can be found here:

https://bdsc.webapps.blackberry.com/html5/documentation/ww_developing/working_with_config_xml_file_1...

 

The rim:loadingscreen element is here:

https://bdsc.webapps.blackberry.com/html5/documentation/ww_developing/rim_loadingscreen_element_8346...

 

If the paths are fine, I'm actually not seeing what part of that element would be causing the break as I used it exactly the same in my project, I then created the folder path (with images), and packaged just fine using:

 

<rim:loadingScreen
backgroundImage="mainApp/images/google-voice-icon256.png"
foregroundImage="mainApp/images/google-voice-icon64.png"
onLocalPageLoad="true">

<rim:transitionEffect type="zoomIn" />

</rim:loadingScreen>

Can you share the packaging command you're executing from the command line? As well as the folder from which you are running the command?

 

Erik Oros

BlackBerry Development Advisor

Erik Oros
BlackBerry Development Advisor
@WaterlooErik
Please use plain text.
Developer
eblade
Posts: 132
Registered: 02-08-2012
My Carrier: None yet

Re: exception while packaging

here's a quick bat file I wrote to deal with this, I need to get a command line zip tool added to it to make it a little easier though :smileyhappy:
set JAVA_HOME="c:\program files (x86)\Research In Motion\BlackBerry WebWorks SDK for TabletOS 2.2.0.5\jre"
c:\program files (x86)\Research In Motion\BlackBerry WebWorks SDK for TabletOS 2.2.0.5\bbwp\bbwp c:\users\eric\ripplesites\gv\gvbb.zip -p c:\temp\gvbb
c:\program files (x86)\Research In Motion\BlackBerry WebWorks SDK for TabletOS 2.2.0.5\bbwp\blackberry-tablet-sdk\bin\blackberry-deploy -installApp -password blackberry -device 192.168.109.128 -package c:\temp\gvbb\gvbb.bar
The app source is all in c:\users\eric\ripplesites\gv The app loads some files from there, which then load some files in mainApp\ where all of the assets are currently stored. I'm going to read through those documents this evening, and I'll hopefully be able to locate the problem on my end. Thank you for your assistance :smileyhappy: (hoping my developer account gets approved today :smileyhappy: )
Please use plain text.