JAXB on a never-ending stream.

Hi.
Would it be considered possible to use JAXB to parse a never-ending stream of XML? For instance...
<foo:foo xmlns="some:namespace">
    <bar> ... </bar>
    <bar> ... </bar>
    <bar> ... </bar>
    <bar> ... </bar>
    <bar> ... </bar>
    ... continues for eternity ...
</foo:foo>Each time I parse a chunk I want to get one 'bar' element only. Namespaces dropped into 'foo' would have to correctly affect these individual documents, so simply consuming the first bit of the stream and asking it to parse multiple times is probably the wrong approach. :-)
And of course somewhere I would need to output the damn things again, and again with correct namespaces. So maybe it is too hard afterall.

I'm not sure if this is what crowse was suggesting, but you could potentially use a SAXParser to get the discreet <bar></bar> events and pump that to an Unmarshaller to return objects to you. You'll want to turn off validation on the Unmarshaller, since you've already been through that once with the SAXParser.
If you're interested in parsing streaming XML using JAXB, another alternative is to alter your protocol so that your repeating element is a toplevel element. You can then prefix the element length to the XML. This should allow you to quickly find the end of the element without having to actively parse it. You can then feed that packet to the Unmarshaller.
-S

Similar Messages

  • After upgrading my MBP quad i7 (early 2011) to Mountain Lion I'm seeing a never ending stream of errors in the console

    that say:
    7/25/12 6:43:26.561 PM nfsd[137]: Can't export /private/var/xgrid/sfs: No such file or directory (2)

    ah I forgot to update. 
    Thanks for your help.  What I ended up doing was creating a directory called "sfs" in /private/var/xgrid/sfs and suddenly the problem went away

  • Exp never end !

    Hi,
    ORacle 8.1.7 on Windows 2k
    I try to export a tablespace which is transportable, there is no transport violations. I put it in read only mode. But when I export it, the export utility never end.
    Here's the command line :
    exp transport_tablespace=y tablespaces=(USERS) file=exp_users.dmp
    launch in user : sys as sysdba
    Thanks for help me. :))

    Read the documentation of Runtime.exec() very carefully. You may have a deadlock condition on one of the console streams (in, out, err).

  • Updated my iPhone 5 to ios7, in the App store after installing updates I now have a never ending list of the Apps I've updated.  How do I get rid of the list after they've been updated?  In the previous version I did not have an annoying permanent list.

    Updated my iPhone 5 to ios7, in the App store after installing updates I now have a never ending list of the Apps I've updated.  How do I get rid of the list after they've been updated?  In the previous version I did not have an annoying permanent list.

    iOS 7 allows you to have your apps update automatically. Therefore, the list of what has been updated stays so that you can see what was updated, when and what the release notes say. It has been suggested that they list has a limit, much like Recents. Currently, there is no way for the user to delete the entries manually. Just try not to look at them.

  • Loading plsql_proxy.jar takes so long..never ends

    Hello people,
    I´m deploying a proxy cliente using command,
    jpub -u SCOTT/SCOTT -sysuser SCOTT/SCOTT -proxywsdl=any_wsdl -endpoint=any
    then the executing process stay in Load plsql_proxy.jar for a long time. it looks like never ends.
    plsql_wrapper.sql
    plsql_dropper.sql
    plsql_grant.sql
    plsql_revoke.sql
    Executing plsql_dropper.sql
    Executing plsql_wrapper.sql
    loading sqlj/lib/dbwsclient.jar (about 5 minutes)...
    Loading plsql_proxy.jar......................
    the execution process looks like stopped at this here and doesn´t throw any exception.
    I´ll be grateful the soon answer.
    Rodius
    anybody knows how long takes the proxy client generation process?

    I have this issue also, with images from my D70 (~6 megapixels) ... no solution, except that when it happens, quitting and re-launching Aperture seems to clear it up for a while, at least until it happens again.
    Given that you have almost twice the RAM and four times the CPU cores that I have, I suspect this is a software issue, and not one of insufficient hardware resources.  :-)

  • I printed a 'preview' document and now it continues to print a never ending set of copies.  I have re-installed the printer software, but it still continues to print more copies.  What do I need to do to stop the document printing?

    I printed a 'preview' document and now it continues to print a never ending set of copies.  I have re-installed the printer software, but it still continues to print more copies.  What do I need to do to stop the document printing?

    Try resetting the printing system.
    1. Open System Preferences > Print & Fax
    2. Move your mouse over the Printers list
    3. Hold down the Control button and click the mouse
    4. Click the "Reset printing system ..." popup
    5. Restart your Mac
    This will remove your print queues but not your printer drivers. So you will only need to add your printer queues again.

  • I created a new administrator USER account. I deleted the original one but the process never ends. It's been 3 days now.

    I created a new administrator USER account. I deleted the original one but the process never ends. It's been 3 days now. And I can't close preferences window or turn off the computer.
    It's stays in the "deleting" but I can't cancel it or close the window.
    What can I do?

    Here are two screen shots to show you what I am seeing.  The first screen shot shows it allowing me to select (highlighted in blue) my admin user (which is what I am locced in as).  The second screen shot shows it allowing me to select the "Guest" user (highlighted in blue).  However when I click on the user "Orion" nothing happens.  It will not change to highlight that user.

  • Initial Time Machine Backup never ends

    Hi all folks,
    I try to backup my PB12 Disc (120 GB) to a external 500 GB Disc, connected via FW400, but the backup never ends, I think.
    The backup starts with 100MB/min but after 20h (80GB are store to a external Disc) it slow down to 1MB/min.
    With the "Activity Monitor" I see only some disc activities and a "mds" and "mdworker" process use some cpu time only (more than 10%).
    Where can I get some detail information, a log file, about the Time Machine activity from.
    Thanks for any help,
    Lutz

    Hi all folks,
    the initial Backup ends after 2 days (nice to to see, :-(),
    but on the boot volume I can go the time walk only.
    I split my disc into two partitions, sorry.
    Bye, Lutz
    p.s.
    With CCC I spend 4-6 hours to back up my disks only (100GB).

  • Mappings never ends

    Dear All,
    We are using 10.2 version of OWB and we have around 80 mappings in one module daily we are running the mappings parallel through control center for the time consuming (manually). but one mapping still running normally it takes 1:30 to 2:00 hrs time to finish but some times it is taken almost 5 to 6 hrs some times it never end. at that situation we stopped the mapping.but while we check the target table data is coming perfect.
    Let me know the cause of this and how to salve it.
    Thanks,

    Hi,
    When you kill the mapping from the Control Center the DB session which was triggered by mapping won't kill , you may see the session still running from Session Browser or any other way. This may be the reason you see the data in the Target table. to test this you may start regular running mapping and kill it from CC and observe the session from Database and you may see the data in the target table too.
    This may be one possibility. I am not saying what others say is wrong . I had experienced this issue before and i had to tune my code to get the mapping run consistent.
    Suresh

  • My icalendar data is on a never ending importing how do I get it to stop?

    My icalendar is on a never ending importing how do I get it to stop!

    Items purchased in an account a permanently associated with that account.  You cannot split accounts nor merge them.  You can log in with your family account and download items that way.  In the long run though, especially if you are using other Apple devices, you may encounter problems with authorization.  You should look into making new purchases with your own ID.

  • Ipod boot never end...

    Hi all,
    I have a big prob with my ipod photo 40GB : I tried to use it in disk mode to backup my hard disk, and during the copy the ipod gave a unknow error. Since this the ipod start the boot (white apple on black background) and never end, the boot restart every 5-10 secondes... no ipod on dekstop so no way to reinstall it with ipod updater. I tried the 5R but it still the same... Please help !!!
    Thanks in advance
    Phil

    I am experiencing the identical problem. I am hoping that if I drain the battery until it is completely dead it may force a "hard" reset which when charged again, it may start working properly.
    Let me know if you find anything out.

  • Suddenly never ending pinwheel and slower than usual

    My macbook pro suddenly started to get slow and gave me a never ending pinwheel while only having Safari running. The mouse was working but no response when clicking. Only way to restart computer was by holding down the Start button. Restarted and this time the computer hang up when I tried to Log in (while writing Login and password). I mangaged to Log in two more times but I got the pinwheel again when browsing internet. Finally I managed to make it to Support/Community.. any idea what's wrong?
    Thanks in advance (: !

    Print out these instructions and info at the links provided as most require you to be offline.
    Do a SMC and PRAM reset first, then a Hardware Test
    https://support.apple.com/kb/ht3964
    http://docs.info.apple.com/article.html?path=Mac/10.6/en/26871.html
    https://support.apple.com/kb/ht1509
    If the hardware test gives any errors, note them here.
    Check the time and date on your computer to make sure it's correct.
    If your still having slowdowns, pull the power plug on both the router and the modem, connect the modem and wait a bit then connect the router. Reboot your computer and it should connect automatically to your wifi. See if your slowdowns only occur if connecteted to the WiFI or not, that way it can be determined if it's a internet issue or not.
    (If your still having slowdowns, it might be because you have a Open Network on your router and someone is leaching off of it. WPA 2 with AES is the only secure wifi standard))
    You can test your internet connection speed here, see if it matches what your paying for.
    http://www.speedtest.net/
    IF your computer still has issues then:
    Fish out the 10.6.x disks that came with your computer (grey) or the 10.6.3 Snow Leopard retail disk, stick it in the computer and reboot holding the c key.
    (Make sure the disks are clean on the bottom, wipe with a very soft cloth and a tiny bit of rubbing alcohol to clean and don't place the disk on a harsh surface that can damage the bottom.)
    Second screen in, under the Utilities menu is Disk Utility, select your drive on the left and click First Aid, Repair Disk (please write down any errors this gives and tell us) and Repair Permissions (the results there you can ignore)
    Do not erase or reformat the drive.
    Reboot and see if your computer works, if not repeat the c boot off the installer disk again and this time skip Disk Utility and install OS X.
    It will install on top of your 10.6.8 installed version (only, not your programs or files), which when finished you reboot and immediately Software Update to 10.6.8
    This should take care of anything wrong with OS X itself.
    Now to clean the caches of the user and other checks.
    Download the free OnyX for 10.6 and run ALL the maintenance and cleaning aspects and reboot at the end of the tasks (you can cancel in between reboots) but reboot at the end of using Onyx)
    Do all the checks it asks when it starts up and note any errors here they report.
    Also under the Verify Tab is a Preference (plist) check, check the "show only corrupt files" and run that, make a note of all and any corrupt plist files.
    http://www.titanium.free.fr/
    Plist files are preference settings files that sometimes get corrupted and may be the cause of your problems.
    If you have some, then you can look in your Users/Library/Preferences folder for them and Trash them and reboot the machine and load the program responsible, the plist file gets rebuilt without your preferences which you reset.
    The next thing to check would be your web browser plug-ins here
    https://www.mozilla.org/en-US/plugincheck/
    For Flash in Safari check here again as it's more accurate
    http://flashbuilder.eu/flash-player-version.html
    Download Flash and install if it's not this version (latest)
    http://get.adobe.com/flashplayer/
    Silverlight here
    https://www.microsoft.com/getsilverlight/get-started/install/default.aspx
    Finally install and run ClamXAv on your drive, this will look for known malware that might have gotten accidentally installed.
    http://www.clamxav.com/
    Since OS X was reinstalled, along with bundled programs like Safari, this should only leave applications and users as a source of any infection.
    If your stil having issues, then create a new user and transfer your files over and when up on the new user, delete it.

  • D10, boot problems, a never ending fan test!

    I hate this noisy fan test!!! My dog always panics, if it is in the room! But that's not the problem.
    If I switch on the external mains, the fan test starts and ends after some ten seconds.
    If I push the switch at the front of the maschine, the fan test starts and - sometimes - never ends. In this case, the maschine - obviously - will not boot. What to do? - Repeat the procedure. Sometimes I need 10 or more attempts to boot the maschine.
    Now I found (shortly before I decided to bring the maschine back to the dealer): The fan test succeeds nearly every time (and the maschine will boot), if I switch off all the external USB-devices (5 disks, WLAN-stick, memory stick, etc).
    My questions:
    what's going wrong with the fan test at my maschine?
    is it possible to skip this crazy fan test?
    Thanks for your help!
    Lenovo PC Think Station D10 6427-H6G, Windows XP

    regarding the fan test, this cannot be disabled.   thinkstations are designed for 24/7 uptime just like servers and the BIOS tests the fans at every boot/reboot.   since there isn't much reason to turn these systems off or put them asleep, the best workaround is to leave your D10 running 24/7 as it was designed to do.   mine only gets rebooted for windows updates, software updates, or video driver updates.   otherwise, it's up 24/7/365.
    regarding the fans getting stuck, update your BIOS.   the latest version can be found here.
    also, if you put your system to sleep, be sure to wake it with the power button and not your keyboard.   a few users have reported their fans getting stuck when waking with their keyboards.   i'm not aware of the issue happening when using the power button.
    ThinkStation C20
    ThinkPad X1C · X220 · X60T · s30 · 600

  • Sync never ends Error 4001

    hello, i have the problem that my itunes match never ends the sync.
    It runs always in a loop
    Itunes is in german
    I found a lot of solutions with the alt key, deactivate and activate Itunes Match and other, but nothing help.
    have anyone a idea what i can do??
    Udo

    I ended up calling Apple, and they had me completely reformat the iPod. This seemed to fix the problem.

  • Sync never ends

    I have a new 32mb Touch. I originally synced it while on vacation with PC #1, and it worked perfectly. Now I am home, and I have attempted to sync it with PC #2.
    I tried several times to sync to PC #2, and each time it would successfully transfer all (or most) of my media, but the sync process would never end.
    I am using iTunes 7.6.1.9, and my Touch is version 1.1.3 with Software Upgrade.
    I even went so far as to do a total restore of the Touch, but this doesn't seem to fix the problem.
    Any advice would be appreciated.

    I ended up calling Apple, and they had me completely reformat the iPod. This seemed to fix the problem.

Maybe you are looking for

  • HP Laserjet 1018 does not print (Vista)

    Hi, I've had the HP Laserjet 1018 for about 2 years and have been a very happy customer. Recently I upgraded to Windows 7 and have been using it without trouble for a few months. Just a few days ago I started having some spooler problems on Windows 7

  • How to make report for last 24 hours?

    Hello, I have a little problem, I can't make report for last 24 hours. Example: If I am running report on 2.1.06 at 14:00, I want to get results from 1.1.06 14:00 to 2.1.06 14:00. How do i make a report with this selection? Because,if I choose date f

  • Using Sun Java System App Server Update 1 with JDK1.5's XML

    Hi, I have some new code that uses new XML features from JDK 1.5, e.g., the Validation API. However, this code fails to run on Sun Java System App Server Update 1, since the server uses the 'endorsed' mechanism to load outdated XML libraries. When I

  • Content-Type problems

    Hi, Can anyone tell me the difference in application/x-www-form-encoded and application/x-www-form-urlencoded content types in HTTP ? Thanks in advance!

  • On my mouse when I scroll up it goes down and vice versa?

    I just updated my mac and now on my mouse (which was fine before) when i scroll up it goes down and when i scroll down it goes up?