Unable to read 2 GB file??

I want to read a text file of size Max upto 200 GB.
I tried with BufferedReader -- > it give error "out of memory " the moment i call readLine() method.
I tried to read stream character by character but still give error once file size increaese to 150MB.
I tried to broke the file and try to read the file But the again after reading the 4 file each of 40 MB it again broke "Out Of memory"
I am totally stuck.
I dont know how to go ahead can any one help me out in same ?
Note i need to maintain the count of URLs in the text file ??
Please help me out.

Hi JoachimSauer ,
Thanks for your reply..
My task is to read the file and extract URLs and the count the repetitions.
The file which i am using is can be 1 GB.
yes it has newline charachter.
Actually when i tried to read char by char i made a method which returning me the line ::
please see readLine method
public class FileChunkReading {
private FileInputStream in;
private StringBuffer buf = new StringBuffer();
public FileChunkReading(String fileName) throws FileNotFoundException {
in = new FileInputStream(fileName);
{color:#0000ff}public String readLine() throws IOException {
int c;
buf.setLength(0);
buf.setLength(1024);
c = in.read();
if(c == -1){
return null;
while (c != -1) {
if ((char)c == '\n')
return buf.toString();
else
buf.append((char) c);
c = in.read();
return buf.toString();
}{color}
public void closeFile() throws IOException {
in.close();
//// Now this read line method is used to reading one line at a time.
Now i had made a class which is using instance of this class.
when it run after few minutes give out memory exception !
The other class which is using it is as follows :
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
class FileURLSearch {
     private FileChunkReading fcr = null;
     private String searchTypes[] = {".jsp", ".htm" ,".html",".pl"};
     private HashMap <String,Integer>urlMap = new HashMap<String,Integer>();
     public FileURLSearch(String fileName) throws FileNotFoundException {
          fcr = new FileChunkReading(fileName);
     public Map getURLList() throws IOException {
               String currentLine = null;
               while((currentLine = fcr.readLine()) != null) {
                    String url = extractURL(currentLine );
                    if(url != null && url !="") {
                         String urls[] = url.split(";");
                         for(int i = 0 ; i < urls.length ; i++){
                              if(urlMap.containsKey(urls)){
                                   urlMap.put(urls[i], (Integer)urlMap.get(urls[i]) + 1);
                              }else{
                                   urlMap.put(urls[i], 1);
          return urlMap;
     //it might be possible the current url is extended till previous line
     private String extractURL(String currentLine ) {
          StringBuffer sb = new StringBuffer();
          int startIndex = 0;
          for(String st : searchTypes){
               while( (startIndex = currentLine.indexOf(st , startIndex))!=-1){
                    //backtrack
                    int urlStartIndex = backTrackURL(currentLine , startIndex);
                    startIndex += 3;
                    int urlEndIndex = startIndex;
                    //forwardtrack
                    if(currentLine.charAt(++startIndex) == '?'){
                         urlEndIndex = forwardTracking(currentLine ,startIndex);
                    sb.append(currentLine.substring(urlStartIndex, urlEndIndex));
                    sb.append(";");
          return sb.toString();
     // return end index
     private int forwardTracking(String currentLine ,int startIndex){
          return minValue(currentLine.indexOf(';',startIndex) ,currentLine.indexOf(' ',startIndex) ,currentLine.indexOf('"',startIndex))+1;
     //return start index
     private int backTrackURL(String currentLine ,int endIndex) {
          return maxValue(currentLine.lastIndexOf(';',endIndex) ,currentLine.lastIndexOf(' ',endIndex) ,currentLine.lastIndexOf('"',endIndex))+1;
     private int maxValue(int val1 , int val2 , int val3) {
          return (val1 > val2) ? ((val1 > val3)? val1 : val3 ) : ((val2 > val3) ? val2 : val3);
     private int minValue(int val1 , int val2 , int val3) {
          return (val1 < val2) ? ((val1 < val3)? val1 : val3 ) : ((val2 < val3) ? val2 : val3);
public class FileReaderDemo {
     public static void main(String[] args) throws IOException {
          FileURLSearch fus = null;
          try {//commmand line argument sort of
               fus = new FileURLSearch("testLogFile.log");
          } catch (FileNotFoundException e) {
               e.printStackTrace();
          long startTime = System.currentTimeMillis();
          Map map =fus.getURLList();
          System.out.println(" URL Found : "+map.size());
          System.out.println(" URL Found : "+map);
          System.out.println("time taken : " + ((System.currentTimeMillis() - startTime)/1000) +" seconds" );
Please suggest where i am going wrong .
Thanks in Advance.
Edited by: zuned on Jul 22, 2010 5:16 AM

Similar Messages

  • Error: Unable to read footer file

    Hoping someone out there can help me. I get this error on
    everypage in my site and have no idea how to stop it.
    Error: Unable to read footer file
    The error does not show up when I preview inside dreamweaver
    but only rears its ugly head after I post the site up on the
    internet. I have searched for hours through the Dreamweaver menus
    and can not find these elusive footers and have no idea where they
    are coming from or what footer file it is trying to read.. Please
    help. This probably has a simple solution and I am just not able to
    understand it. Thank you.

    sdrouillard wrote:
    > This probably has a simple solution and I am just not
    able to understand
    > it.
    Possibly, but without a URL we can't comment. Post it, and
    we'll see.
    At a guess, sounds like an include file is missing. Are you
    on some sort of
    free hosting plan where the host puts some adverts in the
    footer? If that
    file is removed from your site directory you might get the
    error you've
    mentioned (at least, that was the case on the only other time
    I've seen this
    error)
    Regards,
    Pete.
    Peter Connolly
    http://www.acutecomputing.co.uk
    Derby
    UK
    Skype ID: acutecomputing

  • RMAN unable to read backupset file during Cloning

    Hi,
    I'm performing cloning operation on windows to windows. On target I have taken backup through rman using recovery catalog. I've taken fresh backup of database along with archivelogs and delete the obsoleted one using rman recovery catalog repository.
    When I connect to Target,Recovery catalog and auxiliary instance after executing some commands RMAN gives error that it is unable to read backupset file. What could be the reason for this. I'm posting the Error Portion of RMAN listing please see it and tell me what could be the reasons as I have taken fresh backups and it seems that it is unable to read that particular backup.
    channel ORA_AUX_DISK_1: reading from backup piece C:\ORACLEBASE\PRODUCT\10.2.0\F
    LASH_RECOVERY_AREA\ORCL\BACKUPSET\2010_09_27\O1_MF_NNNDF_TAG20100927T125050_6B0M
    6YLD_.BKP
    ORA-19870: error reading backup piece C:\ORACLEBASE\PRODUCT\10.2.0\FLASH_RECOVER
    Y_AREA\ORCL\BACKUPSET\2010_09_27\O1_MF_NNNDF_TAG20100927T125050_6B0M6YLD_.BKP
    ORA-19505: failed to identify file "C:\ORACLEBASE\PRODUCT\10.2.0\FLASH_RECOVERY_
    AREA\ORCL\BACKUPSET\2010_09_27\O1_MF_NNNDF_TAG20100927T125050_6B0M6YLD_.BKP"
    ORA-27041: unable to open file
    OSD-04002: unable to open file
    O/S-Error: (OS 3) The system cannot find the path specified
    failover to previous backup
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of Duplicate Db command at 09/27/2010 13:17:22
    RMAN-03015: error occurred in stored script Memory Script
    RMAN-06026: some targets not found - aborting restore
    RMAN-06023: no backup or copy of datafile 6 found to restore
    RMAN-06023: no backup or copy of datafile 5 found to restore
    RMAN-06023: no backup or copy of datafile 4 found to restore
    RMAN-06023: no backup or copy of datafile 3 found to restore
    RMAN-06023: no backup or copy of datafile 2 found to restore
    RMAN-06023: no backup or copy of datafile 1 found to restore
    RMAN>
    Please help me in this matter.
    Regards,
    Abbasi

    If your RMAN backup exist on target server path.
    Target Server: C:\Oracle\RMAN_BACKUP\
    Put it on the same location in the auxiliary server.
    Auxiliary Server: C:\Oracle\RMAN_BACKUP\
    During cloning also connect with your recovery catalog as you are using recover catalog for the target server.
    Regards
    Asif Kabir
    Edited by: asifkabirdba on Sep 27, 2010 2:51 PM

  • Unable to read multiple files in BODS

    hi all,
    i am unable to read multiple files [with same format of fields] using wild card characters in file name.
    scenario:
    i have 2 files: test1.xlsx & test2.xlsx
    in the excel file format, for the file name column, i have given test*.xlsx.
    and done the direct mapping to target column.
    but when i run the job i am getting below error.
    at com.acta.adapter.msexceladapter.MSExcelAdapterReadTable.ReadAllRows(MSExcelAdapterReadTable.java:1242)
    at com.acta.adapter.msexceladapter.MSExcelAdapterReadTable.readNext(MSExcelAdapterReadTable.java:1285)
    at com.acta.adapter.sdk.StreamListener.handleBrokerMessage(StreamListener.java:151)
    at com.acta.brokerclient.BrokerClient.handleMessage(BrokerClient.java:448)
    at com.acta.brokerclient.BrokerClient.access$100(BrokerClient.java:53)
    at com.acta.brokerclient.BrokerClient$MessageHandler.run(BrokerClient.java:1600)
    at com.acta.brokerclient.ThreadPool$PoolThread.run(ThreadPool.java:100)
    please let me know if there is any solution to this.
    regards,
    Swetha

    Hi,
    i just copied a xlsx file with 3 different names (Test_Data.xlsx, Test_1.xlsx, Test_2.xlsx) and tried with below options and it worked for me.
    Note: I tried on the same OS and DS 4.1 SP2(14.1.2.378)versions. In Linux File names are case sensitive.

  • Store Critical: Unable to read index file for user/mailtest: System I/O err

    more imap
    [27/Nov/2007:13:36:52 +0800] e69-1-c imapd[5984]: Store Critical: Unable to read index file for user/mailtest: System I/O error. Administrator, check server log for details.
    [27/Nov/2007:13:36:52 +0800] e69-1-c imapd[5984]: Store Critical: Unable to read index file for user/mailtest/&V4NXPnux-: System I/O error. Administrator, check server log for details.
    [27/Nov/2007:13:36:52 +0800] e69-1-c imapd[5984]: Store Critical: Unable to read index file for user/mailtest/&XfJT0ZAB-: System I/O error. Administrator, check server log for details.
    [27/Nov/2007:13:36:52 +0800] e69-1-c imapd[5984]: Store Critical: Unable to read index file for user/mailtest/&g0l6Pw-: System I/O error. Administrator, check server log for details.
    [27/Nov/2007:13:36:52 +0800] e69-1-c imapd[5984]: Store Critical: Unable to read index file for user/mailtest/test: System I/O error. Administrator, check server log for details.
    [27/Nov/2007:13:36:52 +0800] e69-1-c imapd[5984]: Store Critical: Unable to read index file for user/mailtest: System I/O error. Administrator, check server log for details.
    [27/Nov/2007:13:36:54 +0800] e69-1-c imapd[5984]: Store Critical: Unable to read index file for user/mailtest: System I/O error. Administrator, check server log for details.
    [27/Nov/2007:13:36:54 +0800] e69-1-c imapd[5984]: Store Critical: Unable to read index file for user/mailtest/&V4NXPnux-: System I/O error. Administrator, check server log for details.
    [27/Nov/2007:13:36:54 +0800] e69-1-c imapd[5984]: Store Critical: Unable to read index file for user/mailtest/&XfJT0ZAB-: System I/O error. Administrator, check server log for details.
    [27/Nov/2007:13:36:54 +0800] e69-1-c imapd[5984]: Store Critical: Unable to read index file for user/mailtest/&g0l6Pw-: System I/O error. Administrator, check server log for details.
    [27/Nov/2007:13:36:54 +0800] e69-1-c imapd[5984]: Store Critical: Unable to read index file for user/mailtest/test: System I/O error. Administrator, check server log for details.
    [27/Nov/2007:13:36:58 +0800] e69-1-c imapd[5984]: Store Critical: Unable to read index file for user/mailtest: System I/O error. Administrator, check server log for details.
    [27/Nov/2007:13:37:00 +0800] e69-1-c imapd[5984]: Store Critical: Unable to read index file for user/mailtest: System I/O error. Administrator, check server log for details.
    [27/Nov/2007:13:37:00 +0800] e69-1-c imapd[5984]: Store Critical: Unable to read index file for user/mailtest/&V4NXPnux-: System I/O error. Administrator, check server log for details.
    [27/Nov/2007:13:37:00 +0800] e69-1-c imapd[5984]: Store Critical: Unable to read index file for user/mailtest/&XfJT0ZAB-: System I/O error. Administrator, check server log for details.
    [27/Nov/2007:13:37:00 +0800] e69-1-c imapd[5984]: Store Critical: Unable to read index file for user/mailtest/&g0l6Pw-: System I/O error. Administrator, check server log for details.
    [27/Nov/2007:13:37:00 +0800] e69-1-c imapd[5984]: Store Critical: Unable to read index file for user/mailtest/test: System I/O error. Administrator, check server log for details.

    whr25 wrote:
    root@e69-1-c # ./imsimta version
    Sun Java(tm) System Messaging Server 6.3-0.15 (built Feb 9 2007)
    libimta.so 6.3-0.15 (built 19:27:56, Feb 9 2007)
    SunOS e69-1-c 5.10 Generic_118833-24 sun4u sparc SUNW,Sun-FireThis is an old release of 6.3, you should be planning to upgrade to proactivly prevent known bugs.
    prstat
    2255 mailsrv 407M 310M sleep 59 0 0:00:44 0.0% imapd/3Not 3GB. Of course if you had just restarted messaging server as you noted below then that isn't unexpected.
    I'm restart Messaging Server,I't is not problem
    This issue is about two days after the RuningWhen the problem does occur what is the prstat output? The size of the imapd processes will increase over-time depending on the number of people accessing the store via IMAP, and the size of the mailboxes (store.idx files) they are accessing.
    Regards,
    Shane.

  • In HTTP log:  Store Critical: Unable to read index file for user/ uid

    All:
    Sun Java(tm) System Messaging Server 6.2-7.05 (built Sep 5 2006)
    libimta.so 6.2-7.05 (built 12:18:44, Sep 5 2006)
    We recently have started to see the following errors in our http logs:
    [01/Mar/2007:13:03:43 -0500] httpd[5174]: Store Critical: Unable to read index file for user/<uid>: System I/O error. Administrator, check server log for details.
    It's occurring a couple of different times during the day to certain users. Then it won't happen for days to anyone, but then start up again. I saw a similar thread to this re: IMAP and I'm curious if http could be having the same problem. We increased the number of process of http (from 2 to 4 a few months ago) but kept the same maxsessions (6000), so maybe I need to change the maxsession to something lower? We only started to see the I/O error two weeks ago We're not seeing the error in imap logs. Also there's no errors in the default log related to the users that receive this in http.
    I'm planning on running a reconstruct -m in the mean time to see if that helps. There have been no changes to the server or application for quite some time. Any thoughts?

    Yes, http can have the same issue. Yes, lowering the maxsessions from 6000 is the answer, IF it's the same problem. Likely, but not guranteed.
    If you actually look at the store.idx for that particular user, what do you see? Is it near 2 gig? If so, then the user needs to either delete some messages or move some to another folder, as 2 gig is the limit for the store.idx file.....
    jay

  • Unable to read PDF files created by FTP Adapter

    Hi,
    I am unable to read pdf files generated by FTP Adapter with its default settings.
    Can anybody guide me how to proceed with it. I guess I need to change something in encoding mechanism in FTP Adapter Outbound Connection Pool, but not sure what has to be.
    Thanks,
    Richa

    Hi all,
    I have got its solution. I was unable to read .pdf files because FTP adapter  was sending the files just by changing the extension from .txt /.xml to .pdf that is the reason that it was not readable.
    We had to write an java code to convert .xml file to .pdf file and then paas it to FTP ADapter.
    Thanks

  • AC-00402: Unable to read driver file  While CLONING

    Hi All
    We are running EBS 11.5.10. When I try to clone PROD to TEST instance running adcfgclone it shows below error.
    oratest@devh:/d02/oratest/testdb/9.2.0/appsutil/clone/bin>perl adcfgclone.pl dbTier
    Enter the APPS password [APPS]:
    apps
    First Creating a new context file for the cloned system.
    The program is going to ask you for information about the new system:
    Provide the values required for creation of the new Database Context file.
    Do you want to use a virtual hostname for the target node (y/n) [n] ?:
    Target instance is a Real Application Cluster (RAC) instance (y/n) [n]:
    Target System database name [PROD]:TESTH
    Target system domain name [axis-solutions.net]:
    Target system RDBMS ORACLE_HOME directory [d01/oraprod/proddb/9.2.0]:/d02/oratest/testdb/9.2.0
    Target system utl_file accessible directories list [usr/tmp]:
    Number of DATA_TOP's on the target system [4]:1
    Target system DATA_TOP 1:/d02/oratest/testdata
    Do you want to preserve the Display set to prodh:1.0 (y/n) [y] ?:n
    Target system Display [devh:0.0]:
    Do you want to preserve the port values from the source system on the target system (y/n) [y] ?:n
    Clone Context uses the same port pool mechanism as the Rapid Install
    Once you choose a port pool, Clone Context will validate the port availability.
    Enter the port pool number [0-99]:
    1
    Checking the port pool 1
    done: Port Pool 1 is free
    Database port is 1522
    Backing up /d02/oratest/testdb/9.2.0/appsutil/TESTH_devh.xml to /d02/oratest/testdb/9.2.0/appsutil/TESTH_devh.xml1.bak
    Creating the new Database Context file from :
    /d02/oratest/testdb/9.2.0/appsutil/template/adxdbctx.tmp
    The new database context file has been created :
    /d02/oratest/testdb/9.2.0/appsutil/TESTH_devh.xml
    Log file located at /tmp/CloneContext_03101204.log
    Running Rapid Clone with command:
    perl /d02/oratest/testdb/9.2.0/appsutil/clone/bin/adclone.pl java=/d02/oratest/testdb/9.2.0/appsutil/clone/bin/../jre mode=apply stage=/d02/oratest/testdb/9.2.0/appsutil/clone/bin/.. component=dbTier method=CUSTOM dbctxtg=/d02/oratest/testdb/9.2.0/appsutil/TESTH_devh.xml showProgress contextValidated=true
    Beginning database tier Apply - Thu Mar 10 12:05:08 2011
    Log file located at /d02/oratest/testdb/9.2.0/appsutil/log/TESTH_devh/ApplyDBTier_03101205.log
    / 50% completed AC-00402: Unable to read driver file: /d02/oratest/testdb/9.2.0/appsutil/clone/bin/../data/driver/data.drv
    ERROR while running Apply...
    ERROR: Failed to execute /d02/oratest/testdb/9.2.0/appsutil/clone/bin/adclone.pl

    Hi
    I checked the logfile. Its shows below mentioned errors
    DEBUG: checkDBConnection in()
    ADX Database Utility
    getConnection() -->
    sDbHost : devh
    sDbDomain : axis-solutions.net
    sDbPort : 1522
    sDbSid : TESTH
    sDbUser : APPS
    Trying to connect using SID...
    getConnectionUsingSID() -->
    JDBC URL: jdbc:oracle:thin:@devh.axis-solutions.net:1522:TESTH
    Exception occurred: java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
    Trying to connect using SID as ServiceName
    getConnectionUsingServiceName() -->
    JDBC URL: jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=devh.axis-solutions.net)(PORT=1522))(CONNECT_DATA=(SERVICE_NAME=TESTH)))
    Exception occurred: java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
    Trying to connect using SID as ServiceName.DomainName
    getConnectionUsingServiceName() -->
    JDBC URL: jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=devh.axis-solutions.net)(PORT=1522))(CONNECT_DATA=(SERVICE_NAME=TESTH.axis-solutions.net)))
    Exception occurred: java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
    Connection could not be obtained; returning null
    -------------------ADX Database Utility Finished---------------
    RC-40201: Unable to connect to Database TESTH.
    StackTrace:
    java.lang.Exception: Cannot connect to database using DBUtil
    at oracle.apps.ad.clone.ApplyDatabase.checkDBConnection(ApplyDatabase.java:3398)
    at oracle.apps.ad.clone.ApplyDatabase.<init>(ApplyDatabase.java:524)
    at oracle.apps.ad.clone.ApplyDatabase.<init>(ApplyDatabase.java:328)
    at oracle.apps.ad.clone.ApplyDatabase.<init>(ApplyDatabase.java:304)
    at oracle.apps.ad.clone.ApplyDBTier.<init>(ApplyDBTier.java:154)
    at java.lang.reflect.Constructor.newInstance(Native Method)
    at oracle.apps.ad.clone.util.CloneProcessor.run(CloneProcessor.java:68)
    at java.lang.Thread.run(Thread.java:484)
    DEBUG: checkDBConnection out()
    Executing runInstallDriver...

  • AC-00402: Unable to read driver file

    Hi All,
    os: OUL5x64
    db:11g r1 11.1.0.7
    upgrade to 12.1.3 from 12.1.1
    the last step was upgraded java jdk to version 6 update 26 then run
    Then running this command from appTier
    perl <AD_TOP>/bin/admkappsutil.pl
    then move the appsutil.zip to DB tier and unzip
    unzip -o appsutil.zip
    BUT WHEN RUN adautoconfig on dbtier always got this error.
    the adautocfg.sh in appTier was fine.
    Can you give some suggestion as what was wrong here?
    Thanks in advance.
    Regards,
    [oracle@db1 TEST_db1]$ ./adautocfg.sh
    Enter the APPS user password:
    The log file for this session is located at: /u01/app/oracle/product/11.1.0/TEST/appsutil/log/TEST_db1/09071651/adconfig.log
    AutoConfig is configuring the Database environment...
    AutoConfig will consider the custom templates if present.
    Using ORACLE_HOME location : /u01/app/oracle/product/11.1.0/TEST
    Classpath : :/u01/app/oracle/product/11.1.0/TEST/jdbc/lib/ojdbc6.jar:/u01/app/oracle/product/11.1.0/TEST/appsutil/java/xmlparserv2.jar:/u01/app/oracle/product/11.1.0/TEST/appsutil/java:/u01/app/oracle/product/11.1.0/TEST/jlib/netcfg.jar:/u01/app/oracle/product/11.1.0/TEST/jlib/ldapjclnt11.jar
    AC-00402: Unable to read driver file: /u01/app/oracle/product/11.1.0/TEST/appsutil/template/addbtmpl.drv
    ERROR: Version Conflicts utility failed.
    Terminate.
    The logfile for this session is located at: /u01/app/oracle/product/11.1.0/TEST/appsutil/log/TEST_db1/09071651/adconfig.log

    Sorry, i found the error
    this was permission error.
    Thanks,

  • I am unable to read PDF files on my system.

    I am unable to read PDF files on my system. Need immediate help. Thanks

    DeepakSS wrote:
    It said that 11 is not compatible to my system.
    What exactly is "it"; can you post a screenshot of that?
    Other things you can try...
    Using Windows Explorer navigate to C:\Program Files (x86)\Adobe\Reader 11.0\Reader, then double-click on Eula.exe and accept the license agreement
    Can you open Adobe Reader by itself?  If so, try disabling Protected Mode [Edit | Preferences | Security (Enhanced)].
    If you cannot open Reader by itself, try to disable Protected Mode in the registry; download, unzip, then run the attached registry script
    It could even be a malware issue; see http://helpx.adobe.com/acrobat/kb/reader-core-dll-error.html
    ...or wait and see if the next Reader version fixes the problem (likely to be released later today).

  • Unable to read the file using UTL_FILE Dir

    I need to read/write a file from/to the operating system through PLSQL Package. I used UTL_FILE package to do the same. In the application server the utl_file_dir(/usr/tmp in my system) is created as a softlink to database server.
    oI want to run this package through the application server. However I am unable to read and write the file to the operating system.
    I just wondering it is not reading/opening the file from the server. Please suggest me how to modify my code.

    Hi,
    How to check if it is end of file or not? I have the following function which is working fine in my win2003 server std 32bit and Oracle10g Database R2 Standard Edition one 32bit. HOwever, when I deploy to production server which is 64bit OS and database, it gives error at UTL_FILE.GET_LINE(fptr, tmp);
    Any idea why it behaves like that?
         FUNCTION readFile (
              inHTML OUT CLOB,
              path IN VARCHAR2,
              htmlFile IN VARCHAR2
         ) RETURN BOOLEAN IS
         fptr utl_file.file_type;
         tmp VARCHAR2(5023);
         bufferlen BINARY_INTEGER;
         BEGIN
              fptr := UTL_FILE.FOPEN(path, htmlFile, 'r');
              DBMS_LOB.CREATETEMPORARY(inHTML, TRUE);
              DBMS_LOB.OPEN(inHTML, DBMS_LOB.LOB_READWRITE);
              LOOP
                   UTL_FILE.GET_LINE(fptr, tmp);
                   if tmp is not null then
                        tmp := tmp || CHR(10);
                        bufferlen := LENGTH(tmp);
                        DBMS_LOB.WRITEAPPEND(inHTML, bufferlen, tmp);
                   end if;
              END LOOP;
              WHEN NO_DATA_FOUND THEN
              DBMS_LOB.CLOSE(inHTML);
                   UTL_FILE.FCLOSE(fptr);
                   RETURN TRUE;
              WHEN OTHERS THEN
                   DBMS_LOB.CLOSE(inHTML);
                   DBMS_LOB.FREETEMPORARY(inHTML);
                   RETURN FALSE;
         END readFile;

  • Unable to read the file in excel..

    Hi all,
    I created a report.for this report It was an excel template. when I click on view button I am getting an error Unable to read file.
    I checked my query in database it retrieving 43000 records.
    When I am going for rownum<1000 my report is giving successful results.But when I am removing that condition in where clause I am getting error Unable to read file.
    Can any one pls help in this.....
    Thanks,
    KSS.

    Not that this really answers your question but... 45K records seems like a lot of data. Perhaps you need to add some conditions to your SQL to limit the records to a more manageable size and make the results more relevant to the task. Just an opinion.
    ds

  • Why am I now unable to read RAW files from 5dmk2 camera.

    I have had a H/D rebuild and reloaded Elelemts.  Now I find I am unable to read any of my Canon5Dmk2 raw files . Any suggestions please.

    Download and install Adobe Camera Raw 5.4

  • Unable to read big files into string object & java.lang.OutOfMemory Problem

    Hi All,
    I have an application that uses applet and servlet communication. On the client side I am reading an large xml file of 12MB size (using JFileChooser) and converting the file to an string object using below code. But I am getting java.lang.OutOfMemory on the client side . But the same below code works fine for small xml files which are less than 4MB sizes:
    BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(file),"UTF8"), 1024*12);
    String s, s2 = new String();
    while((s = in.readLine())!= null)
    s2 += s + "\n";
    I even tried the below code but still java.lang.OutOfMemory is coming:
    while (true)
    int i = in.read();
    if (i == -1)
    break;
    sb.append(i);
    Please let me know what am I doing wrong here ...

    Hi,
    I could avoid the java.lang.OutOfMemory error using below code. But using below code I could read small files of sizes less than 4MB
    but with large files of 12 MB the below code just simply hangs and I am unable to print the string object namely 's'.
    My purpose is to construct an String or StringBuffer object out the user uploaded xml file at the client side and pass that object to server for processing. So how can I construct such object avoid memory problem and increasing the performance of such operations.
    BufferedInputStream in = new BufferedInputStream(new FileInputStream(file));
    byte[] b = new byte[in.available()];
    in.read(b, 0, b.length);
    String s = new String(b, 0, b.length);
    in.close();
    Thanks & Regards,
    Sony.

  • Unable to read mp3 files on usb storage on my car radio

    Hello,
    I have bought a car radio (Kenwood KDC-261UB), to listen to mp3 files on usb storage and also on my iphone. Although connected to my iphone all is OK, each time I transfer mp3 files on a storage (whatever the capacity), the car radio is unable to read them or so slow that it becomes prohibitive (NA file displayed). If now I transfer the files with the help of a Linux based computer, everything is OK. So, what is the problem ? Can you help me ? (I'm on a imac, with OS X 10.9.5) Thank you by advance. Francis Beaubois (France)

    Delete the .DS_Store files off the USB drive. Once I did this, it worked 100% with no problems.
    Well, until I went over 1400 files in the root folder, in which case you just need to separate them out into sub-folders.
    http://hamell.net/how-to-fix-kenwood-stereo-mp3-file-errors/

  • FCP5: Capture ERROR: "FCP was unable to read movie file just captured"

    Something I've never had trouble before has just happened: I get the following error message when I try to capture DV footage as soon as it has completed the capture: "FCP was unable to read the movie file just captured" It doesn't matter what length the file is.
    I am using a Sony Z1 and have captured hundreds of hours of footage. I tried capturing HDV footage and it works fine. My sequence and capture settings all match what's on tape.
    When I try in iMovie HD, it captures DV fine.
    I checked software update and there's nothing for me right now. The only thing that has changed on my system is updating to OS 10.5.4 along with the Quicktime and iTunes updates. Could that be the problem? But why does iMovie work fine then?
    Any ideas would be mucho appreciado

    Forgot to add, if I capture that same HDV tape but downsample it to DV within the camera, it also does not save the captured file. Thanks

Maybe you are looking for

  • T400 Backlight Issues

    Hey guys, this is my first post on the forums, and I'd like to ask you guys for some help.  I have a t400 that I ordered probably around august of 2009, and it's had backlight problems since about november of that year.  Since I was exceptionally bus

  • Problem with the order of inserted PDFs...

    I work with archiving records in chronological order and am having problems getting the files to insert correctly. When I go to insert files, everything is fine when only one file is being inserted. Also what works fine is if I'm trying to insert mul

  • Importing photos from Nikon D5000 into iphoto

    I just got a Nikon D5000 and cannot import my photos directly from the camera to iphoto using the USB cable supplied with the camera. I have no trouble when I use my D80 camera - plug it in to the USB and iphoto starts importing automatically. What a

  • FB60 vs MIRO

    Hi All I am using "Instruction Keys" for entering some data for the bank. When posting via FB60 there is no problem - these fields are nicely on "Payment" tab. When using MIRO I can't see them!!!! I do not understand it - the field status is the same

  • Awdd_2013-01-27-1.consolidated.metriclog    What does this mean? Is it just a crash or something to worry about?

    I found this on diagnostics, I assume its just a small crash, as crashes a happen all the time, it's on an iPad mini. I worry a lot about stuff like this, so dont worry me unnecessarily please! :) it is not jail broken.