Too many files open when parsing xml

HI,
I have an application which needs to parse about 13 XML files multiple times.After parsing the XML and creating a DOM I put in values to create an XML message which is then put onto a message queue.I am getting a 'Too many files open' problem.I have run the loop a maximum of 105 times after which i get the problem.However I will need to do this atleast more than 10000 times.Can someone suggest a solution to read the XML, create a DOM and populate the DOM without encountering the above mentioned problem.If I just parse the XML and store the 13 DOMs in a HashMap and use the same, the text values from the previous call get appended resulting in an invalid XML.To overcome this we parse the XML each time a message is to be sent.We also tried increasing the system memory as suggested at some sites but the solution was of no help.
Thanks & Regards

Don't know what this has to do with Web Start but you should make sure that, after parsing a file, the corresponding InputStream is properly closed.

Similar Messages

  • Photoshop CS6 error "could not complete ... too many files open. Try closing........." with 3D psd?

    Im working in a .psd file with multiple 3D layers. The file size totals at 356mb.
    When opening the file, I get this error: "could not complete your request because there are too many files open. Try closing some windows and try again." This doesn't any sense to me, as I was not experiencing any chugging when the file was open, and I am on a relatively fast system.
    Win 7 64bit
    Intel i7-2760QM @ 2.4GHz (8 CPU)
    16 gigs ram
    Nvidia GTX 560M (2752mb)

    Having the same issue on the Mac!
    Worked on a file yesterday, fairly big, but nothing that I haven't handled before... Only difference was the 3DS file I imported has over 270 textures.
    I think there is a limit on how many textures can be imported, essentially corrupting the file on save. It would be a lot more helpful to have Photoshop warn us that the 3D model is too complicated before we import it and save our work looking forward to finishing off the next day.
    I tried the same model again today, did nothing other than position it and render it, then saved, same error on opeing: "Could not complete your request because there are too many files open. Try closing some windows and try again."
    If anyone at Adobe would like to have a look ta the file the smaller version that I did today I can upload somewhere or send a YouSendIt.
    Cheers.

  • Photoshop CS5.1 Extended: Could not complete your request because there are too many Files Open

    I saved a file last night and now this morning I get an error message stating: "Photoshop CS5.1 Extended: Could not complete your request because there are too many Files Open. Try closing some windows and try again.". I've rebooted the system and made sure Photoshop was the only program running and that there were no other files open prior to trying to open my file. I increased Photoshops ram usage, checked the OpenGL settings, 3D and VRAM settings, cleared my temp files and am at a loss for opening this file.
    System Specs:
    Win 7 64
    6 core I7 processor
    32gb Ram
    3GB VRAM
    600gb free space on 7200 rpm drive
    File specs:
    1 3D object replicated maybe 5 times (yes, I should have rasterized them, and will do that to 4 of them if I get the file open)
    Maybe 8 textures
    Not sure how many total layers.
    Is there anyway to get Photoshop to reopen this file?

    No, more VRAM is useless. I had the same thought as you so I tried with a friend's computer with 3GB of VRAM for 8GB RAM (mine has 1GB VRAM for 16GB RAM). Still got the same error message. Sorry guys but our files are lost until Adobe fix the error in Photoshop code. I hope in the future they will find a way to either fix this error or give a clear limitation, it is really a shame such a dangerous problem exists and persists for more than 3 photoshop gen.
    Still you may be able to have at least a flat image of your latest file by trying to open the file as smart object. I started my work over by doing that. Not a lot but better than nothing.
    However for my new file I am trying something different : Each time I think a 3D file is final, I do not rasterize it but make it into a smart object and save the new smart object into a single separated .psd file. If any change is needed I can still edit all of my 3D objects by opening them separately. So far it works, the global file is lighter with few to no 3D objects inside but I will not say it is a 100% no-risk method yet.
    Last advice I can give everyone : Before closing the file you are working on, save it as a copy (File / Save as... and check 'As copy' in the options below) then with your main file still open, try to open the copy. You may need a lot of memory if your file is heavy but still if the dreaded error message appears when you try to open the copy then remove or rasterize some 3D objects in your main one. Save again as copy and try to open the copy until you do not get the message anymore.

  • Final Cut Express keeps stopping and saying "Too many files open"

    Final Cut Express keeps stopping and saying "Too many files open". I don't see how this is the case as I only have the one project open...

    Try here:
    http://www.fcpbook.com/Misc1.html
    Al

  • Sync fails in iTunes 9.0 & 9.01: "too many files open" and error -6999

    I've been trying to synch my iPod (Touch, g1) for the last couple weeks but have been getting errors ever since going to iTunes 9.0.
    First it blew my library and now says "Previous iTunes Libraries" at the top. Can live with that (after going through and reloading about 2/3s of the album artwork).
    But now am getting two errors every time I try to sync. One is, "Attempting to copy to the disk '[my iPod's name]' failed. There are too many files open currently."
    Elsewhere I saw it suggested for this error that I turn off sharing, but, alas, sharing isn't turned on.
    The second error message is, "The iPod '[my iPod's name]' cannot be synced. An unknown error occurred (-6999)." and I can't find any mention by Apple about what to do about this.
    HELP. Please.

    There has been some advice to turn off "sharing" to stop getting the "too many files open" error message, but, as noted in my question, sharing was already turned off in the iTunes Preferences.
    But, it turns out, of course, that there is another kind of sharing in the 9.x iTunes -- the one for sharing libraries on your local network. Don't know why they are different because the function seems the same, but I noticed that there was still an icon for "home sharing" or "house sharing" (little picture of a house) on the library/playlist list in iTunes.
    I right clicked on the house icon and found another checkbox switch there. I turned that one off too (Why Apple?) and, voila, the "too many files" error has (apparently) gone away.
    Hope this helps some others out there.
    Apparently you have to turn off sharing in two different places. (Again; why is that, Apple?)

  • CS3 Camera Raw Too Many Files Open at the Same time alert!!!

    Please help me. I keep getting this error message in Camera Raw that says there are too many files open at the same time - but I only have 100 open:( Please help - I was getting this error with CS2 and thought upgrading to CS3 would fix it and it didn't!!!

    > "10 or 100 - you can quickly go through a stack of images in ACR and make any desired changes you want. Whether making the same or similar adjustment to similar files, or making radically different adjustments to different images as appropriate".
    I've done this with far more than 100! I think my maximum is 425 raw files, invoking ACR from Bridge without Photoshop even loaded, and it worked well. (I've also done 115 JPEGs in order to crop them under extreme time constraints).
    It can be very slick. For example, if I use a ColorChecker a number of times in a shoot, it is easy to select just the set (perhaps 100 or so) that a particular ColorChecker shot applies to and set the WB for all of them.
    Furthermore, in case people don't know, you can set ratings on raw images while many of them are open in ACR. (Just click under the thumbnail). It isn't as powerful as Lightroom, but it is not to be dismissed.
    I suspect that it is possible to apply sensor-dust-healing to lots of images in the same way, and certainly it is easy to apply presets based on various selections.
    Perhaps with AMG (Adobe Media Gallery) it will be sensible to use the above capability to process 100s of raw files, then create a set of web pages for the best of them, in not much more time than it would have taken in Lightroom. I judge that Lightroom is the "proper" tool for the job (perhaps after 1.1!), but Bridge+ACR can go a long way.

  • Anyone know how to fix error message: word cannot complete too many files open

    anyone know how to fix error message: word cannot complete too many files open
    thanks
    Ronny

    First, take a look at this thread, toward the end of the second page:
    https://discussions.apple.com/thread/1449787?start=0&tstart=0
    Your ansswer is there, somewhere.
    Unfortunately, you've not provided enough system information to solve this.(The only info is that you use a MacBook Pro.) This issue may have been addressed in a prior version. Update your Support Communitees Profile to include your current hardware, system, and devices.

  • 8g touch updated 4.2.1, problems synching apps and music. gives multiple errors; device times out, internal device errors, network times out, duplicate file, too many files open. itunes diagnostics ok. what to do?

    have an 8g ipod touch which has had problems trying to play games and downloading update 4.2.1. went to the apple store who kindly downloaded the software update but now can't synch and generates multiple error messages; device times out, internal device error, network times out, duplicate file and too many files open etc etc. have latest i tunes download and diagnostic test ok. what can i do?

    Does the ext directory have the php_oci8.dll? In the original steps the PHP dir is renamed. In the given php.in the extension_dir looks like it has been updated correctly. Since PHP distributes php_oci8.dll by default I reckon there would be a very good chance that the problem was somewhere else. Since this is an old thread I don't think we'll get much value from speculation.
    -- cj

  • Too Many Files Opened

    All,
    I am running on Fedora Core 10 (2.6.27.21-170.2.56.fc10.x86_64) with Java 1.6.0_12-b04 (32-bit and 64-bit get the same issue) and am getting a "java.io.FileNotFoundException: ... (Too many open files)" error when running my unit tests. I have been very careful about placing things in a try { } finally { stream.close(); } block and can't figure out what is actually going wrong.
    The unit tests actually work fine on Windows XP, which points me to either Java or Linux itself.
    After doing some research online I found some articles and postings:
    - http://lj4newbies.blogspot.com/2007/04/too-many-open-files.html
    - http://www.mail-archive.com/[email protected]/msg15750.html
    - http://www.linuxforums.org/forum/redhat-fedora-linux-help/73419-we-facing-too-many-open-files-regularly.html
    However, is there anything else I can do within Java itself (using a VM argument, code "best practices" that I may be missing, etc. to combat this?
    My Linux core configuration as based on the articles are as follows:
    $ cat /proc/sys/fs/file-max
    564721
    $ ulimit -a
    core file size          (blocks, -c) 0
    data seg size           (kbytes, -d) unlimited
    scheduling priority             (-e) 0
    file size               (blocks, -f) unlimited
    pending signals                 (-i) 55296
    max locked memory       (kbytes, -l) 32
    max memory size         (kbytes, -m) unlimited
    open files                      (-n) 1024
    pipe size            (512 bytes, -p) 8
    POSIX message queues     (bytes, -q) 819200
    real-time priority              (-r) 0
    stack size              (kbytes, -s) 10240
    cpu time               (seconds, -t) unlimited
    max user processes              (-u) 1024
    virtual memory          (kbytes, -v) unlimited
    file locks                      (-x) unlimited

    tjacobs01 wrote:
    The unit tests actually work fine on Windows XP, which points me to either Java or Linux itself.OR another app on your linux machine that's got a lot of files open
    OR you installed java as yourself and not system and you don't have priveledges to open the files
    OR your code has a bug somewhere that doesn't effect running it on windows
    99.999% of the time, the problem is with you, not with Java or LinuxThis actually seems to be it. I rebooted the system into console mode to avoid X from loading. I then reset the JDK to be setup by root (I use the self-extracting, non-RPM version). When I ran the test suite via Ant here it did not show the problem. Therefore, I'm fairly convinced it is actually some other application eating up too many files.

  • Too Many Files Open Currently

    When I try to sync my iPod Touch 2G and there are a large number of files to sync/update (100+), I receive an error message that says "Attempting to copy to the disk "iPod Touch 2G" failed. There are too many files currently open."
    When I receive that message, I have to click OK and then restart my Airport Extreme (AE) via the Airport Utility. Before I restart the AE, I can still access the internet, but I cannot access the USB External Drive to which the AE is connected and which contains my iTunes library.
    It seems as though iTunes and the Airport Express are not communicating "nicely" and that something iTunes is doing is causing the Airport Express to "choke" on the data being synced. The network is hardwired/ethernet rather than wireless.
    This problem has occurred with both iPod touches in our house. I have tried uninstalling and reinstalling iTunes and Quicktime along with resetting both iPod Touches to their factory settings.
    Thanks in advance for any ideas you might have!

    turn off itunes sharing

  • My iphone 4s keeps saying to many files open when i try download an app

    when i try update my apps its saying to many files open but i have no open files!

    Try double tapping home button, hold down an app and wait till they wobble then tap all the red minus signs to close the apps and try again - it worked for me and I downloaded 4 app updates and a new app which didnt work before

  • Java.io.FileNotFoundException (Too many file open)

    Hi,
    I have an application wherein I have to open an XMl file, make amends to it and then write it back. It is possible that the same XML file be opened more than once. After processing lots of XMl files I get the following error:
    [java] java.io.FileNotFoundException: /nas/bansalp/app/databases/databases/IntActe_human_528_psimi.xml (Too many open files)
         [java]      at java.io.FileInputStream.open(Native Method)
         [java]      at java.io.FileInputStream.<init>(FileInputStream.java:106)
         [java]      at java.io.FileInputStream.<init>(FileInputStream.java:66)
         [java]      at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70)
         [java]      at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161)
         [java]      at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:653)
         [java]      at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:186)
         [java]      at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:771)
         [java]      at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
         [java]      at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
         [java]      at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:225)
         [java]      at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:283)
         [java]      at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:208)
         [java]      at alliance.dps.Commons.makedocument(Unknown Source)Code for makedocument is as follows:
    public static Document makedocument(File file) throws Exception
      Document response = null;
      DocumentBuilder builder = null;
      try
         DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();
         builder  = builderFactory.newDocumentBuilder();
         if (file==null)
          response = builder.newDocument();
         else
          response = builder.parse(file);
      catch(Exception e) { e.printStackTrace(); }
      return response;
    }Here also I am not explicitely opening any handle. parse method should close the file after creating a DOM tree.
    I would appreciate if someone could give me some directions as to what might be wrong.
    - Parit

    I'm finding that builder.parse(File) doesn't close the file. I now create a FileInputStream from the File and make sure I close it myself in a finally{} block.

  • Document contains too many nodes error when extracting xml tag name

    I Have a large xml file in which the tag contains ~: as the value.
    Now I am trying to extract all the tags which have ~: as the value and store that column using the following query and insert into a table.
    insert into space_md select distinct xmltype(extract(value(x), '/').getstringval()).getrootelement() COLUMN_NAME
    from gt_xmltype_tab gt, TABLE(XMLSequence(extract(gt.xmlfile1, '/ROWSET/ROW/*'))) x
    where instr(extract(value(x),'/').getstringval(),'~:') > 1;
    The xml file was generated using dbms_xmlgen.getxml. Table has 48 columns and around 4000 rows.
    My above insert query gave me an error of 31186 too many nodes error.
    I am using oracle version 10.2.0.3.
    Following are the set of commands I ran....
    SQL> insert into gt_xmltype_tab(xmlfile1)
    values(XMLType(bfilename('BKUP_RES','QC.xml'),nls_charset_id('AL32UTF8'))); 2
    1 row created.
    SQL> SQL>
    SQL> insert into restore_space_metadata select distinct 'QC', xmltype(extract(value(x), '/').getstringval()).getrootelement() COLUMN_NAME
    2 from gt_xmltype_tab gt, TABLE(XMLSequence(extract(gt.xmlfile1, '/ROWSET/ROW/*'))) x
    3 where instr(extract(value(x),'/').getstringval(),'~:') > 1;
    insert into restore_space_metadata select distinct 'QC', xmltype(extract(value(x), '/').getstringval()).getrootelement() COLUMN_NAME
    ERROR at line 1:
    ORA-31186: Document contains too many nodes
    Is there a better way of extracting the xml tag element name based on the xmltag content?
    There is one other table which has 172 columns but only 100 rows so it doesnt create any problem on that table.
    But this QC table has less columns but many many rows...
    Any suggestions

    There is a requiremnent of taking centain type of data backup and restore it.
    It was implemented on flat file approach which was giving errors.
    So it was implemented using XML approach.
    Read data, store in xml file and read from xml file and load it into table.
    Further, found that dbms_xmlstore is not able to handle tag only with whitespace
    and tried to use the loading xml file into xmltype table column and extract data.
    XMLTYPE column also has same problem of ignoring whitespace when used with extractvalue functions.
    So for the workaround I update xmlfile having only one more more whitespace in the tag to have ~: character once.
    After restoring data from xml to table I would run update qeury to update ~: to " ".
    Now instead of running blind update for all the tables and all the columns from ~: to " " I thouhgt whyy not create a xml file of tag having ~:
    along with its tablename.
    and thats where I found the problem of too many nodes...
    THe insert query you saw is populating table for table_name and column_name with tag having only ~: in it.
    I hope this gives you the fair idea of stuff I am doing.

  • Too Many Files Open (Errno: 24) - HP Unix server

    Hi All,
    We have many processes (nearly 30) running on HP unix server. Among these 30 processes, 10 processes runs for every 15 mins and transfer files between NT server and UNIX server.
    All these 10 processes are same processes. Only difference is, each one transfer files from/to different NT servers. During the file transfers, we are opening and closing the streams. But, we are not closing the file objects. Without closing the file objects, we are assigning NULL to the file objects after use. I read at many places that it is recommended to assign NULL to the file object as assigning null will be removed by garbage collector.
    Coming to the issue..... after our processes runs for 1 or days, we are getting an error saying "java.io.FileNotFoundException: Too many open files (errno:24)" and the corresponding process is going down.
    it seems, the setting specified to limit the file objects on UNIX server need to be increased. But, as we are closing all the streams, I don't think increasing the setting on UNIX will solve the problem.
    Could any of you throw some light on this and let me know if you already have come across this type of issue before?
    One more doubt I have is.... I read as ...... The file object limit set on UNIX is the sum of file objects as well as open sockets count. Do any can help me in letting me know what else will be considered as part of these fileobject count? I mean, whether the connection to DB from unix also are considered as part of these file object count?
    Thanks in advance and looking for your reply....
    Kamal

    Under Unix, sockets, named and unnamed pipes etc. all use file descriptors as teh open files.
    Unix systems usually provide the /proc pseudo file system.
    ls -l /proc/[process id]/fd
    might yield something interesting.
    total 31
    lr-x------ 1 oracle oinstall 64 Jan 3 12:01 0 -> /dev/null
    l-wx------ 1 oracle oinstall 64 Jan 3 12:01 1 -> /opt/oracle/product/AS/10g/R2/opmn/logs/OC4J~ebank~default_island~1
    l-wx------ 1 oracle oinstall 64 Jan 3 12:01 10 -> /opt/oracle/product/AS/10g/R2/j2ee/ebank/application-deployments/dev/ebank_default_island_1/application.log
    l-wx------ 1 oracle oinstall 64 Jan 3 12:01 11 -> /opt/oracle/product/AS/10g/R2/j2ee/ebank/application-deployments/dev-sme/ebank_default_island_1/application.log
    l-wx------ 1 oracle oinstall 64 Jan 3 12:01 12 -> /opt/oracle/product/AS/10g/R2/j2ee/ebank/application-deployments/dev-sme-fun/ebank_default_island_1/application.log
    l-wx------ 1 oracle oinstall 64 Jan 3 12:01 13 -> /opt/oracle/product/AS/10g/R2/j2ee/ebank/application-deployments/smea-dev/ebank_default_island_1/application.log
    l-wx------ 1 oracle oinstall 64 Jan 3 12:01 14 -> /opt/oracle/product/AS/10g/R2/j2ee/ebank/application-deployments/dev-noncash/ebank_default_island_1/application.log
    l-wx------ 1 oracle oinstall 64 Jan 3 12:01 15 -> /opt/oracle/product/AS/10g/R2/j2ee/ebank/application-deployments/fun-noncash/ebank_default_island_1/application.log
    l-wx------ 1 oracle oinstall 64 Jan 3 12:01 16 -> /opt/oracle/product/AS/10g/R2/j2ee/ebank/application-deployments/act-trambulin/ebank_default_island_1/application.log
    l-wx------ 1 oracle oinstall 64 Jan 3 12:01 17 -> /opt/oracle/product/AS/10g/R2/j2ee/ebank/application-deployments/ebank-dev/ebank_default_island_1/application.log (deleted)
    l-wx------ 1 oracle oinstall 64 Jan 3 12:01 18 -> /opt/oracle/product/AS/10g/R2/j2ee/ebank/log/ebank_default_island_1/default-web-access.log
    l-wx------ 1 oracle oinstall 64 Jan 3 12:01 19 -> /opt/oracle/product/AS/10g/R2/j2ee/ebank/log/ebank_default_island_1/jms.log
    l-wx------ 1 oracle oinstall 64 Jan 3 12:01 2 -> /opt/oracle/product/AS/10g/R2/opmn/logs/OC4J~ebank~default_island~1
    lrwx------ 1 oracle oinstall 64 Jan 3 12:01 20 -> socket:[2833421]
    lrwx------ 1 oracle oinstall 64 Jan 3 12:01 21 -> socket:[2833419]
    l-wx------ 1 oracle oinstall 64 Jan 3 12:01 22 -> /opt/oracle/product/AS/10g/R2/j2ee/ebank/log/ebank_default_island_1/rmi.log
    lrwx------ 1 oracle oinstall 64 Jan 3 12:01 23 -> socket:[2833423]
    lrwx------ 1 oracle oinstall 64 Jan 3 12:01 24 -> socket:[2833424]
    lrwx------ 1 oracle oinstall 64 Jan 3 12:01 25 -> socket:[2833425]
    l-wx------ 1 oracle oinstall 64 Jan 3 12:01 26 -> /opt/oracle/product/AS/10g/R2/j2ee/home/velocity.log
    lrwx------ 1 oracle oinstall 64 Jan 3 12:01 27 -> socket:[5553789]
    lrwx------ 1 oracle oinstall 64 Jan 3 12:01 28 -> socket:[5786563]
    lr-x------ 1 oracle oinstall 64 Jan 3 12:01 3 -> pipe:[2833350]
    lr-x------ 1 oracle oinstall 64 Jan 3 12:01 32 -> /proc/24214/stat
    lr-x------ 1 oracle oinstall 64 Jan 3 12:01 34 -> /dev/random
    l-wx------ 1 oracle oinstall 64 Jan 3 12:01 4 -> pipe:[2833350]
    l-wx------ 1 oracle oinstall 64 Jan 3 12:01 5 -> /opt/oracle/product/AS/10g/R2/j2ee/home/velocity.log
    l-wx------ 1 oracle oinstall 64 Jan 3 12:01 6 -> /opt/oracle/product/AS/10g/R2/j2ee/ebank/log/ebank_default_island_1/server.log
    lr-x------ 1 oracle oinstall 64 Jan 3 12:01 7 -> /proc/uptime
    l-wx------ 1 oracle oinstall 64 Jan 3 12:01 8 -> /opt/oracle/product/AS/10g/R2/j2ee/ebank/log/ebank_default_island_1/global-application.log
    l-wx------ 1 oracle oinstall 64 Jan 3 12:01 9 -> /opt/oracle/product/AS/10g/R2/j2ee/ebank/application-deployments/PaymentGatewayTestDevel/ebank_default_island_1/application.log

  • Financial Batch jobs were failing due to too many files opened

    1) This issue started after upgrading the OS from windows 2003 to 2008 and PeopleSoft from 8.49 patch 10 to 8.52 to patch 9

    I am also getting same kind of error
    Below is the error message:
    open of the file E:\Ftp\GL_IMP_571819.Log failed: Too many open files (2,633) GL_JRNL_IMP.PROCESS. GBLdefualt 1900-01-01.Import.On Execute PCPC:52127 statement:7333

Maybe you are looking for