Accessing Serialized Files randomly.

I have a problem accessing serailized files randomly. I am using ObjectOutputStream to write objects to a file. I am using the ObjectInputStream to read the objects from the file. Both of these work fine if the order in which i Write objects is the same as the order in which I read Objects. But I need to skip few objects when reading objects from the file. I know API states that the order of writing and reading should be the same. But still is there any way where i can read serailized objects ramdomly form the file.
Please help me with this it is very impritant of the project. We are trying to store tuples in the file. We are going to build an index over these tuples and then read the tuple that we need.
Thankyou,
Nishant

You could wrap the ObjectOutputStream around a ByteArrayOutputStream to first serialize an object to a byte[] and then save that into a RandomAccessFile.
The trick is to be able to tell where in the file each serialized object starts. Possibilities include:
1) If your objects are known to serialize to a fixed size (or if there is a reasonable max size of the serialized object), you could pad each byte[] "record" you write to the file (eg, each object always uses 1K bytes). Then you can easily read back the i'th object byte[] and deserialize it.
2) Design into your RandomAccessFile a "directory" section that keeps track of each stored object and it's starting byte address in the file.
If the file needs to hold an arbitrary # of objects, the directory could support a special entry pointing to a "next" directory section later in the file.
-Brian

Similar Messages

  • How to read UTF-8 encoded text file randomly?

    I am trying to read a text file which has been encoded in UTF-8. The problem is that I need to access the file randomly. The RandomAccessFile is a low-level class and there seems to be no-way to wrap it in InputStreamReader so that UTF-8 encoding can be done on-the-fly. Is there any easy way to do that. Below is the simplified version of my program.
    import java.io.*;
    public class Test{
            public Test(String filename){
                    try{
                            RandomAccessFile rafTemIn = new RandomAccessFile(new File(filename), "r");
                            while(true){
                                    char chr = rafTemIn.readChar();
                                    System.err.println(chr);
                    } catch (EOFException e) {
                            System.err.println("File read.");
                    } catch (IOException e) {
                            System.err.println("File input error");
            public static void main(String[] args){
                    Test t= new Test("template.idx");
    }

    The file that I am going to read could be few hundreds of MBs or GBs. Hence, I will index interesting items in the file. The index file contain the keyword and the byte offset in the file. So, I will need to seek to any byte to read it. The file could be UTF-8 encoded XML or UTF-8 encoded plain text.
    Also, would like to add-up that in the sample program above I am reading the file sequentially. The concerned class has another method which actually does the reading randomly. If this helps, I am pasting the simplified version of code again but this also includes the said method.
    import java.io.*;
    public class Test{
            long bloc;
            long eloc;
            RandomAccessFile rafTemIn;
            public Test(String filename){
                    bloc=0L;
                    eloc=0L;
                    try{
                            rafTemIn = new RandomAccessFile(new File(filename), "r");
                            while(true){
                                    char chr = rafTemIn.readChar();
                                    System.err.println(chr);
                    } catch (EOFException e) {
                            System.err.println("File read.");
                    } catch (IOException e) {
                            System.err.println("File input error");
            public String getVal(String templateName){
                    String stemval=null;
                    try {
                            rafTemIn.seek(bloc); //bloc is a long value for beginng location to read from. It changes.
                            byte[] b = new byte[(int)(eloc - bloc + 1L)];
                            rafTemIn.read(b,0,(int) (eloc - bloc + 1L));
                            stemval = new String(b,"UTF-8");
                    } catch(IOException eio) {
                            System.err.println("Template Dump file IO error.");
                    return stemval;
            public static void main(String[] args){
                    Test t= new Test("template.idx");
                    System.out.println(t.getVal("wikipedia"));
    }

  • Manipulating random access dat files

    I have a bit of a problem, i inherited a system written in qbasic and i need to be able to manipulate some .dat files which are stored as random access binary files.
    my input stream is as follows
    RandomAccessFile vansfile = new RandomAccessFile("c:\\vansfile.dat", "rw");
    no problems here. i then create a byte array of size record length which happens to be 2462 bytes long and read the first 2462 bytes to the array.
    byte[] sss = new byte[2462];
    int j j = vansfile.read(sss)
    now i know roughly at which offsets some data fields are kept, for instance bytes
    sss[0] and sss[1] = a label which is stored in ascii,and bytes 7 to 27 hold a persons name ie byte 7 holds 78 = N byte 8 holds 65 = A ... which ends up spelling NATASHA (the persons name). SO FAR SO GOOD
    NOW apparently bytes 1413 to 1420 holds a monetary value (which i assume is encoded as an integer or a double). if i print the byte values, i get the following where the number before the : is the byte and the number after the : is the value.
    1413 : -102
    1414 : -103
    1415 : -103
    1416 : -103
    1417 : -103
    1418 : -7
    1419 : -126
    1420 : 64
    NOW this Number is supposed to be 60720 ($607.20)
    does anyone know if there is any function which will interpret the above bytes correctly as the result (which i know is correct).

    Your data in bytes 1413 -1420 is stored in the IEEE 754 floating-point "double format" bit layout (the format Java uses for a double),
    and it has the value 607.2
    BUT - it was written in littleEndian, whereas Java uses bigEndian. Makes sense, since QBasic is a MS product, and MS uses littleEndian.
    You can either reverse the byte order and use Double.longBitsToDouble to create a java double, or read it with one of the methods that can read littleEndian.
    If you use the longBitsToDoublemethod, it needs a long as its argument. The easiest way to do that is to create a long using the hex values of the bytes. For example, using your data converted to hex:
    1420: 40
    1419: 82
    1418: f9
    1417: 99
    1416: 99
    1415: 99
    1414: 99
    1413: 9a
    long bits = 0x4082f9999999999aL;
    double d = Double.longBitsToDouble(bits);

  • Randomly accessing serialized objects

    Is there any way to access objects written to a file randomly. Serialization basically needs accessing objects in the same order as they are writeen. but i need to access object(s) in any order.
    Any suggestions on how to do so?

    I got this reply when i questioned the person
    incharge...may be theres much more to it than i
    could specify..........It could also be the case that the person in charge doesn't know that there are databases with small footprints implemented in java.
    so i would be glad if soemone
    could tell me what ever i plan to do with respect to
    random accessing is possible or not.....I think that you should be able to write all objects to one stream, and do a reset (on the object output stream) between each write, and write the start position of each object into an index file.
    I'm not sure that it will work, and having a data file + an index file is like having a small database (so why not download a database in that case)
    /Kaj

  • The process cannot access the file because it is being used by another process with Execute package task

    Hi,
    I've a master package that calls other packages with an Execute Package Task. Sometimes we have an error: "The process cannot access the file because it is being used by another process" and sometimes not. It seems random.
    We are working on a Terminal Server and the SQL Server database engine and the files are placed on another server. It seems that the errors doesn't occu when we run the packages on the server with a job. We can't log onto the windows server on this machine..
    Hennie

    I've seen this myself. On most occasions an immediate rerun would fix the issue. As stated this happens only when we try to run this from BIDs. From SQL agent job it always runs fine. 
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • SOLVED: Getting an Input/Output error when accessing certain files

    My system started failing a few days ago because of sudden Input/Output errors when trying to access certain files. It was running fine until various applications started crashing like for example Pidgin (in retrospect probably because of DBus crashing). I decided to reboot and now can't login anymore because the DBus module fails to load which in turn means that HAL doesn't load either and so I can't use my keyboard to login.
    The error message I get from DBus is that it can't access the file /etc/dbus-1/system.d/org.freedesktop.PolicyKit.conf because of an Input/Output error. I tried to fix/see what was wrong using the arch livecd. Because I thought my problem had to do with a pacman update that had failed before I'd rebooted, I updated my system and I noticed that when pacman tried to access other files it came back with the same error message. The files seemed pretty random, one of them was fakeroot.conf and then several library files like libfaad (sorry this is kind of vague but I'm away from home right now and can't go online very often so I'm writing this from memory).
    I'm guessing its a hard drive problem because checking the filesystem for errors came back with nothing. I was just wondering whether anyone had any other ideas before I go and reinstall. I'm going back home tomorrow so I'll be able to follow any advice/reinstall then.
    Last edited by siell (2010-04-08 17:01:37)

    UPDATE
    It seems to be fixed! The second run of e2fsck fixed some more issues and the files that were causing the problems earlier seemed to have bad inodes. Boots fine now and I can get into my system. I checked and I still have a reasonable amount of free space so I don't think that was the reason ... I have no idea how the filesystem got so corrupted out of nowhere.
    A few things are different, for example, it asked me to unlock the keyring and I couldn't mount my external encrypted drive anymore and had to do it manually with cryptsetup. e2fsck made quite a few changes so I imagine it's due to that. Shouldn't be to hard to fix though.
    Thanks for your help!

  • Can air for html/ajax accessing serial port or usb?

    I just have made use of Adobe AIR .I want to use printer with
    air . Do air have some poperties to accessing serial port or usb?
    I look up that on the Adobe AIR documents.I only found
    'Adobe® AIR™ provides the eans to check for changes to
    the network connectivity of the computer on which an AIR
    application is installed'.
    Do you have some demo with Adobe AIR accessing serial port or
    usb ?
    Or has another poperties to do that!
    thank you!!

    There is no API for accessing the serial port. USB devices
    can only be accessed through the file system (and only if they are
    storage devices).

  • Unable to access jar file error !

    hello,
    i have built my netbeans project and obtained the hequalifies.jar file . unfortunately when i'm trying to run this jar file from the prompt command I'mgetting the error: unable to access jar file
    here is the command i'm typing:
    C:\Users\User\Documents\NetBeansProjects\hEqUALIFIES\dist>java -jar " C:\Users\U
    ser\Documents\NetBeansProjects\hEqUALIFIES\dist hequalifies.jar "
    anyone has any clue?
    10x!

    ok i'm gonna make it easier on you.
    i gess i found what is the problem but have no idea how to solve it.
    when i obtained the .jar file i also obtained a README.txt file in which it is written the following phrase:
    ** If a library on the projects classpath also has a Class-Path element*
    specified in the manifest,the content of the Class-Path element has to be on the projects runtime path.
    I'M SORRY BUT I DID NOT UNDERSTAND WHAT IS MEANT BY: what is "the projects runtime path"?
    the content of my manifest is:
    Manifest-Version: 1.0
    Ant-Version: Apache Ant 1.7.1
    Created-By: 10.0-b23 (Sun Microsystems Inc.)
    Main-Class: hequalifies.ui.HeQualifies
    Class-Path: lib/PlugIn
    X-COMMENT: Main-Class will be added automatically by build
    I'm having problem with lib/plugin.

  • Crashes when running applications from network share - "Windows cannot access the file for one of the following reasons"

    Hi,
    starting a couple of weeks ago, we get the following error(s) when running applications from a network share. We don't know what causes this, we are not aware of any major changes in our network infrastructure or client/Server configuration. We did upgrade
    a lot of machines to Windows 8, but the issue also occurs on older Win7 computers.
    We figured out a workaround though: The applications run fine when launching from a FQDN share (like
    \\share.domain.Company.com) and only cause problems when running from
    \\share directly. They have worked fine for years without FQDN though.
    Any ideas?
    Error Details (the Kind of error differs greatly):
    # 1 #
    Log Name: Application
    Source: Application Error
    Date: ...
    Event ID: 1005
    Task Category: (100)
    Level: Error
    Keywords: Classic
    User: N/A
    Computer: vmDEV
    Description:
    Windows cannot access the file for one of the following reasons: there is a problem with the network connection, the disk that the file is stored on, or the storage drivers installed on this computer; or the disk is missing. Windows closed the program XYZ
    because of this error.
    Program: XYZ
    File:
    The error value is listed in the Additional Data section.
    User Action
    1. Open the file again. This situation might be a temporary problem that corrects itself when the program runs again.
    2. If the file still cannot be accessed and
    - It is on the network, your network administrator should verify that there is not a problem with the network and that the server can be contacted.
    - It is on a removable disk, for example, a floppy disk or CD-ROM, verify that the disk is fully inserted into the computer.
    3. Check and repair the file system by running CHKDSK. To run CHKDSK, click Start, click Run, type CMD, and then click OK. At the command prompt, type CHKDSK /F, and then press ENTER.
    4. If the problem persists, restore the file from a backup copy.
    5. Determine whether other files on the same disk can be opened. If not, the disk might be damaged. If it is a hard disk, contact your administrator or computer hardware vendor for further assistance.
    Additional data
    Error value: C000020C [ also seen with code C00000C4]
    #2 (German error Messages from now on, we only use German OSes, the above english one is translated based on similar error Messages I found on the web) #
    Name der fehlerhaften Anwendung: XYZ.exe, Version: 2015.0.496.5054, Zeitstempel: 0x54ea67c3
    Name des fehlerhaften Moduls: clr.dll, Version: 4.0.30319.34014, Zeitstempel: 0x52e0b784
    Ausnahmecode: 0xc0000006
    Fehleroffset: 0x00026549
    ID des fehlerhaften Prozesses: 0x13ac
    Startzeit der fehlerhaften Anwendung: 0x01d055a854d36445
    Pfad der fehlerhaften Anwendung: \\share\application.exe
    Pfad des fehlerhaften Moduls: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
    Berichtskennung: 949ea933-c19b-11e4-bf04-78542e186754
    Vollständiger Name des fehlerhaften Pakets:
    Anwendungs-ID, die relativ zum fehlerhaften Paket ist:
    Anwendung: XYZ.exe
    Frameworkversion: v4.0.30319
    Beschreibung: Der Prozess wurde aufgrund einer unbehandelten Ausnahme beendet.
    Ausnahmeinformationen: Ausnahmecode c0000006, Ausnahmeadresse 720B6549
    Stapel:
    # 3 #
    Anwendung: WpfApp.exe
    Frameworkversion: v4.0.30319
    Beschreibung: Der Prozess wurde aufgrund einer unbehandelten Ausnahme beendet.
    Ausnahmeinformationen: System.Runtime.InteropServices.SEHException
    Stapel:
       bei SP.Forms.AutoCompleteSelectionBase.OnEnter(System.EventArgs)
       bei System.Windows.Forms.Control.NotifyEnter()
       bei System.Windows.Forms.ContainerControl.UpdateFocusedControl()
    # 4 #
    Anwendung: WpfApp.exe
    Frameworkversion: v4.0.30319
    Beschreibung: Der Prozess wurde aufgrund einer unbehandelten Ausnahme beendet.
    Ausnahmeinformationen: System.Runtime.InteropServices.SEHException
    Stapel:
       bei System.IO.UnmanagedMemoryStream.ReadByte()
       bei System.IO.BinaryReader.ReadByte()
       bei System.IO.BinaryReader.Read7BitEncodedInt()
       bei System.Resources.ResourceReader._LoadObjectV2(Int32, System.Resources.ResourceTypeCode ByRef)
       bei System.Resources.ResourceReader.LoadObjectV2(Int32, System.Resources.ResourceTypeCode ByRef)
       bei System.Resources.ResourceReader.LoadObject(Int32, System.Resources.ResourceTypeCode ByRef)
       bei System.Resources.RuntimeResourceSet.GetObject(System.String, Boolean, Boolean)
       bei System.Resources.RuntimeResourceSet.GetObject(System.String, Boolean)
       bei System.Resources.ResourceManager.GetObject(System.String, System.Globalization.CultureInfo, Boolean)
       bei System.Resources.ResourceManager.GetStream(System.String, System.Globalization.CultureInfo)
    # 5 #
    Anwendung: WpfApp.exe
    Frameworkversion: v4.0.30319
    Beschreibung: Der Prozess wurde aufgrund einer unbehandelten Ausnahme beendet.
    Ausnahmeinformationen: System.Runtime.InteropServices.SEHException
    Stapel:
       bei System.Reflection.RuntimeParameterInfo.get_Name()
       bei System.Diagnostics.StackTrace.ToString(TraceFormat)
       bei System.Environment.GetStackTrace(System.Exception, Boolean)
       bei System.Exception.GetStackTrace(Boolean)
       bei System.Exception.ToString(Boolean, Boolean)
       bei System.Exception.ToString(Boolean, Boolean)
       bei System.Exception.ToString(Boolean, Boolean)
       bei System.Exception.ToString()
    # 6 #
    Name der fehlerhaften Anwendung: XYZ.exe, Version: 2015.0.496.5054, Zeitstempel: 0x54ea834f
    Name des fehlerhaften Moduls: KERNELBASE.dll, Version: 6.3.9600.17278, Zeitstempel: 0x53eeb460
    Ausnahmecode: 0xe0434352
    Fehleroffset: 0x00012f71
    ID des fehlerhaften Prozesses: 0xa68
    Startzeit der fehlerhaften Anwendung: 0x01d0559cb7ec4ed6
    Pfad der fehlerhaften Anwendung: \\share\XYZ.exe
    Pfad des fehlerhaften Moduls: C:\WINDOWS\SYSTEM32\KERNELBASE.dll
    Berichtskennung: 010514d0-c190-11e4-bf04-78542e186754
    Vollständiger Name des fehlerhaften Pakets:
    Anwendungs-ID, die relativ zum fehlerhaften Paket ist:
    # 7 #
    Name der fehlerhaften Anwendung: XYZ.exe, Version: 2015.0.496.5054, Zeitstempel: 0x54ea7a6e
    Name des fehlerhaften Moduls: ntdll.dll, Version: 6.3.9600.17630, Zeitstempel: 0x54b0d74f
    Ausnahmecode: 0xc0000006
    Fehleroffset: 0x0006db27
    ID des fehlerhaften Prozesses: 0x18dc
    Startzeit der fehlerhaften Anwendung: 0x01d0559cb08529c3
    Pfad der fehlerhaften Anwendung: \\share\xyz.exe
    Pfad des fehlerhaften Moduls: C:\WINDOWS\SYSTEM32\ntdll.dll
    Berichtskennung: ef389186-c18f-11e4-bf04-78542e186754
    Vollständiger Name des fehlerhaften Pakets:
    Anwendungs-ID, die relativ zum fehlerhaften Paket ist:

    Hi,
    >>The applications run fine when launching from a FQDN share
    It sounds like a DNS suffix issue. When this issue occurs, please try to ping share on the client, then check if the corresponding IP address is correct. If the IP address is wrong, please adjust your settings of DNS to make sure that the client can resolve
    the share correctly.
    If it's very hard to change the settings of the DNS for some reason, as a work around, we can add the entry into the clients' hosts file.
    Best Regards.
    Steven Lee Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Error on load: System.IO.IOException: The process cannot access the file : error in event viewer when users want to view documents from this third party deployed scan solution

    Error on load: System.IO.IOException: The process cannot access the file
    '\\server1\SCANSHARED\.pdf' because it is being used by another process.
       at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
       at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
       at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
       at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
       at System.IO.File.WriteAllBytes(String path, Byte[] bytes)
       at abc.Scan.Layouts.ICC.Scan.View.Page_Load(Object sender, EventArgs e)
    I faced this  error in event viewer  when users want to view documents from this third party deployed scan solution
    here I have two WFS servers  and they configured with load balancing in F5 .
    when I enable both servers in F5 I receive this error messages in 2nd server,
    when users want to view documents
    adil

    Do you have antiVirus installed on the sharepoint servers?
    These folders may have to be excluded from antivirus scanning when you use file-level antivirus software in SharePoint. If these folders are not excluded, you may see unexpected behavior. For example, you may receive "access denied" error messages when files
    are uploaded.
    Please follow this KB and exclude the folders from Scanning.
    http://support.microsoft.com/kb/952167
    Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog

  • All my desktop icons are Adobe Reader icons, can't access related files

    I was trying to open a file this morning, and when a pop-menu asked what application I wanted to choose (from a list) to open it, I clicked on Adobe Reader - just as a guess.   After that,  just about all my desktop icons are Adobe icons, and when I click on them, the pop up menus says I can't access the file.   These icons also show up on my menu of all my MS Office programs like Outlook, Word, Excel,  etc. 
    Tech support at Adobe recommended I use System Restore, but it also is now an Adobe icon, so I can't open it.    If anyone can help reverse this, I'd greatly appreciate it.
    Thanks,
    David

    Hi,
    This also happened to me this morning. Now all my icons are PDF symbols and Reader opens when I try to open any other program. I uninstalled Reader it and it fixed itself but when I reinstalled the program the same issue occurred.
    I wanted to make PDF reader the default application when openning PDF's vs. Distiller, tinkered and broke my computer.
    Any clues on how to bring everything back to normaL?

  • Not able to access a file referenced from a HTML file

    Hi,
    Using UCM i am checking two files aboutus.html and aboutusBanner.png in About Us FOLDER.Checkin is happening perfectly well.
    Now In JDEVELOPER I am creating a webcenter application (named MyPortalApplication) and accessing those file using a connection to the UCM server.I am able to fetch the files under
    Application Resouces->Connection ->Content Repository ->UCM ->Contribution Folder ->About Us
    UCM I am using a connection name.
    My aboutus.html file in accessing the aboutusBanner.png to display some image.
    Below is code snippet for aboutus.html ...
    <table align="CENTER" width="930px" BORDER=0 bgcolor="white">
    <tr>
    <td>
    <img src="aboutusBanner.png" />
    </td>
    </tr>
    <tr>
    <td valign="top">
    <p style="font-family:Verdana;font-size:14px">
    <br>
    Go Green Eat Fresh opened in 1992 by three Italian brothers with a vision:
    </p>
    </td>
    </tr>
    </table>
    But when i am running the application that banner image (aboutusBanner.png) is not getting displayed.I think i am not giving the path aboutusBanner.png in aboutus.html correctly.
    Please suggest me how my aboutus.html should use the aboutusBanner.png in code given above.
    Thanks,
    Rajeev

    <img src="aboutusBanner.png" />This may reference the file while it is on filesystem (most likely on a web server, must be in the same directory).
    If you want to create a reference to a file in UCM (document repository), you need to do it differently. The easiest way (if your file is in Public security group) is to use html link to the file: e.g. http://{serverURL}/{instance name}/groups/public/documents/graphic/oly_088631.jpg (search for the file in UCM and copy the link from the search result dialog).
    A better way is to use SSXA - see this manual http://download.oracle.com/docs/cd/E17904_01/doc.1111/e13650/toc.htm - when your html will be constructed from a template and the image will be defined through a placeholder (you will learn to use placeholders in Chapter 3 of the manual). Since PS3, SSXA should be usable for Webcenter pages.

  • Excel Automation with Interop - Windows Service - Microsoft Excel cannot access the file

    I have a windows console application, which automates Excel. In our scenario the application gets called from a Windows Service. If the console app is executed directly everything works fine. If the console app is executed through the Win Service, we get
    the following error when trying to open the excel file:
    Unhandled exception Occured : 'Microsoft Excel cannot access the file 'bla.xls'. There are several possible reasons:
    The file name or path does not exist.
    The file is being used by another program.
    The workbook you are trying to save has the same name as a currently open workbook.'.'
    The code snippet used to open the file:
    xlApp = new Application();xlApp.Visible = false;xlApp.UserControl = false;xlApp.Application.ScreenUpdating = false;xlApp.DisplayAlerts = false;xlWorkbook = xlApp.Workbooks.Open( Filename: filePath,  UpdateLinks: 2,  IgnoreReadOnlyRecommended: true, Editable: false);
    The console app and windows service are running on a Win Server 2008 64-bit OS with Excel 2013 32-bit installed. The service is running with a special user account, which has all the right permissions on accessed files and folders. The excel process is also
    started with the same account (I cheched that one). 
    I already tried to do the following, but to no avail:
    Run excel.exe /automation -> worked fine
    Created the folders and also gave full control to the account under which the service is run (even gave full control to Everyone)
    C:\Windows\SysWOW64\config\systemprofile\Desktop
    C:\Windows\System32\config\systemprofile\Desktop
    Configured DCOM
    Excel Application -> Identity -> Specific user account
    Excel Application -> Identity -> Interactive User
    Excel Application -> Security -> Launch permissions -> Everyone full control
    Several combinations of the above
    So I really am stuck with this problem right now. Any input on this is appreciated.

    I have a windows console application, which automates Excel. In our scenario the application gets called from a Windows Service. If the console app is executed directly everything works fine. If the console app is executed through the Win Service, we get
    the following error when trying to open the excel file
    Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office
    may exhibit unstable behavior and/or deadlock when Office is run in this environment.
    If you are building a solution that runs in a server-side context, you should try to use components that have been made safe for unattended execution. Or, you should try to find alternatives that allow at least part of the code to run client-side.
    If you use an Office application from a server-side solution, the application will lack many of the necessary capabilities to run successfully. Additionally, you will be taking risks with the stability of your overall solution.
    You can read more about that in the
    Considerations for server-side Automation of Office article.

  • The circuit of my macbook is dead yet the hard drive is fine.  I need to access a file from the hard drive, how can i do this? is there a cable i can connect to another mac that will let me transfer the file?

    The circuit of my macbook is dead yet the hard drive is fine.  I need to access a file from the hard drive, how can i do this? The mac turns on the screen freezes as bright blue.  Is there a cable i can connect to another mac that will let me transfer the file?

    There is another option if the Macbook will start up in Target Disk Mode.
    Restart the computer while holding down the T key. If you see the firewire symbol moving around on the screen you can connect this one to another one in TDM. You will need a suitable cable to connect the two Macs.
    http://support.apple.com/kb/ht1661
    Firewire symbol:

  • Blocking access to file sharing (AFP/SMB) from outside of network

    Hello all,
    Is there a way to block access to file shares from outside of our LAN? I have a machine that has some sharing turned on (it is also my email server) and I can reach it across the internet and mount shares as if I was in the office.
    How can I block this access? Both SMB and AFP?
    Thank you,
    -John

    Justin, thank you for your reply. The machine is on a public ip address and is not behind a NAT router. I've turned on the software firewall and that is working now. However, I imagine it would be better to use a hardware firewall. Any suggestions on a good one? Thank you.

Maybe you are looking for

  • It shows nothing other than white screen, what's wrong with my ipod nano.

    my ipod nano shows white screen when it's turning on and could not be turn off, it do not respond to any button i press. there is not sign of battery charging as well when i connected it to the USB port. what's wrong with it?

  • Printer has disappeared, Network function gone and Bluetooth does not work

    About 3 or four days ago Software update informed me there was no software to updated. After installing my iMac G5 quit photoshop and QuarkXpress nonstop. In the past when I had problem like this I would just erase the hard drive and re-install all s

  • Leaving Disc in Drive

    Is it advisable / beneficial / or even possible to leave a disc in the drive at all times? I'd like to leave a CDRW in there for convenience sake.

  • Envelopes on F4440

    How do I print envelopes on the F4440?

  • OWB 11.2 and OBII

    Hello, actually we have an Oracle-DB 11.1 with OWB 11.1 and Oracle Business Intelligence 10.1.3.4. Now we want to use OWB 11.2. So we have to update the DB-Repository to 11.2. That should make no problems - i hope. But is Oracle Business Intelligence