Synchronizing with Sockets

I have a thread that performs a FTP Operation to upload all files from a directory to an FTP Server. Im using the enterprisedt FTP library.
I think there is something wrong with my synchronization process every time I try to transfer some files only a chuck of a single file is transferred and the program exits abnormally without continuing with the rest of the files.When I check the sever logs it complained of [an error closing connection: An established connection was aborted by the software in your host machine......An existing connection was forcibly closed by the remote host.]
Question:
1) Has anyone faced any similar problems with synchronzing with the FTP LIbray. If so how did you overcome the above problem.
2) If im wrong and there is a problem with the synchronization of the block object (new Object()) how do I fix the code so that I wait for the operation to finish before moving on to the next file.
3) Can anyone offer any tips of how the program can be efficient. Im using a scheduling scenario where this class is called from scheduler and the connection is initiated using a reference from the scheduler.
for(int i=0;i<files.length;i++)
synchronized(block){
     try{
          transferFile(transfer.getLocalDir(), transfer.getRemoteDir());
     catch(Exception e){
     onError(e.getMessage());
public void transferFile(String local, Sting remote) throws Exception{
try{
ftp.put(local,remote);
catch(FTPException e){
throw new Exception(e);
Thanks

Ive check the site again there is no mention of the ftp library being synchronous. However it is not thread safe and instructs the user to ensure the user does not try to access the same ftp object.
The website: http://www.enterprisedt.com/products/edtftpj/faq-answers.html#4
Besides without the synchronized method I would get the same result.

Similar Messages

  • Slave instance can not synchronized with the master for a long time

    Hi,
    Slave instance can not synchronized with the master for a long time, and the gap of LSNs between slave and master are more and more larger. The transfer bytes per second between master and slave is 118MB/s , upper limit to the ethernet card. Why???
    ENVIRONMENT:
    1. A network program which we called mcdb is based on BDB 4.8.30. It is used to accept get/set requests and then query data from bdb or save data to bdb.
    2. mcdb implements replication with bdb replication manager api. The default start replication policy is DB_REP_ELECTION, rep ack policy is DB_REPMGR_ACKS_ONE_PEER and rep priority is 100.
    3. The bdb data files, bdb log files, region files and rep files are all in the same home directory.
    4. There are two instances of the mcdb are separately on two standalone servers which has no other programs. These two instances are in one replication group which can elect a master automatically.
    5. The master instance is online, which has lots of requests (get, set, delete).
    ACTIONS:
    1. Start two mcdb instances on two servers and the two instance make a replication group. Slave has already synchronized with the master.
    2. Stop the slave for a long time (more than 20 hours).
    3. Start the slave instance to synchronize data with master.
    RESULT:
    1. the gap of LSNs between slave and master are more and more larger.
    2. db_stat of master and slave:
    master db_stat:
    467170     Number of PERM messages not acknowledged
    9245     Number of messages queued due to network delay
    172415     Number of messages discarded due to queue length
    25880     Number of existing connections dropped
    3407     Number of failed new connection attempts
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    DB_REPMGR site information:
    10.67.15.146 (eid: 0, port: 30011)
    Environment configured as a replication master
    331726/3574994     Next LSN to be used
    0/0     Not waiting for any missed log records
    328872/466092     Maximum permanent LSN
    0     Next page number expected
    0     Not waiting for any missed pages
    0     Number of duplicate master conditions originally detected at this site
    2147M     Current environment ID (2147483647)
    100     Current environment priority
    49     Current generation number
    50     Election generation number for the current or next election
    2323     Number of duplicate log records received
    0     Number of log records currently queued
    6768     Maximum number of log records ever queued at once
    55284     Total number of log records queued
    120M     Number of log records received and appended to the log (120475988)
    111     Number of log records missed and requested
    2147M     Current master ID (2147483647)
    2     Number of times the master has changed
    0     Number of messages received with a bad generation number
    8505306     Number of messages received and processed
    12     Number of messages ignored due to pending recovery
    471869     Number of failed message sends
    12M     Number of messages sent (12959945)
    0     Number of new site messages received
    1     Number of environments believed to be in the replication group
    990543     Transmission limited
    0     Number of outdated conditions detected
    0     Number of duplicate page records received
    0     Number of page records received and added to databases
    0     Number of page records missed and requested
    Startup complete
    6244678     Number of transactions applied
    0     Number of startsync messages delayed
    1     Number of elections held
    1     Number of elections won
    No election in progress
    0.057097     Duration of last election (seconds)
    8944103     Number of bulk buffer sends triggered by full buffer
    0     Number of single records exceeding bulk buffer size
    5273M     Number of records added to a bulk buffer (5273592170)
    10M     Number of bulk buffers sent (10490865)
    0     Number of re-request messages received
    0     Number of request messages this client failed to process
    0     Number of request messages received by this client
    slave db_stat:
    0     Number of PERM messages not acknowledged
    0     Number of messages queued due to network delay
    0     Number of messages discarded due to queue length
    1454     Number of existing connections dropped
    0     Number of failed new connection attempts
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    DB_REPMGR site information:
    10.67.15.147 (eid: 0, port: 30011)
    Environment configured as a replication client
    329544/2916048     Next LSN expected
    330433/2013808     LSN of first log record we have after missed log records
    329543/5500501     Maximum permanent LSN
    0     Next page number expected
    0     Not waiting for any missed pages
    0     Number of duplicate master conditions originally detected at this site
    2147M     Current environment ID (2147483647)
    100     Current environment priority
    49     Current generation number
    50     Election generation number for the current or next election
    5256M     Number of duplicate log records received (5256599432)
    3925284     Number of log records currently queued
    3925285     Maximum number of log records ever queued at once
    4880561     Total number of log records queued
    3578038     Number of log records received and appended to the log
    1912297     Number of log records missed and requested
    0     Current master ID
    1     Number of times the master has changed
    0     Number of messages received with a bad generation number
    12M     Number of messages received and processed (12980442)
    2     Number of messages ignored due to pending recovery
    0     Number of failed message sends
    1912307     Number of messages sent
    0     Number of new site messages received
    0     Number of environments believed to be in the replication group
    0     Transmission limited
    0     Number of outdated conditions detected
    0     Number of duplicate page records received
    0     Number of page records received and added to databases
    0     Number of page records missed and requested
    Startup incomplete
    110568     Number of transactions applied
    80     Number of startsync messages delayed
    0     Number of elections held
    0     Number of elections won
    No election in progress
    0     Number of bulk buffer sends triggered by full buffer
    0     Number of single records exceeding bulk buffer size
    0     Number of records added to a bulk buffer
    0     Number of bulk buffers sent
    0     Number of re-request messages received
    0     Number of request messages this client failed to process
    0     Number of request messages received by this client
    Edited by: 899585 on 2013-1-4 下午10:54
    Edited by: 899585 on 2013-1-4 下午10:55

    Hi,
    Unfortunately, this issue is beyond the level of what is supported over the forum. Performance related issues are extremely complex and require an in-depth understanding of your environment and dedicated support. In a generic sense, you can look at this as a basic queueing problem. You have a server that went down and work is still coming in. When the server gets started it is possible that it may never catch up depending on new work coming in and the rate at processing the old work.
    So what would you do in this case --- one thing would be to reduce the new work coming in. In HA terms this would be slowing the master down and you can increase DB_REP_ACK_TIMEOUT for this. Another thing you could do is add fresh servers to help reduce the workload. In HA terms, this would be the equivalent of restarting the client and give it a fresh look at everything. Another thing you could do is replan the system and load balance. In HA terms, it would mean something like take a hot backup of the master and reinit a client from scratch.
    If you are interested in getting a dedicated support person working on this concern, please let me know and we can move forward down that path. Just respond to the thread with your email address and I will get in contact with you so we can pursue that approach.
    thanks
    mike

  • I've done everything I know in order to get my calendar in iCloud synchronized with my macBook, my IPad and my iPhone, but get no success. I've checked if all devices are set to the same account. Can you help me?

    I've done everything I know in order to get my calendar in iCloud synchronized with my macBook, my IPad and my iPhone, but get no success. I've checked if all devices are set to the same account. Can you help me?

    The only thing I can see strange is that when I login my iCloud account through my principal email address, when I check my preferences is marked an @me.com address that is old and I don't use it anymore, but I can't erase it or even change it.

  • What happens when an iPod is synchronized with an iTunes library that is bigger than the available space on the iPod?

    What happens when an iPod is synchronized with an iTunes library that is bigger than the available space on the iPod? I did this some time ago. On screen was shown available space somewhat less than 120 GB, but maybe somewhere between 10 and 20 GB more in the library. I had to get the iPod updated anyway, so I did proceed. However, afterwards the total content of the library was only about 110 GB. Now I wonder what did actually happen. Was the first sign only corrected for double copies of the same files or lost files or where files deleted from iTunes? And if files where deleted from iTunes, were they also deleted from my computer?

    Same as you would if you bought a pc; copy everything from your old computer to your new one.  Then you can just sync everything from the new computer, as you did with the old one.

  • Outlook 14.4.8 not synchronizing with Exchange 2007 anymore (shows "downloading" but no new messages shown in inbox"

    Outlook 14.4.8 on iMAC Retina and Yosemite 10.10.2 is not synchronizing with Exchange 2007 anymore (shows "downloading" but no new messages shown in inbox".
    Accessing Mails with Webbrowser and from Windows Outlook is working correctly.
    All Macs (also the ones with OS 10.6.8) do not anymore show any new messages in inbox.
    Restarted Server, tried to disable autodiscover on macs and deleting/adding account and repairing database does not fix the problem. Also restarted server several times.
    We have the same problem on 2 imacs retina with yosemite and on 2 mac pro with 10.6.8 and different office 2011 versions.
    i tried to configure the exchange account in apple mail on yosemite and it also states "connected" and does list some folders but no new mails are getting in.
    Windows clients and outlook on them works and syncs fine, and also when connecting via webbrowser at owa it must be a mac-specific/webdav issue.
    exchange 2007 Sp3 Version 8.3 (bild 83.6) and Update Rollup 15 for sp3 (automatic updates "HIGH" for server and clients)
    there is one update popping up again and again even after everytime successull installation: Windows Mlicious Software Removal Tool x64 - October 2010.
    i tried to configure a new user with empty mailbox and configured it with microsoft mail (mac - yosemite)  as exchange and was able to send a mail from there (even if quite delayed).
    but there are not coming in any mails.
    same exchange accounts triggered by imap do work and also via owa.
    Exchange Accounts in Outlook for MAC and also in Mail (Yosemite) do show the folder structures but there is no mails showing up. I can send mails from the exchange accounts created but they seem to be processed with a delay of like 15minutes and outlook
    is giving error "end of file reached" but messages are send after some time.
    Does seem like EWS is extremely slow, to slow perhaps to sync and therefore ending in timeout.
    Also i cannot reach the server from externally over ssl https 443. if testing port 443 of exchange from outside the port seems closed even firewall settings of sbs 2008 and sonicwall ports are correctly open.
    could it be there is something in regarding webdav which is very slow and leading to timeouts ?
    in application log i do have the following two information events every few minute:
    The Exchange Web Services started successfully. Event ID 1
    and
    Process STORE.EXE (PID=3688). Exchange Active Directory Provider has discovered the following servers with the following characteristics: 
     (Server name | Roles | Enabled | Reachability | Synchronized | GC capable | PDC | SACL right | Critical Data | Netlogon | OS Version) 
    In-site:
    SERVER.org.local CDG 1 7 7 1 0 1 1 7 1
     Out-of-site:
    Errors in Application log:
    The Open Procedure for service "BITS" in DLL "C:\Windows\system32\bitsperf.dll" failed. Performance data for this service will not be available. The first four bytes (DWORD) of the Data section 
    The entry <C:\WSUS\WSUSCONTENT\CONTENTFOLDERACLSCHECK.TXT> in the hash map cannot be updated.
    An exception Microsoft.Exchange.Data.Storage.ConversionFailedException occurred while converting message Imap4Message 69447
    Also outlook 2011 clients are asked by time to time to reenter pwds and errors like "connection is closed. 13" 
    Faulting application taskeng.exe, version 6.0.6002.18342, time stamp 0x4cd34898, faulting module ntdll.dll, version 6.0.6002.18881, time stamp 0x51da3d16, exception code 0xc000071b, fault offset 0x0000000000082445, process id 0x3288
    Certificate Services Client Provider pautoenr.dll raised an exception. Exception code 3221225477.
    Backup Exec:
    FULL_BACKUP -- The job failed with the following error: A failure occurred querying the Writer status.
    Volume Shadow Copy Service error: A critical component required by the Volume Shadow Copy service is not registered.  This might happened if an error occurred during Windows setup or during installation of a Shadow Copy provider.  The
    error returned from CoCreateInstance 
    Exchange VSS Writer (instance 2d932ef8-6319-4ab8-a45f-1242480b44ad:15) failed with error code 1295 when processing the backup completion event. 

    Hi,
    Since Outlook running on Windows works well, it seems an issue on the Mac side. I suggest ask Mac for help so that you can get more professional suggestions.
    More information for your reference:
    Please try to verify whether there is any expired certificate from the computer personal store.
    If it is the case, please remove them.
    Thanks
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]
    Mavis Huang
    TechNet Community Support

  • HT202020 Using a SDHC card adapter I can import directly on my iPad2 videos (.mov) taken with a Panasonic DMC-ZS3. The same video files (same file format) imported in Aperture 3.3 cannot be synchronized with iPad. Is Aperture causing the problem?

    Using a SDHC card adapter I can import directly on my iPad2 videos (.mov) taken with a Panasonic DMC-ZS3. The same video files (same file format) imported in Aperture 3.3 cannot be synchronized with iPad. Is Aperture causing the problem?

    Oh, baby! This bad boy flies!! Here's what to expect:
    I had 40,000 images in Aperture 3 and it was dog slow at everything. I installed 3.1 update today. It took 5 minutes to update the database and then behaved marginally better than before at ASIC library navigation. I was disappointed.
    Then I QUIT the app. It took a couple of hours to "update files for sharing" with a counter that went to 110,000 images. So it must have updated every thumbnail and variation of preview. Turned it back on , and BAM. Came up fully in seconds. Paused for 10 seconds ten everything was lickrty split. For the first time ever, I can use the Projects view with all 791 projects and scroll quickly. I even put it in photos modevand whipped thru all 49,000 images!
    Haven't done anybprocessing yet, but i'm liking it!!
    Jim

  • How to use setSoTimeOut() with socket ??

    HI All!
    I eagerly need to know how to use setSoTimeOut() with socket (on server side).
    Actually the scenario is that My Server accepts connection and waits for connected client to send data to it. I WANT TO KEEP, IF CLIENT DOENS'T SENDS ANY DATA TO SERVER WITHIN 5 min. THEN SERVER MUST CLOSE THE CONNECTION, BUT IF SERVER RECEIVES STILL A BYTE FROM THE CLIENT WITHIN 5 mins., THE SERVER MUST RESET CHECKING TIME OUT FOR NEXT 5 MINUTES.
    How can i do that??
    Any help with example will be appreciated!!
    Thanx in advance

    you'd have to do something like this:
    (this is all assuming you want to read Strings from the socket. setSoTimeout works for any read() call to the InputStream associated with the Socket)
    ServerSocket ss = new ServerSocket(myPort);
    Socket s = ss.accept();
    s.setSoTimeout(5*60*1000); // 5 mins * 60 secs * 1000ms
    BufferedReader in = new BufferedReader(new InputStreamReader(s.getInputStream()));
    boolean running = true;
    while(running)
    try
    String readIn = in.readLine();
    // do whatever you want with the data read
    catch(SocketTimeoutException)
    running = false;
    Now. That's what I think needs to be done. I don't have Java on the machine I'm currently on, so I can't test/verify it, but it goes something like that.
    Good luck,
    Radish21

  • Manage it with File or with Socket Programming?

    I want to view a directory in a FTP Server and it's sub directory
    I think there are 3 method to achieve it :
    first, with Socket.For this one,I have to read the FTP protocol.
    second, transform that directory into a InputStream.
    Then read every line from the InputStream and judge every line if it's a directory or a file.Then read the sub directory,so and so on.
    This is a very heavy method.
    Third,new a File from the directory.But "File(URI uri)" requires a URI with a "file" scheme.
    I know that there is a package sun.net.ftp, but it's not pure java.
    so,
    How can I get a File class from a FTP resource?
    or is there any other method that I can achieve it?

    I wonder if I can achieve it in Pure Java.
    Because my software will be used in many different
    platform
    There is also samba:
    http://jcifs.samba.org/
    jCIFS is not Samba and yes it's 100% Java. In fact it's quite small and fast. Faster than the C clients believe it or not (although it uses more system resources).
    Mike

  • VSS Error: "An unexpected error occurred when cleaning up snapshot volumes. Confirm that all snapped volumes are correctly re-synchronized with the original volumes."

    Hi all,
    at a customer’s site I’ve a problem with a fresh installation of Backup Exec 2014. Every backup (full or incremental) always reports the following
    error: “An unexpected error occurred when cleaning up snapshot volumes. Confirm that all snapped volumes are correctly re-synchronized with the original volumes.”.
    It’s not a Backup Exec problem itself, also backups using “Windows Server Backup” failing with the same error.
    On this site I have three servers; the error is only generated for one of them. Here’s a short overview:
    Server1: Windows Server 2012 R2, latest patchlevel, physical machine, Domain Controller and Fileserver. Backup Exec is installed on this machine,
    backup is written directly to SAS tape loader. There error is generated on this server.
    Server2: Windows Server 2008 R2, latest patchlevel, virtual machine, running on Citrix Xen Server 6.2. Used for remote desktop services, no errors
    on this server.
    Server3: Windows Server 2012 R2, latest patchlevel, virtual machine, database server with some SQL Instances, no errors on this server.
    As I said, error is reported only on server1, no matter if it is a full or an incremental backup. During the backup I found the following errors
    is the event log (translated from a german system):
    Event ID: 12293
    Volume Shadow Copy Service error: Error calling a routine on a Shadow Copy Provider. "{89300202-3cec-4981-9171-19f59559e0f2}" an error occured. Routinedetails Error calling Query(). [0x80042302] [hr = 0x80042302, unexpected component error of
    the Volume Shadow Copy Service.
    Process:
    Volume Shadow Copy polling
    Volume Shadow Copy delete
    Context:
       Executioncontext: Coordinator
       Executionkontext: Coordinator
    And
    Event ID: 8193
    Volume Shadow Copy Service error: Unexpected error calling Routine "IVssCoordinator::Query" hr = 0x8004230f, Unexpected error Volume Shadow Copy Service Provider
    Process:
    Volume Shadow Copy delete
    Context:
       Executioncontext: Coordinator
    There are some articles about this error in the knowledge base or web which does not help or do not apply to my environment for example:
    http://www.symantec.com/business/support/index?page=content&id=TECH38338&actp=search&viewlocale=en_US&searchid=1423724381707
    What I already have tried:
    Disabled Antivirus during the whole backup
    Installed latest Service Pack for Backup Exec
    Rebooted the server
    vssadmin list writers do not show any errors
    consult eventid.net for other possible solutions
    no limits set for vaa
    Anymore ideas from you guys?
    Best regards,

    Hi Shaon,
    vssadmin list providers gave the following output:
    vssadmin list providers
    vssadmin 1.1 - Verwaltungsbefehlszeilenprogramm des Volumeschattenkopie-Dienstes
    (C) Copyright 2001-2013 Microsoft Corp.
    Anbietername: "Microsoft File Share Shadow Copy provider"
       Anbietertyp: Dateifreigabe
       Anbieterkennung: {89300202-3cec-4981-9171-19f59559e0f2}
       Version: 1.0.0.1
    Anbietername: "Microsoft Software Shadow Copy provider 1.0"
       Anbietertyp: System
       Anbieterkennung: {b5946137-7b9f-4925-af80-51abd60b20d5}
       Version: 1.0.0.7
    Unfortunately theres not Symantec VSS Provider listed.
    Best regards,
    Christoph

  • Need help with sockets!

    I am fairly new to network programming. All help is very appreciated!
    I know how to work with sockets and serversockets, and how to transmit data between the host and the clients. My problem is that I have no idea how to get my working program to work online.
    -It works fine when I have both the client and host programs running on my computer.
    -It works fine when I have the host on one computer (192.168.1.103), and the client running on another one (192.168.1.102 I think). I guess in this case I'm just using the linksys network, not the internet.
    -IT DOES NOT WORK WHEN I upload the files to my website, and run them from there. I am not sure what the cause is; the host correctly creates the serversocket and waits, but never receives a connection to the client. The client seems to connect; it does not throw any exceptions, and creates a socket, but never actually communicates with the host.
    Could the problem be with my applets' permissions?
    What hostname/IP should I have the client connect to? It is on the same server, so would localhost work, or do I need to connect to my websites ip, or to the hostname?
    What other problems could there be?!?!?!?!
    Thank you so much for your help!!!!!!!!!!

    Donv7 wrote:
    1) Is the server program running on the same machine as the webserver?
    2) How are you opening this Socket in the applet? You mentioned something about localhost, that would be wrong. You should use the www hostname. Same as the host that served the HTML that the applet lives in.1- My server program and client program are actually the same thing. This doesn't sound too good.
    And applet is not a suitable endpoint for a P2P application. An applet is going to be a client. Not a server.
    Are you actually running a server (of your program) on the webserver? Or are you hoping that two applets will talk to each other with one acting as a server? Because that's not going to work.

  • Synchronizing with Outlook

    I have been a Blackberry user forever.  I have always used Outlook for my e-mail, contacts etc.  I have never had an issue until I upgraded to Q10 when it was released.  I now have a Passport but I am growing so weary and frustrated by simply trying to manage my Contacts I am seriously thinking about moving to an Android device.  My friends on Android laugh at me when I describe my struggles I am having.
    When I synchronize my contacts with Outlook I have all kinds of problems.  I end up with duplicate contacts, contacts with the same last name are merged into one and half the data disappears, some contacts are updated with data that is so old that I have no idea where it came from, all information under a contact is deleted except for their PIN etc etc..
    I have always assumed I was merging two different record sets but I cannot seem to figure it out.  I have read everything I can on-line but I have never read about anything that matches exactly what I am experiencing.  Rogers people know less about the device than I do.  I am looking for anyone that can help me understand what is happening.  If there is a service I can pay for I am happy to do that at this point.  That would be cheaper than switching platforms.
    Any suggestions out there?

    Hi and Welcome to the Community!
    You did not say...are you synchronizing with Outlook Desktop Client, or with Outlook.com OTA? If the former, then there are plenty of reports of problems, which everyone who uses that method hopes will someday be resolved. But, if the latter, that has actually proven to be an excellent method of keeping things in sync between your device and your Desktop Outlook, by using Outlook.com as the intermediary rather than tethering and synching via USB. Given the prevalence of OTA sync for so many things, USB sync is actually fading away rather swiftly (at least for those who can accept using "the cloud" as the intermediary between device and computer-based client software).
    Good luck and let us know!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Error by submitting objects with socket

    Hallo,
    I allways get the following error massage:
    Error:
    java.net.ConnectException: Connection timed out: connect
    Exception in thread "Thread-0" java.lang.NullPointerException
    at com.Receiver.read(Receiver.java:36)
    at Input.write(Kommunicator.java:111)
    at Input.run(Kommunicator.java:137)
    Error:
    java.net.ConnectException: Connection timed out: connect
    Here is my code:
    import com.*;
    import TerminalIO.*;
    import java.util.*;
    import java.io.*;
    import java.net.*;
    public class Kommunicator
         public static void main(String [] args){
              KeyboardReader inread = new KeyboardReader();
              int port = inread.readInt();
              String ip =inread.readLine();
              Emitter out = new Emitter(ip, port);
              Input in= new Input(new Receiver(ip, port));
              try{
                   in.start();
                   boolean flag=true;
                   while(flag){
                        out.open();
                        if(line.equalsIgnoreCase("\\quit")){
                             out.write("User left");
                             in.interrupt();
                             flag=false;
                        else{
                             out.write(line);
                        out.close();
              catch(IOException e){
                   System.out.println("Error:\n"+e.toString());
    class Input extends Thread
         private Receiver out;
         public Input(Receiver a){out=a;}
         private void open(){
              try{
                   out.open();
                   super.start();
              catch(IOException e)
                   System.out.println("Error:\n"+e.toString());
         private void close(){
              try{
                   out.close();
              catch(IOException e)
                   System.out.println("Error:\n"+e.toString());
         private void write(){
              try{
                   Object temp=out.read();
                   if(!temp.equals(null))
                        String line=temp.toString();
                        do
                        System.out.println("Other:"+line);
                        line=out.read().toString();
                        }while(!line.equals(""));
              catch(IOException e)
                   System.out.println("Error:\n"+e.toString());
              catch(ClassNotFoundException e)
                   System.out.println("Error:\n"+e.toString());
         public void run()
              open();
              write();
              close();
    package com;
    import java.net.*;
    import java.io.*;
    public class Receiver
         private String ip;
         private int port;
         private ObjectInputStream ois;
         private Socket sock;
         public Receiver(String a, int b)
              ip=a;
              port=b;
         public void open() throws IOException
              sock = new Socket(InetAddress.getByName(ip), port);
              ois = new ObjectInputStream(sock.getInputStream());
              sock.setSoTimeout(3000);
         public void close() throws IOException
              ois.close();
              sock.close();
         public Object read() throws IOException,ClassNotFoundException
              Object temp=null;
              temp=ois.readObject();
              return temp;
         public int getPort()
         {return port;}
         public String getIp()
         {return ip;}
    package com;
    import java.io.*;
    import java.net.*;
    public class Emitter
         private String ip;
         private int port;
         private Socket sock;
         private ObjectOutputStream oos;
         public Emitter(String a, int b)
              ip=a;
              port=b;
         public String getIp()
         {return ip;}
         public int getPort()
         {return port;}
         public void open() throws IOException
              sock = new Socket(InetAddress.getByName(ip),port);
              oos =new ObjectOutputStream(sock.getOutputStream());
              sock.setSoTimeout(3000);
         public void write(Object a) throws IOException
         {oos.writeObject(a);}
         public void close() throws IOException
              oos.close();
              sock.close();
    }I hope you can help me with my problem and I hope you can answer my questions;
    1) is it a general problem with socket, that it is not allowed to submit objects on a permanent way?
    2) is it there another way how to submit object?
    3) can the problem be caused through trying to submit packeges in a lan?

    1. When you get an exception trying to construct any object, it is poor practice to print and ignore it.
    2. It is invalid to continue as though the object had been constructed.
    3. In this case you failed to connect but then continued to the read method using a null socket reference.
    4. You need to restructure your code so that it reacts correctly to exceptions.
    5. Then you need to solve the question of why the connect failed.

  • Problem synchronizing with iPod

    A user is have quite a few problems synchronizing with his iPod.
    He is only able to sync if he logs in as an administrator (he has two accounts on the machine), runs iTunes, cancels the sync (the administrator account doesn't have the music files), closes iTunes, logs on again with his regular account, and opens iTunes again.
    It seems to be a permissions issue, but he does have administrator permissions on the folder when using his regular account.
    How should iTunes be set up so that administrator permissions aren't needed to sync with an iPod?
    In addition, is there a way to update iTunes software via the updater without administrator permissions?

    Is Fast user switching enabled on the PC?
    Checking on this because iTunes doesn't like Fast User Switching on XP or Vista. See:
    iPod for Windows: Fast user switching in Windows XP and Windows Vista is not supported

  • Turning off the iPad screen when synchronizing with the iTunes

    Quick question: How do I turn off the iPad screen when synchronizing with the iTunes. Is this even possible? Are there settings I am overlooking? Or perhaps a third-party app which can make it happen?
    I have a large library and often leave my iPad connected to iTunes for several hours at a stretch. The bright glowing screen can be a big distraction, and, more importantly I am very worried about pixel burn-in.
    Cheers,

    The iPad LED Backlit IPS Screen is not phosphor-based, so there is no permanent phosphor burn-in problem. You might see some image persistence, but that is not permanent and can be corrected. See this support article about image persistence: http://support.apple.com/kb/HT2807
    Since you have already converted your music to 128 kbps, you are unlikely to see any more 10+ hour syncs unless you have to do a restore. In that event, you could select the brightness control in settings to the lowest level.
    FYI, there are some apps, such as Night stand HD that are designed to be used for long periods with unvarying displays and I have yet to see image persistence problems reported. However, since the iPad is still a new product, there may be some reports in the future.

  • Re: is it possible to program with Sockets with the Internet as a network.

    I am working with socket programming.
    During the Christams holidays I will need to do some programming at home.
    Is it possible to program with sockets on a home PC using Windows with only the Internet as a network?

    yes it is
    I am also working on an application that uses sockets at the moment, and I asked help a lot by these days ;)
    Maybe I can help you from what I've learned..
    here is a basic:
    create server socket:
    ServerSocket server = new ServerSocket(4444);
    4444 is the port on which the socket is listening
    Socket socket = new Socket("127.0.0.1",4444);
    127.0.0.1 is a local IP adress to connect to and 4444 is the port number to connect to. That considers that the server and the connecting client are both on the same PC, but then you can use other IPs ;)
    Hope it helps

Maybe you are looking for

  • Palm TX - Desktop DateBook Empty & Now it seems it will not sync with device.

    Hello Palm Forum Members, I have Windows 7 and I sync my Palm TX to DeskTop 6.2.2 via bluetooth.  Two weeks ago I loaded my DeskTop DateBook and it was blank.  I have made several attempts to sync my device to the desktop in hopes to recover my dateb

  • WONT TURN ON

    my macbook was working fine around midnight last night when i put it to sleep, but then around 8am this morning, i opened it and the gray screen came up, but before the password entry box came up, it went back to sleep. this happened multiple times.

  • Using Device Central CS5.5 offline or Obtain online libraries for local (offline) use

    Device Central CS5.5 cannot navigate my proxy server, and my security unit is never going to provide an exception to allow it. I need Device Central to at least start-up so I can review some mobile website designs. But all I get upon starting DC is t

  • Blog entries via email?

    Hi all, Anyone know if the new blog utility in iWeb/.mac will support adding entries via email from a handheld device such as a blackberry?

  • Java constructors

    Right you prob saw me having problems with this earlier. I think i am making progress. I think i have created two constructors within a class, and for one of these constructors i have initialised a time object to 3.45. What i am stuck on is outputtin