Java File Size

Is there a limit on the filesize for .java files? I am trying to compile a class that contains a 3 dimensional array of double with around 4000 rows. The code is as follows:
public class SierData2{
  public double[][][] pointData= {
    {{-0.577350, -0.577350,  0.577350},
     ----and so on till end of the array having 4095 values.On compiling, I get an error that "code too large"!!
Any ideas on why I am getting this error?

Hi there,
the Class file format document in section 4.8.1 sais:
The value of the code_length item must be less than 65536.
So one method "body" should only as long as 65535 bytes. I mean the byte code.
We have just faced to this problem, as earlier compilers does not take this constraint into account. We've also got a resource class with a huge static final Object[][]. The generated static initializator method (<clinit>) has a length of 70161 bytes. The new javac with 1.4 jdk does not allow us to recompile this class. :-( We have to separate it to two arrays, in two static mehtods, and then in the static {} block, we put the two arrays into one big array.
Regards,
Vazul

Similar Messages

  • What is the size limit for a servlet .java file?

    I have been working on a jsp page with over 500 controls so I have getParameter() for those at least in my servlet. It is too big I think because the java file size is 40K but the class file is 25KB. Any sugguestion? Thanks,J

    Yes, there is a maximum length for the URL but if you use POST with a form the parameters do not appear in the URL... They would if you'd use GET however.
    Still, I guess it is just too much. And if that's a form a user would be supposed to fill out (usually they are supposed to do just that) they'd probably get tired and quit after the first 100 fields... 500 fields on one page is definately too much. I'd say try splitting it up to have about 10 fields on a page but then you'de have 50 pages to go through, which is less that good...
    May I ask what the 500 fields are for? What data is the form supposed to process? There might be a more practicable way to solve this.

  • Maximum file size handled by java

    Hi
    What is the maximum file size that java can handle i.e if I need to read a disk file using java, is there any limit on the size of the file being read?

    The size you can handle is not limited... only by your code :-)
    Check MemoryMappedFiles... i handle Gigabyte files with no problem ;-)

  • File size (using java.io.File)

