File access question

I've written an application that runs on a server and watches a list of directories specified in an .ini file. A thread is executed every few seconds (also specified in the .ini) that checks to see if any files have been copied into any of the directories it is monitoring. If it finds one or more files, it zips them into a .zip file and copies them to an output directory.
The problem I'm having is people are copying HUGE .eps files into the directories through our company's network. The thread gets executed before the copy is done and a .zip file of the partial .eps file gets created.
The question is how can java know if a file is currently being written to? My application needs to wait until the file has been fully copied before it tries to zip it up and send it out. How can I achieve this?

These are all good responses, but I've now tried most of them and I still get sent back to my original problem:
We're using Windows NT so I don't know if this is the same case for UNIX or other OS'es but when you copy a large file from one machine to another, NT automatically allocates disk space on the target machine for the size of the file AFTER the copying is done.
So if you were copying a 64 Meg .eps file from one machine to another, as soon as the copying starts the file system reports the file size as 64 Megs not however much has been copied so far. So I don't think filesize checking will help.
I tried using canWrite() on a file currently being copied to and it returns true so that didn't work either. I'm sure it has something to do with the way NT copies files. It allocates all of the disk space necessary right from the start so Java thinks it is a whole file and can do whatever it wants with it.
I also tried the rename-and-replace method but still ran into the same problem. NT reported to Java that a complete file was available even though it was a partial file. So then the renaming and deleting took place way before the file was actually done copying.
I think what I really need is some way to access whether or not the file is currently being used. Just a simple true or false method that will tell me if another application or the file system itself is currently using a file. Then I'll just wait until it is done and then zip it up.
I read the JavaDoc for the FilePermission class and it reads like Greek to me and I don't think it will be much help. Any ideas?

