Chat Applet using RMI .... trouble running the Applet using the IE browser.

Hi,
I'm trying to run a chat application using RMI technology. Actually, this wasn't created from the scratch. I got this one from from the cd that comes with the book I bought and I did some refinements on it to suit what I wanted to:
These are the components of the chat application:
1. RApplet.html - invokes the applet
html>
<head>
<title>Sample Applet Using Dialog Box (1.0.2) - example 1</title>
</head>
<body>
<h1>The Sample Applet</h1>
<applet code="RApplet.class" width=460 height=160>
</applet>
</body>
</html>
2. RApplet.java - Chat session client applet.
import java.rmi.*;
import java.applet.*;
import java.awt.event.*;
import java.awt.*;
import java.io.*;
import java.rmi.server.*;
//import ajp.rmi.*;
public class RApplet extends Applet implements ActionListener {
// The buttons
Button sendButton;
Button quitButton;
Button startButton;
Button clearButton;
// The Text fields
TextField nameField;
TextArea typeArea;
// The dialog for entering your name
Dialog nameDialog;
// The name the server knows us as
String privateName;
// The name we want to be known as in the chat session
String publicName;
// The remote chats erver
ChatServer chatServer;
// The ChatCallback
ChatCallbackImplementation cCallback;
// The main Chat window and its panels
Frame mainFrame;
Panel center;
Panel south;
public void init() {
// Create class that implements ChatCallback.
cCallback = new ChatCallbackImplementation();
     // Create the main Chat frame.
     mainFrame = new Frame("Chat Server on : " +
                    getCodeBase().getHost());
     mainFrame.setSize(new Dimension(600, 600));
     cCallback.displayArea = new TextArea();
     cCallback.displayArea.setEditable(false);
     typeArea = new TextArea();
     sendButton = new Button("Send");
     quitButton = new Button("Quit");
     clearButton = new Button("Clear");
     // Add the applet as a listener to the button events.
     clearButton.addActionListener(this);
     sendButton.addActionListener(this);
     quitButton.addActionListener(this);
     center = new Panel();
     center.setLayout(new GridLayout(2, 1));
     center.add(cCallback.displayArea);
     center.add(typeArea);
     south = new Panel();
     south.setLayout(new GridLayout(1, 3));
     south.add(sendButton);
     south.add(quitButton);
     south.add(clearButton);
     mainFrame.add("Center", center);
     mainFrame.add("South", south);
     center.setEnabled(false);
     south.setEnabled(false);
     mainFrame.show();
     // Create the login dialog.
     nameDialog = new Dialog(mainFrame, "Enter Name to Logon: ");
     startButton = new Button("Logon");
     startButton.addActionListener(this);
     nameField = new TextField();
     nameDialog.add("Center", nameField);
     nameDialog.add("South", startButton);
     try {
     // Export ourselves as a ChatCallback to the server.
     UnicastRemoteObject.exportObject(cCallback);
     // Get the remote handle to the server.
     chatServer = (ChatServer)Naming.lookup("//" + "WW7203052W2K" +
                              "/ChatServer");
     catch(Exception e) {
     e.printStackTrace();
     nameDialog.setSize(new Dimension(200, 200));
     nameDialog.show();
* Handle the button events.
public void actionPerformed(ActionEvent e) {
     if (e.getSource().equals(startButton)) {
     try {
          nameDialog.setVisible(false);;
          publicName = nameField.getText();
          privateName = chatServer.register(cCallback, publicName);
          center.setEnabled(true);
          south.setEnabled(true);
          cCallback.displayArea.setText("Connected to chat server as: " +
                         publicName);
          chatServer.sendMessage(privateName, publicName +
                         " just connected to server");
     catch(Exception ex) {
          ex.printStackTrace();
     else if (e.getSource().equals(quitButton)) {
     try {
          cCallback.displayArea.setText("");
          typeArea.setText("");
          center.setEnabled(false);
          south.setEnabled(false);
          chatServer.unregister(privateName);
          nameDialog.show();
     catch(Exception ex) {
          ex.printStackTrace();
     else if (e.getSource().equals(sendButton)) {
     try{
          chatServer.sendMessage(privateName, typeArea.getText());
          typeArea.setText("");
     catch(Exception ex) {
          ex.printStackTrace();
     else if (e.getSource().equals(clearButton)) {
     cCallback.displayArea.setText("");
public void destroy() {
     try {
     super.destroy();
     mainFrame.setVisible(false);;
     mainFrame.dispose();
     chatServer.unregister(privateName);
     catch(Exception e) {
     e.printStackTrace();
3. Chatcallback.java - interface used by clients to connect to the server.
import java.rmi.*;
public interface ChatCallback extends Remote {
public void addMessage(String publicName,
               String message) throws RemoteException;
4. ChatcallbackImplementation.java - implements Chatcallback interface.
import java.rmi.*;
import java.io.*;
import java.awt.event.*;
import java.awt.*;
public class ChatCallbackImplementation implements ChatCallback {
// The buttons
// The Text fields
TextArea displayArea;
public void addMessage(String publicName,
               String message) throws RemoteException {
displayArea.append("\n" + "[" + publicName + "]: " + message);
5. Chatserver.java - interface for the chat server.
import java.rmi.*;
import java.io.*;
public interface ChatServer extends Remote {
public String register(ChatCallback object,
               String publicName) throws RemoteException;
* Remove the client associated with the specified registration string.
* @param registeredString the string returned to the client upon registration.
public void unregister(String registeredString) throws RemoteException;
* The client is sending new data to the server.
* @param assignedName the string returned to the client upon registration.
* @param data the chat data.
public void sendMessage(String registeredString, String message) throws RemoteException;
6. ChatServerImplementation.java - implements Chatserver interface.
import java.rmi.*;
import java.util.*;
import java.rmi.server.*;
import java.io.*;
* A class that bundles the ChatCallback reference with a public name used
* by the client.
class ChatClient {
private ChatCallback callback;
private String publicName;
ChatClient(ChatCallback cbk, String name) {
     callback = cbk;
     publicName = name;
// returns the name.
String getName() {
     return publicName;
// returns a reference to the callback object.
ChatCallback getCallback() {
     return callback;
public class ChatServerImplementation extends UnicastRemoteObject
implements ChatServer {
// The table of clients connected to the server.
Hashtable clients;
// Tne number of current connections to the server.
private int currentConnections;
// The maximum number of connections to the server.
private int maxConnections;
// The output stream to write messages to.
PrintWriter writer;
* Create a ChatServer.
* @param maxConnections the total number if connections allowed.
public ChatServerImplementation(int maxConnections) throws RemoteException {
     clients = new Hashtable(maxConnections);
     this.maxConnections = maxConnections;
* Increment the counter keeping track of the number of connections.
synchronized boolean incrementConnections() {
     boolean ret = false;
     if (currentConnections < maxConnections) {
     currentConnections++;
     ret = true;
     return ret;
* Decrement the counter keeping track of the number of connections.
synchronized void decrementConnections() {
     if (currentConnections > 0) {
     currentConnections--;
* Register with the ChatServer, with a String that publicly identifies
* the chat client. A String that acts as a "magic cookie" is returned
* and is sent by the client on future remote method calls as a way of
* authenticating the client request.
* @param object The ChatCallback object to be used for updates.
* @param publicName The String the object would like to be known as.
* @return The actual String assigned to the object for removing, etc. or
* null if the client could not register.
public synchronized String register(ChatCallback object, String publicString) throws RemoteException {
     String assignedName = null;
     if (incrementConnections()) {
     ChatClient client = new ChatClient(object, publicString);
     assignedName = "" + client.hashCode();
     clients.put(assignedName, client);
     out("Added callback for: " + client.getName());
     return assignedName;
* Remove the client associated with the specified registration string.
* @param registeredString the string returned to the client upon registration.
public synchronized void unregister(String registeredString) throws RemoteException {
     ChatCallback cbk;
     ChatClient sender;
     if (clients.containsKey(registeredString)) {
     ChatClient c = (ChatClient)clients.remove(registeredString);
     decrementConnections();
     out("Removed callback for: " + c.getName());
     for (Enumeration e = clients.elements(); e.hasMoreElements(); ) {
          cbk = ((ChatClient)e.nextElement()).getCallback();
          cbk.addMessage("ChatServer",
                    c.getName() + " has left the building...");
     else {
     out("Illegal attempt at removing callback (" + registeredString + ")");
* Sets the logging stream.
* @param out the stream to log messages to.
protected void setLogStream(Writer out) throws RemoteException {
     writer = new PrintWriter(out);
* The client is sending new message to the server.
* @param assignedName the string returned to the client upon registration.
* @param data the chat data.
public synchronized void sendMessage(String registeredString, String message) throws RemoteException {
     ChatCallback cbk;
     ChatClient sender;
     try {
     out("Recieved from " + registeredString);
     out("Message: " + message);
     if (clients.containsKey(registeredString)) {
          sender = (ChatClient)clients.get(registeredString);
          for (Enumeration e = clients.elements(); e.hasMoreElements(); ) {
               cbk = ((ChatClient)e.nextElement()).getCallback();
               cbk.addMessage(sender.getName(), message);
     else {
          out("Client " + registeredString+ " not registered");
     catch(Exception ex){
     out("Exception thrown in newData: " + ex);
     ex.printStackTrace(writer);
     writer.flush();
* Write s string to the current logging stream.
* @param message the string to log.
protected void out(String message){
     if(writer != null){
     writer.println(message);
     writer.flush();
* Start up the Chat server.
public static void main(String args[]) throws Exception {
     try {
     // Create the security manager
     System.setSecurityManager(new RMISecurityManager());
     // Instantiate a server
     ChatServerImplementation c = new ChatServerImplementation(10);
     // Set the output stream of the server to System.out
     c.setLogStream(new OutputStreamWriter(System.out));
     // Bind the server's name in the registry
     Naming.rebind("//" + args[0] + "/ChatServer", c);
     c.out("Bound in registry.");
     catch (Exception e) {
     System.out.println("ChatServerImplementation error:" +
                    e.getMessage());
     e.printStackTrace();
Using my own machine (connected to a network), I tried to test this one out by setting mine as the server and also the client. I did the following:
1. Compile the source code.
2. Use rmic to generate the skeletons and/or stubs from the ChatCallbackImplementation and ChatServerImplementation.
3. Start the rmiregistry with no CLASSPATH
4. Start the server successfully.
5. Start the applet using the AppletViewer command.
It worked fined.
The problem is when I ran the applet using the browser, IE explorer, the dialog boxes, frame and buttons did appear. I was able to do the part of logging on. But after that, the applet seemed to have hang. No message appeared that says I'm connected (which appeared using the appletviewer). I clicked the send button. No response.
I double-checked my classpath. I did have my classpath set correctly. I'm still trying to figure out the problem. Up to now, I don't have any clue what it is.
I will appreciate much if someone can help me figure what's could have possibly been wrong ....
Thanks a lot ...

Hi Domingo,
I had a similar problem running applet/rmi with IE.
Looking in IE..view..JavaConsole error messages my applet was unable to find java.rmi.* classes.
I checked over java classes in msJVM, they're not present.
( WinZip C:\WINDOWS\JAVA\Packages\9rl3f9ft.zip and others from msVM installed )
( do not contain the java.rmi.* packages )
I have downloaded and installed the latest msJVM for IE5. ( I think its included in later versions)
@http://www.objectweb.org/rmijdbc/RJfaq.html I found ref to rmi.zip download to provide
these classes. I couldn't get the classes from the site but I managed to find a ref to IBM
site @http://alphaworks.ibm.com/aw.nsf/download/rmi which had similar download.
The download however didn't solve my problems. I was unable to install rmi.zip with
RmiPatch.exe install.
I solved this by extracting the class files from rmi.zip and installing them at C:\WINDOWS\JAVA\trustlib ( msJVM installation trusted classes lib defined in
registry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Java VM\TrustedLibsDirectory )
This solved the problem. My rmi/applet worked.
Hope this helps you.
Chris
([email protected])

Similar Messages

  • Trouble running .java applettes from studio

    I am having trouble running javascript applettes from studio however they do work if run directly in MS explorer 6. The path for explorer exists in tools/options/sever and external tool settings/web browsers. Any suggestions?

    Do you have Java or JavaScript problems?
    Can you provide some code sample/steps to reproduce this?

  • How to check if the RMI is running from Applet?

    I want to check if the RMI at a particular machine is running. I am planning to set-up four RMI servers in four different locations. If one fails, I would like the client to look-up for an other RMI at a different location. To do this effectively, I would like to check if the RMI is running. I would run a thread and check if the RMI is running. Second, at every call of the function at the RMI, I will check if the connection is live.
    Can someone suggest me a good method?
    Thanks
    subbu

    Sounds to me like a bit of overkill, but here's how you might do it:
    1. Set up a round-robin lookup chain. In other words. have the client do its RMI look up calls on a list of possible servers.
    2. To always be ready to failover to another server, you should check for RemoteExceptions. This should trigger your code to go into recovery. (You have to trap these exceptions on every remote method invocation anyhow.)

  • Dynamic Page that uses javascript to run an executable on the client's pc

    I have an .exe file on a shared network that has to be called and executed from portal. The below code works as standalone but not from a dynamic page or an HTML portlet. Any ideas?
    <html>
    <script language="javascript" type="text/javascript">
    function runApp()
    var shell = new ActiveXObject("WScript.shell");
    shell.run('"c:/CstatsWeeklyreport.exe"',1,true);
    </script>
    <body>
    <input type="button" name="button1" value="Run Notepad" onClick="runApp()" >
    </INPUT>
    </body>
    </html>

    Thanks D, but that's not what I'm looking for. That changes which application a file opens with when you download it. That's not what I need for this situation. Here's a little more detail.
    The clients will have an application on their hard drive; it can be any application, even a custom application that they developed themselves. Then, they open a web page with a listbox full of items. Depending on which item they select, a query will return a file path to the .exe file itself. The .exe file resides on the client's hard drive, not on the server. So they're not downloading anything. Depending on the filepath returned by the query, the browser needs to start the process and open the .exe file for them.
    So let's say I have developed a simple text editor called Tedit. I have a file on my hard drive - "C:\TextEditor\bin\debug\TEdit.exe". When they click the open button, that file path is returned from the database. Then the javascript is called to start the process and open that program.
    Again, nothing is getting downloaded, the application resides on the user's hard drive and there is no file to associate it with.
    This can be done in IE using an ActiveX control. And it used to be possible in Firefox using the nsIFile or nsIProcess objects. But since FF15 that's not available anymore, so the javascript throws an error telling them that their permission is denied.
    What I need, is a javascript that will launch the .exe file from the user's hard drive without downloading anything.

  • Trouble running sample code from the java trails

    I'm trying to run Sun's DocumentEventDemo available on the trails. I can get it to compile successfully but I get several errors when I try to run it. After compiling the source, this is what I get when I try to run it:
    C:\listen>java -cp . DocumentEventDemo
    Exception in thread "main" java.lang.NoClassDefFoundError: DocumentEventDemo (wr
    ong name: events/DocumentEventDemo)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$000(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    The source is available from the java trails using the name DocumentEventDemo
    Thanks
    ~Sklave

    actually that is really helpful. My directories are most likely incorrect, but I'm coming to java from a c/c++ background and don't know how to make the directories correctly for the given package. I'll look that up and see what I get. In the meantime, if you or anyone else could follow up with a link or a quick explanation on packages and directories that'd be great too.
    ~Sklave

  • Running/ Using RMI  with JDevelope 9.0.4

    I am trying to learn to use RMI (Remote Method Invocation), have used the example found in Deitel and Deitel, only I've come to run them and the examples on running the application suggests one method.
    I'm wondering if JDeveloper has a quick, easy way to run or use RMI within applications

    OC4J provides the proprietary Remote Method Invocation (RMI)/Oracle RMI (ORMI) protocol.
    http://www.comp.hkbu.edu.hk/docs/o/dl/web/B10326_01/ormi.htm#1030532

  • How to run a Applet in a browser. No one REPLIED. Plz help

    I had created a applet.
    When I run it in ECLIPSE, the applet program runs well.
    But when I try to open the applet program in browser
    by storing the html file in the director in which I had the class file ,
    my applet is not running.
    In the browser's bottom status bar , it says "notinited".
    I dont know what is the mistake.
    Please tell me what I should do. I am pasting my html file here.
    <HTML><applet code="MortgagecalculationApplet.class" width=421 height=481></applet>
    </HTML>

    Hi..
    Well I tried doing somthing which worked.. would like to share with you...
    actually in the jar file created , if the class file is kept in the root directory of the jar file... it works...
    eg. while crating the jar, if we go to the directory of the class file and then create it , it ould work..
    if u r in som other directory while creating the jar, it wont work..
    for the jar created, open it with winzip and if in the path column of the required class file if it shows a path, then it wont work..
    else it will..
    dats wat I ve found out....

  • How to configure OC4J using RMI/IIOP with SSL

    Any help?
    I just mange configure the OC4J using RMI/IIOP but base on
    But when I follow further to use RMI/IIOP with SSL I face the problem with: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
    p/s: I use self generate keystore which should be ok as I can use it for https connection.
    Any one can help?
    Below is the OC4J log:
    D:\oc4j\j2ee\home>java -Djavax.net.debug=all -DGenerateIIOP=true -Diiop.runtime.debug=true -jar oc4j.jar
    05/02/23 16:43:16 ================ IIOPServerExtensionProvider.preInitApplicationServer
    05/02/23 16:43:38 ================= IIOPServerExtensionProvider.postInitApplicationServer
    05/02/23 16:43:38 ================== config = {SEPS={IIOP={ssl-port=5556, port=5555, ssl=true, trusted-clients=*, ssl-client-server-auth-port=5557, keystore=D:\\oc4j\\j2ee\\home\\server.keystore, keystore-password=123456, truststore=D:\\oc4j\\j2ee\\home\\server.keystore, truststore-password=123456, ClassName=com.oracle.iiop.server.IIOPServerExtensionProvider, host=localhost}}}
    05/02/23 16:43:38 ================== server.getAttributes() = {threadPool=com.evermind.server.ApplicationServerThreadPool@968fda}
    05/02/23 16:43:38 ================== pool: null
    05/02/23 16:43:38 ====================== In startServer ...
    05/02/23 16:43:38 ==================== Creating an IIOPServer ...
    05/02/23 16:43:38 ========= IIOP server being initialized
    05/02/23 16:43:38 SSL port: 5556
    05/02/23 16:43:38 SSL port 2: 5557
    05/02/23 16:43:43 com.sun.corba.ee.internal.iiop.GIOPImpl(Thread[Orion Launcher,5,main]): getEndpoint(IIOP_CLEAR_TEXT, 5555, null)
    05/02/23 16:43:43 com.sun.corba.ee.internal.iiop.GIOPImpl(Thread[Orion Launcher,5,main]): createListener( socketType = IIOP_CLEAR_TEXT port = 5555 )
    05/02/23 16:43:44 com.sun.corba.ee.internal.iiop.GIOPImpl(Thread[Orion Launcher,5,main]): getEndpoint(SSL, 5556, null)
    05/02/23 16:43:44 com.sun.corba.ee.internal.iiop.GIOPImpl(Thread[Orion Launcher,5,main]): createListener( socketType = SSL port = 5556 )
    05/02/23 16:43:45 ***
    05/02/23 16:43:45 found key for : mykey
    05/02/23 16:43:45 chain [0] = [
    Version: V1
    Subject: CN=Server, OU=Bar, O=Foo, L=Some, ST=Where, C=UN
    Signature Algorithm: MD5withRSA, OID = 1.2.840.113549.1.1.4
    Key: SunJSSE RSA public key:
    public exponent:
    010001
    modulus:
    b1239fff 2ae5d31d b01a0cfb 1186bae0 bbc7ac41 94f24464 e92a7e33 6a5b0844
    109e30fb d24ad770 99b3ff86 bd96c705 56bf2e7a b3bb9d03 40fdcc0a c9bea9a1
    c21395a4 37d8b2ce ff00eb64 e22a6dd6 97578f92 29627229 462ebfee 061c99a4
    1c69b3a0 aea6a95b 7ed3fd89 f829f17e a9362efe ccf8034a 0910989a a8573305
    Validity: [From: Wed Feb 23 15:57:28 SGT 2005,
                   To: Tue May 24 15:57:28 SGT 2005]
    Issuer: CN=Server, OU=Bar, O=Foo, L=Some, ST=Where, C=UN
    SerialNumber: [    421c3768]
    Algorithm: [MD5withRSA]
    Signature:
    0000: 34 F4 FA D4 6F 23 7B 84 30 42 F3 5C 4B 5E 18 17 4...o#..0B.\K^..
    0010: 73 69 73 A6 BF 9A 5D C0 67 8D C3 56 DF A9 4A AC sis...].g..V..J.
    0020: 88 AF 24 28 C9 39 16 22 29 81 01 93 86 AA 1A 5D ..$(.9.")......]
    0030: 07 89 26 22 91 F0 8F DE E1 4A CF 17 9A 02 51 7D ..&".....J....Q.
    0040: 92 D3 6D 9B EF 5E C1 C6 66 F9 11 D4 EB 13 8F 17 ..m..^..f.......
    0050: E7 66 58 9F 6C B0 60 7C 39 B4 E0 B7 04 A7 7F A6 .fX.l.`.9.......
    0060: 4D A5 89 E7 F4 8A DC 59 B4 E7 A5 D4 0A 35 9A F1 M......Y.....5..
    0070: A2 CD 3A 04 D6 8F 16 B1 9E 6F 34 40 E8 C0 47 03 ..:[email protected].
    05/02/23 16:43:45 ***
    05/02/23 16:43:45 adding as trusted cert:
    05/02/23 16:43:45 Subject: CN=Client, OU=Bar, O=Foo, L=Some, ST=Where, C=UN
    05/02/23 16:43:45 Issuer: CN=Client, OU=Bar, O=Foo, L=Some, ST=Where, C=UN
    05/02/23 16:43:45 Algorithm: RSA; Serial number: 0x421c3779
    05/02/23 16:43:45 Valid from Wed Feb 23 15:57:45 SGT 2005 until Tue May 24 15:57:45 SGT 2005
    05/02/23 16:43:45 adding as trusted cert:
    05/02/23 16:43:45 Subject: CN=Server, OU=Bar, O=Foo, L=Some, ST=Where, C=UN
    05/02/23 16:43:45 Issuer: CN=Server, OU=Bar, O=Foo, L=Some, ST=Where, C=UN
    05/02/23 16:43:45 Algorithm: RSA; Serial number: 0x421c3768
    05/02/23 16:43:45 Valid from Wed Feb 23 15:57:28 SGT 2005 until Tue May 24 15:57:28 SGT 2005
    05/02/23 16:43:45 trigger seeding of SecureRandom
    05/02/23 16:43:45 done seeding SecureRandom
    05/02/23 16:43:45 com.sun.corba.ee.internal.iiop.GIOPImpl(Thread[Orion Launcher,5,main]): getEndpoint(SSL_MUTUALAUTH, 5557, null)
    05/02/23 16:43:45 com.sun.corba.ee.internal.iiop.GIOPImpl(Thread[Orion Launcher,5,main]): createListener( socketType = SSL_MUTUALAUTH port = 5557 )
    05/02/23 16:43:45 matching alias: mykey
    matching alias: mykey
    05/02/23 16:43:46 ORB created ..com.oracle.iiop.server.OC4JORB@65b738
    05/02/23 16:43:47 com.sun.corba.ee.internal.corba.ClientDelegate(Thread[Orion Launcher,5,main]): invoke(ClientRequest) called
    05/02/23 16:43:47 com.oracle.iiop.server.OC4JORB(Thread[Orion Launcher,5,main]): process: dispatching to scid 2
    05/02/23 16:43:47 com.oracle.iiop.server.OC4JORB(Thread[Orion Launcher,5,main]): dispatching to sc [email protected]7
    05/02/23 16:43:48 com.sun.corba.ee.internal.corba.ClientDelegate(Thread[Orion Launcher,5,main]): invoke(ClientRequest) called
    05/02/23 16:43:48 com.oracle.iiop.server.OC4JORB(Thread[Orion Launcher,5,main]): process: dispatching to scid 2
    05/02/23 16:43:48 com.oracle.iiop.server.OC4JORB(Thread[Orion Launcher,5,main]): dispatching to sc com.sun.corba.ee.internal.corba.ServerDelegate@9300cc
    05/02/23 16:43:48 com.sun.corba.ee.internal.corba.ServerDelegate(Thread[Orion Launcher,5,main]): Entering dispatch method
    05/02/23 16:43:48 com.sun.corba.ee.internal.corba.ServerDelegate(Thread[Orion Launcher,5,main]): Consuming service contexts, GIOP version: 1.2
    05/02/23 16:43:48 com.sun.corba.ee.internal.corba.ServerDelegate(Thread[Orion Launcher,5,main]): Has code set context? false
    05/02/23 16:43:48 com.sun.corba.ee.internal.corba.ServerDelegate(Thread[Orion Launcher,5,main]): Dispatching to servant
    05/02/23 16:43:48 com.sun.corba.ee.internal.corba.ServerDelegate(Thread[Orion Launcher,5,main]): Handling invoke handler type servant
    05/02/23 16:43:48 NS service created and started ..org.omg.CosNaming._NamingContextExtStub:IOR:000000000000002b49444c3a6f6d672e6f72672f436f734e616d696e672f4e616d696e67436f6e746578744578743a312e30000000000001000000000000007c000102000000000c31302e312e3231342e31310015b3000000000031afabcb0000000020d309e06a0000000100000000000000010000000c4e616d65536572766963650000000004000000000a0000000000000100000001000000200000000000010001000000020501000100010020000101090000000100010100
    05/02/23 16:43:48 NS ior = ..IOR:000000000000002b49444c3a6f6d672e6f72672f436f734e616d696e672f4e616d696e67436f6e746578744578743a312e30000000000001000000000000007c000102000000000c31302e312e3231342e31310015b3000000000031afabcb0000000020d309e06a0000000100000000000000010000000c4e616d65536572766963650000000004000000000a0000000000000100000001000000200000000000010001000000020501000100010020000101090000000100010100
    05/02/23 16:43:48 Oracle Application Server Containers for J2EE 10g (9.0.4.0.0) initialized
    05/02/23 16:45:14 com.sun.corba.ee.internal.iiop.ConnectionTable(Thread[JavaIDL Listener,5,main]): Server getConnection(119e583[Unknown 0x0:0x0: Socket[addr=/127.0.0.1,port=1281,localport=5556]], SSL)
    05/02/23 16:45:14 com.sun.corba.ee.internal.iiop.ConnectionTable(Thread[JavaIDL Listener,5,main]): host = 127.0.0.1 port = 1281
    05/02/23 16:45:14 com.sun.corba.ee.internal.iiop.ConnectionTable(Thread[JavaIDL Listener,5,main]): Created connection Connection[type=SSL remote_host=127.0.0.1 remote_port=1281 state=ESTABLISHED]
    com.sun.corba.ee.internal.iiop.MessageMediator(Thread[JavaIDL Reader for 127.0.0.1:1281,5,main]): Creating message from stream
    05/02/23 16:45:14 JavaIDL Reader for 127.0.0.1:1281, handling exception: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
    05/02/23 16:45:14 JavaIDL Reader for 127.0.0.1:1281, SEND TLSv1 ALERT: fatal, description = unexpected_message
    05/02/23 16:45:14 JavaIDL Reader for 127.0.0.1:1281, WRITE: TLSv1 Alert, length = 2
    05/02/23 16:45:14 JavaIDL Reader for 127.0.0.1:1281, called closeSocket()
    05/02/23 16:45:14 com.sun.corba.ee.internal.iiop.ReaderThread(Thread[JavaIDL Reader for 127.0.0.1:1281,5,main]): IOException in createInputStream: javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
    05/02/23 16:45:14 javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
    05/02/23 16:45:14 at com.sun.net.ssl.internal.ssl.SSLSocketImpl.d(DashoA12275)
    05/02/23 16:45:14 at com.sun.net.ssl.internal.ssl.AppInputStream.read(DashoA12275)
    05/02/23 16:45:14 at com.sun.corba.ee.internal.iiop.messages.MessageBase.readFully(MessageBase.java:520)
    05/02/23 16:45:14 at com.sun.corba.ee.internal.iiop.messages.MessageBase.createFromStream(MessageBase.java:58)
    05/02/23 16:45:14 at com.sun.corba.ee.internal.iiop.MessageMediator.processRequest(MessageMediator.java:110)
    05/02/23 16:45:14 at com.sun.corba.ee.internal.iiop.IIOPConnection.processInput(IIOPConnection.java:339)
    05/02/23 16:45:14 at com.sun.corba.ee.internal.iiop.ReaderThread.run(ReaderThread.java:63)
    05/02/23 16:45:14 Caused by: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
    05/02/23 16:45:14 at com.sun.net.ssl.internal.ssl.InputRecord.b(DashoA12275)
    05/02/23 16:45:14 at com.sun.net.ssl.internal.ssl.InputRecord.read(DashoA12275)
    05/02/23 16:45:14 at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
    05/02/23 16:45:14 at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA12275)
    05/02/23 16:45:14 at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
    05/02/23 16:45:14 ... 6 more
    05/02/23 16:45:14 com.sun.corba.ee.internal.iiop.IIOPConnection(Thread[JavaIDL Reader for 127.0.0.1:1281,5,main]): purge_calls: starting: code = 1398079696 die = true
    05/02/23 16:45:14 JavaIDL Reader for 127.0.0.1:1281, called close()
    05/02/23 16:45:14 JavaIDL Reader for 127.0.0.1:1281, called closeInternal(true)
    05/02/23 16:45:14 JavaIDL Reader for 127.0.0.1:1281, called close()
    05/02/23 16:45:14 JavaIDL Reader for 127.0.0.1:1281, called closeInternal(true)
    05/02/23 16:45:14 JavaIDL Reader for 127.0.0.1:1281, called close()
    05/02/23 16:45:14 JavaIDL Reader for 127.0.0.1:1281, called closeInternal(true)
    05/02/23 16:45:14 com.sun.corba.ee.internal.iiop.ConnectionTable(Thread[JavaIDL Reader for 127.0.0.1:1281,5,main]): DeleteConn called: host = 127.0.0.1 port = 1281

    Good point, I do belive what you are referring to is this:
    Any client, whether running inside a server or not, has EJB security properties. Table 15-2 lists the EJB client security properties controlled by the ejb_sec.properties file. By default, OC4J searches for this file in the current directory when running as a client, or in ORACLE_HOME/j2ee/home/config when running in the server. You can specify the location of this file explicitly with the system property setting -Dejb_sec_properties_location=pathname.
    Table 15-2 EJB Client Security Properties
    Property Meaning
    # oc4j.iiop.keyStoreLoc
    The path and name of the keystore. An absolute path is recommended.
    # oc4j.iiop.keyStorePass
    The password for the keystore.
    # oc4j.iiop.trustStoreLoc
    The path name and name of the truststore. An absolute path is recommended.
    # oc4j.iiop.trustStorePass
    The password for the truststore.
    # oc4j.iiop.enable.clientauth
    Whether the client supports client-side authentication. If this property is set to true, you must specify a keystore location and password.
    # oc4j.iiop.ciphersuites
    Which cipher suites are to be enabled. The valid cipher suites are:
    TLS_RSA_WITH_RC4_128_MD5
    SSL_RSA_WITH_RC4_128_MD5
    TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA
    SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA
    TLS_RSA_EXPORT_WITH_RC4_40_MD5
    SSL_RSA_EXPORT_WITH_RC4_40_MD5
    TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA
    SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA
    nameservice.useSSL
    Whether to use SSL when making the initial connection to the server.
    client.sendpassword
    Whether to send user name and password in clear form (unencrypted) in the service context when not using SSL. If this property is set to true, the user name and password are sent only to servers listed in the trustedServer list.
    oc4j.iiop.trustedServers
    A list of servers that can be trusted to receive passwords sent in clear form. This has no effect if client.sendpassword is set to false. The list is comma-delimited. Each entry in the list can be an IP address, a host name, a host name pattern (for example, *.example.com), or * (where "*" alone means that all servers are trusted.

  • Anyone use VMware to run windows on a intel macboon pro

    I am looking for a reliable emulator to run widows as an application in my macbook pro.
    Does anyone have any experience with the VM WARE player or such.
    Any help is appriciated.
    Happy Holidays All,
    Grant Parkis

    I use Parallels to run Vista and XP Pro. However it is not nessecary to run emulation software any longer on the mac platform, since Intel processors make it possible to run these OS's natively.
    While I do use Parallels to run Windows. For the few moments i really do need to do such a silly thing, Bootcamp is MUCH better to use because Parallels emulates windows, and Bootcamp literally lets you partition the HD for a space to install the OS for real. If anyone is wondering, IMO Bootcamp is a bit more of an inconvienant because you have to reboot into the other partition, Parallels is quicker because it can be opened in its own window, and boot very fast. BUT Paralells is a bit quirky in its operation/emulation of WIndows. BC is not at all and runs as you would expect it to on any Intel computer.

  • When we use RMI-IIOP?

    Dear,
    Can anyone tell me when we use RMI-IIOP? When we use RMI-IIOP and
    EJB? When will use JSP? When will use servlet?
    Sorry for that silly question, but i really want to know it?
    kurt

    As I know, If using RMI-IIOP, we have to handle lots of stuffs like
    connection pool, security...etc.
    Am I right?
    Kurt
    Tom Barnes <[email protected]> wrote in message
    news:[email protected]..
    >
    >
    Andy Piper wrote:
    RMI-IIOP is useful for:
    a) Interop, i.e. between different appservers
    b) C++ client integration
    Customers also sometimes want it because they have security
    restrictions on what protocols they can put through a firewall.
    It is also useful for light-weight Java clients. RMI-IIOP clients need
    not use the (large) weblogic.jar jar.
    Tom

  • Urgent help:send image over network using rmi

    hi all,
    i have few question about send image using rmi.
    1) should i use ByteArrayOutputStream to convert image into byte array before i send over network or just use fileinputstream to convert image into byte array like what i have done as below?
    public class RemoteServerImpl  extends UnicastRemoteObject implements RemoteServer
      public RemoteServerImpl() throws RemoteException
      public byte[] getimage() throws RemoteException
        try{
           // capture the whole screen
           BufferedImage screencapture = new Robot().createScreenCapture(new     Rectangle(Toolkit.getDefaultToolkit().getScreenSize()) );
           // Save as JPEG
           File file = new File("screencapture.jpg");
           ImageIO.write(screencapture, "jpg", file);
            byte[] fileByteContent = null;
           fileByteContent = getImageStream("screencapture.jpg");
           return fileByteContent;
        catch(IOException ex)
      public byte[] getImageStream(String fname) // local method
        String fileName = fname;
        FileInputStream fileInputStream = null;
        byte[] fileByteContent = null;
          try
            int count = 0;
            fileInputStream = new FileInputStream(fileName);  // Obtains input bytes from a file.
            fileByteContent = new byte[fileInputStream.available()]; // Assign size to byte array.
            while (fileInputStream.available()>0)   // Correcting file content bytes, and put them into the byte array.
               fileByteContent[count]=(byte)fileInputStream.read();
               count++;
           catch (IOException fnfe)
         return fileByteContent;           
    }2)if what i done is wrong,can somebody give me guide?else if correct ,then how can i rebuild the image from the byte array and put it in a JLable?i now must use FileOuputStream but how?can anyone answer me or simple code?
    thanks in advance..

    Hi! well a had the same problem sending an image trough RMI.. To solve this i just read the image file into a byte Array and send the array to the client, and then the client creates an imegeIcon from the byte Array containing the image.. Below is the example function ton read the file to a byte Array (on the server) and the function to convert it to a an imageIcon (on the client).
    //      Returns the contents of the file in a byte array.
        public static byte[] getBytesFromFile(File file) throws IOException {
            InputStream is = new FileInputStream(file);
            // Get the size of the file
            long length = file.length();
            // You cannot create an array using a long type.
            // It needs to be an int type.
            // Before converting to an int type, check
            // to ensure that file is not larger than Integer.MAX_VALUE.
            if (length > Integer.MAX_VALUE) {
                // File is too large
            // Create the byte array to hold the data
            byte[] bytes = new byte[(int)length];
            // Read in the bytes
            int offset = 0;
            int numRead = 0;
            while (offset < bytes.length
                   && (numRead=is.read(bytes, offset, bytes.length-offset)) >= 0) {
                offset += numRead;
            // Ensure all the bytes have been read in
            if (offset < bytes.length) {
                throw new IOException("Could not completely read file "+file.getName());
            // Close the input stream and return bytes
            is.close();
            return bytes;
        }to use this function simply use something like this
    public byte[] getImage(){
    byte[] imageData;
              File file = new File("pic.jpg");
              // Change pic.jpg for the name of your file (duh)
              try{
                   imageData = getBytesFromFile(file);
                   // Send to client via RMI
                            return imageData;
              }catch(IOException ioe){
                           // Handle exception
                           return null; // or whatever you want..
    }and then on the client you could call a function like this
    public ImageIcon getImageFromServer(){
         try{
              // get the image from the RMI server
              byte[] imgBytes = myServerObject.getImage();
              // Create an imageIcon from the Array of bytes
              ImageIcon ii = new ImageIcon(imgBytes);
              return ii;
         }catch(Exception e){
              // Handle some error..
              // If yo get here probably something went wrong with the server
              // like File Not Found or something like that..
              e.printStackTrace();
              return null;
    }Hope it helps you..

  • BootCamp Advice on gaming uses and which Windows OS to use.

    I am about to purchase a new MacBook Pro 13.3 inch with 2.4Ghz, 4GB RAM, 320M GeForce NVIDEA card, 256MB.
    I am going to use it as a hub in university but also I am going to use it as a gaming device. I am using the Mac OSX to run the intensive RTS games (e.g Total War games) but I would also like to know if I can use BootCamp to run windows games on the Mac too, so I can play a wider library (E.g. FPS games also found on the consoles, RPGs and so on).
    If this is the case, which windows OS should I use? XP, Vista, or Windows 7, to get the best gaming experience from my specs. Note that price is not a deal-breaker but it is a disadvantage, so if for example XP was only marginally worse than Windows 7, I would probably take it and avoid unneeded cost.
    Just as a note, I am unlikely to use Bootcamp for anything else very intensive, just if I have any other compatibility issues with programs I need to run.

    shaun Macdonald wrote:
    Supposing I am not going to buy new games but merely build up a library of current ones, is Window 7 64bit worth the price?
    As in does it run the games significantly better for any reason? And does anybody know which is preferable when tackling the problem of bootcamp overheating Macbook Pros when playing games?
    Sounds like you are rationalizing why you should stay with an older OS. I use Windows 7 64bit every day running in BootCamp for work. It runs quick, is extremely stable (leaps and bounds better than XP or Vista), it is more secure, is easier to network, I never experience instability, and I never have overheating issues. I don't know what running games "significantly better" means. The games will run as they were designed to run.
    The advantages of Windows 7 over XP or Vista are well documented. But if you want to stay with an older OS that is your choice. I opted to go with the better OS.

  • Error while running PING program using applet. Pls correct the code.-urgent

    Can anyone pls correct the error in the below code.
    Program : TestExec1
    Using : Applet
    Logic : Trying to display the ping status in the text area but it returns error...!
    CODING
    import java.awt.*;
    import java.lang.*;
    import java.io.*;
    import java.net.*;
    import java.awt.event.*;
    import java.applet.*;
    import java.*;
    /*<applet code="TestExec1" width=380 height=150>
    </applet>
    public class TestExec1 extends Applet
    String line = null;
    TextArea outputArea;
    Process p;     
         public void init()
              outputArea = new TextArea(20,20);
         public void start()
              try
                        Process p= Runtime.getRuntime().exec("ping 192.168.100.192 -t");
                        BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream()));
                        while ((line = in.readLine()) != null)
                             outputArea.append("\n" + line);
                             System.out.println(line);
              catch (IOException e)
                        e.printStackTrace();
    Error : C:\Program Files\Java\jdk1.6.0_02\bin>appletviewer TestExec1.java
    java.security.AccessControlException: access denied (java.io.FilePermission <<AL
    L FILES>> execute)
    at java.security.AccessControlContext.checkPermission(AccessControlConte
    xt.java:323)
    at java.security.AccessController.checkPermission(AccessController.java:
    546)
    at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
    at java.lang.SecurityManager.checkExec(SecurityManager.java:782)
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:447)
    at java.lang.Runtime.exec(Runtime.java:593)
    at java.lang.Runtime.exec(Runtime.java:431)
    at java.lang.Runtime.exec(Runtime.java:328)
    at TestExec1.start(TestExec1.java:31)
    at sun.applet.AppletPanel.run(AppletPanel.java:458)
    at java.lang.Thread.run(Thread.java:619)
    Regards
    ESM

    java.security.AccessControlException: access denied (java.io.FilePermission
    <<ALL FILES>> execute)This message tells you that the applet does not have permission to access/execute files. Access may be granted by either signing the applet, which allows the user to grant (or not grant) the access when running the applet, or by adding the necessary permission file to the user's computer.
    See http://java.sun.com/javase/6/docs/technotes/guides/security/index.html

  • How to run an Applet using the JDK1.3.1 platform?

    I'm a beginner of Java Applet.
    I've type in the sample program provided in the text book, and compiled it using the jdk1.3.1 platform.
    Usually we run a java program using java [filename], right?
    How about running an applet file?
    What is appletviewer function?
    Thanks!

    I try to put it in a HTML page but it required me to download a Java Virtual Machine.
    I've been searching sources for that but stil cannot get.
    This is always what I get:
    [We're sorry, you cannot view this page because it requires the Microsoft Java Virtual Machine (MSJVM). Your machine does not have the MSJVM installed. For more information please visit www.microsoft.com/java.]
    I visit java.sun.com. On the right side of the page listed with the HOT DOWNLOADS.
    I click on the Java VM but still cannot get anything...
    Can u help me on that?
    I've been trying for 2 days already.
    Thanks!

  • Components and applet not loading when running the application using JVM1.3

    I have my UI written in JavaScript.When I click a button,it opens a window showing the different components(images) and an applet containing a tree structure.The applet code is written in java
    This is working fine and the applet is loading properly when I use JVM1.4. But there is a problem when I use JVM1.3.1_09.The images appear broken and the applet doesnot load.(When I click on one of the broken images,the images appear correctly but the applet still doesn't load)
    Can anyone tell me what could be the reason behind this behavior??
    My sys config: win2k-SP4, IE5.0-SP4

    If you are using SDK 1.4 for compilation,
    recompile your classes with the option -target 1.1
    javac -target 1.1 MyClass.java

Maybe you are looking for

  • Thunderbird no longer gets my email

    It was working and it did some upgrades and it allows me to send emails, but after a few days I noticed when someone complained I hadn't responded to my email that I wasn't getting any. I checked my isp with webmail and sure enough there were 13 emai

  • Bluetooth mouse lag

    So here is the situation: I have a Macbook Pro (early 2009 model) with an Apple wireless keyboard and a Logitech V270 bluetooth mouse. Recently, I've been experiencing mouse lag (to the point where I can hardly even use the mouse anymore). The lag is

  • PO Release procedure based on Cost Centers

    Currently a have release procedure based on purchasing groups created as departments. Now i have to create release  procedure based on cost centers. Is it possible to bind cost centers with purchasing groups, in order to use the release procedure tha

  • Finding serial number in Office X

    Is there a way to get my serial number from Office X though one of the programs?

  • Can I use Win Xp as a scratch disk?

    Just a quickie - Illustrator cs3 is on my apple mac.  But I run Bootcamp and have win XP edition on my partition (this is not the same as parallels where you can switch between operating systems without restarting) bootcamp you have to restart the ma