Applet: update file on server

Hi Forum,
Following is the code in an applet to update file on server.
Why does the following code is not doing any updation to the server file?
Any reply will be appreciated.
protected void SaveFile() {
try {
URL url = new URL("Http://uptsrv/draw/Sample.txt");
//URL url = new URL(getCodeBase(),filename);
URLConnection urlCon = url.openConnection();
this.showStatus(" Saving... " + url.getPath());
urlCon.connect();
urlCon.setDefaultUseCaches(false);
urlCon.setDoOutput(true);
urlCon.setDoInput(true);
PrintWriter stream = new PrintWriter(urlCon.getOutputStream());
stream.print("Bharath");
stream.close();
stream=null;
catch(MalformedURLException mue){
//initDrawing();
showStatus("Error: " + mue);
catch (IOException e) {
//initDrawing();
showStatus("Error: " + e);
Regards,
Bharath Kumar A
Software engineering tools Team
Honeywell India Software operations Pvt. Ltd.
151/1, doraisani palya,
Bannergatta Road
Bangalore - 76
India
Email: [email protected]

check this link
http://java.sun.com/docs/books/tutorial/networking/urls/readingWriting.html
also check the directory and file permissions of ur Http Sever .
I think u r going the wrong way . i m not sure that u can write a string to a file using URL connection
Renjith

Similar Messages

  • Slow response when updating files on server

    Hey there,
    I'm trying to pinpoint a problem I'm having with my Mac Pro and MacBook Pro regarding very slow page refreshes when modifying files on my server via browser. I'm using a software package called Photo Cart that is a shopping cart for my website. It uses a MySQL database and I seem to have the problem primarily when changes are made to the database. When I make a change to one of the settings on the web app admin, I am stuck waiting for the page to come back for exactly 2 minutes. The change I specify seems to update instantly, as I can see the updated settings on the client side from another computer during the wait time. Also, during the wait, I cannot access the admin area, or the store front from the offending computer. The result is the same on Safari 5.0.2 and Firefox 3.6 & 4b10.
    Any idea why this might be happening? A guy on the support forum for Photo Cart said, "A very few Macintosh users have experienced similar things. The problem APPEARS to be related to local network hardware (router and/or modem)."
    I'm using a Time Machine for my router and it's connected to a Motorola Surfboard cable modem. This problem did not always occur, however, I don't know when it started and there has been no change to my network equipment since the last working state.
    I have no problems with any other web apps, including my WordPress site which is hosted on the same server and also uses a MySQL db.
    For now, I'm stuck editing my Cart from a crappy old PC laptop running XP (using the exact same network setup as the Mac Pro.) Not fun. What Gives

    It looks like I found the problem. Not sure why but it seems to be connected to fonts. After going though font book and cleaning out any duplicates the problem seems to have stopped. I hate fonts!

  • On the fly modification of an updated file

    Good Day,
    I have a SharePoint library which keeps word documents (docx) in document sets. These word documents can be co-authored which means that more than one user can use Word application and work with the file at the same time. Each time user saves the file (i.e.
    using Ctrl-S shortcut) the document is updated on the SharePoint.
    1)
    Is there any way of "on the fly" modification of updated file on server side and save such an altered version of the document?
    (FYI - the file modification I'm talking about should remove all edition rights inside docx file)
    I have tried with ItemUpdating but I cant figure out how to access new version of the file (the content which actually is going to be put on the server) alter and make sure it going to be stored on the server. I can easily access current version of the file
    (which of doesn't have any modifications) - but it is not the case here - I need access to version which is going to be put on the server and alter it.
    Is it possible to do something like that?
    2)
    I also went for other possibilities (although much less convenient) and experimented with ItemUpdated event. This time I was able to access the file and the content was updated but any alterations of the content failed with the exception saying:
    {"The file "XXX" is locked for shared use by YYY."}
    Why am I getting this exception? Of course the file is locked because is it still open by user in the Word app (who actually manually triggered document save operation) and this is a normal use case here. I can get more users to open that document and let
    them edit it simultaneously and that is fine. Then, why I cannot modify the file in event receiver because of this exception?
    I hope you'll come up with some ideas.
    Thanks.

    Hi,
    We can use SystemUpdate() instead of Update()
    to update the file in Event Receiver.
    Here is a blog for your reference:
    http://www.novolocus.com/2012/07/25/sharepoint-check-out-vs-lock/
    Best Regards
    Dennis Guo
    TechNet Community Support

  • Bug: halt when deleting unneeded update files

    If WSUS installed on a heavy IO loaded harddrive (LUN) of a VM, when deleting unneeded update files by Server Cleanup Wizard, MMC node may halt.
    Server OS: Windows Server 2012 Standard
    Errors can be located in Event Log:
    An unhandled exception occurred and the process was terminated.
    Application ID: /LM/W3SVC/1881423753/ROOT/ServerSyncWebService
    Process ID: 3288
    Exception: System.NullReferenceException
    Message: Object reference not set to an instance of an object.
    StackTrace:    at Microsoft.UpdateServices.Internal.DataAccess.GetRevisionIdListForCache(Int64 deploymentChangeNumber, Int64& highestChangeNumber, CategoryIdCacheEntry[]&
    newCategoryDeployments, CategoryIdCacheEntry[]& deletedCategoryDeployments, RevisionIdCacheEntry[]& newRevisionDeployments, RevisionIdCacheEntry[]& deletedRevisionDeployments)
    at Microsoft.UpdateServices.Internal.RevisionIdCache.UpdateCategoryAndRevisionIdCache(Int64 deploymentChangeNumberAtRefresh)
    at Microsoft.UpdateServices.Internal.ServerImplementation.UpdateCache()
    at Microsoft.UpdateServices.Internal.ServerImplementation.DatabaseChangeHandler(Object byTimer)
    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    at System.Threading.TimerQueueTimer.CallCallback()
    at System.Threading.TimerQueueTimer.Fire()
    at System.Threading.TimerQueue.FireNextTimers()
    Application: w3wp.exe
    Framework Version: v4.0.30319
    Description: The process was terminated due to an unhandled exception.
    Exception Info: System.NullReferenceException
    Stack:
    at Microsoft.UpdateServices.Internal.DataAccess.GetRevisionIdListForCache(Int64, Int64 ByRef, Microsoft.UpdateServices.Internal.CategoryIdCacheEntry[] ByRef, Microsoft.UpdateServices.Internal.CategoryIdCacheEntry[]
    ByRef, Microsoft.UpdateServices.Internal.RevisionIdCacheEntry[] ByRef, Microsoft.UpdateServices.Internal.RevisionIdCacheEntry[] ByRef)
    at Microsoft.UpdateServices.Internal.RevisionIdCache.UpdateCategoryAndRevisionIdCache(Int64)
    at Microsoft.UpdateServices.Internal.ServerImplementation.UpdateCache()
    at Microsoft.UpdateServices.Internal.ServerImplementation.DatabaseChangeHandler(System.Object)
    at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
    at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
    at System.Threading.TimerQueueTimer.CallCallback()
    at System.Threading.TimerQueueTimer.Fire()
    at System.Threading.TimerQueue.FireNextTimers()
    Faulting application name: w3wp.exe, version: 8.0.9200.16384, time stamp: 0x50108835
    Faulting module name: KERNELBASE.dll, version: 6.2.9200.16384, time stamp: 0x5010ab2d
    Exception code: 0xe0434352
    Fault offset: 0x00000000000189cc
    Faulting process id: 0xcd8
    Faulting application start time: 0x01cdcff0fa98da3e
    Faulting application path: c:\windows\system32\inetsrv\w3wp.exe
    Faulting module path: C:\Windows\system32\KERNELBASE.dll
    Report Id: 332ed25c-3c39-11e2-93f1-005056b26389
    Faulting package full name: 
    Faulting package-relative application ID:
    Step to repo:
    1 Open Update Services MMC.
    2 Click Options from the left panel.
    3 Select Server Cleanup Wizard from the right.
    4 Press Next.
    MMC node MAY(only when lots of files need to be deleted) be prompted to be reset when deleting unneeded files if it's running longer than usual. Re-open Update Services MMC will fix it. But
    it will be appeared again another day when many unneeded files exist.
    Eternal Snow

    Nothing to me indicated that his previous disks weren't functional.
    In the very first two lines of the first post of this thread, the drive was described as "heavily loaded". Specifically the scenario was:
    If WSUS installed on a heavy IO loaded harddrive (LUN) of a VM
    Running the Server Cleanup Wizard, particularly performing the "Delete unneeded updates..." action is a highly database intensive action. If that task is competing for IOPS on the disk system, then there's absolutely a high probability that the task
    will "timeout" before the stored proc being called can complete it's task.
    The "fix" is to put the application on a properly equipped machine.
    If the guys who wrote the system can't create it to not fall over if the HDs it's on happen to be a wee bit slow, then yes it's a bug and they've written it badly.
    We're not talking about "a wee bit slow", though, are we?
    As for timeout issues, it's a natural artifact of a WSUS server these days. Read every tenth thread in this forum and somebody is having issues with timeout errors.
    There are two contributing factors. The first is that the number of updates currently contained in the MU catalog is about 100x the number of updates that existed when WSUS v3 was originally written in 2007.
    The second is that in 95% of the cases, the administrator reporting the issue failed to properly performed needed administrative and maintenance activities on the WSUS server over the lifespan of the server.
    Lawrence Garvin, M.S., MCITP:EA, MCDBA, MCSA
    SolarWinds Head Geek
    Microsoft MVP - Software Packaging, Deployment & Servicing (2005-2013)
    My MVP Profile: http://mvp.microsoft.com/en-us/mvp/Lawrence R Garvin
    http://www.solarwinds.com/gotmicrosoft
    The views expressed on this post are mine and do not necessarily reflect the views of SolarWinds.

  • Moving directory with Software Update files from one server to another

    Hi guys,
    I have recently bought a Mac Mini to move on it my test system Mac OS 10.9 with Server 3.0, running on VM.
    My question is:
    Is it possible to move the Software Update packages/directory from one server to another, so I don't need to wait a whole week to have them all downloaded from the Apple servers?
    I assume, if replace all the Software update fodder it is not going to work as there are some kind of index files elsewhere that will not accept that change.
    I haven’t tried any migration assistant as don’t want to replicate the server.
    Any suggestions, please?

    hi Lucas,
    i just stumbled onto this post of yours while searching for solutions for a somehow related issue that's kept me thinking.
    your post isn't new, yet it received no answers... maybe you found a solution already.
    in case you haven't, a possible hint might come from https://discussions.apple.com/message/20478878#20478878
    for the record, i've installed os x server 3.0 on mvrx 10.9 on a 4-year old Intel Core 2 Duo mac mini with 500GB disks.
    in my case, it's the almost 200GB of update files wasting what's left of my storage real estate to press for a solution.
    tried to do what's suggested here, seems to work fine on my system, too. hope this helps.

  • Applet reading files in in web server eg geocities

    hi ,
    i have an applet that reads files i have created in a web server. when i try to run the applet in , internet explorer i get an error message
    java.io.FileNotFoundException: nic.txt (The system cannot find the file specified)
    does anyone have any solution to this problem. do i need a policy file and if i do where do i put it.

    Applets work on the clients computer, not the server. Your applet is >trying to read nic.txt from your computer. Can't be done easily, you'd >need your own serverprogram to do the reading and pass the data to the >client... let me clarify afew points
    the applet is on a webserver eg. geocities.
    the file is also on the same directory as the applet .class file.
    so everything is on the web server,.

  • WSUS in Windows Server 2012 R2 is not downloading update files.

    I'm not using Proxy server and this is the only WSUS server in our environment and update source is to sync from Microsoft Update site.
    Synchronization completes successfully and every update files is not downloading. When I look at the download status from the main page, it said it downloaded, but when I look at the files from updates folder, it said failed to download.
    I'm getting following error messages:
    Content file download failed.
    Reason: The server does not support the necessary HTTP protocol. Background Intelligent Transfer Service (BITS) requires that the server support the Range protocol header.
    Source File: /c/msdownload/update/software/crup/2013/12/windows8.1-kb2903939-x64_a8ae5dc28899c892b46c9aa9c8aa71e2d3961a79.cab
    Destination File: e:\wsus\WsusContent\79\A8AE5DC28899C892B46C9AA9C8AA71E2D3961A79.cab
    John

    Hi,
    This is most likely a problem with a proxy server or firewall. Since you don’t have a proxy server, then firewall could be the culprit.
    Error message when you try to download a file by using the Background Intelligent Transfer Service: "Content file download failed"
    http://support.microsoft.com/kb/922330
    Make sure your firewall support HTTP 1.1 range requests. If it still doesn’t help, try the following workaround:
    If you are unable resolve this issue from the proxy/firewall side, then try these steps as a workaround on the WSUS server,
    Set BitsDownloadPriorityForeground=1 using osql.exe on WSUS SQL instance.
    net stop WSUSservice
    CD "%ProgramFiles%\Update Services\tools\osql"
    osql.exe -S <SQL instance name> -E -b -n -Q "USE SUSDB update tbConfigurationC set BitsDownloadPriorityForeground=1"
    net start WSUSservice
    Original post in this
    blog.
    Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.
    Hope this helps.

  • Create a new file on server from an applet

    Hello!
    I 'm trying to create a text file on server from an applet, i have permissions to write on server and i'm running in apache, my code is
    public void write () {
    try{
    URL url = new URL("http://localhost/bnm/hello.txt");
    URLConnection urlcon = url.openConnection();
    urlcon.setDoOutput(true);
    urlcon.setUseCaches(true);
    PrintWriter pt = new PrintWriter
    (new OutputStreamWriter (urlcon.getOutputStream()));
    String str = new String(URLEncoder.encode("this is output applet ")) ;
    pt.print(str);
    pt.flush();
    catch(Exception e)
    e.printStackTrace();
    The result is nothing, the file isn�t created, but the code don't throw exceptions.
    Ah! in other example, i can read a file of server fro m the applet, the problem is to write
    Anybody, knows the matter??
    Excuse my poor english :P
    Thanks for all.

    I had the same needs and didn't know whether this was possible, due to applets security restriction. So I searched the Web and found some contradictory information. I will explain what I think is the situation, to give you an answer, but also so that other people can tell me whether I understood correctly.
    1) Unless you sign it, an applet cannot write files directly, either client-side or server-side. All what it can do to access a file server-side (except .jar files ?) is opening a http connection, which allows only to retrieve data. When I try to run code such as yours, I get this exception :
    java.net.UnknownServiceException: protocol doesn't support output
         at java.net.URLConnection.getOutputStream(URLConnection.java:679)
    2) As Ares_Man points out, what it can do is opening a http connection not directly with the file you want, but with a server-side script (JSP, PHP, CGI,...) which will be allowed to write files on the server. You can use POST or GET parameters to pass to the script what you are going to write.
    This simple code worked for me (it executed the script toto.php):
              try{
                   URL toto=new URL(getCodeBase(),"toto.php");
                   InputStream f=toto.openStream();
                   f.close();
              catch(Exception e){
                   e.printStackTrace();
    Probably it's a good idea to do a URLConnection.setCache(false) though, to be sure that the script toto.php will be executed.
    3) I don't know how you can pass serialized objects as parameters. So if more than text informations are to be written, I would tend to make the script store them into a database instead of files. That way, you could pass any SQL query as parameter, maybe along with a password parameter for security. I don't know whether this is secure enough.

  • HEAD request to detect updating of files at server

    Hi,
    I'm trying to send a HEAD request from my AIR for Android Application.
    Because, i want download the file only when it has been updated.
    I have tried it with URLLoader and HTTPStatusEvent, but the length of reponseHeaders  is 0.
    public function dwnLoadIconWheel():void
        var urlPub:String = _serverPath + datePath;
        //var urlRequest:URLRequestHeader
        //httpResponseStatus
        var loader:URLLoader = new URLLoader();
        loader.addEventListener(Event.COMPLETE, onPubWheelIconHandler);
        loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorPubWheelIconHandler);
        loader.addEventListener(HTTPStatusEvent.HTTP_STATUS, httpStatusPubWheelIconHandler);
        loader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorPubWheelIconHandler);
        var header:URLRequestHeader = new URLRequestHeader("Created", "2008-06-04T22:45:25Z");
        var request:URLRequest = new URLRequest(_xmlServerEpaperUrl + globalPath);
        trace(request.url);
        request.method = URLRequestMethod.HEAD;
        request.requestHeaders.push(header);
        try {
            loader.load(request);
        } catch (error:Error) {
            trace("Unable to load requested document.");
    protected function httpStatusPubWheelIconHandler(event:HTTPStatusEvent):void
        var loader:URLLoader = URLLoader(event.target);
        loader.removeEventListener(Event.COMPLETE, onPubWheelIconHandler);
        loader.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorPubWheelIconHandler);
        loader.removeEventListener(HTTPStatusEvent.HTTP_STATUS, httpStatusPubWheelIconHandler);
        loader.removeEventListener(IOErrorEvent.IO_ERROR, ioErrorPubWheelIconHandler);
        if (event.responseHeaders.length == 0)
            trace("Header length 0");
        else
            trace("Header received");
    My questions is, if can i get the date of my file from server without download the complete file. Can i do HEAD requests to detect update of files?
    Thanks!

    I found the solution of the problem
    The problem was that i had not used the event correct. I should have used a event of type HTTPStatusEvent.HTTP_RESPONSE_STATUS.
    loader.addEventListener(HTTPStatusEvent.HTTP_RESPONSE_STATUS, httpStatusPubWheelIconHandler);

  • Since I updated my Creative Cloud desktop App to its last version, my files are no longer synchronized. I received the "fail to synch files" and "server error" messages.

    Since I updated my Creative Cloud desktop App to its last version, my files are no longer synchronized. I received the "fail to synch files" and "server error" messages.

    Hi, Jeff.
    I'm not on a network and I didn't change anything on my secutiy setups, so I got in touch to the customer support. They checked my computer and found nothing wrong, so they uploded some log files to analyse the case. I'm waiting for a answer.
    Thanks for the tips.

  • Applet question, how to download resource files from server

    hi,
    i am new at applet world.
    i have an applet that reads some resource, data and configuration files. so i need to download these files from server to client. i did some resarch and could not find how to download files from server in an applet application.
    how can i do this task?
    thank you for your answers.

    You may want to distinguish between 'resources' and data/configuration files.
    'Resources' are non-class files that are part of your application, i.e without them the application would simply not work, just like class files.
    Those are typically images, sounds or resource bundles (GUI elements translated to different languages) that nobody except you, the developer, would touch (when releasing an upgrade or a patch).
    Those should just go into the applet jar or additional jars named in the applet tag.
    Data/configuration files, that may be changed by others than the developers, should be made available through HTTP, just like the applet jar itself. The applet will have (read) access to them using java.net.URLConnection.

  • Copy a .swf file from server side to client using signed applet

    Hello All,
    I already have my applet signed and its working pretty well. However I want to know how can I import a .swf file into clients machine. The .swf file initially is on server side, my applet checks whether this .swf file exists already on client machine. If not it copies it to his machine.
    I know how to chk if the file already exits on client machine but I am not sure how to copy this .swf file to his machine if its missing.
    May be I need to set some input buffers from server side and then copy them to his machine.
    Can some one throw some light on this issue ??

    Hello to all Java Code Masters out thr,
    I am trying to copy a .swf file from server side to client side, however I am unsuccessful in writing the correct data. By correct data I mean that , the data does gets saved on the client side in the .swf file, and the size of the .swf file on client side is as expected, but some how I don't know why the data is not the same as expected.
    I tried opening up both the swf file, one which is on server side and the other which is on client side. And both looked different in the notepad.
    When I opens up the client side .swf file on browser it shows nothing while the .swf file on server side worked fine.
    Here is a snap shot of the two .swf files when opened in notepad:
    clientside.swf
    &#22339;&#2131;&#51395;&#40056;&#48612;&#28681;&#56220;&#6234;&#31352;&#65363;&#27474;&#26039;&#46793;&#52076;&#11698;&#45679;&#32228;&#9617;&#45643;&#52076;&#54002;&#56237;&#62930;&#57181;&#27635;&#46965;&#48804;&#30062;&#60407;&#31086;&#2937;&#37359;&#28873;&#49741;&#8252;&#10112;&#503;&#8501;&#16164;&#43397;&#16140;&#10313;&#8264;&#537;&#13737;&#16956;&#43411;&#586;&#4917;&#43544;&#22918;&#4216;&#49632;&#40179;&#64495;&#64206;&#44335;&#61334;&#19077;&#57113;&#61099;&#53246;&#52863;&#52855;&#52985;&#32246;&#63967;&#27542;&#13055;&#32611;&#52219;&#26476;&#56728;&#25064;&#57340;&#63580;&#65317;&#56023;&#32706;&#57446;&#19865;&#24183;&#40928;&#65057;&#61684;&#25313;&#64294;&#45864;&#44950;&#25919;&#7115;&#8035;&#44004;&#31973;&#18921;&#32575;&#18967;&#25451;&#63915;&#44668;&#30262;&#32651;&#11230;&#60116;&#21241;&#51902;&#30302;&#2462;&#38913;&#38887;&#2904;&#47227;&#11350;&#25775;&#35978;&#25879;&#38313;&#61967;&#15065;&#8627;&#33840;&#11456;&#12040;&#52418;&#33633;&#6640;&#63050;&#65270;&#39008;&#42184;&#40462;&#49876;&#16324;&#15399;&#60051;&#62263;&#26562;&#19076;&#47084;&#16512;&#51385;&#58710;&#13280;&#42314;&#13071;&#55199;&#17948;&#14772;&#61464;&#8985;&#9032;&#16254;&#42612;&#16367;&#47121;&#16212;&#60451;serverside.swf
    CWS�� x���     p��ZxzS�Rk�e��l��-o��}�%K�l�������]��ku���nu��nyy���pM�< �'�5!$����I
    (H �
    5<B
    ��J5��Yx��������/����J������w����}���
    k�2c��lg���a��\�%��serverside.swf is what I expect to be saved, but clientside.swf is what i get.
    Below is a code snippet which I am trying :
      public void writeswftoclient(String swfcontent) {
        String userHome = System.getProperty("user.home" );
        String ImoracleDirectory = userHome + "\\MyFolder";
        File fdirectory = new File(ImoracleDirectory);
        if(!fdirectory.isDirectory()) {
          fdirectory.mkdir();
        String playlist = ImoracleDirectory + "\\clientside.swf";
        File fplaylist = new File(playlist);
        try {
          Writer output = null;
          output = new BufferedWriter(new FileWriter(fplaylist,true));
          *System.out.println(swfcontent);*
          *output.write(swfcontent);*
          output.close();
        catch (Exception e) {
          System.out.println("Cannot create or write to the playlist");
      }In above code I am trying to write the string swfcontent, which contains the data shown above in serverside.swf, to clientside.swf.
    Interesting thing is that I am doing System.out.println(swfcontent); just before writing the data to clientside.swf using output.write(swfcontent);. And System.out.println does print the write data on the java console. However I dont know out of what reason the data doesnt get written correctly on the client's computer.
    Kindly help me in this plzzzzzzzzzz.

  • Unexpected end of file from server

    Can someone confirm if this is an issue with the code being passed or if it is an issue with the applet?
    It seems that I may be receiving this message when I have more than one web app open that uses java.
    I am not a java developer but I am just looking for some help, tell me if more detail is needed please.
    Failed to parse the response with XML stream: java.net.SocketException: Unexpected end of file from server
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
         at java.lang.reflect.Constructor.newInstance(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.net.www.protocol.http.HttpURLConnection.getChainedException(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
         at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
         at com.kronos.wfc.platform.uiframework.framework.xml.SerializationClient.getResponse(SerializationClient.java:170)
         at com.kronos.wfc.platform.uiframework.applet.datamanager.RetrieveObjectsFromServer.run(RetrieveObjectsFromServer.java:172)
    Caused by: java.net.SocketException: Unexpected end of file from server
         at sun.net.www.http.HttpClient.parseHTTPHeader(Unknown Source)
         at sun.net.www.http.HttpClient.parseHTTP(Unknown Source)
         at sun.net.www.http.HttpClient.parseHTTPHeader(Unknown Source)
         at sun.net.www.http.HttpClient.parseHTTP(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(Unknown Source)
         at sun.net.www.protocol.https.HttpsURLConnectionImpl.getHeaderField(Unknown Source)
         at com.kronos.wfc.platform.uiframework.framework.xml.SerializationClient.getResponse(SerializationClient.java:132)
         ... 1 more
    UIDefaults.getUI() failed: no ComponentUI class for: javax.swing.JOptionPane[,0,0,0x0,invalid,alignmentX=0.0,alignmentY=0.0,border=,flags=0,maximumSize=,minimumSize=,preferredSize=,icon=,initialValue=,message=The application could not get data from the server.
    Please log off and try again.,messageType=ERROR_MESSAGE,optionType=DEFAULT_OPTION,wantsInput=false]
    java.lang.Error
         at javax.swing.UIDefaults.getUIError(Unknown Source)
         at javax.swing.MultiUIDefaults.getUIError(Unknown Source)
         at javax.swing.UIDefaults.getUI(Unknown Source)
         at javax.swing.UIManager.getUI(Unknown Source)
         at javax.swing.JOptionPane.updateUI(Unknown Source)
         at javax.swing.JOptionPane.<init>(Unknown Source)
         at javax.swing.JOptionPane.showOptionDialog(Unknown Source)
         at javax.swing.JOptionPane.showMessageDialog(Unknown Source)
         at javax.swing.JOptionPane.showMessageDialog(Unknown Source)
         at com.kronos.wfc.platform.uiframework.applet.baseapplet.KronosApplet.private_showErrorMessage(KronosApplet.java:3225)
         at com.kronos.wfc.platform.uiframework.applet.baseapplet.KronosApplet.showErrorMessage(KronosApplet.java:3193)
         at com.kronos.wfc.platform.uiframework.applet.baseapplet.KronosDataManager.showError(KronosDataManager.java:859)
         at com.kronos.wfc.platform.uiframework.applet.baseapplet.KronosDataManager.processNotification(KronosDataManager.java:429)
         at com.kronos.wfc.platform.uiframework.applet.baseapplet.KronosDataManager.update(KronosDataManager.java:741)
         at com.kronos.wfc.platform.uiframework.applet.datamanager.ServerConnectionObject.setRetrievedObject(ServerConnectionObject.java:195)
         at com.kronos.wfc.platform.uiframework.applet.datamanager.RetrieveObjectsFromServer.run(RetrieveObjectsFromServer.java:190)

    System.getProperties().put("proxySet", "true");You'll have to show what else you get from the server, but the above line does nothing.

  • Applet java file not refreshing in browser

    I have an applet that I am updating and I am not seeing the corresponding update when I open the web page. I can manually download the java class file and look inside it and it definitely is the updated file. I have deleted the browser history. (I am running tests with Firefox 3, IE7, and Safari 4 public beta). Is there something else I need to do to make sure the browser pulls in the latest version of the class file referenced in the html?
    Here is the code:
    <HTML>
    <HEAD>
       <TITLE>A Simple Program</TITLE>
    </HEAD>
    <BODY>
       <CENTER>
          <APPLET CODE="SendRequest.class" WIDTH="500" HEIGHT="150">
          </APPLET>
       </CENTER>
    </BODY>
    </HTML>The applet refers to a hard coded URL to read through a urlconnection. It is always reading a file and showing content, but it is not showing the right file. If I change the name of the referenced file in the java program, it looks like the browser has cached the referred file, rather than throwing and error and saying the file doesn't exist.
    Here is the java
    import java.applet.*;
    import java.awt.*;
    import java.net.URLConnection;
    import java.net.URL;
    import org.w3c.dom.Document;
    import java.lang.String;
    import java.io.*;
    public class SendRequest extends Applet {
        @Override
        public void paint(Graphics g) {
            g.drawRect(0, 0, 499, 149);
            g.drawString(getResponseText(), 5, 70);
        public String getResponseText() {
            try {
                URL url = new URL("http://myserver.com/stats/logs/ex20090603000001-72.167.131.217.log");
                URLConnection urlconn = url.openConnection();
                BufferedReader in = new BufferedReader(
                                    new InputStreamReader(
                                    urlconn.getInputStream()));
                String inputLine;
                String htmlFile = "";
                try {
                    while ((inputLine = in.readLine()) != null)
                        htmlFile += inputLine;
                    in.close();
                    return htmlFile;
                } catch (Exception e) {
                    return "Can't get the string.";
            } catch (Exception e) {
                return "Problem accessing the response text.";
    }Any help would be appreciated. I heard that some files may cache more persistently than others, but I don't fully understand the details.
    Thanks,
    Jim

    Check this [document loader example|http://pscode.org/test/docload/] & follow the link to sandbox.html for tips on clearing the class cache. That relates specifically to caching a refused security certificate, but class caching is much the same. As an aside, getting a console can be tricky in modern times (unless the applet fails completely). It is handy to configure the [Java Control Panel|http://java.sun.com/docs/books/tutorial/information/player.jnlp] to pop the Java console on finding an applet (Advanced tab - Settings/Java Console/Show Console).
    Of course there are two better tools for testing applets, especially in regard to class caching. AppletViewer and Appleteer both make class refresh fairly easy. Appleteer is the better of the two. I can tell you that with confidence, since I wrote it. ;-)

  • Cannot refresh table - test connection works fine but refresh gives "We couldn't refresh the connection. Please go to existing connections and verify they connect to the file or server." error.

    I'm having some difficulty updating a table in my powerpivot data model. The data for the table is stored in a local excel file; if I go to
    Existing Connections select the connection and do a test then everything is successful. When however I try to refresh that particular table I get the following error:
    "We couldn’t refresh the connection. Please go to existing connections and verify they connect to the file or server."
    In the past I had this and it was an authentication issue, the files are stored on SharePoint and I wasn't logged in to Sharepoint - I have however checked this and it can't be the issue because I have other tables linked to other excel files in the same
    location that are refreshing without issue. Can anyone think of what may be causing it?
    I have even tried creating a new local excel with the same data, added it to the data model and then tried a refresh and I I get exactly the same issue. 
    Are there any known issues with refreshing data from an Excel file if, after the initial import, you add columns to the table in the excel file I was wondering if this might contribute?
    Thanks

    Hi Maracles,
    Thanks for your post.
    From your description, I tried to reproduce this issue on my test environment. However, everything is fine for me. Could you please post the specific version of SQL Server PowerPivot for Excel?
    You can try to use a trace file to troubleshoot errors in PowerPivot. If this issue still persists, please try to reinstall SQL Server PowerPivot for Excel to see if this helps.
    For more information, please see:
    PowerPivot Options & Diagnostics Dialog Box:
    http://technet.microsoft.com/en-us/library/gg399091.aspx
    Using a Trace File to Troubleshoot Errors in PowerPivot:
    http://www.sqlchick.com/entries/tag/powerpivot
    Best Regards,  
    Elvis Long
    TechNet Community Support

Maybe you are looking for

  • How can we split the grid display in alv reports.

    hi everyone.i am trying to get the display of two reports in a single one using split screens.i had written a report for vendor balance.one for open and one for cleared items.how can i combine these two reports. the field catalog was same for these t

  • Deleting Calendars in iCal 5

    How do I permanently delete a calendar in iCal 5? After clicking on the 'Calendars' button on the top left corner of the main iCal window, a list of all my calendars pops up from which I can toggle each calendar's visibility, but I can't find a way o

  • Deploying a WAR file to Sun App Server 8.1 PE

    So I thought that if I downloaded Sun App Server PE 8.1 and put it on my soon-to-be production machine, it should be pretty easy right? Nope. So I have JSC update 6 (which includes Sun Application Server 8.0) (God how I wish there was a catchy name l

  • Import javax.media.* is not working

    Hi, I'm new to java and i was trying to create a media player using the javax.media package from the JMF. I installed it using the windows setup and it seemed to install correctly. Testing it with the java.sun.com applet tester worked. The media play

  • Procure to Pay in 30 days - Fixed price Implementation

    Just so readers are aware, Oracle have just announced a fixed price fixed scope implementation methodology for iprocurement (p2P). More information is available at http://www.oracle.com/start/procure2pay/intro.html?src=726402&Act=29 or www.e-vector.c