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

Adobe AIR Development

Reply
Highlighted
New Contributor
Posts: 4
Registered: ‎02-14-2011
My Device: Playbook

[Fatal Error] : Content is not allowed in prolog - in Getting Started HelloWorld app

Hi,

 

I have been following the "BlackBerry tablet OS SDK for Adobe Air, Getting Started Guide for Windows Developers 0.9.3 Beta.  I have Flash Builder 4.5 installed and the tablet simulator boots correctly, but when I try to test my AIRHelloWorld app on the simulator I get the following error:

 

[Fatal Error] :1:1: Content is not allowed in prolog.

 

Can anyone offer any help please?

 

Thanks,

 

FizzyPixel

Developer
Posts: 45
Registered: ‎01-14-2011
My Device: Not Specified

Re: [Fatal Error] : Content is not allowed in prolog - in Getting Started HelloWorld app

Looks like an XML parsing error.

 

I'd take a close look at the blackberry-tablet.xml file (or whatever you called it).

 

Make sure the first few characters start with <?xml version=1.0" etc.

 

Rufus.

 

 

New Contributor
Posts: 4
Registered: ‎02-14-2011
My Device: Playbook

Re: [Fatal Error] : Content is not allowed in prolog - in Getting Started HelloWorld app

[ Edited ]

Hi Rufus

 

Thanks for reply, this is the xml I'm using (blackberry-tablet.xml)

<?xml version="1.0" encoding="UTF-8"?>
<qnx>
  <initialWindow>
    <systemChrome>none</systemChrome>
    <transparent>true</transparent>
  </initialWindow>
  <publisher>Sample Inc.</publisher>
  <category>core.internet</category>
  <icon>
  	<image>blackberry-tablet-icon.png</image>
  </icon>
</qnx>

 and the full error I get is:

 

Error occurred while packaging the application:

 

[Fatal Error] AIRHelloWorld-app.xml:1:1: Content is not allowed in prolog.

Error: Content is not allowed in prolog.

 

Any suggestions would be greatly appreicated,

Thanks

Developer
Posts: 382
Registered: ‎05-19-2008
My Device: BlackBerry Torch
My Carrier: AT&T

Re: [Fatal Error] : Content is not allowed in prolog - in Getting Started HelloWorld app

I dont think you should use the <xml> tag in the blackberry-table.xml file. I think it has to be JUST the <qnx> element.

 

I just added the icon and splash screen to my app last night and I recall questioning the <xml> tag that FB Burrito placed in there by default when I used the New->Other->Xml right-click menu. I took it out and never had an issue.

 

Bill

Bill
-------------------------------------------
Check out my book on BlackBerry Development for Java.
And my other really really old book
My Apps: FlashKids
New Contributor
Posts: 4
Registered: ‎02-14-2011
My Device: Playbook

Re: [Fatal Error] : Content is not allowed in prolog - in Getting Started HelloWorld app

Hi Bill,

 

Thanks for your message, I've tried the xml file with and without the <xml> tag, but I still get the error.  Starting to wonder if the problem lies with Burrito itself, not sure what to try next.

 

FizzyPixel

Developer
Posts: 382
Registered: ‎05-19-2008
My Device: BlackBerry Torch
My Carrier: AT&T

Re: [Fatal Error] : Content is not allowed in prolog - in Getting Started HelloWorld app

This is the example I used, including the video from Renaun.  The file looks right though, except without the beginning <xml> node.

 

I also ran into an odd problem because I spaced the data out. notice in the example the the values are all in the form of

 

<node>data</node>?

 

I had spaced them out to be like

 

<node>

       Data

</node>

 

and I got some strange error. I don't recall exactly what it was, but see if you've done that in your file. whitespace isn't supposed to matter in XML, but apparently it does.

 

Bill

 

Bill
-------------------------------------------
Check out my book on BlackBerry Development for Java.
And my other really really old book
My Apps: FlashKids
Contributor
Posts: 16
Registered: ‎10-25-2010
My Device: Blackberry Tour 9630
My Carrier: Verizon Wireless

Re: [Fatal Error] : Content is not allowed in prolog - in Getting Started HelloWorld app

Hello,

 

I am getting the same error when running the blackberry-airpackager:

 

 

[Fatal Error] appName.swf:1:1: Content is not allowed in prolog.
Error: Content is not allowed in prolog.

 

 

Any thoughts?

 

Thanks,

netsport

 

New Contributor
Posts: 4
Registered: ‎02-14-2011
My Device: Playbook

Re: [Fatal Error] : Content is not allowed in prolog - in Getting Started HelloWorld app

Hi netsport

 

How I got this to work in the end was by downloading an example project that worked PlaybookRCP (http://prsync.com/adobe/working-with-flex-rpc-services-in-actionscript-mobile-projects-109653/) and copying my code into it - not pretty I know, but it did the trick.  The project now creates a bar file which it wasn't doing before.

 

Hope that helps.

 

FizzyPixel

Developer
Posts: 146
Registered: ‎03-27-2011
My Device: Blackberry Playbook
My Carrier: WiFi

Re: [Fatal Error] : Content is not allowed in prolog - in Getting Started HelloWorld app

I gave you a kudo for answering your own question because people don't often respond with the solution.

Thanks, I'm sure anyone who has the same problem in the future will appreciate it =)
----------------------------------------
If this post solved your problem, please click the 'Accept as Solution' button.
If you found this post useful, please provide a Kudo. Thanks.

Approved Apps: Celestial Slingshot
Developer
Posts: 508
Registered: ‎01-19-2011
My Device: My Trusty Red Plane
My Carrier: Outer Space

Re: [Fatal Error] : Content is not allowed in prolog - in Getting Started HelloWorld app

sorry for digging out an old thread like this, but hey, I know how to use the search function! Success! Smiley Happy

 

for all that are interested and for those running across this error in the future:

 

I just came across the same error, because I created myself a .bat file with all console commands (changed IDE's, that's why). The reason why you specifically get the error


netsport wrote:

[Fatal Error] appName.swf:1:1: Content is not allowed in prolog.
Error: Content is not allowed in prolog.

 


with the fatal error in the swf, not in the xml, is the order of arguments that airpackager takes. It has to be YourApp-app.xml YourApp.swf blackberry-tablet.xml

 

Have fun everyone!

-----------------------------------------------------------------------
I'm a bird from outer space. But I'm not flappy o.o