Which is better design: writing a file or maintaining a list?

Hi everybody,
I'm just looking for a quick recommendation from the design perspective. For a group of 20,000 strings or more, if they need to be edited, is it better for efficiency and speed to save them in a list within a program, or to write a file containing the strings, and then access them from there? If you have an opinion on that I would really appreciate it.
Thanks!
Jezzica85

jezzica85 wrote:
So, if I definitely don't need a separate file, and I may not need a list, is there an easy way to read multiple lines in the same file reader? The easiest way to read individual lines, from a java.io.FileReader, is to wrap it in a BufferedReader and use readLine().
Like this:BufferedReader in = new BufferedReader(myFileReader);
String line;
while((line = in.readLine() != null) {
  // do stuff with line
Basically, I need to determine which lines are in my final file both by knowing the line I'm reading and the lines before and after it.If you only can tell whether you need a line depending on the lines that come after it, then you're going to have to store the line while you read the subsequent lines. In that case, a list will be fine. (Well, you can also use a regular scalar String-typed variable, but chances are you're going to be storing multiple lines at a time, thus a List). If you're only going to make the determination based on lines that came earlier, then you don't need a list. You might want to use boolean or other types of variables to keep track of whether you need to keep a line.
For example, if the only criterion is that spans of blank lines get replaced by a single blank line, then you could probably get by with a single String variable. Stick the current line into a variable, then get the next line. If both the new line and the previous line are blank, throw away the new line. Otherwise, print the old one and put the new one in the old one's place in the variable.
It will all depend on your program requirements. Just try to keep things simple and don't build stuff than you need.

Similar Messages

  • Which is better ASM or file system storage

    Hi all, I need a urgent help from all u gr8 DBAs.
    I have to give justification to my client that which is better to use between file based option ASM and why??
    So can anyone give me some write up in this line?

    Ok, how about this
    Today's large databases demand minimal scheduled downtime, and DBAs are often required to manage multiple databases with an increasing number of database files. Automatic Storage Management lets you be more productive by making some manual storage management tasks obsolete.
    The Oracle Database provides a simplified management interface for storage resources. Automatic Storage Management eliminates the need for manual I/O performance tuning. It simplifies storage to a set of disk groups and provides redundancy options to enable a high level of protection. Automatic Storage Management facilitates non-intrusive storage allocations and provides automatic rebalancing. It spreads database files across all available storage to optimize performance and resource utilization. It also saves time by automating manual storage tasks, which thereby increases their ability to manage more and larger databases with increased efficiency. Different versions of the database can interoperate with different versions of Automatic Storage Management. That is, any combination of release 10.1.x.y and 10.2.x.y for either the Automatic Storage Management instance or the database instance interoperate transparently.
    http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14220/mgmt_db.htm

  • Out of memory error when writing large file

    I have the piece of code below which works fine for writing small files, but when it encounters much larger files (>80M), the jvm throws an out of memory error.
    I believe it has something to do with the Stream classes. If I were to replace my PrintStream reference with the System.out object (which is commented out below), then it runs fine.
    Anyone else encountered this before?
         print = new PrintStream(new FileOutputStream(new File(a_persistDir, getCacheFilename()),
                                                                false));
    //      print = System.out;
              for(Iterator strings = m_lookupTable.keySet().iterator(); strings.hasNext(); ) {
                   StringBuffer sb = new StringBuffer();
                   String string = (String) strings.next();
                   String id = string;
                   sb.append(string).append(KEY_VALUE_SEPARATOR);
                   Collection ids = (Collection) m_lookupTable.get(id);
                   for(Iterator idsIter = ids.iterator(); idsIter.hasNext();) {
                        IBlockingResult blockingResult = (IBlockingResult) idsIter.next();
                        sb.append(blockingResult.getId()).append(VALUE_SEPARATOR);
                   print.println(sb.toString());
                   print.flush();
    } catch (IOException e) {
    } finally {
         if( print != null )
              print.close();
    }

    Yes, my first code would just print the strings as I got them. But it was running out of memory then as well. I thought of constructing a StringBuffer first because I was afraid that the PrintStream wasn't allocating the memory correctly.
    I've also tried flushing the PrintStream after every line is written but I still run into trouble.

  • SharePoint Designer 2013 after installation getting error with runtime i.e. error writing to file Microsoft.SharePoint.Client.Runtime.Local.Resources.dll Verify that you have access to that directory

    SharePoint Designer 2013 after installation getting error with runtime i.e. error writing to file Microsoft.SharePoint.Client.Runtime.Local.Resources.dll Verify that you have access to that directory
    after retry..again SharePoint Designer requires the following component require to install Microsoft.NET framework version 4 i have downloaded and try to installed but fail not work please answer what to do?
    Thanks and Regards, Rangnath Mali

    Hi Rangnath,
    For running SharePoint Designer 2013, you need to install Microsoft .NET 4.0 Framework or higher.
    Please uninstall the Microsoft .NET 4.0 Framework, and install it again. After that, reboot your machine.
    Best Regards,
    Wendy
    Wendy Li
    TechNet Community Support

  • Which is better? store files in the database or directly on the O.S.?

    Hi,
    i´m developing an application to manager files. which is better? store files in the database or directly on the O.S.? If i decide to store on database, i will use the BLOB data type but i have a doubt...the BLOB data type occupies the same space on database regardless of file size? there is another data type better?
    Tks,
    Fernando.

    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1011065100346196442
    Ask Tom has a bit of info to share on the topic. Have a read of this. :)

  • If i do a lot of writing, web surfing and email, which is better for me, macbook pro or air?

    looking for the right portable as a gift for someone who does a LOT of writing and also email and websurfing and research. which is better, the macbook pro or the air?

    Either one.

  • Can I do correction Design of a file which was made by Dw CS6(html file) on Muse?

    I am still Adobe Muse biginner.
    Can re-design the html.file (Creative cloud's providing Dreamweaver CS6 made, exported file) on Adobe Muse?
    How to import it into Muse the file?
    I tried these 3 cases experimentally:
    1) FILE - Open site - gray and non active
    2) Insert HTML - unclear
    3) Copy and paste from opened the html data from word - uniform regulations of the html file of Dreamwever will be changed and changed on Muse's new document
    The html file which I want to re-design, it is constructed by quiet simple composition by txt and JPG images, just one site(page), I expect that the material makes be operate like a iWeb (Apple) or Dreamweaver.
    I don't want to destroy glossy design made by Dw, keep almost design, just I would like to insert image, and want to export html file again.
    Is it possible? If it were possible to do it, how do I devise it? Do you know if the procedure was written on Adobe's pages on online, or not? Please tell me the possibilities.
    I want to ask the posibility whether half constructed site can re-make on Muse.

    The downloads folder in the history manager? I'm not sure what you mean.
    When I click on History, I see what I've put in the screenshot. Then it starts telling me where I've been today. Nothing about downloads, per se. I've been getting at those through Tools/Downloads.
    I have FireFox set up to ask me where downloads should go, rather than automatically sending them to my Downloads folder in Windows, and even if it had automatically saved to Downloads, it wouldn't still be there now.
    In a pinch, I suppose I could skip the first few in the downloads list, and then start right-clicking on individual downloads and selecting Go To Download Page, but I was hoping there might be some way to narrow it down, by getting at the date on downloads. That's fairly easy in History, but I don't see any way to do it in Tools/Downloads.

  • Which is better API Frame work or WebServices

    Dear All,
    We are planning to make a design for Open architecture to communicate four of our products which are previously designed independently. So we need to establish an interaction between one product with the other project up on their requirements. Which is the better option we can proceed from API Design or Making each of the product as web service or any other thing.
    Please reply to me ASAP.
    Thanks&Regards
    Mahesh Yamsani

    To be fair if you download an applet all the class files are stored in your .jpi_cache, and depending on how that game requests its graphics sometimes they are stored there to, so really if you have to download an applet game twice, blame the programmer (I've probably got that dead wrong :B ).
    But, what's wrong with Jars. They offer so much more.
    No offence meant by this Malohkan but if you can't organize your downloaded files the internet must really be a landmine for you :)
    Personally I'd be happy if I never seen another applet again, it seems java is tied to this legacy, and to the average computer user it seems that is all java is capable of.
    Admitidly there are some very funky applets out here using lots of way over my head funky pixel tricks, but they would look so much better running full screen and offline.

  • Writing XML files

    Hello all
    There's a vast amount of information on the java.sun.com site about parsing XML files:
    * creating DOM trees in memory from an XML file
    * setting up event handlers to be called when an XML file is parsed
    * transforming XML files using XSL.
    However, I can find very little information anywhere about writing XML files in the first place! I'm already aware of two ways to do this:
    (1) create a DOM in memory and write this to a file. If the data is large, though, this isn't feasible.
    (2) just output the XML elements directly to some file as text. This doesn't take account of the encoding, or special characters, and the document is not necessarily then syntactically valid.
    Is there some API which I haven't yet come across that is designed specifically for writing XML data to files? If it's built in to Java 2, then goodness knows how I've missed it all this time; if it's third-party, I'd be grateful for any links.
    Thanks for your help
    Rich Fearn

    I know pastes can be horrible, but this is a working example which I find useful: SAX XML output ;)
    import java.io.*;
    // SAX classes.
    import org.xml.sax.*;
    import org.xml.sax.helpers.*;
    //JAXP 1.1
    import javax.xml.parsers.*;
    import javax.xml.transform.*;
    import javax.xml.transform.stream.*;
    import javax.xml.transform.sax.*;
                    //AlphabetXMLOut(file, alphabets);
    class AlphabetXMLOut {
            public void run(){
                    try{
                            FileOutputStream fos = new FileOutputStream("output.xml");
                            PrintWriter out = new PrintWriter(fos);
                            StreamResult streamResult = new StreamResult(out);
                            // PrintWriter from a Servlet
                            //PrintWriter out = response.getWriter();
                            //StreamResult streamResult = new StreamResult(out);
                            SAXTransformerFactory tf = (SAXTransformerFactory) SAXTransformerFactory.newInstance();
                            // SAX2.0 ContentHandler.
                            TransformerHandler hd = tf.newTransformerHandler();
                            Transformer serializer = hd.getTransformer();
                            serializer.setOutputProperty(OutputKeys.ENCODING,"ISO-8859-1");
                            serializer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM,"users.dtd");
                            serializer.setOutputProperty(OutputKeys.INDENT,"yes");
                            hd.setResult(streamResult);
                            hd.startDocument();
                            AttributesImpl atts = new AttributesImpl();
                            // USERS tag.
                            hd.startElement("","","USERS",atts);
                            // USER tags.
                            String[] id = {"PWD122","MX787","A4Q45"};
                            String[] type = {"customer","manager","employee"};
                            String[] desc = {"Tim@Home","Jack&Moud","John D'oe"};
                            for (int i=0;i<id.length;i++){
                                    atts.clear();
                                    atts.addAttribute("","","ID","CDATA",id);
    atts.addAttribute("","","TYPE","CDATA",type[i]);
    hd.startElement("","","USER",atts);
    hd.characters(desc[i].toCharArray(),0,desc[i].length());
    hd.endElement("","","USER");
    hd.endElement("","","USERS");
    hd.endDocument();
    fos.close();
    }catch (IOException e){
    System.err.println ("Unable to write to file");
    System.exit(-1);
    }catch (TransformerConfigurationException tce){
    System.err.println("Error in: TransformerConfigurationException");
    }catch (SAXException spe) {
    // Error generated by the parser
    System.err.println("Error in: (SAXException");
    // Use the contained exception, if any
    Exception x = spe;
    if (spe.getException() != null)
    x = spe.getException();
    x.printStackTrace();
    -Hope this helps

  • Reinstalling - Error Writing to File

    I'm trying to reinstall iTunes, but it stops at 'status: copying new files' and says: "error writing to file: C:\Program Files\iTunes\iTunes.Resources\fr.lproj\MusicStoreBar.nib\classes.nib. Verify that you have access to that directory." with 'retry' or 'cancel'.
    Not really sure what to do. Does anyone have a solution?
    Thankyou!

    Why not try something simple like putting an x in from to the name of that folder. Hopefully the installer will ignore it as it will not recognise the name. This is assuming windows allows you to rename the folder. You might be able to rename the actual file, which is probably better but you may not be allowed to do it if the file has been corrupted. Try it though.
    Then try installing iTunes.
    If you haven't already, download and save the iTunessetup file on your PC and run it from there.
    http://www.apple.com/itunes/download/

  • In reponse to "A Better designed SwingWorker"

    This is in response to [A Better designed SwingWorker|http://forums.sun.com/thread.jspa?threadID=5160966&tstart=0] since that thread got locked. I have got it working using a bound property on my common model which my child models listen to.
    Any other ways I could have got it to work ?
    Thanks, Bhishma

    I think the problem is not really specific to swing worker, but just general OO concepts. I'll walk through an example.
    There should be controller classes that listen & publish events to/from the view layer classes.
    So consider a set of classes like the following:
    A view class
    - Responsible for creating / arranging the JComponents.
    - Does not expose its JComponents to model or controller classes.
    - Contains a public method to get the top-level JComponent for display.
    - Fires events (to any registered listeners) with event names like "download", which would be fired when the download button is pressed.
    - It handles events such as "disable menu" and "enable menu", which would tell the view classes to enable its menu items, etc.
    - Does not know anything about the controller or model objects.
    A controller class
    - Responsible for the lifecycle of the view and model objects (instantiation, etc).
    - It keeps track of the model and view objects and controls how they interact. It acts as an intermediary between them to prevent them from talking directly to each other.
    - It listens to view and model events. Thus, it handles view events such as "download", which it would respond to by launching a swing worker.
    - It fires events such as "disable menu" and "enable menu", which is easy to dispatch since it has a reference to the model and view objects.
    - It always creates and launches the swing workers.
    A model class
    - Contains the logic for doing the work and stores the data.
    - For example, this class would contain the method to download a file.
    - The model itself is not responsible for calling the download method or even knowing when to call it.
    An easy way to enforce most of the design is to use three seperate packages (view, model and controller). So the controller class in the controller package can only see the public methods on classes in the view and model packages.

  • Access denied error while writing a file to the file system - myfileupload.saveas() throws system.unauthorizedexception

    hi,
    as part of my requirement , i have to perform read and  write  operations of  few files [ using the file upload control in my custom visual web part] and on submit button click.
    but while writing these files - with the help of  fileupload control - and when i use  myfileupload.saveas(mylocation);
    - i am saving these files into my D:\ drive of my server , where i am executing my code -, am getting access denied error.
    it throws system.unauthorizedexception.
    i have given full control on that folder where i was trying to store my attached files. and also  after following asp.net forums,
    i have added  iusr group added and performed all those steps such that, the file is saved in my D:\ drive.
    but unfortunately  that didnt happen.
    also
    a) i am trying the code with runwithelevatedprivileges(delegate() )  code
    b) shared the drive within the  d :drive where i want o save the files.
    c) given the full privieleges for the app pool identity- in my case , its
    network service.
    the  other strange thing is that, the same code works perfectly in  other machine, where the same sp, vs 2012  etc were installed .
    would like to know, any other changes/ steps i need to make it on this  server, where i am getting the  error.
    help is  appreciated!

    vishnuS1984 wrote:
    Hi Friends,
    I have gone through scores of examples and i am failing to understand the right thing to be done to copy a file from one directory to another. Here is my class...So let's see... C:\GetMe1 is a directory on your machine, right? And this is what you are doing with that directory:
    public static void copyFiles(File src, File dest) throws IOException
    // dest is a 'File' object but represents the C:\GetMe1 directory, right?
    fout = new FileOutputStream (dest);If it's a directory, where in your code are you appending the source file name to the path, before trying to open an output stream on it? You're not.
    BTW, this is awful:
    catch (IOException e)
    IOException wrapper = new IOException("copyFiles: Unable to copy file: " +
    src.getAbsolutePath() + "to" + dest.getAbsolutePath()+".");
    wrapper.initCause(e);
    wrapper.setStackTrace(e.getStackTrace());
    throw wrapper;
    }1) You're hiding the original IOException and replacing it with your own? For what good purpose?
    2) Even if you had a good reason to do that, this would be simpler and better:
    throw new IOException("your custom message goes here", e);
    rather than explicitly invokign initCause and setStackTrace. Yuck!

  • EXPORT XFA error while writing XFA files

    Hello Experts,
    We are facing an error while exporting to PDF from BEx report.
    We are on EP7 SP14. BI on SP16.
    After the report is displayed and Export to PDF button is clicked, a new window opens which shows following:
    1. Error:
    Message: No message was provided.
    Stack trace: java.lang.NullPointerException
    at com.sap.ip.bi.export.model.layout.impl.Margins.<init>(Margins.java:32)
    at com.sap.ip.bi.export.model.layout.impl.CellLayout.<init>(CellLayout.java:48)
    at com.sap.ip.bi.export.model.layout.impl.CellLayout.dub(CellLayout.java:57)
    at com.sap.ip.bi.export.xfa.xftextensions.TableContentIterator.createCell(TableContentIterator.java:170)
    at com.sap.ip.bi.export.xfa.xftextensions.TableContentIterator.next(TableContentIterator.java:104)
    at com.sap.ip.bi.export.xfa.xftextensions.TableSubFormSet.writeXFD(TableSubFormSet.java:1189)
    at com.sap.ip.bi.export.xfa.core.Xft_subform.writeXFD(Xft_subform.java:1604)
    at com.sap.ip.bi.export.xfa.core.Xft_subform.writeXFD(Xft_subform.java:1604)
    at com.sap.ip.bi.export.xfa.core.Xft_template.writeXFD(Xft_template.java:216)
    at com.sap.ip.bi.export.xfa.core.Xft.writeXFD(Xft.java:62)
    at com.sap.ip.bi.export.xfa.impl.Document.writeWidthsAsXmlToStream(Document.java:294)
    at com.sap.ip.bi.export.xfa.widthcalc.WidthCalculator.<init>(WidthCalculator.java:55)
    at com.sap.ip.bi.export.xfa.impl.SizeCalculator.calc(SizeCalculator.java:96)
    at com.sap.ip.bi.export.impl.ExportController.calculateAndSetSizes(ExportController.java:626)
    at com.sap.ip.bi.export.impl.ExportController.doExportPrep(ExportController.java:405)
    at com.sap.ip.bi.export.impl.ExportController.convert(ExportController.java:325)
    at com.sap.ip.bi.export.controller.ExportResult.createExport(ExportResult.java:71)
    at com.sap.ip.bi.webapplications.pageexport.PageExportRenderingRootNode.createPDF(PageExportRenderingRootNode.java:593)
    at com.sap.ip.bi.webapplications.pageexport.PageExportRenderingRootNode.doExport(PageExportRenderingRootNode.java:132)
    at com.sap.ip.bi.webapplications.pageexport.PageExportRenderingRootNode.processRendering(PageExportRenderingRootNode.java:349)
    at com.sap.ip.bi.webapplications.runtime.impl.Page.buildRenderingTree(Page.java:4494)
    at com.sap.ip.bi.webapplications.runtime.impl.Page.processRenderingRootNode(Page.java:4568)
    at com.sap.ip.bi.webapplications.runtime.impl.Page.processRendering(Page.java:4204)
    at com.sap.ip.bi.webapplications.runtime.impl.Page.doProcessRequest(Page.java:4150)
    at com.sap.ip.bi.webapplications.runtime.impl.Page._processRequest(Page.java:2948)
    at com.sap.ip.bi.webapplications.runtime.impl.Page.processRequest(Page.java:2794)
    at com.sap.ip.bi.webapplications.runtime.controller.impl.Controller.doProcessRequest(Controller.java:994)
    at com.sap.ip.bi.webapplications.runtime.controller.impl.Controller._processRequest(Controller.java:883)
    at com.sap.ip.bi.webapplications.runtime.controller.impl.Controller.processRequest(Controller.java:860)
    at com.sap.ip.bi.webapplications.runtime.jsp.portal.services.BIRuntimeService._handleRequest(BIRuntimeService.java:359)
    at com.sap.ip.bi.webapplications.runtime.jsp.portal.services.BIRuntimeService.handleRequest(BIRuntimeService.java:276)
    at com.sap.ip.bi.webapplications.runtime.jsp.portal.components.LauncherComponent.doContent(LauncherComponent.java:24)
    at com.sapportals.portal.prt.component.AbstractPortalComponent.serviceDeprecated(AbstractPortalComponent.java:209)
    at com.sapportals.portal.prt.component.AbstractPortalComponent.service(AbstractPortalComponent.java:114)
    at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
    at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
    at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
    at com.sapportals.portal.prt.component.PortalComponentResponse.include(PortalComponentResponse.java:215)
    at com.sapportals.portal.prt.pom.PortalNode.service(PortalNode.java:645)
    at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
    at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
    at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
    at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:753)
    at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:240)
    at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:524)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:407)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:156)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
    at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
    at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
    at
    com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java
    :33)
    at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
    at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102)
    at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)
    Message: EXPORT XFA error while writing XFA files
    Stack trace: com.sap.ip.bi.base.exception.BIBaseRuntimeException: EXPORT XFA error while writing XFA files
    at com.sap.ip.bi.export.xfa.impl.Document.writeWidthsAsXmlToStream(Document.java:311)
    at com.sap.ip.bi.export.xfa.widthcalc.WidthCalculator.<init>(WidthCalculator.java:55)
    at com.sap.ip.bi.export.xfa.impl.SizeCalculator.calc(SizeCalculator.java:96)
    at com.sap.ip.bi.export.impl.ExportController.calculateAndSetSizes(ExportController.java:626)
    at com.sap.ip.bi.export.impl.ExportController.doExportPrep(ExportController.java:405)
    at com.sap.ip.bi.export.impl.ExportController.convert(ExportController.java:325)
    at com.sap.ip.bi.export.controller.ExportResult.createExport(ExportResult.java:71)
    at com.sap.ip.bi.webapplications.pageexport.PageExportRenderingRootNode.createPDF(PageExportRenderingRootNode.java:593)
    at com.sap.ip.bi.webapplications.pageexport.PageExportRenderingRootNode.doExport(PageExportRenderingRootNode.java:132)
    at com.sap.ip.bi.webapplications.pageexport.PageExportRenderingRootNode.processRendering(PageExportRenderingRootNode.java:349)
    at com.sap.ip.bi.webapplications.runtime.impl.Page.buildRenderingTree(Page.java:4494)
    at com.sap.ip.bi.webapplications.runtime.impl.Page.processRenderingRootNode(Page.java:4568)
    at com.sap.ip.bi.webapplications.runtime.impl.Page.processRendering(Page.java:4204)
    at com.sap.ip.bi.webapplications.runtime.impl.Page.doProcessRequest(Page.java:4150)
    at com.sap.ip.bi.webapplications.runtime.impl.Page._processRequest(Page.java:2948)
    at com.sap.ip.bi.webapplications.runtime.impl.Page.processRequest(Page.java:2794)
    at com.sap.ip.bi.webapplications.runtime.controller.impl.Controller.doProcessRequest(Controller.java:994)
    at com.sap.ip.bi.webapplications.runtime.controller.impl.Controller._processRequest(Controller.java:883)
    at com.sap.ip.bi.webapplications.runtime.controller.impl.Controller.processRequest(Controller.java:860)
    at com.sap.ip.bi.webapplications.runtime.jsp.portal.services.BIRuntimeService._handleRequest(BIRuntimeService.java:359)
    at com.sap.ip.bi.webapplications.runtime.jsp.portal.services.BIRuntimeService.handleRequest(BIRuntimeService.java:276)
    at com.sap.ip.bi.webapplications.runtime.jsp.portal.components.LauncherComponent.doContent(LauncherComponent.java:24)
    at com.sapportals.portal.prt.component.AbstractPortalComponent.serviceDeprecated(AbstractPortalComponent.java:209)
    at com.sapportals.portal.prt.component.AbstractPortalComponent.service(AbstractPortalComponent.java:114)
    at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
    at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
    at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
    at com.sapportals.portal.prt.component.PortalComponentResponse.include(PortalComponentResponse.java:215)
    at com.sapportals.portal.prt.pom.PortalNode.service(PortalNode.java:645)
    at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
    at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
    at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
    at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:753)
    at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:240)
    at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:524)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:407)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:156)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
    at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
    at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
    at
    com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java
    :33)
    at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
    at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102)
    at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)
    Caused by: java.lang.NullPointerException
    at com.sap.ip.bi.export.model.layout.impl.Margins.<init>(Margins.java:32)
    at com.sap.ip.bi.export.model.layout.impl.CellLayout.<init>(CellLayout.java:48)
    at com.sap.ip.bi.export.model.layout.impl.CellLayout.dub(CellLayout.java:57)
    at com.sap.ip.bi.export.xfa.xftextensions.TableContentIterator.createCell(TableContentIterator.java:170)
    at com.sap.ip.bi.export.xfa.xftextensions.TableContentIterator.next(TableContentIterator.java:104)
    at com.sap.ip.bi.export.xfa.xftextensions.TableSubFormSet.writeXFD(TableSubFormSet.java:1189)
    at com.sap.ip.bi.export.xfa.core.Xft_subform.writeXFD(Xft_subform.java:1604)
    at com.sap.ip.bi.export.xfa.core.Xft_subform.writeXFD(Xft_subform.java:1604)
    at com.sap.ip.bi.export.xfa.core.Xft_template.writeXFD(Xft_template.java:216)
    at com.sap.ip.bi.export.xfa.core.Xft.writeXFD(Xft.java:62)
    at com.sap.ip.bi.export.xfa.impl.Document.writeWidthsAsXmlToStream(Document.java:294)
    2. Message:
    No metadata is available for "DISABLE_NAVIGATION":
    <parameterList>
      <param name="BI_COMMAND_TYPE" value="OPEN_DIALOG_DISABLE_NAVIGATION"/>
      <param name="TARGET_DIALOG_REF" value="DISABLE_NAVIGATION"/>
    </parameterList>
    In this window, complete screen of report is displayed as an image instead of PDF.
    Please let me know if anybody faced similar issue earlier.
    It was working perfect earlier, but suddenly error started.
    regards
    Kedar Kulkarni

    No proper findings, but issue resolved.
    Problem i found that we got a domain change and service values were not refreshed until we apply new patch.
    So when we applied patch level 6 on BI WEBAPP& BI BASE S URL for ADS got refreshed and we faced the issue.
    After resetting the URL to new domain problem got resolved.
    Regards
    Kedar Kulkarni

  • Error writing to file during iTunes 10.6 installation - Help!!

    I am trying to update iTunes to 10.6 but I get 'Error writing to file C:\Config.Msi\1b0f1d.rbf. Verify that you have access to that directory' I am presented with the option to 'Retry' or 'Cancel' after choosing retry on multiple occassions the update will not complete. I have a new pc on Windows 7 Home Premium 64-bit system. I have never had this problem before. Thanks in advance.

    Wierdly after persistance it has worked :s not sure how. but I have iTunes 10.6 which is the main thing!

  • Problem with writing to file

    What the program is supposed to do
    Print the squares of one through ten to a file whose name is typed in by the user.
    My Program
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    public class SquareSend
         private JTextField field;
         public static void main(String[] args)
              SquareSend gui = new SquareSend();
              gui.go();
         public void go()
              JFrame frame = new JFrame();
              JTextField field = new JTextField();
              field.addActionListener(new sendToFile());
              frame.getContentPane().add(BorderLayout.CENTER, field);
              frame.setSize(300, 50);
              frame.setVisible(true);
         public class sendToFile implements ActionListener
              public void actionPerformed(ActionEvent e)
                   FileOutputStream out;
                 PrintStream p;
                 try
                         out = new FileOutputStream(field.getText());
                         p = new PrintStream( out );
                         int x = 1;
                          while (x<11)
                               int y = (int)(Math.pow(x,2));
                               p.println("The square of "+x+" is "+y+".");
                               x++;                           
                         p.close();
                 catch (Exception f)
                         System.err.println ("Error writing to file");
    Error Message
    Error writing to file (display message if designated in the try...catch statement).
    Thanks for your help

    use f.printStackTrace() in your catch clause if you want more information about the exception thrown.

