Problem after storing data in Storage and trying to read it

Hi all,
I have a problem with reading the data from a Storage file I created. The code folows:
public var storage: Storage;
public var prop: Property;
public var props: Property[];
var initialized: Boolean = false;
public function initiliazeDatabase(): Boolean {
storage = Storage {
source: "test.db"
var resource: Resource = storage.resource;
var inputStream: InputStream = resource.openInputStream();
readData(inputStream);
println("Initilatization done!!!");
println("size: {sizeof props}");
return initialized;
function initStorage() {
println("Initializing Storage…");
var out = storage.resource.openOutputStream(true);
var dummyRoot = "<prop></prop>\n";
out.write(dummyRoot.getBytes());
out.close();
initialized = true;
function parseCallback(e: Event) {
if (e.type == PullParser.START_ELEMENT) {
if (e.qname.name == "prop" and e.level == 0) {
prop = Property { };
} else if (e.type == PullParser.END_ELEMENT) {
if (e.qname.name == "prop" and e.level == 0) {
insert prop into props;
} else if (e.type == PullParser.TEXT) {
if (e.qname.name == "name" and e.level == 1) {
prop.name = e.text;
if (e.qname.name == "value" and e.level == 1) {
prop.value = e.text;
public function addProp(name: String, value: String): Void {
prop = Property {
name: name;
value: value;
insert prop into props;
public function storeData(): Void {
var out = storage.resource.openOutputStream(false);
for (prop in props) {
out.write(prop.toXml().getBytes());
out.close();
public function readData(inn: InputStream): Void {
var parser = PullParser {
input: inn;
onEvent: parseCallback;
try {
parser.parse();
initialized = true;
} catch (npe: NullPointerException) {
initStorage();
Now, for the first time, the app works as it should, the Storage is initialized (if it does not exist) and the required fields are stored in it when I need to.
However, the next time I start the application I get the following error:
Exception in thread "AWT-EventQueue-0" java.lang.ExceptionInInitializerError
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.javafx.runtime.provider.GUIRuntimeProvider$1.run(GUIRuntimeProvider.java:65)
at com.sun.javafx.tk.swing.SwingToolkit$StartupRoutine.run(SwingToolkit.fx:582)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: com.sun.javafx.data.pull.impl.StreamException: [20,1] Syntax Error in prop
at com.sun.javafx.data.pull.ukit.xml.ParserStAX.panic(ParserStAX.java:1516)
at com.sun.javafx.data.pull.ukit.xml.ParserStAX.next(ParserStAX.java:400)
at javafx.data.pull.PullParser.next(PullParser.fx:319)
at javafx.data.pull.PullParser.parse(PullParser.fx:258)
at com.gpsbuddy.utils.DatabaseUtils.readData(DatabaseUtils.fx:86)
at com.gpsbuddy.utils.DatabaseUtils.readData(DatabaseUtils.fx:86)
at com.gpsbuddy.utils.DatabaseUtils.initiliazeDatabase(DatabaseUtils.fx:30)
at com.gpsbuddy.utils.DatabaseUtils.initiliazeDatabase(DatabaseUtils.fx:30)
at com.gpsbuddy.main.Main.<clinit>(Main.fx:21)
at com.gpsbuddy.main.Main.<clinit>(Main.fx:21)
I did check the muffin file and it has no errors in it...
Thanks in andvance...

Well, as it appears, the second part of the exception was right.. :P... I do have problem with the XML file.. for some reason I cannot have two <prop> tags in one document?
For example, if I have <prop></prop>, the program start ok... but when a new prop is added, for example, <prop></prop><prop></prop>, I get the error from the previous post?
Does anybody know anything about this? Could this be an error in the parser, or I am missing something?
Edited by: jonycus1 on Feb 25, 2010 3:10 PM

Similar Messages

  • I recently upgraded my iCloud storage and trying to store my photos to it. Out of 500 only 150 is uploading. I know space is not a problem I have 13.5 gigs remaining on my cloud. Please help.

    I recently upgraded my iCloud storage and trying to store my photos to it. Out of 500 only 150 is uploading. I know space is not a problem I have 13.5 gigs remaining on my cloud. Please help.

    Welcome to the Apple Community.
    Assuming you have finished with your old backup.....
    You can see what your iCloud storage is used for and delete any unwanted content at settings > iCloud > backup & storage > manage......

  • I am using Windows 7 64-bit. After installing Photoshop Elements 13 and trying to run it I always get the message: Photoshop does not work anymore. And it doesn't.

    I am using Windows 7 64-bit. After installing Photoshop Elements 13 and trying to run it I always get the message: Photoshop does not work anymore. And it doesn't.

    Hi Hardy Tasso,
    Are you seeing this problem since first launch of PSE13 after installation or recently?
    Please try:
    Keep Ctrl + Alt + Shift keys pressed while launching PSE13 Editor and click OK on the dialog that comes next.
    Thanks,
    Anwesha

  • Having problem with storing data in array

    Hi,
    I'm having problem on storing data in array. My problem is that each time it loops, the array just keep overwrite instead save to the next index. Like at 0 the value is 123, and 1 is 234. But i having that all data capture all overwrite at 0 till the last data it still show at 0. How do i correct this problem?
    Solved!
    Go to Solution.

    How to use array to do comparison? Like Array 1 go thru array 2 to get data Loss out and build an array. Like Array 1 ,1000,1024,1048,etc before 1520 fall in between Array 2 range 1000-1500. So Freq 1000,1024,1048 etc will get Loss value as 1 and 1520 fall in between 1500-2000 will output Loss 2. and so on till the end of the list. How should do this? Need help on this.
    Array 1                                                Array 2
    Freq                                              ​     Freq   Loss
    1000                                              ​    1000      1
    1024                                              ​    1500      2
    1048                                              ​    2000      3
    1100                                              ​     :
    1200                                              ​     :
    :                                                 ​        18000
    1520
    18000

  • An internal error has occurred:  ?:0: attempt to index a nil value after installing LR5.5 update and trying to play or preview slideshow

    An internal error has occurred:  ?:0: attempt to index a nil value after installing LR5.5 update and trying to play or preview slideshow. Never had this problem before. I went to forums and see that this is a problem with previous versions and this only occurred after installing lastest update.

    Jeannine,
         If you follow the advice of the previous poster Julie Kmoch and then gradualy add presets back in one at a time you might be able to find the one that is causing the issue. I may be guessing, but I believe the issue has something to do with either an incompatible Preset setting (eg a older preset in newer version of LR) or a corrupt Preset.
    Say you bought LR2 and imported a bunch of Presets from the internet, cuz 'Hey these effects are cool and I don't have to recreate the wheel', and then you upgraded to LR3 (not a clean install) and now one of the Presets that calls a certain slider setting or value that is different in LR3 doesn't work anymore. This might be why it throws the error, but again I am just speculating.
    Location of LR Preset folder in Windows Vista/ Windows 7
    C:/Users/<YourUserName>/AppData/Roaming/Adobe/Lightroom/Develop Presets
    If you do not see the folder AppData, you may need to change the settings in Windows Explorer to 'Show Hidden Files and Folders'. To do that in Windows Vista/ Windows 7, open a Windows Explorer window, Click on Organize, then Foler and Search Options. Then click on the View tab and select the option button next to Show hidden files, folders and drives.
    Hope this helps a bit,
    Glenn

  • Networking problem after a zone is created and installed

    Hi all,
    I've got a networking problem after a zone was created and installed on a Solaris 10 box. The box was configured with two NICs, one (e1000g0) with a public IP address, the other one (e1000g1) with a private IP address and connected to a local switch. All worked fine so far.
    Then I created a local zone with shared networking (e1000g1). The zone has a private IP address which is in the same subnet as e1000g1 on the global zone. After some time, I noticed that I could not access (ssh, ping) the global zone. Then after some time, the global zone became available. The problem happened quite frequently.
    Also I observed that: 1) When the global zone was unavailable from outside, it was available (ssh, ping) from another box within the same subnet (e1000g0); 2) If I shutdown e1000g1, the problem was gone.
    Any idea what caused this problem?
    Many thanks,
    Xiaobo

    It was a route problem.

  • After updating to snow leopard  and trying to delete mackeeper flash player will no longer work. Can anyone help me?

    After updating to snow leopard and trying to delete mackeeper, Flash player is being blocked and will not allow me to view utubes. Can anyone help?

    Here are instructions for eradicating MacKeeper - you may need to re-install it to uninstall it fully:
    http://applehelpwriter.com/2011/09/21/how-to-uninstall-mackeeper-malware/
    Regarding Flash - there are many reports on here that v13.x isn't working for a lot of people. distractme in the following thread posted instructions on how to install the previous version, which should work whilst Adobe work on a fix:
    https://discussions.apple.com/message/25430408#25430408

  • I have written a binary file with a specific header format in LABVIEW 8.6 and tried to Read the same Data File, Using LABVIEW 7.1.Here i Found some difficulty.Is there any way to Read the Data File(of LABVIEW 8.6), Using LABVIEW 7.1?

    I have written a binary file with a specific header format in LABVIEW 8.6 and tried  to Read the same Data File, Using LABVIEW 7.1.Here i Found some difficulty.Is there any way to Read the Data File(of LABVIEW 8.6), Using LABVIEW 7.1?

    I can think of two possible stumbling blocks:
    What are your 8.6 options for "byte order" and "prepend array or string size"?
    Overall, many file IO functions have changed with LabVIEW 8.0, so there might not be an exact 1:1 code conversion. You might need to make some modifications. For example, in 7.1, you should use "write file", the "binary file VIs" are special purpose (I16 or SGL). What is your data type?
    LabVIEW Champion . Do more with less code and in less time .

  • The table for storing data for infocube and ODS

    Hi all:
        could you please tell me how to find the table for storing data for infocube and ODS?
    thank you very much!

    Hi Jingying Sony,
    To find tables for any infoprvider go to SE11.
    In database table field enter the following
    Cube -
    Has fact table and dimension table
    For customized cube - ie cube names not starting with ' 0 '
    Uncompressed Fact table - /BIC/F<infocubename>
    Compressed fact table - /BIC/E<infocubename>
    Dimension table - /BIC/D<infocubename>
    For standard cube - ie cube names  starting with ' 0 '
    Uncompressed Fact table - /BI0/F<infocubename>
    Compressed fact table - /BI0/E<infocubename>
    Dimension table - /BI0/D<infocubename>
    Click on display.
    For DSO,
    For standard DSO active table- /BI0/A<DSO name>00.
    You use 40 for new table.
    Click on display.
    For customized DSO use- /BIC/A<DSO name>00.
    An easier way is in the database table field, write the name of the cube/DSO preceeded and followed by ' * ' sign. Then press F4 . It shall give you the names of the available table for that info provider.
    Double click on the name and choose display.
    Hope this helps,
    Best regards,
    Sunmit.

  • Problem in retrieve data  in COSS and COSP from PBS using FM /pbs/select_in

    hi all i have problem in retrieving data from COSP and COSS tables from PBS using FM /pbs/select_into_table in this FM i couldn't find the tables if any body knows pls reply back with the Archiving object to be use and parameters to be used.

    That are controlling tables-
    Have you installed PBS for Controlling ?
    try http://www.pbs-bensheim.de/
    A.

  • My ipod wont charge ive try everthing when i plug it in to the computer nothing happen but before that it was full charge and 5 mins after that it was 10% and tried charging it nothing but now the screen is blank...So what should i do?

    My ipod wont charge ive try everthing when i plug it in to the computer nothing happen but before that it was full charge and 5 mins after that it was 10% and tried charging it nothing but now the screen is blank...So what should i do?

    - See:
    iPod touch: Hardware troubleshooting
    - Try another cable
    - Try another charging source
    - Look at the dock connector on the iPod. Look for abnormalities like bent or corroded contacts, cracked or broken plastic.
    - Make an appointment at the Genus Bar of an Apple store.
    Apple Retail Store - Genius Bar

  • Display problems after installing 10.5.2 and the leopard graphics update

    Shortly after installing the leopard graphics update, my display started exhibiting problems.
    The next day, the powerbook wouldn't even boot, just leaving me at a blue screen.
    I tried verifying permissions and verifying disk, reinstalling leopard and eventually did a fresh install of Tiger, which boots, but crashes frequently and has graphics corruption as visible in this screenshot:
    http://pics.livejournal.com/dorukai/pic/000fw0hw
    The same corruption is visible on a second monitor if I connect one.
    The timing (being right after installing the graphics update) suggests that the update somehow caused this problem (flashing the video card firmware maybe?) but any ideas at all are very welcome at this point!
    Unfortunately after installing Tiger I kept getting updates, and one has broken the ability to boot normally, I can only boot in safe mode

    I have the same problem. It happened right after I installed the graphics update. When the computer restarted, my screen went crazy. I couldn't see anything, just a screen full of horizontal lines. After restarting a couple of times it seemed to go away, but it has begun to happen again recently. although not as bad yet. I am not saying it's not a logic board issue, but it does seem funny that more than one person is experiencing the same type of problem after the graphics update. I guess it's time to take a trip to the apple store.

  • Problem after update 10.5.5 and coolbook

    Hi, i have a very big problem after update tp 10.5.5 in my macbook air.
    i do the update with coolbook active.... and when restart... the system dont pass over 800mhz at 50ºC and all the system go very slow.
    i tried to active again coolbook, restart, but coolbook dont work....
    so now i have that problem.... my 1,8 macbook air dont pass over 800 mhz...
    what can i do??

    I'm not familiar with Coolbook, so can't really offer any help there but, have you tried disabling on removing Coolbook to see how your Air runs?
    If the Air runs ok without Coolbook installed, there's your problem, if it still runs at a max of 800Mhz, contact Apple.

  • Problem with "Insufficient data for image" and embedded JPEG 2000 Images

    I frequently download pdf from the http://www.glorecords.blm.gov web site.  They are reporting a problem with Reader Reader 10.1.4 and the pdf files they have.
    "("Insufficient data for image" and embedded JPEG 2000 Images)"
    I am experiencing the same "Insufficient data for image" error when opening their downloaded pdf and viewing in ACROBAT X 10.1.4.
    Can someone address this please?
    Win 7 sp1

    Read this:
    http://blogs.adobe.com/dmcmahon/2012/08/21/acrobat-insufficient-data-for-an-image-error-af ter-updating-to-10-1-4-or-9-5-2/

  • Problem by opening Data Orchestration Admin and Monitoring Tool

    Hi all,
    Using SAP NetWeaver Mobile (7.1) only
    You can access the SAP NetWeaver Mobile Administrator through the DOE. To do this, you must log on to the DOE and choose Data Orchestration Engine ® Data Orchestration Admin and Monitoring Portal.
    When the Browser opened, i dont get any information, there comes "The page cannot be displayed"
    But under DOE SETUP AND REPAIR i have installed all packages.
    I have installed the SAP Netweaver AS ABAP 7.1 newly, so is there a step which i forget?
    i hope you can help me
    thanks
    hassan

    So i have activate all the services, but there comes the same page.
    There is no fault number...
    This is the url:
    http://sapnw71:0/sap/bc/webdynpro/sap/sdoe_administration?sap-client=000&sap-language=EN
    What is with this port? Could that be possible?
    The page looks like this...
    The page cannot be displayed
    The page you are looking for is currently unavailable. The Web site might be experiencing technical difficulties, or you may need to adjust your browser settings.
    Please try the following:
    Click the  Refresh button, or try again later.
    If you typed the page address in the Address bar, make sure that it is spelled correctly.
    To check your connection settings, click the Tools menu, and then click Internet Options. On the Connections tab, click Settings. The settings should match those provided by your local area network (LAN) administrator or Internet service provider (ISP).
    See if your Internet connection settings are being detected. You can set Microsoft Windows to examine your network and automatically discover network connection settings (if your network administrator has enabled this setting).
    Click the Tools menu, and then click Internet Options.
    On the Connections tab, click LAN Settings.
    Select Automatically detect settings, and then click OK.
    Some sites require 128-bit connection security. Click the Help menu and then click About Internet Explorer to determine what strength security you have installed.
    If you are trying to reach a secure site, make sure your Security settings can support it. Click the Tools menu, and then click Internet Options. On the Advanced tab, scroll to the Security section and check settings for SSL 2.0, SSL 3.0, TLS 1.0, PCT 1.0.
    Click the  Back button to try another link.
    Cannot find server or DNS Error
    Internet Explorer

Maybe you are looking for

  • Xcelsius 2008 - Unable to preview changes made in design mode

    Xcelsius 2008 - Unable to preview changes made in design mode I have installed Xcelsius 2008 (RTM) and also Service Pack 1 / Fix Pack 1.1.  Unfortunately, I can now not preview changes I made in design mode (but can see the change in design mode).  I

  • Why can't  I import a nested table?

    My Operation system is Win NT 4.0 (Package 6) data base is oracle 8.1.6 now, I craete a table TAB01 nested table TAB02NT. All operation such as delete ,insertion goes no well. I have export the table TAB01 without any warings and errors But a error o

  • "You have received a private message in the Lenovo Community!" enhaced message

    Hi. I think it's a good improvement to modify the current private message notification. A simple modification can do our life (in special, admins life) much more simple. Something like this will be fine, I guess: Email subject You have received a pri

  • IPhoto splitting events into individual files with long numbers as names?

    Okay so technical first.  I am running Mavericks with iPhoto version 9.5.1 on both my MacBook and iMac.  I have had minor problems/irritations with iphoto for awhile but recently upgraded to Mavericks and the problems increase.  I mainly use iPhoto f

  • Show a picture in a frame

    Please Is there somebody who's help me out? I'd like show a picture thats have an extension like .jpg, How Can I do this? My email is [email protected] or [email protected] Thanks.