Similar Messages

  • File Access questions

    2 questions
    1.) I can't edit files from the portal, I can only view them, is this normal?
    2.) Can I view files on my smart phone? I've seen this work for SBS so I'm wondering if there is a way to do it here?
    Thanks!

    "Users" allows you to set up custom access permissions for users or groups you specify.
    For example, for some file:
    User: me - Read & Write
    User: mywife - Read only
    Others: No Access
    You can write to the file. Your wife can open it but not edit it. Your kids cannot access it.

  • Sql agent job getting file access denied error

    I'm not sure if this question belongs in this forum. Please move it if you want to.
    Here is my question. I have an ssis package that is running into an error at the file system task trying to move a file. The package is deployed to the catalog and I am running the package using the stored procedure
    [SSISDB].[catalog].[start_execution] @execution_id
    When I execute this stored proc in Management Studio while logged in under a sysadmin, everything works fine. But when I call the same TQL in SQL Agent job, I get a file access denied error. This has something to do with the id that is getting used
    to run the package and I am not sure how to track that down. Any help would be appreciated.
    I've check the windows permission on both the id that is running the SQL Agent and SQL SSIS Service. Both seem to have the right windows permission.

    Please see:
    http://support.microsoft.com/kb/918760

  • FIle Access in WP8

    Hi ALL,
    Am Developing Windows Phone 8 App.
    My Requirement is Specific to WP8 Not 8.1
    Am Accessing Music Files like
                var ml = new MediaLibrary();
                var Music = ml.Songs;
    I need to get the path of each song so that i can copy those songs to some other directory  through c#
    Any Suggestion would be of great Help.
    Thanks
    Arjun

    Hello ArjunShrivatsa,
    according to the thread at
    [1], it seems that you can only add new songs to the music library.
    It is only possible in WP 8.1 to get access(read/write) to the music library.
    [1]
    http://stackoverflow.com/questions/13467701/windows-phone-8-media-file-access
    Regards,
    Bo Liu
    Developer-Hotline for MSDN Online Germany
    Disclaimer:
    Please take into consideration, that further inquiries cannot or will be answered with delay.
    For further information please contact us per telephone through the MSDN-Entwickler-Hotline:
    http://www.msdn-online.de/Hotline
    For this post by the MSDN-Entwickler-Hotline the following terms and conditions
    apply: Trademarks,
    Privacy
    as well as the separate
    terms of use for the MSDN-Entwickler-Hotline .

  • PATH/FILE ACCESS ERROR CITRIX

    Hello!
    My customer is using BPC 5.1 and users are accessing BPC through Citrix.
    Whenever they send data (button that run MNU_ESUBMIT_REFSCHEDULESHEET_REFRESH), they are getting a popup window that says "SAP - Path/File Access Error". When they click ok on this window, the data sends anyway.
    However, we'd still want this resolved as the clients do not feel comfortable having their users see this message. We also noticed that when they are not on Citrix, it sends without any issues.
    Your thoughts would be greatly appreciated!
    Thanks,
    Fabiola
    Edited by: Fabiola Vezza on Jan 21, 2010 2:36 PM
    Edited by: Fabiola Vezza on Jan 21, 2010 2:37 PM

    I have moved this thread to the BPC MS forum.  Notice the sticky [note|Please do not post BPC, SSM or FI/CO questions here!; at the top of the FPM - General (PCM, FC, Other) Forum whereby we announced new dedicated forums for BPC which are the proper place to post your questions regarding BPC in the future.
    [Jeffrey Holdeman|http://wiki.sdn.sap.com/wiki/display/profile/Jeffrey+Holdeman]
    SAP BusinessObjects
    Enterprise Performance Management
    Regional Implementation Group

  • Can a unsigned jar file access the tmpdir (java.io.tmpdir)?

    Hello, according to the JNLP tutor, a signed jar file can access the local file system, but a unsigned one can not. My question is, can a unsigned jar file access the temp directory (the system property java.io.tmpdir)? I think the temp directory should be accessible even though it is part of the local file system.
    Thanks,
    LyLi

    no - unsigned application has no read/write access to the temp dir, but you can use the jnlp api to read and write files with the users permssion.
    see: http://java.sun.com/javase/6/docs/jre/api/javaws/jnlp/index.html for FileOpenService, FileSaveService, and ExtendedService.
    /Andy

  • Trusted Local Flex swf files access to internet?

    Hi All,
    We're developing a desktop game client using Flex and require
    a local swf file to make loader calls to the Internet. I know about
    the sandbox issues but have read that placing a text file such as
    myflexapp.cfg into the
    C:\windows\system32\Macromed\Flash\FlashPlayerTrust directory can
    let the Flash player know about swf files that are trusted. The
    file myflexapp.cfg has the absolute path to the directory location
    of my Flex generated swf file - which is the debug directory of my
    Flex project. I also tried targeting the swf file explicitly rather
    than the entire directory.
    When I test, the swf file continues to just quietly fail to
    load any resources from the internet. Also, I do not get any
    warning dialogs telling me that a swf file is trying to access the
    internet and if I wish to allow it. Have I missed something? has
    anyone had any success with using the Global Flash Player Trust
    directory to allow a local Flex generated swf file access to the
    internet? Also I cannot see the mms.cfg file in the
    C:\windows\system32\Macromed\Flash directory as is described in the
    Adobe Flex 3 Help chapter "Overview of permission controls".
    Any thoughts would be greatly appreciated! Thanks in advance
    Regards
    Tom

    hi - does this always work? i have the same question as wanderz. i live in ethiopia where the internet connection is unreliable and want a robust local wirless network that will allow my devices to communicate with each other and some file sharing. ive used a router in the past but, for instance, when the internet connection goes down my ipad no longer works as a remote control for my mac mini
    really grateful for any suggestions

  • CIFS UNC File access in Video Component

    Does the FLV video player component support file access via CIFS (windows file share) using UNC path \\server\share\filename?
    If Yes,
    Is that considered local file access?  or Network Access?
    Do the Cross Domain Policy restrictions apply?
    Thanks

    Applets are not allowed to connect to other server
    than the one they were loaded from. This is probably
    the reason here.You mean that I can use the applet after uploading on my web-site and using "getDocumentBase()" only?
    OK.
    The applet works perfectly if I use that function, but I have another question.
    If I want to use something like:
    Img1=getImage(getDocumentBase(), "s01.jpg");
    it works perfectly.
    If I do the fillowing:
    Img1=getImage(getDocumentBase(), "pic/s01.jpg");
    it also works.
    But is it possible to go a level up?
    Like:
    Img1=getImage(getDocumentBase(), "../pic/s01.jpg");
    That is if an applet is in one folder and the pictures are in another, but to get to them I have to go a level up and then enter another folder.
    Please help.
    Thanks.

  • I got new hard driver for my MacBook I don't have the cd but I do have flash drive that has the software I need help because when I turn on my laptop it shows me a file with question mark how can I install the software from the flash driver?

    I got new hard driver for my MacBook I don't have the cd but I do have flash drive that has the software I need help because when I turn on my laptop it shows me a file with question mark how can I install the software from the flash driver?

    Hold down the Option key while you boot your Mac. Then, it should show you a selection of devices. Click your flash drive and it will boot from that.

  • Not Working: BlackBerry Link Remote File Access Remove Old BlackBerry from BB ID

    I have: removed my blackberry q10 from blackberry link, wiped my q10, uninstalled and reinstalled blackberry link, have link version 1.1.1.32, blackberry q10 os version 10.1.0.2309 - which whenever I plug in the q10 after removing the device from link, says there is an os update, so I update it, and then it does nothing apart from rebooting the q10, or gives an error saying 'updates not available. Please check internet connection and retry.'.
    Also, I have Logout/login on blackberry link, I know my q10 is activated as I have purchased items from app world, and on the computer the app world site shows that I have a q10 when I sign in. I am using the same BBID and have changed the password on my q10 to see if that made a difference, then signed out and back into link on computer with updated password. I have administrator rights on my computer.
    I can access the q10 from my computer over the same wifi network, and it syncs files fine with wireless sync turned on. It is remote file access not giving the option to connect to my q10. 'BBID *email* isn't associated with a device running Blackberry 10 OS or an error occurred when trying to retrieve your information from the Blackberry ID servers.'
    The problem is that although I have the same blackberry id for link and my q10, no devices show up on the remote file access screen, and I cannot access my files on my computer from my q10, yet I can sync them on my computer over the wifi network. How can I enable Remote File Access?
    A problem could be that I have a Curve 9300 on my BB ID account, so if I could disable this (which I have no idea how to do after a lot of research), this might rectify why link cannot set up remote file access.
    What I haven't done is wiped my q10 and uninstalled all user data from link at the same time, as then I would have to manually reload everything on my q10.
    My q10 shows my computer in the settings\blackberry link\paired devices ,  but I 'cannot view files on *computer*'. Also, link does not show in the file manager. I set up my q10 as a permanent link not a one-off connection.

    No one cares because it's not a z10 (I know because I am having the same problem and no one knows how to fix it and no threads for q10 fix)
    Slàinte.
    Not all things are good.
    Not all things are evil.
    But with an open mind...
    You can see the difference.
    Knowledge is power.

  • Read-only file access from network volume

    I get an read-only file access from network volume problem while sharing a drive from Snow Leopard to a Tiger install. Most of files were opening well, but *.fp7 (FileMaker) and *.xls (Excel) files won't open dealing with a read-only error.
    As descibed in the last post of http://discussions.apple.com/thread.jspa?threadID=1406977 the client have the same share name of the server. Renomming it resolved the error!
    Thanks!

    right then, as it looks like I'm talking to myself....
    I have just wiped clean the Macbook Pro.
    I installed Leopard from scratch, then installed Office 2008.
    Logged back onto the network share, and the read-only error came up again, ONLY in Excel.
    bugger.
    Did the same thing with my Macbook and all is fine.
    Copy the file to the local hard drive, opens ok.
    I then copied the file to another Mac on the network.
    mmmm, opens fine.
    what's the difference....
    mmmm, the machine it opens fine from is running 10.4
    the machine which hosts all the data is running 10.3.9
    could this be the problem.
    Just done a software update check on the 10.3 machine and there are some security updates that need doing.
    Going to run that now and see what happens, otherwise I think the iMac running 10.3.9 is going to need to come up to 10.4 and fingers crossed this will solve it.

  • MaxDB KNLDIAG file access denied

    Hi,
    I'm a DBA recently assigned to support MaxDB database (ver 7.6) used by
    SAP Content Server in our windows 2003/32 bit environments.
    Initially, our windows support group granted the DBA group access to
    the files on E:\sapdb\data\wrk\CD1 where the KNLDIAG and other files
    are allocated. We were able to view the KNLDIAG file when errors
    occurred.
    However, when the database instance is placed offine and back online,
    we loose access to the KNLDIAG file, but not the other files on the
    same directory/subdirectory.
    Can you explain what is happening?
    Is MaxDB doing something behind the scenes?
    What can be done so that we don't loose access to this file?
    I would appreciate any help you can provide.
    Regards,
    Bill

    Hi Bill!
    > I'm a DBA recently assigned to support MaxDB database (ver 7.6) used by
    > SAP Content Server in our windows 2003/32 bit environments.
    > Initially, our windows support group granted the DBA group access to
    > the files on E:\sapdb\data\wrk\CD1 where the KNLDIAG and other files
    > are allocated. We were able to view the KNLDIAG file when errors
    > occurred.
    > However, when the database instance is placed offine and back online,
    > we loose access to the KNLDIAG file, but not the other files on the
    > same directory/subdirectory.
    >
    > Can you explain what is happening?
    Yes, no problem!
    > Is MaxDB doing something behind the scenes?
    Of course not - it's well documented
    Unlike Oracle MaxDB does not use the same file all the time to write out the error messages.
    Instead, with every restart the last file 'KLNDIAG' (and/or 'KNLMSG'  in more recent versions) is renamed to 'KNLDIAG.OLD'. If there is already an 'KNLDIAG.OLD' this file is gone afterwards.
    Then a new file is 'KNLDIAG' is created by the MaxDB Kernel with the default permission of the folder.
    Usually these are dictated by the Windows account that runs the MaxDB-Service.
    If you did not change this, this would be the "local systemaccount".
    On my test system this results in default permissions that allow members of "Adminstrators", "Backup Operators", "System" and of course the "Owner/Creator" to access the file.
    > What can be done so that we don't loose access to this file?
    Simple: if you want to access it via OS tools, make sure that the user is a member of the "Administrators" or the "Backup Operators" group.
    If you don't want to do that, just use the file access via the DBMGUI or DB Studio (or DBMCLI) to get access to the file.
    regards,
    Lars
    p.s.
    Maybe you didn't notice that by now - the KNLDIAG file is not simply written at the end of the file, but consists of a startup header part and a body which is cyclically overwritten.
    For any newbies I cannot overstate the importance of reading the documentation [http://maxdb.sap.com] and/or get a training for it (SAP course ADM 515 really pays of here...)

  • Server 2008r2 and windows 7 pro slow to no networkshare file searching and file access (green progress bar)

    we are running a windows server 2008r2 sp1 domain controller and a 3com gigabit switch to which 7 windows 7 pro computers are connected. We are only using the windows server to distribute a few printers and as a network share (z drive).
    we are storing all files (word documents only) centrally on the server (z share), and files are accessed and written to the z share.
    Problem is that file access from the z share on the windows 7 client computers is at best buggy. we are able to browse the z-share, but as soon as we want to search the z-share for files (f.i. use file explorer with "content: memorandum") the green
    progress bar shows and no search is performed. something like alphabetically sorting a directory on map/file name on the z-share also shows a green bar with no sorting. manually going to the files works.
    One thing i noticed, sometimes not all files that one user created and stored on the server is visible and can be found by another user. I prefer to disable all offline file caching setting, because that feature is not used. no files should be made accessible
    offline. i don't know where to change that on the server side. 
    I am reluctant to experiment on the server end (2008r2 sp1), so i tried a few suggested solutions on the client end (windows 7 client)
    I tried disabling offline file caching
    i tried properties (z share) ==> advanced and map optimizing and several options there
    i tried disabling the smbv2 protocol and disabling the smbv1 protocol (using
    sc.exe config lanmanworkstation depend= bowser/mrxsmb10/nsi command etc. posted by microsoft)
    i tried disabling windows defender
    i tried accessing the z share via ip and server name (the share is mapped via its servername, e.g. dennis-dc1\share). still the same
    file searching on the clients c drive ('own harddrive') works much better, file searching on the server also works.
    any suggestions or solutions that i can test on the client side, as mentioned i am reluctant to change something on the server side. if a solutions works, i prefer to change it on the server side.

    Hi,
    The issue could be due to windows indexing service taking long time in sorting and searching in mapped drives. Please try the steps belwo to disable windows indexing service or search service on the windows 7 client to resolve the issue.
    You can click on Start and select Control Panel, click on
    Programs and Features, go into the Turn Windows Features on or off section Scroll down the list and uncheck the box next to Indexing Service or Windows Search.
    Best Regards,
    Mandy
    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 Subscriber Support, contact [email protected]

  • Problem with file access in other computer in jsp

    I have problem with file accessing in other computer in jsp.
    The follow code
    File folder=new File("Z:"+File.separator+"sharefolder");//Z is a net share driver
    File[] files=folder.listFiles();
    System.out.println("test");
    System.out.println("length="+files.length);
    will throw exception at the second print.
    but it works well in main funtion.
    Is anybody know what is the problem.
    JSP works on windows2003 server,tomcat 5.0.28 JDK1.4 net share folder on windows2000 server

    no error code for this.But when I start tomcat I get the follow error.
    java.lang.IllegalArgumentException: Document base Z:\ does not exist or is not a readable directory
         at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:138)
         at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:3910)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4138)
         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
         at org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer.java:903)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:216)
         at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:256)
         at org.apache.commons.digester.Rule.end(Rule.java:276)
         at org.apache.commons.digester.Digester.endElement(Digester.java:1058)
         at org.apache.catalina.util.CatalinaDigester.endElement(CatalinaDigester.java:76)
         at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
         at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
         at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
         at org.apache.commons.digester.Digester.parse(Digester.java:1567)
         at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:488)
         at org.apache.catalina.core.StandardHost.install(StandardHost.java:863)
         at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:483)
         at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427)
         at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)
         at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
         at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
         at org.apache.catalina.core.StandardService.start(StandardService.java:480)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
    Jun 5, 2006 6:55:41 PM org.apache.catalina.core.StandardContext start
    SEVERE: Error in resourceStart()
    Jun 5, 2006 6:55:41 PM org.apache.catalina.core.StandardContext start
    SEVERE: Error getConfigured
    Jun 5, 2006 6:55:41 PM org.apache.catalina.core.StandardContext start
    SEVERE: Context startup failed due to previous errors
    Jun 5, 2006 6:55:41 PM org.apache.catalina.core.StandardContext start
    SEVERE: Exception during cleanup after start failed
    LifecycleException: Container StandardContext[msgstore] has not been started
         at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4466)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4371)
         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
         at org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer.java:903)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:216)
         at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:256)
         at org.apache.commons.digester.Rule.end(Rule.java:276)
         at org.apache.commons.digester.Digester.endElement(Digester.java:1058)
         at org.apache.catalina.util.CatalinaDigester.endElement(CatalinaDigester.java:76)
         at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
         at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
         at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
         at org.apache.commons.digester.Digester.parse(Digester.java:1567)
         at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:488)
         at org.apache.catalina.core.StandardHost.install(StandardHost.java:863)
         at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:483)
         at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427)
         at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)
         at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
         at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
         at org.apache.catalina.core.StandardService.start(StandardService.java:480)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)

  • File access to /res folder before decompression

    Hi, anyone please assist on how i would access a compressed text file in the /res folder before I can decompress it. I also need to know if its possible to create a file since the decompression algorithm creates a new decompressed file. The following code runs on a computer but I need to use it in the J2ME platform by calling it from the midlet class. Any assistance will be highly appreciated:
    import java.io.*;
    import java.util.*;
    public class Decompress{
    final static int MAX_CODES = 4096;
    final static int BYTE_SIZE = 8;
    final static int EXCESS = 4;
    final static int ALPHA= 256;
    final static int MASK = 15;
    static int [] s;
    static int size;
    static Element [] h;
    static int leftOver;
    static boolean bitsLeftOver;
    static BufferedInputStream in;
    static BufferedOutputStream out;
    private static void setFiles(String[] args) throws IOException{
    String inputFile, outputFile;
    if(args.length >= 1){
    inputFile = args[0];
    if(!inputFile.endsWith(".lzw")){
    System.out.println("The filename must end with \"lzw\" extension");
    System.exit(1);
    in = new BufferedInputStream(new FileInputStream(inputFile));
    outputFile = inputFile.substring(0, inputFile.length()-4);
    out = new BufferedOutputStream(new FileOutputStream(outputFile));
    else{
    System.out.print("usage:java Decompress <filename>");
    System.exit(1);
    private static void output(int code)throws IOException{
    size = -1;
    while(code>=ALPHA){
    s[++size]=h.suffix;
                code = h.prefix;
    s[++size]=code;
    for(int i=size; i>=0; i--)
    out.write(s);
    private static int getCode() throws IOException{
    int c = in.read();
    if(c == -1)return -1;
    int code;
    if(bitsLeftOver)
    code = (leftOver<<BYTE_SIZE)+c;
    else{
    int d = in.read();
    code = (c<<EXCESS)+(d>>EXCESS);
    leftOver = d&MASK;
    bitsLeftOver = !bitsLeftOver;
    return code;
    private static void decompress() throws IOException{
    int codeUsed = ALPHA;
    s = new int[MAX_CODES];
    h = new Element[MAX_CODES];
    int pcode = getCode(), ccode;
    if(pcode>=0){
    s[0] = pcode;
    out.write(s[0]);
    size = 0;
    do{
    ccode = getCode();
    if(ccode<0)break;
    if(ccode<codeUsed){
    output(ccode);
    if(codeUsed<MAX_CODES)
    h[codeUsed++] = new Element(pcode, s[size]);
    else{
    h[codeUsed++] = new Element(pcode, s[size]);
    output(ccode);
    pcode = ccode;
    }while(true);
    out.close();
    in.close();
    public static void main(String [] args) throws IOException{
    setFiles(args);
    decompress();

    if(messageNotWellFormatted("File access to /res folder before decompression"){
      retry();
    }else{
      answerTo(post.getProfile());
    }retry with the formatting tips !!!!!

Maybe you are looking for

  • I CANNOT SYNC MY IPOD DUE TO TOO MANY ID'S.  hOW DO i USE JUST ONE ID AND GET RID OF THE OTHERS SO I CAN AUTHORIZE THIS COMPUTER TO SYNC.

    I cannot sync my ipod classic with this computer.  For some reason, my computer will not authorize my ipod.  I seem to have 5 usernames, but I only want to use one  I use my ipod 4 my job; this is extremely frustrating.  the serial # has been scratch

  • Wont install audio drivers?!? Please help

    My motherboard is the k7n2 delta series. I have 5.1 surrond sound speakers and I had just bought the S-bracket for this motherboard. I CANT get INTO the "NVIDIA nFORCE(TM) Control Panel" to configurate the speakers. When I install the drivers a warni

  • PO creation error - Info-record

    Hi All, I am trying to create the PO for a particular material,but i am getting an error on saving the PO. "Please contact the responsible person for Info-rec" The Info-record for that material for that vendor is present when i checked in the t-code

  • Satelite A100 Series: Replace Keyboard

    Can anybody perhaps give some guideline how to replace the keyboard - is there some Worksho\Technical manual avaiable, describing the operation?

  • Quote Expiration Process in SAP

    Hi All: I have a situation below: During the vendor Quote Process, quote comes only with 90 days validity. Now after the quote some times it takes time to take the decision to move further. now if at the time of PO, if quote is expired than they have