Client/Server apps using custom objects

I have wrote an ip transaction server and I am trying to pass objects across to it that don't have to reside on the server. I have created an interface that implements serializable and then the class I am trying to pass implements the interface. I read that as long as the interface is on both the client and the server that the object doesn't need to be using this approach.
I, however, keep getting a classdefnotfound error for the custom object when I do a readObject().
Can this really be done?
Thanks in advance.
Relevant code snippets:
interface Workable implements java.io.Serializable
     public abstract int getToWork();
public class test1 implements Workable
     public int getToWork()
          System.out.println("Test 11 value = ");
          return 1;
Server code:
Workable ipdata;
ipdata = (Workable)in.readObject();//Blows up trying to read object here
ipdata.getToWork();

Take a look at the thread on this newsgroup named:
deserialization loads classes more eagerly than construction?
That seems similar to your complaint (Java's object serialization not conforming to its own specs about "classes that don't need to be present", in that thread it is a non-serializable member object that blocks things). I get the feeling you hit a bug in Java's serialization mechanism and that it is caused by a faulty heuristic in Java serialization.

Similar Messages

  • How to create client and server app using node.js in firefox os.

    I want to create a client and server app using node.js for firefox os. Please suggest me how to create a apps.
    I want to send a request from client to server and based on client request, service reply to client.
    If any links available, Please share it.
    Thanks

    Hi sb00349044,
    The SUMO forums focuses on end-user support.
    For questions about developing for Firefox OS, you will find better guidance in MDN, StackOverflow, and mailing lists:
    * [https://developer.mozilla.org/en-US/Firefox_OS MDN - Firefox OS]
    * [http://stackoverflow.com/questions/tagged/firefox-os StackOverflow - Firefox OS]
    * [https://lists.mozilla.org/listinfo Mailing Lists at Mozilla]
    Thanks,
    - Ralph

  • Client Server program using Applets for client

    Creating a client server program using Applets for the clients.
    Having problems distrubting the message from client to client
    using ObjectOutputStreams/ObjectInputSteams.
    I can connect each client to simple server and respond with by writting
    the i/o stream of each client but unable to communicate from client to client. If any one out there has in tips of creating a class of objectOutputStreams that holds a array of ObjectOutputStreams and then broadcasts the message to every client, it would be much appreciated
    Thanks.

    Cheers poop for your reply
    I never explained the problem properly. What it is I am trying to set up a Client Server program using Applets as the clients GUI. The problem is broadcasting the message to multiply client connnection(s).
    Below is code, each client can connect and send message to the server. The problems is broadcasting the message to every client connection. The every client can input a message but only the last connected client can receive the message?????? Thanks in advance..
    /*this my server class */
    import java.io.*;
    import java.net.*;
    public class Server extends JFrame
    private static final int ServerPort=8080;
    private static final int MaxClients=10;
    private ObjectOutputStream output=null;
    private ObjectInputStream input=null;
    private BroadCastMessage broadcastMessage;
    public void runServer()          
    BroadCastMessage broadcastMessage= new BroadCastMessage();
    try
    {  //connect to server
    ServerSocket s = new ServerSocket(ServerPort,MaxClients);
         //listen to port 5000 for new connections
         ///max is 25
         System.out.println("Server listening on port "+ServerPort);
    while (state.isProgramRunning())
         try
         /// sGUI.waitForConnection();//new line
         s.setSoTimeout(100);
         //enable times in server-socket
         while (true)     
         Socket incoming = s.accept();
         //wait and accept connnections from serverSocket
         //instance of the class,pases the new connection and message
         //spawn as a thread
         SocketConnection connection=new SocketConnection(incoming,broadcastMessage);
         Thread a = new Thread(connection); a.start();
         System.out.println(state.getConnectionCount()+"Connection received from :"+incoming.getInetAddress());
         catch(InterruptedIOException x){}
    while (state.getConnectionCount()>0);
    System.exit(0);
    }catch (IOException e){}
    public static void main(String[] args)
    Server s =new Server();
         s.runServer();
    /*this is my socket connection thread*/
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.net.*;
    public class SocketConnection implements Runnable
    private ObjectOutputStream out;
    private ObjectOutputStream output=null;
    private ObjectInputStream input=null;
    private BroadCastMessage passOnMessage;
    private Socket theConnection=null;
    private String Inmessage="";
    private int Ocount;
    public SocketConnection(Socket caller,BroadCastMessage broadcastMessage,Ocount)
    theConnection =caller;///(5000,n)
    Ocount=ncount;
    passOnMessage=broadcastMessage;
    public void run()
    try
    getStreams();
    processConnection();
    catch(Exception e)
    {String clientDetails=("connection from IP Address: "+theConnection.getInetAddress());}
    private synchronized void getStreams() throws IOException
    { //get streams to send and receive data
    //set up output buffer to send header information
    ///Ocount++;
    //create new objectoutputstream
    output=passOnMessage.getOutputObject(output,theConnection,Ocount);
    ///flush output buffer to send header info.
    Ocount++;
    //set up input stream for objects
    input =new ObjectInputStream(
    theConnection.getInputStream());
    System.out.print("\nGot I/O streams\n");
    private synchronized void processConnection()throws IOException
    //process connection with client
    String Outmessage =" count : "+status.getConnectionCount();
    //send connection successful message to client
         Outmessage=Outmessage+"SERVER>>>Connection successful";
         output.writeObject(Outmessage);
    output.flush();
    do ///process messages sent from client
         try
         Inmessage = (String) input.readObject();
         System.out.println(Inmessage);
         /* //while the connection is open each line
         that is passed from the client to the server
         is read in and is displayed*/
         messageDetails.setMessage(Inmessage);
         String CurrentMessage=messageDetails.getMessage();
         //output.writeObject(CurrentMessage);
         // output.flush();
         passOnMessage.FloodMessage(CurrentMessage);
         //sending out the message
    catch(ClassNotFoundException classNotFoundException){}
    }while (!Outmessage.equals("CLIENT>>>TERMINATE"));
    /*this my attempt at broadcasting the message to all clients
    my thinking was that you could create a array of objectoutputstreams
    which in turn could be broadcasted(bit confussed here)*/
    import java.io.*;
    import java.net.*;
    public class BroadCastMessage /// implements Runnable
    private int count;
    private String Inmessage="";
    private ObjectOutputStream temp=null;
    private ObjectOutputStream[] output = new ObjectOutputStream [12];
    //temp level of array of objects
    public BroadCastMessage()
    count=0;
    public synchronized void FloodMessage(String message) throws IOException
    System.out.print(count);
         for(int i=0;i<count+1;i++)
         try
    {  System.out.print(count);
         output[count].writeObject(message);
         output[count].flush();
         catch(IOException ioException)
    {ioException.printStackTrace();}
         notifyAll();
    public ObjectOutputStream getOutputObject(ObjectOutputStream out,Socket caller,int Ocount)
    try
    { temp = new ObjectOutputStream(caller.getOutputStream());
         AddObjectOutputStream(temp,Ocount);
    ////FloodMessage();
         catch(IOException ioException)
    {ioException.printStackTrace();}
    return temp;     
    public void AddObjectOutputStream(ObjectOutputStream out,int Ocount)
    { ///add new object to array
    count=Ocount;
    output[count]=out;
    System.out.print("\nthe number of output streams : "+count+"\n");
    }

  • Which services in the Server app use PostgreSQL?

    I want to use Postgres.app for PostgreSQL and move my databases currently on the Apple installed instance.  The documentation states that it works best if there is only one active instance of PostgreSQL.
    I currently use the latest version of the Mavericks Server app for DNS and Websites (for now).  I know that at one time Websites was using PostgreSQL.  I would like to know if I can turn of postgres and still use the DNS service.  I think I can figure out how to host my one website in Apache.
    For future projects I would like to know which services in the Server app use PostgreSQL.

    Look at the WiFi selection in System Information and it will tell you.

  • Inventory Management using Custom Object 07

    Hi Guys,
    I have been trying to use custom object 07 as Inventory.
    I have renamed custom object 07 as Inventory. I have verified that already a relationship exists between this custom object and Products. So, I modified the Inventory Page Layout to make the products related information section visible. I have created access profiles and role appropriately. I was able to see the products related information section in the Inventory detail page but I didn't see any means of associating records with the inventory like buttons.
    Did I miss any step? Also could you point me to documentation related to custom objects?
    Thanks and Regards
    Naren B

    Hi Bobb. Thanks for the reply.
    My requirement doesn't require any reports to be developed. So, I didn't think about it. I tried to use custom object 7 for as Inventory. So, i just renamed Custom object 7 as Inventory. Already there is a relationship existing between custom object 7 and products. So, I went to the related information layout of Inventory(CO-7) and used the standard information layout provided for products. But, I didn't find any buttons to associate a product in the related information section under inventory. My main requirement is to manage inventory transactions. When a shipment is receiving the available quantity and the quality of the product have to be changed accordingly and so on. Currently I am using custom objects 1,2 and 3 for this purpose and i was able to achieve the requirement. Don't know what was wrong. May be the button was disabled purposefully. I will check it out and i will let you know. Can you explain in brief in two to three steps the procedure you followed ?
    Thanks and Regards
    Naren

  • Client/server application using sockets

    Hi there,
    I'm trying to create a client/server application using sockets where the client has a GUI of a membership application form for some sort of club. Basically, the user will enter their name, address, membership no. etc in to various Jtext fields and then press a JButton to submit these details to the server. The server will then hopefully just dump these details to a text file.
    Can anyone give me any examples, ideas on how to start, links etc.
    Thanks v. much in anticipation,
    Nick

    Take a browse of the tutorial on sockets: http://java.sun.com/docs/books/tutorial/networking/sockets/clientServer.html

  • Error while using customizing object DNL_PLANT to download Plants

    Hi All,
    I am using customizing object  DNL_PLANT to download plants from the R/3 system to the our CRM system.
    From the table T001W (in R/3) to the table CRMM_LOCMAP (in CRM).
    From this I am able to download the required Plants from the R/3 to CRM.
    But the issue i am facing is that there are few entries (BP) defined as ( VERB- Affilated to Companies ) are also downloaded to the same table.
    And these BP have been asssigned one more role other than VERB i.e. BBP003 now. These BP were intially present in the CRM system with role VERB only.Now they have two roles i.e. VERB and BBP003.
    Is there anyway we can revert these entries from the table (CRMM_LOCMAP).
    Or we remove the etra role (BBP003) added to the BP, by removing thses role by simply using BP transaction and removing the role.
    Please suggest.
    Cheers,
    Sharad

    Hi,
    is this a static class with an inner class you created: GlAccountClasses.GaclAcctType ? If not then this cannot be found. If you want to pass the reference to another View Object, use
    a) a method exposed on the other VO Impl class
    b) The ViewLink accessor
    If you are using Groovy on a VO level then it doesn't help if you have accessors defined on the EO level
    This may help too: http://blogs.oracle.com/raghuyadav/entry/groovy_samples
    Frank

  • Client & server can use different language when using socket for client/ser

    When building client/server applications using socket , is it that client and server do not need to use both Java as long as they implement the same networking protocol?
    Thanks a lot!

    thank you, DrClap!

  • Lotus Notes Client Server Apps

    I'm wondering if anyone has tried to connect to lotus notes client server apps. from portal. I've heard that they have to be "webified" first. Is that true or are there different ways to get to the lotus notes app?

    Hi,
    Please post this on PDK forum.
    Thanks,
    Sharmila

  • How to design socket client-server app for 2-way communication

    Hi, I am writing a client-server application. I have a single server and many clients. Each client will need the ability to send information to the server at any time. The server will also need the ability to send information to a client at any time. Its this second part that I am not sure how to design. Would I need to create a SocketServer on each client to accept incoming messages, or is there a better way? Thanks

    scranchdaddy wrote:
    Don't my requirements sound a lot like an IM application, where a chat server might need to send a message to a chat client at any time?Not really. If that is what you are designing
    in my opinion one could easily be forgiven for thinking you were deliberately obfuscating your goal...
    How does the server know where the client is? Does it know the IP address of the client?I would imagine the server would contain a directory of IPs? I'm not sure.
    What happens if the client is not running?Then I guess the message would not get delivered.
    What happens if the client is behind a firewall that does not allow incoming connections?How do IM chat clients work? How have people solved this in the past?Typically the server would only care about clients currently connected to the server.
    Maybe you should re-think your design. I don't really have a design, just requirements, that's why I'm writing this post.Your subject says "+How to *design* socket client-server app for 2-way communication+".
    Are you saying you expect someone else to do the design for you?

  • Design a client-server system using java

    hello every body,
    I'm trying to design a client-server system using java,
    it work but the Qustion is:
    How can I send more than one mssg on the client side, and How can I recive more than one mssg on the client side?
    I tryed this:
    At client_
          System.out.println("Enter your Name:");
          BufferedReader stdIn1 = new BufferedReader(new InputStreamReader(System.in));
          String userName;
          userName=stdIn1.readLine();
          //sending message to the server
           out.println(userName);
          System.out.println("Enter your password:");
          BufferedReader stdIn2 = new BufferedReader(new InputStreamReader(System.in));
          String Passw;
          Passw=stdIn2.readLine();
          //sending message to the server
          out.println(Passw);
         BufferedReader stdIn3 = new BufferedReader(new InputStreamReader(System.in));
         String userInput;
         userInput=stdIn3.readLine();
         //sending message to the server
         out.println(userInput);
       //receiving message from the server and printing
       String revc;  
       revc=in.readLine();
       System.out.println(revc);
    At server_
        //reading from a client
          inputLine = in.readLine();
          outputLine = "Reply From Server :HelloClient ";
          //sending message to a client
          out.println(outputLine+"------"+ inputLine);
    i hope this is the right place for my question, and hope to get help
    thanks.

    Is there a reason you create a new InputStreamReader and a new BufferedReader every time you prompt for user input?
    lass_987 wrote:
    How can I send more than one mssg on the client sideInvokeout.println()more than once.
    How can I recive more than one mssg on the client side?Invokein.readLine()again.

  • OSX: multi client server app with NSNetService

    hello
    i have a small osx server app
    that uses NSNetService to manage connection and set up streams
    but it seems to stop advertising as soon as a clients connects
    how can i make it multiclient so it keeps advertising and when a new client connects uses the same streams ?
    thanks in advance
    nonnus

    superdeportivo wrote:
    Hello fellahs, as the title of this post says I'm making a client and server application. The server are supposed to handel several clients, and the communication is done true UDP. Out of interest why have you chosen UDP rather than TCP?
    I have got two questions concerning this. The first one is if a exception is throws in the server should I then send the exception back to the client in serialized form. If I choose to do this then I also would need to handel the exception classen to the client. Or should I send back a regular IOException and use it's init cause to define the exception which occured in the server. That is up to you, you can do either. I would do the first option.
    The second question is concerning the multi client support. If this is going to work then I would need to time-out the connection i the server environment, and I have not a clue about how long it should be?It should be long enough that you don't timeout a valid connection. There is no simple answer to this.

  • Creating chart in java client/server app.

    Currently, I'm developing a client/server java app. under windows. I want to create a chart (pie, bar) for graphically reporting, anybody can help me pls........? Thanks a lot
    TriAK

    There are some solutions...You can use the Java Chart() class or BarChart() from the J2sdk API.
    (http://java.sun.com/applets/jdk/1.4/demo/applets/BarChart/example1.html)
    Besides, you can use some already build class from some companies like ObjectPlanet.(www.objectplanet.com).
    There is also another link(have a look at it) http://www.java4less.com/charts_e.htm
    Another way is to build by your own using java.awt(It will be to most difficult in the manner of time consumed).
    Finally, I will recommend you to create charts as html page integrate this application as Applet or html in general(Javascript,JSP).
    I hope I gave you some ideas.

  • Client server application using CORBA

    Hi
    I have a basic client server application running using CORBA/idl where the client starts up and the server says hello back to the client. I have figured out the basics but would like some help with these small problems.
    When I start the client, the server says hello. Thats OK. Now I want the client to start a simple java app (called c:\test.java - it works) that I created before. How?
    The next bit is when I close down the app "test" that I start, I want the server to realise that its closing and simply say goodbye on the client. How?
    If anybody can help me, I'd appreciate it.
    Thanks for your time,
    Shaun

    hi,
    to my knowledge, you will have to define a method in idl file and in your client, which server invocates(saying good bye etc) before shutting down..
    ls.

  • Integrating DOS/client server apps through portal

    Is there any partners out their that have developed any portlets that will integrate legacy client server or DOS through the portlet in a Citrix NFuse fashion?
    There seems to be a few competitive portal providers out their who claim that this can be done. OBTree does this via Java wrapped emulation software which can be integrated over the web.
    This would be very useful for legacy integration into one place without rewriting a front end etc.
    Any ideas or recommendations?

    Any one got idea how to resolve this problem. We are facing this problem with applet based applications. Pleae let me know if any one know how to write netlet rules to make this app. work through portal.

Maybe you are looking for

  • ADF rich client: How to automate testing

    Hi Experts, We need to do some automate testing against application that is developed with ADF Faces 11g, I've tried with loadrunner 8.1, which provides 2 approaches to record web applications, web(html / http) and web(click / script). According to m

  • MIGO BADI

    I am working on this BADI for MIGO transaction for adding custom screen.... I was able to display the custom sub-screen... however it contains a pushbutton... which should trigger another screen... How would i achieve this.... Edited by: Karthik on N

  • Lost HardDrive Space After Deleting Bootcamp Partiton

    Hello, Everyone I have a small issue i open finder window and it says that i have 398.18GB Available but when i go into Disk Utility and go to the top result which is called WDC WD6400AAKS-40H2B0 Media it says that my Total Capacity is 640.14 GB so i

  • Comment fait on pour acheter CS5.5 Design Premium

    Bonjour ya quelqu'un

  • BO for Workorder

    Hi Guys,                I am designing a workorder related workflow.. I dont find a BO for that.. Which BO can be used for workorder.. Maintanance order or Production order ? Thanks