Writing a File Interface

I am writing this program to read in a file and filter it, so i can get some certain data into the database out of that interface. The program i wrote below keeps giving me the following error:
Exception in thread "main" java.util.NoSuchElementException
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.<init>(Throwable.java:82)
at java.lang.Exception.<init>(Exception.java:33)
at java.lang.RuntimeException.<init>(RuntimeException.java:37)
at java.util.NoSuchElementException.<init>(NoSuchElementException.java:35)
at java.util.StringTokenizer.nextToken(Compiled Code)
at file.main(Compiled Code)
here is my code:
import java.io.*;
import java.util.*;
import java.text.*;
import java.util.Date;
public class file {
public static void main(String[] args) throws IOException {
// Display today's date using a default fomat for the current locale
DateFormat defaultDate = DateFormat.getDateInstance();
System.out.println(defaultDate.format(new Date()));
// Display Current time using a short time format for the current locale
DateFormat shortTime = DateFormat.getTimeInstance(DateFormat.SHORT);
System.out.println(shortTime.format(new Date()));
// Display date and time using a long format for both
DateFormat longTimestamp = DateFormat.getDateTimeInstance(DateFormat.FULL, DateFormat.FULL);
System.out.println(longTimestamp.format(new Date()));
// Declare Variables
StringBuffer desc;
// Keep looking through the file while it is still not end of file
try {           
// Opens the file and reads it
File theFile = new File("23133202.2");
BufferedReader in = new BufferedReader(new FileReader(theFile));
// Get Length of File, and see how big it is
long filelength = theFile.length();
Date lastModified = new java.util.Date(theFile.lastModified());
String str = new String("");
int i=0;
// Read the file line by line using a Token
while((str = in.readLine()) != null){
StringTokenizer st = new StringTokenizer(str,":");
int count = st.countTokens();
// tokener contains all the field variables
String tokener = new String("");
Vector vec = new Vector();
System.out.println();
while(st.hasMoreTokens()){
vec.addElement(st.nextToken());
tokener = st.nextToken();
System.out.println(tokener);
} // end while
String[] strArray = new String[vec.size()];
vec.copyInto(strArray);
for (i=0; i<strArray.length; i++){
System.out.println(strArray);
} // end the main while
} // end try
catch (EOFException e) {
// end catch...in.close();
can anyone help me here please?

Do this instead:
// tokener contains all the field variables
String tokener = new String("");
Vector vec = new Vector();
System.out.println();
int count = st.countTokens();
for(int loop = 0; loop < count; loop++)
tokener = st.nextToken();
vec.addElement(tokener);
System.out.println(tokener);
This assumes that you want tokener to be the same token you put into the vector. If not, then you will need to make sure that the number of tokens in the tokenizer is even (so that you are able to get two tokens every loop) and increment loop by 2 instead of one every iteration.

Similar Messages

  • Outbound file interface  in CSV format ( ABAP OO )

    Hello folks,
              I am new to the OO ABAP and trying to write outbound interface for couple of HCM tables. It is the piece of cake for me if I do it in regular ABAP but I choose the to it hard way because I want to do it in OO ABAP. I have read several post from Narish . They were great.
    Letu2019s get the point , how I will go off writing an outbound interface ..
    I have looked the class CL_RSAN_UT_APPSERV_FILE_WRITER and its methods
    APPSERVER_FILE_WRITE
    CONSTRUCTOR
    FREE
    OPEN
    CLOSE
    WRITE
    But it seems like I canu2019t use my internal table because  u201CI_DATA_TABu201D type in method APPSERVER_FILE_WRITE.
    Any help will be appreciated.
    Thanks,
    UA

    In order to use the method WRITE or APPSERVER_FILE_WRITE, you need to fill the table TYPE RSANM_FILE_TABLE by concatenating your fields of internal table using the separator (e.g. Horizontal tab, pipe sign, comma) which would be understood by the reader of the file.
    Like:
    data:  li_data_tab TYPE STANDARD TABLE OF string.
    LOOP at itab into wa_tab.
           CONCATENATE wa_tab-field1
                        wa_tab-field2
           into lwa_file separated by cl_abap_char_utilities=>horizontal_tab.
            APPEND lwa_data_tab TO li_data_tab.
    endloop.
    Regards,
    Naimesh Patel

  • File adapter Need to wait When Other Applicatio is writing the file

    Hi All,
    This is File to File Interface, iam using NFS here.
    While other application is writing the file to the Folder, XI Sender File Adapter shld wait for certain time and then pick it up.
    We have the Option " MSecs to Wait Before Modification Check" on File Sender Advanced TAB.
    But it is no Use, it is not behaving correctly.
    Please assist me on this
    Regards

    Hey Vamsi,
    I think you're good to go here. The behaviour is exactly as it should be. The polling interval takes priority when there is no file there but when there is a file there the modification check will take priority over polling interval so it will still wait the mandatory 2 minutes to ensure that no modification is taking place & that's exactly what you want. You don't want to pick up an incomplete file irrespective of when it was put there. So there will always be just over a 2 minute delay (or whatever you set the Msecs value to + a few seconds depending on where the polling cycle is when a file is written out but a max of 2 minutes & 19 seconds delay) when there is a file there but at least you'll have consistent data. If there is no file there the adapter will just poll every 20 seconds until a file arrives.
    The 2 minute 'wait' step is exactly that. The adapter will see the file then wait 2 minutes & probably does a timestamp comparison or something. It doesn't do a modification check within those 2 minutes. Having said that, I don't see why you can't reduce the Msecs interval. My reasoning is that you basically want to establish whether it's still being wriiten out before you pick it up. Even if you set it to 5 seconds you should still be able to pickup whether the file is being modified (I'm assuming that the check is doing a timestamp comparison). That will significantly reduce your time wait period.
    My assumption on the timestamp comparison was wrong It's actually does a comparison on file size when it reads the data in, see SAP Note (Point 3): [http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_bc_xi/~form/handler%7b5f4150503d3030323030363832353030303030303031393732265f4556454e543d444953504c4159265f4e4e554d3d383231323637%7d]
    Another suggestion made on the note: Get the writing application to write the file out with an extension different to the one you're polling for. Then, after they have completed writing out the file, they can do a re-name to the extension that you're polling for. That could also speed up things.
    Regards, Trevor
    Edited by: Trevor Naidoo on Oct 8, 2009 9:38 AM

  • FEH for File Interfaces?

    Hello Experts,
    Can we use Forward Error Handling (FEH) for implementing error handling in File Interfaces ?
    Like for simple Application Server file interfaces, if something goes wrong during the process of writing/reading a file on App Server, can we use FEH for showing the log?
    I know it is a concept used for PI...so we want to know if it can be used for file interfaces as well? Just want to keep similar approach for error handling and logging (for both PI and File Interfaces).
    Thanks.

    Edit 1 May 2015: Added inbound
    Just a slight correction.
    FEH is used in the ABAP backend systems and are only for asynchronous inbound proxy interfaces. It is not available for sync proxies, IDocs, BAPIs. Neither is it available for any error handling on the PI system itself.
    PI/XI: Forward Error Handling (FEH) for asynchronous proxy calls with the use of Error and Conflict Handler (ECH)
    Message was edited by: Eng Swee Yeoh

  • Forward Error Handling - File interfaces?

    Hello Experts,
    Can we use Forward Error Handling (FEH) for implementing error handling in File Interfaces ?
    Like for simple Application Server file interfaces, if something goes wrong during the process of writing/reading a file on App Server, can we use FEH for showing the log?
    I know it is a concept used for PI...so we want to know if it can be used for file interfaces as well? Just want to keep similar approach for error handling and logging (for both PI and File Interfaces).
    Thanks.

    Edit 1 May 2015: Added inbound
    Just a slight correction.
    FEH is used in the ABAP backend systems and are only for asynchronous inbound proxy interfaces. It is not available for sync proxies, IDocs, BAPIs. Neither is it available for any error handling on the PI system itself.
    PI/XI: Forward Error Handling (FEH) for asynchronous proxy calls with the use of Error and Conflict Handler (ECH)
    Message was edited by: Eng Swee Yeoh

  • 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

  • When downloading iTunes, I got a message about error writing to file and it told the file. Then it said to verify that you have access to that directory. I have no idea how to fix it. I could really use some help, please.

    I was trying to download iTunes on my computer, and while doing so, I got this message: Error writing to file: C:/Program Files (x86)/Common Files/Apple/Apple Application Support/Apple Versions.dll. Verify that you have access to that directory. I have downloaded iTunes numerous times and I have never had this problem. If anyone knows what's going on, I would really appreciate the help.

    Well, there's definitely a mac and a Windows version. And you're at the right page. I think the problem is that someone forgot (or decided not to) to update the text at teh bottom of the page to have Mac and Windows.
    Just push the button, you'll get the Mac update no problem.
    Regards,
    Bentley Wolfe
    Senior Support Engineer, Flash/Flash Player/Digital Editions
    Adobe

  • "Error writing to file" when installing Oracle9i

    I am fairly new to Oracle and have not been able to install Oracle 9i on my Redhat 7.2 box. In three attempts to install I have encountered the same error at some point, usually early on 5% or 10% into the install.
    The error is:
         "Error in writing to file /usr/oracle/product/9.2.0/olap/wrksht/wks.jar"
    However, it has not happened on the same file each time. I have stopped the installation of that component, but it encounters the same error on other files. I have tried redownloading the oracle disks and reinstalling, but to no avail. I read on one posting that Oracle needs to have glib2.2(rather than glib1.2) installed, so I downloaded it and will be trying that later today. If anyone has encountered this error and knows how to solve it I would appreciate the help. Below I have listed my computer configuration and I have attached the portion of the install log that identifies the error that takes place.
         Thanks
         Ed
         Here is my setup:
         Dual boot system running Redhat 7.2 and Win2k      server.
         Pentium III 400 MHZ
         256 MB of RAM
         30 GB Hard drive split in half-- 15GB for linux      15GB for windows.
         The mount points for linux are
         /          400 MB
         /boot      400 MB
         /home          1GB
         /tmp          600 MB
         /swap          600 MB
         /usr          12GB
         ORACLE_HOME is /usr/oracle/product/9.2.0
         all data files and software are under /usr/oracle
         Portion of the install log:
    Starting install install phase 1 of component Oracle OLAP Worksheet
    Calling query areasQueries2.2.0.7.0 getProductHome
    name = oracle.swd.jre
    startVersion = 1.1.8.0.0
    endVersion = 1.1.8.99.99
    acceptCompatible = null
    Query returned : /usr/oracle/jre/1.1.8
    Setting value of JDK_ROOT to /usr/oracle/jre/1.1.8
    Calling action fileActions2.2.0.10.0 copyGroupFromJar
         selectedNodes = null
         copyGroup = worksheet
         permissions = 644
         owner = null
         group = null
         copyAsText = null
         JarLoc = /tmp/OraInstall2003-01-23_03-02-09PM/temp57
         gpEntries = [[xsjwork.jar ->%ORACLE_HOME%/olap/wrksht/xsjwork.jar 1803268 plats=1=>
    Exception thrown from action: copyGroupFromJar
    Exception Name: IOException2
    Exception String: Error in writing to file /usr/oracle/product/9.2.0/olap/wrksht/wks.jar
    Exception Severity: 2
    *** Cancel Dialog:  ***
    User selected: Stop installation of all products.
    Exception handling set to prompt user with options to  RETRY  IGNORE
    User choice : User selected stop installation of all components
    Error in writing to file /usr/oracle/product/9.2.0/olap/wrksht/wks.jar
    Unable to read the list of homes from the inventory.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Hi,
    Did you guys finally find solution to the problem?
    I have been trying to install Oracle 9.2.0.1 on redhat 8.0 box, for ages now. I get the following error first during install
    Error in writing to file libclntsh.so.9.0
    Then it is a series of errors, similar.
    In the end there is the dreaded linking error... for the ins_rdbms.mk sdo_on
    i just cant handle it.
    What the hell is wrong?
    I have done everything right as far as i know... any solutions?
    cheers

  • Problem writing to file

    I'm working on a program that asks for the users name. after that its supposed to pull the current date and time and print that into a file along with the users name.
    my problem is when i open the .txt file i get several characters i dont recogize and then my name at the end.
    Thanks for the help:
    public class CIS314Exam1MarkWellsFrame
    private ObjectOutputStream output;
    public void openFile()
    try
    output = new ObjectOutputStream(new FileOutputStream("guestlog.txt"));
    catch(IOException ioException)
    JOptionPane.showMessageDialog(null, "You do not have access to this file");
    System.exit(1);
    public void insertName()
    try
    Date today = new Date();
    //utput.writeObject(today);
    //String name = JOptionPane.showInputDialog("Enter Name");
    String name = "Mark";
    output.writeObject(name);
    catch(IOException ioException)
    JOptionPane.showMessageDialog(null, "Error writing to file");
    return;
    public void closeFile()
    try
    if(output !=null)
    output.close();
    catch(IOException ioException)
    JOptionPane.showMessageDialog(null, "Error Closing File");
    System.exit(1);
    System.exit(0);
    }

    This isnt the correct forum for this question. Use tags when posting code.  Post the contents of the .txt file and what unexpected characters you are getting.                                                                                                                                                                                                                                                                                                                                           

  • 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!

  • Not writing to file

    Hi,
    I have made a program that reads a string, converts it to bytes, then writes to a file.
    Well i got the first two working, but its not writing to file. I know it should work cos i have written to file on my previous tests, but when i used a FOR loop it stoped working. Do ya know why. Below is the code...
    for (int a = 0;a = bytes.length - 1;a++){
    of.write(bytes[a]);
    System.out.print(" " + bytes[a] + " : " + bytes.length);
    My friend told me to use bytes.length - 1 as it is meant to stop the OUTOFBOUNDS error.
    OK,
    my regards
    Below is the whole program, its a bit messy cos i got lots of old code that i have blocked.
    import java.io.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.lang.String;
    public class sender implements Runnable {
    int i= 0;
    String mes;
    int count =0;
    int b = 0;
    boolean yes = false;
    public static void main (String[] arguments) {
    Thread th = new Thread (new sender());
    th.start ();
    //sender();
    //while (true){}
    public void run() {
    try {
    Thread.sleep(100);
    } catch (InterruptedException e) {}
    String mesdialog = JOptionPane.showInputDialog(null,
    "Enter your message");
    mes = mesdialog.toString();
    try {
    //FileOutputStream of = new
    //FileOutputStream ("send.txt");
    FileWriter of = new
    FileWriter("send.txt");
    //BufferedReader in = new
    // BufferedReader(fr);
    //while (true){}
    int i = 66;
    boolean eof = false;
    int inChar = 0;
    //String inChar;
    byte[] bytes = mes.getBytes();
    /* < disable / enable
    do {
    int n=Integer.MIN_VALUE;
    try{
    n = Integer.parseInt(mes);
    } catch (NumberFormatException nfe){
    //inChar = n;
    if (inChar != -1) {
    byte outChar = (byte)inChar* ;
    //char outChar = (char)inChar ;
    of.write(outChar);
    System.out.println("" + outChar);
    //of.write(mes,0,20);
    } else
    eof = true;
    } while (!eof);//*/
    for (int a = 0;a = bytes.length - 1;a++){
    of.write(bytes[a]);
    System.out.print(" " + bytes[a] + " : " + bytes.length);
    while (!yes) {
    if (bytes[b] == 32 )
    yes = true;
    else {
    of.write(bytes);
    System.out.print(" " + bytes[b]);
    b++;
    //System.exit(0);
    //outfile.write(input);
    } catch (IOException e) {
    System.out.print("AAA ERROR");}

    your friend was obviously wrong.
    for (int a = 0;a = bytes.length - 1;a++){ // that does nothing
    of.write(bytes[a]);
    System.out.print(" " + bytes[a] + " : " + bytes.length);
    }the above "for" loop says :
    1:initialize a with 0;
    2:do loop while a=bytes.length(<-that's completely wrong. it should be
    a boolean expression);
    3:for each loop increment "a" by one.
    try this:for (int a = 0;a < bytes.length;a++){
    of.write(bytes[a]);
    System.out.print(" " + bytes[a] + " : " + bytes.length);

  • 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

  • Writing to file

    public static void main(String args[]) throws Exception
    String str1;
    int length;
    BufferedReader inpu=new BufferedReader(new InputStreamReader(System.in));;
    System.out.println("Enter something: ");
    str1=inpu.readLine();
    System.out.println("hai"+" "+str1);
    i ve used the above code to read an input from the user now i want to write this to a file.plz tell me how to do it

    ya i tried using FileWriter
    But is there any other methods
    import java.io.*;
    class readtofile
    public static void main(String args[]) throws Exception
    String str1;
    int length;
    //stream given to inputstream reader then buffered usin buffered reader
    BufferedReader inpu=new BufferedReader(new InputStreamReader(System.in));;
    System.out.println("Enter something: ");
    str1=inpu.readLine();
    System.out.println("hai"+" "+str1);
    //opening a new file for output
    File outfile_1= new File("testout.txt");
    //using filewriter class for writing to file
    FileWriter out= new FileWriter(outfile_1);
    out.write(str1);
    out.close();
    }

  • Writing to file in JUnit test case? Not working?

    I have a singleton class called InstantLogger that internally uses a PrintWriter to write to file. It is very basic, has startLogger(String filename), log(String msg), and stopLogger(). startLogger just creates file, log write to file, and stopLogger closes file.
    When I use this class outside of the JUnit test suite it works fine.
    As soon as I use it in a JUnit test it does not write to file. It creates the file (this happens in the TestSuite), but will not write anything to it (when log is called from TestCase). I put a System.out in the log function and I see that, but still nothing writing to file. And I will say it again, it does work in non TestCase scenarios so I know it works.
    Is there something that could be preventing me from writing to file in JUnit TestCase? Could this be a Singleton Issue?
    Thanks,

    avalanche333 wrote:
    I have a singleton class called InstantLogger Ouch.
    that internally uses a PrintWriter to write to file. It is very basic, has startLogger(String filename), log(String msg), and stopLogger(). startLogger just creates file, log write to file, and stopLogger closes file.
    When I use this class outside of the JUnit test suite it works fine.Oh, brother.
    >
    As soon as I use it in a JUnit test it does not write to file. It creates the file (this happens in the TestSuite), but will not write anything to it (when log is called from TestCase). I put a System.out in the log function and I see that, but still nothing writing to file. And I will say it again, it does work in non TestCase scenarios so I know it works.
    Is there something that could be preventing me from writing to file in JUnit TestCase? Could this be a Singleton Issue?Um, no.
    Your code is wrong. You're assuming something that isn't correct. You're also making the assumption that just because it "works" in another context that it's right in all contexts. The two aren't the same, be it configuration or something else.
    Singleton? That GoF pattern has been voted off the island. Didn't you hear?
    http://code.google.com/p/google-singleton-detector/
    %

Maybe you are looking for