    Hello all,
    When I want to create an app to be used as file browser, I should like to know the size of a file in a directory. The java.io.File class gives me quite some functionality, but not the functionality to display the file size.
    Does anyone know of a default class that has the functionality to display the file size?
    When no such class exists, I should need to develop it myself. From the top of my head it should be something like this:
    int size = 0;
    int aChar = 0;
    FileReader reader = new FileReader (theFile);
    while (reader.ready() )
        aChar = reader.read()
        size++;
    }The variable size gives me now the number of characters in a file. But this should be done for each file in a particular directory. But does that not ask much CPU performance? Does anyone have an alternative?
    Looking forward to your answer
    Michel

    Hi, I'm having the exact same problem, except that I'm doing a fax system so I can't copy a file while the file is still open. So to check to see if the file is open I have to check the file size in bytes then wait a second and check the file size again. If the file sizes differ then I have to check the next file otherwise I can copy the file. I had a look at the length() method but that will only return the actual length of the file name, not the size of the contents of the file which I need, can anyone please help? Say the file name is 16 ad an a or anything to the file name, if you the call the length() method again it will return 17.

  • 4gb file size limitation using java.io.* package in java stored procedure

    Does anyone know about file size limitations when using java.io.* package inside java stored procedures. I have some java stored procedures that read and write to files. They error out when run as a java stored procedure within oracle on files over 4gb. I have no problems with these procedures when I test them outside of oracle.

    I am using 10g Release 10.2.0.1.0, the java version returned by the Oracle JVM is 1.4.2_04
    When I tested it outside of oracle I ran it using the java run time in ORACLE_HOME\jdk\bin and it works perfectly on files larger than 4gb.
    Thank you for the UTL_FILE suggestion. I have considered using that but there is one method in Java that I can't seem to find a corresponding procedure for in PL/SQL.
    RandomAccessFile.setLength()
    This allows me to truncate a file. I have a need to strip bytes off the end of a file without creating a copy because I am working with large files and disk space may be limited. It is also much slower to read from the original file and writing the same bytes to a new file (minus the trailing bytes).
    If anybody has any insight about the 4gb java.io limitation in Oracle JVM or has a workaround in PL/SQL for the RandomAccessFile.setLength() method in Java, I would really appreciate the help.
    Thanks,
    Thach

  • Managing JSP files (.java, .class) size in working directory

              Our new web application automatically generates JSP pages which
              causes the working directory holding the JSP files to grow
              too large to manage,does Weblogic have a alternate way to
              compile JSP without permanently storing the .java, .class files
              on disk.
              Maybe in cache were they can be managed, cleaned up similar
              to how a database cache works.
              Any ideas or advice would be appreciated.
              THANKS IN ADVANCE.
              

              Just don't look in the classfiles directory and everything will
              be fine.
              WLS will only leave the .java files if you ask it to keep them (keepgenerated).
              If you don't keep the .class files on disk then WLS will have to
              recompile them every time it is restarted. If you have so many
              JSPs you are having trouble managing them, you definitely don't
              want to recompile everytime you restart WLS.
              Last time I looked in our public_html there were 67000 JSP files.
              We don't have any problems managing them.
              Mike
              "denis mercier" <[email protected]> wrote:
              >
              >Our new web application automatically generates JSP pages which
              >causes the working directory holding the JSP files to grow
              >too large to manage,does Weblogic have a alternate way to
              >compile JSP without permanently storing the .java, .class files
              >on disk.
              >Maybe in cache were they can be managed, cleaned up similar
              >to how a database cache works.
              >Any ideas or advice would be appreciated.
              >THANKS IN ADVANCE.
              

  • How do I include a JAVA file in my website  using DreamweaverCC ?

    Hi.  I searched the forums and it seems that all questions relating to JAVA and Dreamweaver elicit zero replies.
    I hope that someone has some direction.  Thanks again.
    I have a JAVA file that I want to include or have run within one of my pages in my WebSite.
    file > new > create > and there is not an option for JAVA but there is one for PHP etc. etc.
    How do I incorporate a java script into my Web Site ?
    I thought that I could just copy the code into the file here - at least to begin with  - but JAVA  runs in the background.
    I am lost
    conceptually
    and I do not know how to go about this task
    structurally.
    Thanks again,
    Regina

    JQuery is a core JavaScript library used by millions of web sites.  It's the "do more & write less code framework."  If you're into re-inventing the wheel every time you need an advanced feature (plugin), feel free to manually code it yourself with JavaScript.  However, you'll need to test & debug your scripts in every conceivable browser and OS before you can be sure it's viable for use on a production site.
    On the other hand, you could use a plugin and be up & running in 5 minutes or less. See the code below.
    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>HTML5, with Fancybox2 Viewer</title>
    <!--[if lt IE 9]>
    <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <!--LATEST JQUERY CORE LIBRARY-->
    <script src="http://code.jquery.com/jquery-latest.min.js"></script>
    <!--FANCYBOX plugins-->
    <link href="http://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.4/jquery.fancybox.css" rel="stylesheet" media="screen">
    <script src="http://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.4/jquery.fancybox.pack.js"></script>
    <style>
    body {
        background: silver;
        font-family:Segoe, "Segoe UI", "DejaVu Sans", "Trebuchet MS", Verdana, sans-serif;
    #wrapper {
        width: 1000px; margin:0 auto;
        background:#FFF;
    /**this styles image container**/
    #thumbs p {
        float: left;
        width: 180px;
        height: 12.5em;
        margin: 10px 22px 0 22px; /**space between containers**/
        padding: 10px; /**space around containers**/
        border: 1px solid silver;
        /**rounded borders**/
        -moz-border-radius: 20px;
        -webkit-border-radius: 20px;
        border-radius: 20px;
        /**this styles caption text**/
        font: italic 14px/1.5 Geneva, Arial, Helvetica, sans-serif;
        color: #666;
        text-align: center;
    /**recommend using same size images**/
    #thumbs img {
        width: 160px; /**adjust width to thumbnail**/
        height: 120px; /**adjust height to thumbnail**/
        margin-bottom: 1.5em;
        opacity: 0.75;
    #thumbs img:hover { opacity: 1.0 }
    /**float clearing**/
    #thumbs:after {
        content: ".";
        clear: left;
        font-size: 0px;
        line-height: 0;
        display: block;
        visibility: hidden;
    </style>
    </head>
    <body>
    <div id="wrapper">
    <h1><a href="http://fancyapps.com/fancybox/">Fancybox2</a> Viewer with images</h1>
    <!--insert thumbnails with links to full size images below-->
    <div id="thumbs">
    <p><a class="fancybox" data-fancybox-group="gallery" href="http://placehold.it/400x320.jpg" title="optional captions"><img src="http://placehold.it/160x120.jpg" alt="Thumbnail 1" /></a> <br />
    Caption 1 </p>
    <p><a class="fancybox" data-fancybox-group="gallery" href="http://placehold.it/400x320.jpg" title="optional captions"><img src="http://placehold.it/160x120.jpg" alt="Thumbnail 2" /></a> <br />
    Caption 2 </p>
    <p><a class="fancybox" data-fancybox-group="gallery" href="http://placehold.it/400x320.jpg" title="optional captions"><img src="http://placehold.it/160x120.jpg" alt="Thumbnail 3" /></a> <br />
    Caption 3 </p>
    <p><a class="fancybox" data-fancybox-group="gallery" href="http://placehold.it/400x320.jpg" title="optional captions"><img src="http://placehold.it/160x120.jpg" alt="Thumbnail 4" /></a> <br />
    Caption 4 </p>
    <!--end thumbs--></div>
    <!--end wrapper--></div>
    <!--FancyBox function code-->
    <script>
    $(document).ready(function() {
        $('.fancybox').fancybox();
    </script>
    </body>
    </html>
    Nancy O.

  • Slow Performance or XDP File size very large

    There have been a few reports of people having slow performance in their forms (tyically for Dynamic forms) or file sizes of XDP files being very large.
    These are the symptoms of a problem with cut and paste in Designer where a Process Instruction (PI) used to control how Designer displays a specific palette is repeated many many times. If you look in your XDP source and see this line repeated more than once then you have the issue:
    The problem has been resolved by applying a style sheet to the XDP and removing the instruction (until now). A patch has been released that will fix the cut and paste issue as well as repair your templates when you open them in a designer with the patch applied.
    Here is a blog entry that describes the patch as well as where to get it.
    http://blogs.adobe.com/livecycle/2009/03/post.html

    My XDP file grow up to 145mb before i decided to see what was actually happening.
    It appears that the LvieCycle Designer ES program sometimes writes alot of redundant data... the same line millions of times over & over again.
    I wrote this small java program which reduced the size up to 111KB !!!!!!!!!!!!!!!!!! (wow what a bug that must have been!!!)
    Here's the sourcecode:
    import java.io.BufferedReader;
    import java.io.BufferedWriter;
    import java.io.FileNotFoundException;
    import java.io.FileReader;
    import java.io.FileWriter;
    import java.io.IOException;
    public class MakeSmaller {
    private static final String DELETE_STRING = "                           <?templateDesigner StyleID aped3?>";
    public static void main(String... args) {
      BufferedReader br = null;
      BufferedWriter bw = null;
      try {
       br = new BufferedReader(new FileReader(args[0]));
       bw = new BufferedWriter(new BufferedWriter(new FileWriter(args[0] + ".small")));
       String line = null;
       boolean firstOccurence = true;
       while((line = br.readLine()) != null) {
        if (line.equals(DELETE_STRING)) {
         if (firstOccurence) {
          bw.write(line + "\n");
          firstOccurence = false;
        } else {
         bw.write(line + "\n");
         firstOccurence = true;
      } catch (FileNotFoundException e) {
       e.printStackTrace();
      } catch (IOException e) {
       e.printStackTrace();
      } finally {
       if (br != null) {
        try {
         br.close();
        } catch (IOException e) {
         e.printStackTrace();
       if (bw != null) {
        try {
         bw.close();
        } catch (IOException e) {
         e.printStackTrace();
    File that gets generated is the same as the xdp file (same location) but gets the extension .small. Just in case something goes wrong the original file is NOT modified as you can see in the source code. And yes Designer REALLY wrote that line like a gazillion times in the .xdp file (shame on the programmers!!)
    You can also see that i also write the first occurrence to the small file just in case its needed...

  • [Help!] Log file size Messaging Server 2005Q4

    Hi,
    I have a large environment where I need to keep detailed IMAP log.
    I tried with logfile.imap.maxlogfilesize = 4294967296but I notice that imap file size is limited to 2MB:
    ls -l
    -rw-------   1 mail  mail      763225 Feb 20 09:16 imap
    -rw-------   1 mail mail     2097263 Feb 20 08:56 imap.7307.1203494098
    -rw-------   1 mail  mail     2097374 Feb 20 08:59 imap.7308.1203494213
    -rw-------   1 mail mail     2097212 Feb 20 09:01 imap.7309.1203494341
    -rw-------   1 mail  mail     2097248 Feb 20 09:03 imap.7310.1203494468
    -rw-------   1 mail  mail     2097235 Feb 20 09:05 imap.7311.1203494608
    -rw-------   1 mail  mail     2097273 Feb 20 09:08 imap.7312.1203494727Is this an implicit limit not configurable?
    My system is:
    logfile.imap.buffersize = 0
    logfile.imap.expirytime = 604800
    logfile.imap.flushinterval = 60
    logfile.imap.loglevel = Debug
    logfile.imap.logtype = NscpLog
    logfile.imap.maxlogfiles = 10
    logfile.imap.maxlogfilesize = 4294967296
    logfile.imap.maxlogsize = 42949672960
    logfile.imap.minfreediskspace = 524288000
    logfile.imap.objectclass = top
    logfile.imap.rollovertime = 86400
    logfiles.imap.alias = |logfile|imap
    Sun Java(tm) System Messaging Server 6.2-6.01 (built Apr  3 2006)
    libimta.so 6.2-6.01 (built 11:20:35, Apr  3 2006)
    SunOS srvmsg01 5.9 Generic_117171-07 sun4u sparc SUNW,Sun-Fire-V440
    I thank you very much for every hints you could let me know.
    Best Regards
    marco

    ziopino wrote:
    I have a large environment where I need to keep detailed IMAP log.
    I tried with logfile.imap.maxlogfilesize = 4294967296
    The maximum value of maxlogfilesize is 2GB (a common filesystem limit).
    There is a whole write-up on logging and how to configure your system to keep a large amount of logs here:
    http://blogs.sun.com/factotum/entry/messaging_server_more_on_managing
    Regards,
    Shane.

  • File Adapter Polling issue(Is there critical value of File size )?

    Hi
    I use File adapter as the Activation to initialize a BPEL process instance .The source data is a kind of Delimited file format.On my PC, when the file size is less than 4M ,everything works fine ,But when the size increased. The BPEL process will not initialize the instance.When the source data is XML data , the "critical value " is about 12M. The error msg is below.
    <2005-08-08 12:48:26,209> <INFO> <default.collaxa.cube.activation> <File Adapter::Inbound> Processing file : D:\Temp\WOSSystemIntegration\InBoundFiles\LOADPLAN_DATA_200508041708.xml
    <2005-08-08 12:48:29,455> <INFO> <default.collaxa.cube.activation> <FileAdapter::Inbound> Sending message to Adapter Framework for posting to BPEL engine: { file=D:\Temp\WOSSystemIntegration\InBoundFiles\LOADPLAN_DATA_200508041708.xml
    <2005-08-08 12:48:40,197> <ERROR> <default.collaxa.cube> <BaseCubeSessionBean::l
    ogError> Error while invoking bean "cube delivery": Delivery callback message se
    rialization failed.
    An attempt to serialize the delivery callback messages for conversation "LocalGU
    ID:d0b7ccf8e4242850:134b07e:10594606738:-7ffc", message "d0b7ccf8e4242850:134b07
    e:10594606738:-7ffb" to binary format has failed. The exception reported is:
    <2005-08-08 12:48:40,245> <ERROR> <default.collaxa.cube> <BaseCubeSessionBean::l
    ogError> Error while invoking bean "delivery": Delivery callback message seriali
    zation failed.
    An attempt to serialize the delivery callback messages for conversation "LocalGU
    ID:d0b7ccf8e4242850:134b07e:10594606738:-7ffc", message "d0b7ccf8e4242850:134b07
    e:10594606738:-7ffb" to binary format has failed. The exception reported is:
    <2005-08-08 12:48:40,245> <ERROR> <default.collaxa.cube.activation> <AdapterFram
    ework::Inbound> [Read_ptt::Read(loadPlanCollection)] - JCA Activation Agent was
    unable to perform delivery of inbound message to BPEL Process 'bpel://localhost/
    default/P2E_WOS_LP~1.0/' due to: Delivery callback message serialization failed.
    An attempt to serialize the delivery callback messages for conversation "LocalGU
    ID:d0b7ccf8e4242850:134b07e:10594606738:-7ffc", message "d0b7ccf8e4242850:134b07
    e:10594606738:-7ffb" to binary format has failed. The exception reported is:
    <2005-08-08 12:48:40,245> <ERROR> <default.collaxa.cube.activation> <AdapterFram
    ework::Inbound>
    com.oracle.bpel.client.ServerException: Delivery callback message serialization
    failed.
    An attempt to serialize the delivery callback messages for conversation "LocalGU
    ID:d0b7ccf8e4242850:134b07e:10594606738:-7ffc", message "d0b7ccf8e4242850:134b07
    e:10594606738:-7ffb" to binary format has failed. The exception reported is:
    at com.collaxa.cube.engine.delivery.DeliveryHandler.initialPostAnyType(D
    eliveryHandler.java:328)
    at com.collaxa.cube.engine.delivery.DeliveryHandler.initialPost(Delivery
    Handler.java:219)
    at com.collaxa.cube.engine.delivery.DeliveryHandler.post(DeliveryHandler
    .java:83)
    at com.collaxa.cube.ejb.impl.DeliveryBean.post(DeliveryBean.java:181)
    at IDeliveryBean_StatelessSessionBeanWrapper22.post(IDeliveryBean_Statel
    essSessionBeanWrapper22.java:861)
    at com.oracle.bpel.client.delivery.DeliveryService.post(DeliveryService.
    java:161)
    at oracle.tip.adapter.fw.AdapterFrameworkListenerBase$DeliveryServiceMon
    itor.send(AdapterFrameworkListenerBase.java:2340)
    at oracle.tip.adapter.fw.AdapterFrameworkListenerBase.executeDeliverySer
    viceSend(AdapterFrameworkListenerBase.java:478)
    at oracle.tip.adapter.fw.AdapterFrameworkListenerBase.deliveryServiceSen
    d(AdapterFrameworkListenerBase.java:535)
    at oracle.tip.adapter.fw.jca.AdapterFrameworkListenerImpl.performSingleA
    ctivation(AdapterFrameworkListenerImpl.java:699)
    at oracle.tip.adapter.fw.jca.AdapterFrameworkListenerImpl.onMessage(Adap
    terFrameworkListenerImpl.java:567)
    at oracle.tip.adapter.fw.jca.messageinflow.MessageEndpointImpl.onMessage
    (MessageEndpointImpl.java:121)
    at oracle.tip.adapter.file.inbound.ProcessWork.publishMessage(ProcessWor
    k.java:651)
    at oracle.tip.adapter.file.inbound.ProcessWork.doTranslation(ProcessWork
    .java:456)
    at oracle.tip.adapter.file.inbound.ProcessWork.processMessages(ProcessWo
    rk.java:200)
    at oracle.tip.adapter.file.inbound.ProcessWork.run(ProcessWork.java:139)
    at oracle.tip.adapter.fw.jca.work.WorkerJob.go(WorkerJob.java:51)
    at oracle.tip.adapter.fw.common.ThreadPool.run(ThreadPool.java:267)
    at java.lang.Thread.run(Thread.java:534)
    <2005-08-08 12:48:40,245> <INFO> <default.collaxa.cube.activation> <File Adapter
    ::Inbound> Failed to send message {D:\Temp\WOSSystemIntegration\InBoundFiles\LOA
    DPLAN_DATA_200508041708.xml} to Adapter Framework.
    <2005-08-08 12:48:40,245> <WARN> <default.collaxa.cube.activation> <AdapterFrame
    work::Inbound> [Read_ptt::Read(loadPlanCollection)] - onReject: Sending invalid
    inbound message to Exception Handler: file://D:/Temp/WOSSystemIntegration/Reject
    edMessages
    <2005-08-08 12:49:44,617> <FATAL> <default.collaxa.cube.activation> <AdapterFram
    ework::Inbound> [Read_ptt::Read(loadPlanCollection)] - Resource Adapter requeste
    d Process shutdown
    <2005-08-08 12:49:48,676> <INFO> <default.collaxa.cube.activation> <AdapterFrame
    work::Inbound> Adapter Framework instance: OraBPEL - performing endpointDeactiva
    tion for portType=Read_ptt, operation=Read
    <2005-08-08 12:49:48,676> <INFO> <default.collaxa.cube.activation> <File Adapter
    ::Inbound> Endpoint De-activation called in adapter for endpoint : D:\Temp\WOSSy
    stemIntegration\InBoundFiles
    <2005-08-08 12:49:49,042> <INFO> <default.collaxa.cube.activation> <AdapterFrame
    work::Inbound> JCAActivationAgent::onStateChanged State is changed for process '
    bpel://localhost/default/P2E_WOS_LP~1.0/', state=OFF
    how can i solve this problem?can i predeploy some parameter? Is there some critical value of File size for the processing of File Adapter ?

    Hi,
    There is no specific parameters to specify the maximum file size to be read in. It is just limited by the heap size of the JVM running the BPEL engine.
    If you have enough RAM on your machine you can change the current heap size from 512Mbyte to 1Go by editing the startorabpel.bat file
    and modifying the line :
    set MEM_ARGS=-Xms512m -Xmx512m -Xmn300m -XX:MaxPermSize=80m
    to
    set MEM_ARGS=-Xms512m -Xmx1024m -Xmn300m -XX:MaxPermSize=80m
    But only do it if you have at least 1.5 Gb of RAM on your machine, otherwise ot will keep spawing and you will have very bad performance.
    Speaking about performance, do you really need to have a BPEL payload of 4 to 12 Mb ?
    Will the BPEL process really need to access it ? if so, the best solution would be using batching techniques to cut you file in pieces and process it piece by peice.
    FB.

  • Sender File adapter Pooling interval & file Size issue

    Hi ALL,
    I have a file size of 400 MB to be picked to be the sender file adapter i am facing issue that the system is unable to even pick the file and place in the Q for Processing.
    1)we have no mapping no content conversion ....only pick the file from one loaction and place it in 3 different locations with 3 different names ...can any one help me in solving this .. ? the best workable method to achive this .
    2) this file is getting created once in a day .say 2 PM .so i can give the poll intravel to 24 hours ..but some times ..the file creation in server gets delayed ..but they cont wain for the next 24 hour to come for processing the file ..so my query is can we reduce  the poll intravel for 2 PM till  3PM hour for some 3 times ..and once it reches 3PM  it can poll as usual with a gap of 24 hour time ..
    thanks
    RK

    Hi Rupash,
    >>I have a file size of 400 MB to be picked to be the sender file adapter i am facing issue that the system is unable to even pick the file and place in the Q for Processing.
    Never use File adapter for picking large file (maximum size which I have seen it to work successfully is 200 MB)
    Instead go for Java proxies. Check this forum post for the discussion:
    Java proxy to use XI as a file mover
    Also if you want some more info on Java proxies refer these blogs and articles:
    /people/prasad.ulagappan2/blog/2005/06/27/asynchronous-inbound-java-proxy
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/a068cf2f-0401-0010-2aa9-f5ae4b2096f9
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f272165e-0401-0010-b4a1-e7eb8903501d
    >>this file is getting created once in a day .say 2 PM .so i can give the poll intravel to 24 hours ..but some times ..the file creation in server gets delayed .
    You can do a availability time planning refer these links for more information:
    Planning Availability Times
    http://help.sap.com/saphelp_nw04/helpdata/en/45/06bd029da31122e10000000a11466f/content.htm
    Controlling a Communication Channel Externally Locate the document in its SAP Library structure
    http://help.sap.com/saphelp_nw04/helpdata/en/45/0c86aab4d14dece10000000a11466f/content.htm
    Regards
    Suraj

  • IView Deployment - how to set maximum file size?

    Hello,
    we have a problem while deploying iViews and uploading files to enterprise portal . The maximum upload file size seems to be limited to 1 MB. I have to deploy an iView greater than 1 MB. While deploying with netweaver developer studio I get following error message
    in logfile of developer studio:
    [19.10.04 / 13:33] #ERROR LEVEL#
    com.sap.portal.developmentTools.ideSpecific.eclipse.wizards.sapmakepar.SAPMPWizard$1 > No Information
    java.io.IOException: Error writing to server
    The direct upload of *.par with EP Component Manager also does not work. After clicking upload-button I get a standard http error page "aktion abgebrochen".
    Also on upload of any other document, for example personal documents which are bigger than 1 MB, I get this error.
    If I reduce file size of portal archiv lower than 1MB I can deploy and upload the iView.
    How canI set maximum upload file size in Enterprise Portal?
    Our Version: 6.0.2.4.7.Enterprise_Portal_Service_Pack_2
    Thanks for helping me,
    Nicole

    You need to use a precision argument:
    String foo = "a long name to print";
    System.out.printf("foo say: %.8s", foo); // 8 maxhttp://java.sun.com/j2se/1.5.0/docs/api/java/util/Formatter.html#syntax

  • How to get the file size (in bytes) for all files in a directory?

    How to get the file size (in bytes) for all files in a directory?
    The following code does not work. isFile() does NOT recognize files as files but only as directories. Why?
    Furthermore the size is not retrieved correctly.
    How do I have to code it otherwise? Is there a way of not converting f-to-string-to-File again but iterate over all file objects instead?
    Thank you
    Peter
    java.io.File f = new java.io.File("D:/todo/");
    files = f.list();
    for (int i = 0; i < files.length; i++) {
    System.out.println("fn=" + files);
    if (new File(files[i]).isFile())
         System.out.println("file[" + i + "]=" + files[i] + " size=" + (new File(files[i])).length() ); }

    pstein wrote:
    ...The following code does not work. Work?! It does not even compile! Please consider posting code in the form of an SSCCE in future.
    Here is an SSCCE.
    import java.io.File;
    class ListFiles {
        public static void main(String[] args) {
            java.io.File f = new java.io.File("/media/disk");
            // provides only the file names, not the path/name!
            //String[] files = f.list();
            File[] files = f.listFiles();
            for (int i = 0; i < files.length; i++) {
                System.out.println("fn=" + files);
    if (files[i].isFile()) {
    System.out.println(
    "file[" +
    i +
    "]=" +
    files[i] +
    " size=" +
    (files[i]).length() );
    }Edit 1:
    Also, in future, when posting code, code snippets, HTML/XML or input/output, please use the code tags to retain the indentation and formatting.   To do that, select the code and click the CODE button seen on the Plain Text tab of the message posting form.  It took me longer to clean up that code and turn it into an SSCCE, than it took to +solve the problem.+
    Edited by: AndrewThompson64 on Jul 21, 2009 8:47 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Data File Size

    I wrote a java program that copies data from a Sql Server DB to Oracle 9i.
    As the program ran, the oracle9i server ran out of disk space. I ran the 'clean' portion of my application that deletes all data from the tables. After I did this, there was still the same amout of free space on the hard drive.
    I am not an oracle dba or expert by any means, I am a programmer but here is what I found, I'm not sure if its revelent.
    On the oracle server I went to the following folder : oracle\ora92\database\DB40
    I think this is the file where my data is stored. The file 'DB40DF' is 6 Gigs.
    I have 2 other databases on the server that are exactly the same as my db40 database and their 'DF' file sizes are 130MB. These have no data in them yet. So from this I would assume that if I emptied all of my tables then the DB40DF should be around 130MB. But this is not the case, after I ran my delete code the file is still 6GIG.
    Did I do my delete wrong? I assumed that my statment would commit and it seems to. When I do a select * from the tables there is no data. If there is no data in my table why is the file 6 gigs? I have included my delete java code incase I did something wrong on that side. If not, is there something I am suspose to do to get the DF file back to normal size? I have Toad 9.5 to administer the database.
    Here is a portion of my delete java code:
    stmt is a java.sql.Statement
    for (String table : tables) {
    sql = "DELETE FROM " + oracleSchema + table;
    stmt.addBatch(sql);
    int[] result = stmt.executeBatch();
    if (stmt != null) {
    stmt.close();
    stmt = null;
    When I print out the int array it shows how many rows were deleted from each table and the record cound seems ok. (ie table x clear 36007 rows deleted)
    Thank you.

    Oracle won't resize a datafile unless this is requested by the SQL statement ALTER DATABASE DATAFILE ... RESIZE... . Oracle won't release extents allocated to a table unless this is requested by the some ALTER TABLE statements. Extents will normally be reused by next INSERT statements. So the behavior you note is normal.

  • Nio ByteBuffer and memory-mapped file size limitation

    I have a question/issue regarding ByteBuffer and memory-mapped file size limitations. I recently started using NIO FileChannels and ByteBuffers to store and process buffers of binary data. Until now, the maximum individual ByteBuffer/memory-mapped file size I have needed to process was around 80MB.
    However, I need to now begin processing larger buffers of binary data from a new source. Initial testing with buffer sizes above 100MB result in IOExceptions (java.lang.OutOfMemoryError: Map failed).
    I am using 32bit Windows XP; 2GB of memory (typically 1.3 to 1.5GB free); Java version 1.6.0_03; with -Xmx set to 1280m. Decreasing the Java heap max size down 768m does result in the ability to memory map larger buffers to files, but never bigger than roughly 500MB. However, the application that uses this code contains other components that require the -xMx option to be set to 1280.
    The following simple code segment executed by itself will produce the IOException for me when executed using -Xmx1280m. If I use -Xmx768m, I can increase the buffer size up to around 300MB, but never to a size that I would think I could map.
    try
    String mapFile = "C:/temp/" + UUID.randomUUID().toString() + ".tmp";
    FileChannel rwChan = new RandomAccessFile( mapFile, "rw").getChannel();
    ByteBuffer byteBuffer = rwChan.map( FileChannel.MapMode.READ_WRITE,
    0, 100000000 );
    rwChan.close();
    catch( Exception e )
    e.printStackTrace();
    I am hoping that someone can shed some light on the factors that affect the amount of data that may be memory mapped to/in a file at one time. I have investigated this for some time now and based on my understanding of how memory mapped files are supposed to work, I would think that I could map ByteBuffers to files larger than 500MB. I believe that address space plays a role, but I admittedly am no OS address space expert.
    Thanks in advance for any input.
    Regards- KJ

    See the workaround in http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4724038

Maybe you are looking for

  • Query regarding check printing in Release 12

    Hi, Need some tips on how to go about resolving an issue related to check printing in Oracle AP Release 12 On some checks we run, the batch is reprinting half of the checks again. Any advice on how to go about troubleshooting this issue will be great

  • Launching programs from adobe reader on linux/unix

    I am hoping someone has solved this problem before: We use pdf for our product manuals and have a large set of examples that we want to allow the user to open by clicking a button. In past releases (pre 8.0 et al) we have not had a problem opening th

  • How do I downgrade to 8.2?

    I want to downgrade from iTunes 9 back to 8.2 since I cannot get my iTunes to work. Anyone got a simple way of doing this?

  • How can i decide how many dimensions are needed here.and which charactersti

    Hi,         i am planning to create custom defined cube for sale order line item data.  how can i decide how many dimensions are needed here.and which characterstics are suitable for that dimensions. Thanks, chandu.

  • Installing AIA 11g on top of SOA Suite 11g

    I have installed SOA Suite 11g (11.1.1.5) as per Oracle Installation Guide. The installation is successful and SOA Suite 11g is working fine! Now I need to installa AIA 11g. 1) Currently I have Oracle XE database. Do I need to uninstall it and instal