Incorrect decryption operation in client-server

Hi all, sorry for my English, I don't know where is the problem and I don't see examples for internet.
I have a cliente-server aplication, where client read a file, encrypt it and send it to server. The server doesn't decrypt de text correcty. For example if the file contents:
"Hola, probando el cifrado y descifrado.", the server shows "Hola, probando eifrado."
I think that the problem is in the form for send and receive the cipher text.
I put the code for client:
import java.net.*;
import java.io.*;
import java.security.*;
import javax.crypto.*;
class ClientAES {
  public static void main(String argv[]) {
    try {
      System.out.print("Introduce the key : ");
      String cadena = Teclado.readString();
      SecureRandom rand = new SecureRandom(cadena.getBytes());
      System.out.println("Generating key...");
      KeyGenerator keyGen = KeyGenerator.getInstance("AES");
      keyGen.init(rand);
      SecretKey desKey = keyGen.generateKey();
      System.out.println("Key generated");
      Socket s=new Socket(argv[0],4096);
      FileInputStream fis = new FileInputStream(argv[1]);
      byte[] b=new byte[fis.available()];
      System.out.println("Bytes that can be read of file: "+fis.available());
      fis.read(b);
      System.out.println(Text send: "+new String(b));
      Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
      cipher.init(cipher.ENCRYPT_MODE,desKey);
      CipherOutputStream cos = new CipherOutputStream(s.getOutputStream(), cipher);
      cos.write(b, 0, b.length);
      fis.close();
      cos.close();
      s.close();
    } catch (Exception e) { e.printStackTrace(); }
}and server:
import java.net.*;
import java.io.*;
import java.security.*;
import javax.crypto.*;
class ServerAES {
  public static void main(String argv[]) {
    try {
      System.out.print("Introduce the key: ");
      String cadena = Teclado.readString();
      SecureRandom rand = new SecureRandom(cadena.getBytes());
      System.out.println("Generating key...");
      KeyGenerator keyGen = KeyGenerator.getInstance("AES");
      keyGen.init(rand);
      SecretKey desKey = keyGen.generateKey();
      System.out.println("Key generated");
      ServerSocket servidor=new ServerSocket(4096);
      System.out.println("Waiting a client...");
      Socket s=servidor.accept();
      System.out.println("Recieve a client connection");
      Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
      cipher.init(cipher.DECRYPT_MODE,desKey);
      CipherInputStream cis = new CipherInputStream(s.getInputStream(), cipher);
      byte[] in = new byte[cipher.getBlockSize()];
      int length;   
      System.out.println(cipher.getBlockSize());
       length = cis.read(in,  0, in.length);
      System.out.println(new String(in)+new String(cipher.doFinal()));
      cis.close();
      s.close();
    } catch (Exception e) { e.printStackTrace(); }
}

eeeh, if I understand your code correctly, then you are creating keys in each process. That means, you'll have two different keys. But you are using AES, which is a symmetric encryption algorithm. Hence you'll need to have the same key on both sides. Otherwise you'll not decrypting the stuff you where encrypting before.
stephan

Similar Messages

  • Error deploying a composite to a clients server

    Hi,
    I'm having trouble deploying a composite to a clients server.
    I've defined the Configuration Plan to change all the references from our server to the clients server.
    The composite has some references to webservices deployed on the same server. I can test those webservices on the Enterprise Manager and they work.
    The error when I try to deploy is the following:
    Deploying on partition "default" of "/Farm_bpm_domain/bpm_domain/soa_server1" ...
    Deploying on "/Farm_bpm_domain/bpm_domain/soa_server1" failed!
    Error during deployment: Deployment Failed: Error occurred during deployment of component: ServiceTest2Process to service engine: implementation.bpmn for composite: ServiceTest2Composite: ORABPEL-05250
    Error deploying BPMN suitcase.
    error while attempting to deploy the BPMN component file "/oracle/product/fmw/11.1.1/bpm/user_projects/domains/bpm_domain/deployed-composites/ServiceTest2Composite_rev1.0/sca_ServiceTest2Composite_rev1.0/soa_68135a9a-c6b0-4982-99de-2eb366875b5d"; the exception reported is: java.lang.IllegalArgumentException: Conversation is not properly defined. There are not operation/process or external services defined
    This error contained an exception thrown by the underlying deployment module.
    Verify the exception trace in the log (with logging level set to debug mode).
    .The logs on the server (set to TRACE:32 (FINEST)) don't add anything to the error message.
    Anyone has had the same problem or has any ideia what might be the problem?
    Thanks in advance,
    Diogo Henriques

    Hi
    Can't offer much help but I just got exactly the same problem also. I just made a minor modification to a simple BPMN Test process. The change involved adding a Script Task and changing the assignment to the Output Argument of a Sub-Process. This change should not have caused any change to the service interface of the process. This was on a local Dev box.
    The process does call a Web Service. It was deploying/executing without error at last WLS boot a day ago, the Web Service is running fine and the process is building without error. There have been no other changes.
    This seems to be some kind of deployment versioning or stale caching related bug. I just undeployed the current version via EM (which actually reported a failure during undeployment but undeployed anyway!) and rebooted WLS and the deployment was then successful.
    See also Error deploying 2 processes in the same project BPM 11gR3 Project
    I suspect both of these are symptoms of the the same underlying problem which show up when there are repeated deployments of the same process after changes - regardless of whether you overwrite the existing version or start a new one.
    Regards
    Jim Nicolson

  • How to validate a server in client-server application

    I am considering a client server application for a masters project. One of the core requirements for this application would be to ensure that the server could not be replaced. This would be easy to do using public/private keys. The client creates a message and encrypts using servers public key, then sends to the server. The server decrypts, processes, creates response, and encrypts using its private key. This works, however the public and private keys need to be in the source code. It looks like keystores may fix that problem, however the password to the key store would then be required. For this application to be usefull, I need to find a way to embed a password or encryption key in a .classfile in a way that it can not be retrieved by decompiling or parsing for strings. Anyone have ideas on how this could be done, or a different method I could use to guarantee that the response coming from a server process is from my server program and not a fake program?

    More detail. The program is a network license server (not web based). We need a simple license server for internal use, so that we can track usage and limit concurrent users for custom software. We also need some security so that people can not take the software home and use it. We have looked at commercial applications, however they are very expensive and we can not justify the cost since this is for internal software. There are 3 main pieces to a license server, the client libraries, the server, and the key generator. For the license server to be usefull, it should be impossible (or very very difficult) for someone to generate their own keys and add them to the license server. It should also be very difficult for them to create a fake license server that will grant licenses to clients without needing keys. If public/private key encryption is used, then the client would need to know the servers public key and their private key. These keys would need to be compiled into the program, stored in a key store, or looked up at run time from some other resource. The server would need to know its private key, and the clients public key. Since this is internal software, we can limit access to the server software, so it would be ok to compile the keys into the code (not ideal but secure enough for out use). However if I use this program as my Masters project, I would need to figure out a better way to secure it. The generic problem is how to give someone two programs that talk to each other, and be able to ensure that they do not fake one of the programs?

  • Should i use secure sockets for my whole client/server application?

    Hi,
    I have a client server application, and I want to ensure that the login process is secure (i.e. use secure sockets). but I dont know how to switch back to a normal socket once that is done.
    So I am left thinking that i should just use SSL for my whole application, which can last pretty long. But I would rather not. Is there any other way of doing this?
    or should I just encrypt the login info using MD5 or something like that, then send it over an unsecure socket?
    thanks!

    Hey,
    Are you sure you haven't confused JGSS for JSSE?
    Imagine you have a client-server system and you sometimes want data sent over the wire to be encrypted... JGSS offers you this flexibility; if you a encrypted transmission, run ift through JGSS before transmitting it; if you don't want an encrypted transmission, bypass JGSS and just send the transmission.
    The benefit is the security (encryption) isn't hard-wired into you communications protocol i.e. TLS. JGSS has nothing to do with connections it is just protocol for securing messages, not sending them.
    You would need to establish the secure context but this could be done at startup and persist for the duration of you applicaiton invocation. You perhaps might need to implement a mechanism to identify encrypted messages on the receiving peer (so it knows to attempt decryption).
    Admittedly, kerberos seems like one of those 'inside-joke' things. I've come to realise if you don't have some sort of kerberos realm/server against which to authenticate - you need to swap it out as the underlying mechanism. How this is done I'm not sure yet, but I intend to find out today....further down the rabbit hole I go!
    If I discover anything helpful, I will let you know.
    Warm regards,
    D

  • JMX Client/Server Classpath error

    Good morning,
    I have some aplication thats monitoring Websphere MQ queues.
    For this i'm use some MQ Jars, but its work fine.
    I have JMX Client/Server, for connect into MQ Server, my aplication use the MQ class MQConstants.
    My JMX connection work fine to. So, my problem is.
    When I try to invoke my aplication method
    mbsc.invoke(objectName, "execute", params, sig);
    ....the fallow errors appears
    javax.management.RuntimeErrorException: Error thrown in operation execute
         at com.sun.jmx.mbeanserver.StandardMetaDataImpl.invoke(Unknown Source)
         at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(Unknown Source)
         at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown Source)
         at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source)
         at javax.management.remote.rmi.RMIConnectionImpl.doOperation(Unknown Source)
         at javax.management.remote.rmi.RMIConnectionImpl.access$100(Unknown Source)
         at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(Unknown Source)
         at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(Unknown Source)
         at javax.management.remote.rmi.RMIConnectionImpl.invoke(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
         at sun.rmi.transport.Transport$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.rmi.transport.Transport.serviceCall(Unknown Source)
         at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
         at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
         at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
         at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
         at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
         at com.sun.jmx.remote.internal.PRef.invoke(Unknown Source)
         at javax.management.remote.rmi.RMIConnectionImpl_Stub.invoke(Unknown Source)
         at javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.invoke(RMIConnector.java:972)
         at br.com.flexvision.mq.FlexJMXClient.connectMBClient(FlexJMXClient.java:67)
         at br.com.flexvision.mq.FlexJMXClient.main(FlexJMXClient.java:101)
    Caused by: java.lang.NoClassDefFoundError: com/ibm/mq/constants/MQConstants
         at br.com.flexvision.mq.beans.FlexMQStatistics.processFieldsTypes(FlexMQStatistics.java:209)
         at br.com.flexvision.mq.beans.FlexMQStatistics.execute(FlexMQStatistics.java:30)
         at br.com.flexvision.mq.beans.FlexMQStatistics.execute(FlexMQStatistics.java:25)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at com.sun.jmx.mbeanserver.StandardMetaDataImpl.invoke(Unknown Source)
         at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(Unknown Source)
         at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown Source)
         at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source)
         at javax.management.remote.rmi.RMIConnectionImpl.doOperation(Unknown Source)
         at javax.management.remote.rmi.RMIConnectionImpl.access$100(Unknown Source)
         at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(Unknown Source)
         at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(Unknown Source)
         at javax.management.remote.rmi.RMIConnectionImpl.invoke(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
         at sun.rmi.transport.Transport$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.rmi.transport.Transport.serviceCall(Unknown Source)
         at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
         at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)The most important line in this error is:
    Caused by: java.lang.NoClassDefFoundError: com/ibm/mq/constants/MQConstants
    Because this is de MQ jar that i need.
    I try to set this into server class path, but doesn't work.
    Somebody knows how i fix this?

    And your server has this FileObject class on its classpath, does it?

  • WARNING - Oracle intends to desupport Forms client server mode

    When Forms 6i becomes desupported you will have to move to Forms 9i. Forms 9i runtime can only be run in web mode from a web browser. You will not be able to run client-server forms in native operating systems such as Windows or Unix. The forms will essentially run on the application server with Java applets to being sent to your web browser. Links to third party products will no longer work with host commands executing on your local machine. You will have to include Java code to make local commands work.
    The transition from Forms 6i client-server to Forms 9i web mode will be one of the most painful upgrades Oracle has ever inflicted on its customers.
    Essentially, Oracle is trying to palm us off with running forms from web browsers whether we or our customers like it or not. Java seems to be creeping in. I suspect Developer will eventually turn into JDeveloper, as they will not want to support two products. Easy one line statements and built-ins will be replaced by hundreds of lines of Java nonsense. Developer will move from a 4GL RAD environment to a cumbersome bloated 3GL Java environment.
    You can stop this happening if you want to keep you customers happy by:
    1. Sending Oracle enhancement requests to allow Forms 9i to run in native client-server mode.
    2. Complaining to your Oracle sales contact.
    3. Asking difficult questions at Oracle user groups.

    Duncan et al.,
    I've been wondering why exactly a Forms9i app. needs to run in a web page? Why could the applet not be deployed in a more "standalone" fashion, i.e., an independent application window. This would at least offer the appearance of a native application, complete with the new Java look-and-feel.
    If Oracle really wanted make their customers happy, they would then take the next step and come up with a way to embed OC4J into a client-side deployment executable, which would then effectively allow for a 2-tier client-server architecture.
    It seems to me that 2-tier/3-tier each have their place in the world, depending on the situation. In the extreme "2-tier" example would be an application that is to be deployed on a single client workstation. It would be hard to argue that a separate application server ought to be used. On the other extreme, anybody who has tried to manage the deployment--and upgrade--of a large number of Forms clients is very attracted to the prospect of only having to maintain and upgrade a few application servers.
    I agree with the direction of the product as far as replacing Toolkit2 and the native runtime with the JRE. The advantage of on-demand updating of application code is compelling. The capability of moving application logic to the middle tier is extremely useful. Platform independence is now done using the "universal" JRE instead of TK2.
    If the product could maintain the client-side processing capability--without resorting to Javabeans--it would be just that much stronger. As an application architect, I want to be able to design the application to allocate the work where it makes the most sense, either on the client, the application server, or the database server.
    How hard would it be to put this client-side processing capability back into the product?
    Regards,
    Bruce MacDonald

  • GENERATE EXCEL IN CLIENT SERVER ENVIRONMENT

    Hi,
    At the moment I use the <utl_file> to generate an excel file(from oracle table) via sql*forms GUI to the server (my development server/cilent were one machine)
    The user presses a button on the GUI form and the excel file is generated.
    Now unfortuanately when we transfer to a 'real' production enviroment with client, server architecture , different machines, my generate to excel cannot generate a excel file :
    error : ORA 29283 : INVALID FILE OPERATION : ORA-06512 at SYS_UTIL file ORA 29283 invalid file operation
    Is thre a solution for this where the user can press the button in the GUI form and the excel gets dumped to the client ? (export the excel)
    THANKS in adavance of any tips.

    Thanks
    But unfortunately with 3 days left and 10 modules using <util_file> , I am in trouble !!
    I usde code as follows in <sql_forms>
                             wfile_handle := utl_file.fopen ('REPORTS',v_file, 'W');
                             utl_file.put_line(wfile_handle,v_header);
    Now in client sever environment wont work and this is coded in many places !!!!

  • Client/server socket based application

    hi does anyone have example of client/server socket based application using Spring and Maven
    where application do the following
    Client sends a request with a path to any file on the server
    „h Server reads the file and responds back with the content
    „h Client outputs the content to the console
    am trying to follow this
    http://www2.sys-con.com/itsg/virtualcd/java/archives/0205/dibella/index.html
    http://syntx.io/a-client-server-application-using-socket-programming-in-java/
    am using java 6

    i have attempt code but i wht to do the following
    client/server socket based application that will read the content of a file and stream the content of the file to the client. The client must simply output the content of the file to the console using System.out. The client must be able to run in a standalone mode (non-network mode) or in a remote mode.
    Additionally the client must be designed in a way that i can print the output to a console but must be interchangeable where if requirements change i can persist the response to file or persist the response to a database.
    /* Server.java*/
    ///ifgetBoolen= true then...
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import java.sql.*;
    public class Server
        static String array[][];
        // STEP 1 a1  
        // Server socket
        ServerSocket listener;
        // STEP 1 a2 Client connection
        Socket client;
        ObjectInputStream in;
        ObjectOutputStream out;
        public void createConnection() throws IOException
                System.out.println("\nSERVER >>> Waiting for connection.....");
                client = listener.accept();
                String IPAddress = "" + client.getInetAddress();
                DisplayMessage("SERVER >>> Connected to " + IPAddress.substring(1,IPAddress.length()));
          public void runServer()
            // Start listening for client connections
            // STEP 2
            try
                listener = new ServerSocket(12345, 10);
                createConnection();
                  // STEP 3
    //              processConnection();
            catch(IOException ioe)
                DisplayMessage("SERVER >>> Error trying to listen: " + ioe.getMessage());
        private void closeConnection()
            DisplayMessage("SERVER >>> Terminating connections");
            try
                if(out != null && in != null)
                      out.close();
                    in.close();
                    client.close();                
            catch(IOException ioe)
                DisplayMessage("SERVER >>> Closing connections");
        public static void define2DArray(ResultSet RS, int Size)
            try
                ResultSetMetaData RMSD = RS.getMetaData();
                DisplayMessage("SERVER >>> Requested arraySize: " + Size);
                if (RS.next())
                    array = new String[Size][RMSD.getColumnCount()];
                    for (int Row = 0; Row < Size; Row++)
                        for (int Col = 0; Col < RMSD.getColumnCount(); Col++)
                            array[Row][Col] = new String();
                            array[Row][Col] = RS.getString(Col+1);
                            DisplayMessage(array[Row][Col] + " ");
                        RS.next();
                else
                    array = new String[1][1];
                    array[0][0] = "#No Records";
            catch (Exception e)
                DisplayMessage("SERVER >>> Error in defining a 2DArray: " + e.getMessage());  
        public static void DisplayMessage(final String IncomingSMS)
            System.out.println(IncomingSMS);
    //client
    * @author
    import java.io.*;
    import java.net.*;
    import javax.swing.*;
    public class ClientSystem
        static Socket server;
        static ObjectOutputStream out;
        static ObjectInputStream in;
        static String Response[][];
        static boolean IsConnected = false;
        static int Num = 0;
        public static void connectToServer() throws IOException
            server = new Socket("127.0.0.1", 12345);
    //        server = new Socket("000.00.98.00", 12345);
            String IPAddress = "" + server.getInetAddress();
            DisplayMessage("\nCLIENT >>> Connected to " + IPAddress.substring(1,IPAddress.length()));
        public static void getStreams() throws IOException
            out = new ObjectOutputStream(server.getOutputStream());
            out.flush();
              in = new ObjectInputStream(server.getInputStream());
              IsConnected = true;
              DisplayMessage("CLIENT >>> Got I/O streams");  
        public static void runClient()
            try
                connectToServer();
                getStreams();
                  DisplayMessage("CLIENT >>> Connection successfull....\n");
                  DisplayMessage("CLIENT >>> Want to talk to server");
            catch (IOException ioe)
                System.out.print("."+Num);
                Num++;
        public static void closeConnection()
            try
                out.close();
                in.close();
                server.close();  
            catch(IOException error)
                DisplayMessage("CLIENT >>> Could not close connections");
        public static void Start()
            System.out.print("\nCLIENT >>> Attempting connection.....");
            try
                IsConnected = false;
                while (IsConnected == false)
                    runClient();
                    if (IsConnected == false)
                        Thread.sleep(100);
            catch (Exception e)
                DisplayMessage("CLIENT >>> Attempting connection.....");
        public static String sendSMS(String sms)
            Response = new String[0][0];
            try
                DisplayMessage("CLIENT >>> " + sms);
                out.writeObject(sms);
                out.flush();
                Response = (String[][])in.readObject();
                DisplayMessage("CLIENT >>> Waiting for server to respond...");
                for (int Row = 0; Row < Response.length; Row++)
                    System.out.printf( "_SERVER >>> \t");
                    for (int Col = 0; Col < Response[Row].length; Col++)
                        //DisplayMessage( "_SERVER >>> " + Response[Row][Col] + " ");
                        System.out.printf( "%s\t", Response[Row][Col]);
                    System.out.println();
                DisplayMessage("CLIENT >>> Query processed successfully....\n");
            catch(ClassNotFoundException cnfe)
                DisplayMessage("CLIENT >>> Class not found for casting received object");
            catch(IOException ioe)
                reConnect();          
            catch (Exception sqle)
                DisplayMessage("CLIENT >>> Error sending query ??? " + sqle.getMessage());
            return "transmission successfull";
        public static void reConnect()
            try
                DisplayMessage("CLIENT >>> Connection was lost. Trying to reconnect...");
                closeConnection();
                Thread.sleep(100);
                IsConnected = false;
                while (IsConnected == false)
                    runClient();
                    Thread.sleep(200);
            catch (Exception e)
                DisplayMessage("CLIENT >>> Error trying to Re-Connect...");
        public static void DisplayMessage(final String IncomingSms)
            System.out.println(IncomingSms);
        System.out.printf("Isms: %s", IncomingSms);  ///naah.
        public static String[][] getResponse()
            return Response;
        public static String getResponse(int row, int col)
            return Response[row][col];
    how can i do below using above code
    The program must be able to work in a non-networked mode. In this mode, the server and client must run in the same VM and must perform no networking, must not use loopback networking i.e: no “localhost” or “127.0.0.1”, and must not involve the serialization of any objects when communicating between the client and server components.
    The operating mode is selected using the single command line argument that is permitted.
    imust use a socket connection and define a protocol. networking must be entirely bypassed in the non-network mode.

  • JMF - client server video streaming how to stop

    Hi
    I am able to stream video from a server to multiple clients using AVReceive2 and AVTransmit2 from the JMF site.
    Iam developing a client server project. I have modified the above code such that Iam able to start and stream the videos by calling on servlets and socket connections.
    The AVTransmit2 code does not however have a stop button and it uses a thread.sleep method. I do not know how to add a stop button in the GUI on AVReceive2 to call on AVTransmit2.
    I am using sockets to communicate to and from the server. Do i have to use RMI or is there another easier way to call stop from the client which would stop the transmission on the server?
    Also, after the video file has been successfully streamed, when I refresh and try to connect again, the server is invoked and __it starts transmission_,_ but the servlet which calls the AVReceive fails and the frame does not show. Any possible reasons why?
    Thanks in advance.
    Junior

    I don't know the speed of the connection.
    4-10 users usually.
    .11b or .11g I don't know.
    microwave nearby - I don't know
    5-6 other wifis - yes
    I will try Safari, thanks!
    Thanks for the update. The speed of the Wi-Fi in the
    coffee shop will depend on many factors. What is the
    speed of their connection to the Internet? How many
    people are sharing the Wi-Fi? Is it 802.11b or
    802.11g? Do they have a microwave operating nearby?
    That will often interfere. Are there additional Wi-Fi
    networks nearby? That can interfere as well. It's
    possible that it was their network that's causing
    your trouble. But, to rule that out, did you try
    using Safari instead? You might make sure you have an
    up-to-date version of the Flash player which you can
    get at http://www.adobe.com
    I have Clearwire
    at home, it's basically like wireless DSL. It's not
    as fast as cable Internet access, but it is portable.
    I only mentioned it because it would indicate that
    you don't need cable speed to watch the videos
    without buffering.
    -Doug

  • Client-server vs timesharing

    HI All,
    How to describe the Oracle 8i architecture. (e.g., client-server vs timesharing) ?

    Neither. client-server is an application environment architecture. TImesharing is an operating system paradigm. Neither apply to oracle's architecture.

  • Client Server Socket With GUI

    Hi,
    As the name of the forum suggests I am very new to this whole thing.
    I am trying to write a client/server socket program that can encrypt and decrypt and has a GUI, can't use JCE or SSL or any built in encryption tools.
    I have the code for everything cept the encryption part.
    Any help, greatly appreciated,

    tnks a million but how do i incorporate that into the following client and server code:
    here's the client code:
    import java.awt.Color;
    import java.awt.BorderLayout;
    import java.awt.event.*;
    import javax.swing.*;
    import java.io.*;
    import java.net.*;
    class SocketClient extends JFrame
              implements ActionListener {
    JLabel text, clicked;
    JButton button;
    JPanel panel;
    JTextField textField;
    Socket socket = null;
    PrintWriter out = null;
    BufferedReader in = null;
    SocketClient(){ //Begin Constructor
    text = new JLabel("Text to send over socket:");
    textField = new JTextField(20);
    button = new JButton("Click Me");
    button.addActionListener(this);
    panel = new JPanel();
    panel.setLayout(new BorderLayout());
    panel.setBackground(Color.white);
    getContentPane().add(panel);
    panel.add("North", text);
    panel.add("Center", textField);
    panel.add("South", button);
    } //End Constructor
    public void actionPerformed(ActionEvent event){
    Object source = event.getSource();
    if(source == button){
    //Send data over socket
    String text = textField.getText();
    out.println(text);
         textField.setText(new String(""));
    //Receive text from server
    try{
         String line = in.readLine();
    System.out.println("Text received :" + line);
    } catch (IOException e){
         System.out.println("Read failed");
         System.exit(1);
    public void listenSocket(){
    //Create socket connection
    try{
    socket = new Socket("HUGHESAN", 4444);
    out = new PrintWriter(socket.getOutputStream(), true);
    in = new BufferedReader(new InputStreamReader(socket.getInputStream()));
    } catch (UnknownHostException e) {
    System.out.println("Unknown host: HUGHESAN.eng");
    System.exit(1);
    } catch (IOException e) {
    System.out.println("No I/O");
    System.exit(1);
    public static void main(String[] args){
    SocketClient frame = new SocketClient();
         frame.setTitle("Client Program");
    WindowListener l = new WindowAdapter() {
    public void windowClosing(WindowEvent e) {
    System.exit(0);
    frame.addWindowListener(l);
    frame.pack();
    frame.setVisible(true);
         frame.listenSocket();
    SERVER Code
    import java.awt.Color;
    import java.awt.BorderLayout;
    import java.awt.event.*;
    import javax.swing.*;
    import java.io.*;
    import java.net.*;
    class SocketServer extends JFrame
              implements ActionListener {
    JButton button;
    JLabel label = new JLabel("Text received over socket:");
    JPanel panel;
    JTextArea textArea = new JTextArea();
    ServerSocket server = null;
    Socket client = null;
    BufferedReader in = null;
    PrintWriter out = null;
    String line;
    SocketServer(){ //Begin Constructor
    button = new JButton("Click Me");
    button.addActionListener(this);
    panel = new JPanel();
    panel.setLayout(new BorderLayout());
    panel.setBackground(Color.white);
    getContentPane().add(panel);
    panel.add("North", label);
    panel.add("Center", textArea);
    panel.add("South", button);
    } //End Constructor
    public void actionPerformed(ActionEvent event) {
    Object source = event.getSource();
    if(source == button){
    textArea.setText(line);
    public void listenSocket(){
    try{
    server = new ServerSocket(4444);
    } catch (IOException e) {
    System.out.println("Could not listen on port 4444");
    System.exit(-1);
    try{
    client = server.accept();
    } catch (IOException e) {
    System.out.println("Accept failed: 4444");
    System.exit(-1);
    try{
    in = new BufferedReader(new InputStreamReader(client.getInputStream()));
    out = new PrintWriter(client.getOutputStream(), true);
    } catch (IOException e) {
    System.out.println("Accept failed: 4444");
    System.exit(-1);
    while(true){
    try{
    line = in.readLine();
    //Send data back to client
    out.println(line);
    } catch (IOException e) {
    System.out.println("Read failed");
    System.exit(-1);
    protected void finalize(){
    //Clean up
    try{
    in.close();
    out.close();
    server.close();
    } catch (IOException e) {
    System.out.println("Could not close.");
    System.exit(-1);
    public static void main(String[] args){
    SocketServer frame = new SocketServer();
         frame.setTitle("Server Program");
    WindowListener l = new WindowAdapter() {
    public void windowClosing(WindowEvent e) {
    System.exit(0);
    frame.addWindowListener(l);
    frame.pack();
    frame.setVisible(true);
         frame.listenSocket();
    Again help on this is very welcomed

  • Creating web service client/server

    Try to ask a question in regarding to creating web service client/server:
    First, please see the attachment for a simplized WSDL file:
    Based on which, I can create a web service client. Now, can I create a web service provider (server) by using the same wsdl file? If not, what change do I need to make?
    Thanks
    Scott
    ----WSDL-------
    <?xml version="1.0" encoding="UTF-8"?>
    <wsdl:definitions
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:tns="http://www.example3.org/testWSDL2/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    name="testWSDL2"
    targetNamespace="http://www.example3.org/testWSDL2/">
    <wsdl:types>
    <xsd:schema targetNamespace="http://www.example3.org/testWSDL2/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:element name="NewOperation">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="in" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="NewOperationResponse">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="out" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    </wsdl:types>
    <wsdl:message name="NewOperationRequest">
    <wsdl:part element="tns:NewOperation" name="parameters"/>
    </wsdl:message>
    <wsdl:message name="NewOperationResponse">
    <wsdl:part element="tns:NewOperationResponse" name="parameters"/>
    </wsdl:message>
    <wsdl:portType name="testWSDL2">
    <wsdl:operation name="NewOperation">
    <wsdl:input message="tns:NewOperationRequest"/>
    <wsdl:output message="tns:NewOperationResponse"/>
    </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="testWSDL2SOAP" type="tns:testWSDL2">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="NewOperation">
    <soap:operation soapAction="http://www.example3.org/testWSDL2/NewOperation"/>
    <wsdl:input>
    <soap:body use="literal"/>
    </wsdl:input>
    <wsdl:output>
    <soap:body use="literal"/>
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="testWSDL2">
    <wsdl:port binding="tns:testWSDL2SOAP" name="testWSDL2SOAP">
    <soap:address location="http://abc.example.net/test"/>
    </wsdl:port>
    </wsdl:service>
    </wsdl:definitions>

    the web service is the specification for whatever functionality you wish to provide
    there are a few artifacts you can auto-generate using the WSDL, but you still need to create a client and server application
    the web service is simply exposing the application remotely and the WSDL is the contract
    http://java.sun.com/webservices/docs/1.6/tutorial/doc/index.html

  • "Cluster is incorrectly configured on the virtual server." re-add server

    Took a server out of a pool, then later went to re-add. /OVS/ mounts fine on the server, but when I go to VM Mangler, it throws the following errors:
    "OVM-1011 Oracle VM Server sonorx3 operation HA Check Prerequisite failed: failed: <Exception: ha_check_shared_storage_mount failed: <Exception: srv('sonorx3'). failed! => <Exception: Cluster is incorrectly configured on the virtual server.> ."
    In /var/log/ovs-agent/ovs_operation.log on the host that fails to join, I see:
    "StackTrace:
    File "/opt/ovs-agent-2.2/OVSXHA.py", line 99, in check_shared_storage_mount
    raise Exception("Cluster is incorrectly configured on the virtual server.")"
    What step is missing here?

    I've tried re-doing ovs-makerepo.
    Google doesn't know anything about the problem (other than this thread here, which it has already indexed).
    What gives?

  • Why cannot execute DB operation at client side with dynamic proxy?

    I want to execute a DB operation at client side with dynamic proxy. that is bypass EJBs to execute DB operation. And there is a data source in weblogic server, and I get an EJB instance using dynamic proxy, get connection using this instance, then invoke executeQuery method. But it is failed, and throw exception when execute "conn.setAutoCommit(false)" as below:
    <Caused by: weblogic.rmi.extensions.RemoteRuntimeException: Unexpected Exception - with nested exception:
    [java.rmi.UnmarshalException: Could not unmarshal method ID; nested exception is:
    java.rmi.UnmarshalException: Method not found: 'newArrayDataResultSet(Loracle.sql.ARRAY;JILjava.util.Map;)']
    at weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic_jdbc_wrapper_PoolConnection_oracle_jdbc_driver_OracleConnection_813_WLStub.setAutoCommit(Unknown Source)
    at weblogic.jdbc.rmi.SerialConnection_weblogic_jdbc_rmi_internal_ConnectionImpl_weblogic_jdbc_wrapper_PoolConnection_oracle_jdbc_driver_OracleConnection_813_WLStub.setAutoCommit(Unknown Source)>
    but it is no exception and run well using EJB, who can tell me why? if it is a weblogic limitation? and my version of WLS is 8.1 sp3

    Hi,
    Do you create the connection object on the server and pass it over to the client, we do not allow passing the connection object over the wire.

  • Client/Server between iPhones

    Hi all,
    I have to develop a networking component for multiplayer games on iPhone. I wondered about the possibility to build a client/server achitecture over bluetooth between two or more iPhones, and if it was possible using CFSocket, CFNetwork classes ? Or are there other useful classes ?
    Thank you.

    To enable cross release client/server operation you need to add the line
    -insecure-backwards-compat
    to the ttendaemon.options file located in <tt_install_dir>/info on the system that hosts the datastores that you wish to connect to. For this to take effect you must restart the main daemon so you will need to shutdown all the datastores before doing this!
    This is documented in the TimesTen Installation Guide and the Timesten operations Guide.
    Regards,
    Chris

Maybe you are looking for

  • Facing issue in upgrading osb 10.3.1 to osb 11.1.1.6.0

    Hi All, I have upgraded my osb 10.3.1 to osb 11.1.1.6.0 For projects, first I exported the projects & resources from osb 10.3.1 environment and then imported them in my new osb 11.1.1.6.0 environment. Everything is working fine in the new osb 11.1.1.

  • BOE-XI (R2) - Rename CMS name in Login Screen for CLUSTER

    BOE-XI (R2) Cluster with Two (2) physical servers side-by-side hosting all BOE services. Both Tomcat and IIS installed on both physical servers. We don't want the end-users of InfoView to see/know the underlying server names (eg. BOE_SERVER_1 and BOE

  • Can't use custom avatar

    I recently reached level 3 and at the bottom of the default avatars there is no upload button or anything. All there is is the finished button. Austin

  • Partitioning Fact Table

    Hi In our data warehouse we have a Fact table which has grown quite a large in size around 17 million records. We have been pondering on the options to partition this table. Unfortunately this fact table does not have any date columns , all columns a

  • Linking Questions cs5: Linking within the Same file, Sharing links, file size bloat

    I have to make print cards for my job. Print cards being a 1 page version of the Larger package layout that the place I work manufactures. On this print card is a section for customer info on top, and the print representation on the bottom. What I've