Maybe you are looking for

  • Time Capsule fan always on

    I just upgraded my 1st generation 1TB Time Capsule to a brand new 2TB TC. After 3 days, the fan came on full-blast and wouldn't spin down. Even when the TC was in a resting state, the fan remained on full-blast. I tried resetting the TC. I tried powe

  • Managing multiple libraries with different file types (AAC v. Lossless)

    I have set up two libraries, one for my AAC music and the other for my lossless music. The files themselves are located in two separate places on my hard drive. When I switch libraries (option-clicking iTunes), and go to Preferences/Advanced tab, the

  • Display text in caps in smartforms

    Hi all, I have a requirement to display a text in capitals. There is a check box in paragraph attributes in the smart form page which says uppercase but its non editable. I also searched in the smart style but is no checkbox for uppercases available.

  • Can i buy an upgrade from CS5 design prenium windows to CS6 design prenium Mac ?

    Hello, As i said in the title, i purchased Student Edition of CS5 Design Premium for student and i'd like to upgrade it to the same edition to CS6 for Mac. is it possible ? I don't find where i can do that in the adobe's website. I've bought it on it

  • The Move from 1G to 3GS

    Moving from 1G to 3GS was absolutely painless for me. Love the new iPhone after holding off on the 3G. My only complaint if there is any, is the plastic back cover of the 3GS. Wow talk about finger print and smudge central! lol Also the oleo thingy f