J++ RMI to 1.4 JDK.

Hi,
I am running a client on J++ that makes RMI calls to a server running on 1.4JDK.
When i run the client I get the following error :
java.rmi.UnmarshalException: Error unmarshaling return header
java.rmi.UnmarshalException: Error unmarshaling return header
at sun/rmi/transport/StreamRemoteCall.executeCall (StreamRemoteCall.java:208)
at sun/rmi/server/UnicastRef.invoke (UnicastRef.java:99)
at sun/rmi/registry/RegistryImpl_Stub.lookup (RegistryImpl_Stub.java:94)
at java/rmi/Naming.lookup (Naming.java:60)
at Class1.getConnectPort (Class1.java:39)
at Class1.main (Class1.java:25)
This error occurs at random. i.e. several Naming.lookup are successful however i get to the point where one will fail.
I have set my policy file on the server to grant permissions to all.
Anyone got any bright ideas as to what could be causing this on 1.4 VM. This doesnt seem to occur if my server run on 1.3 JVM.
thanks a lot.
The code to reproduce is below :
//Interface
package rmitest;
import java.rmi.Remote;
import java.rmi.RemoteException;
public interface IMyServer extends Remote {
public int getNum(int num) throws RemoteException;
import java.rmi.server.*;
import java.rmi.*;
import java.rmi.registry.*;
import java.io.*;
import java.security.*;
import java.net.SocketPermission;
public class MyServerImpl extends UnicastRemoteObject implements IMyServer {
public MyServerImpl() throws RemoteException {
public int getNum(int num) throws RemoteException {
return num;
public static void main(String args[]) {
//System.setSecurityManager(new InsecurityManager());
if (System.getSecurityManager() == null) {
System.setSecurityManager ( new RMISecurityManager());
try {
// start the registry
LocateRegistry.createRegistry(Registry.REGISTRY_PORT);
MyServerImpl server = new MyServerImpl();
Naming.rebind("MyServer", server);
} catch (Exception e) {
System.out.println("Exception during test");
System.err.println(e.getMessage());
e.printStackTrace();
}//end try/catch
import java.rmi.*;
import java.rmi.registry.*;
import rmitest.IMyServer;
public class Class1 {
public Class1() {
public static void main(String[] args) {
Class1 rmiCall = new Class1();
int port = rmiCall.getConnectPort();
public static int getConnectPort() {
int port = -1;
try {
if(System.getSecurityManager() == null) {
System.setSecurityManager( new RMISecurityManager() );
for( int k = 0; k < 1500; k++){
IMyServer abc = (IMyServer) Naming.lookup("//ServerName/MyServer");
//Remote call.
System.out.println( abc.getNum(k) );
catch( Exception e ) {
System.out.println( e );
e.printStackTrace();
finally{
return port;
}

I'm having the same trouble... funny I work at the same company!!
If anyone knows how to get hold of the j++ source code.... please tell us!
(nice one charbell I was about to post a message here myself...
I like the last suggestion.... very usefull!)

Similar Messages

  • WL 8.1 SP6 to WL10.3 upgrade any TIPS on "JMS, EJB, Web Service, JDK" etc?

    We are upgrading from BEA Weblogic 8.1 SP6 to Oracle Weblogic 10.3. The application running on WL 8.1 SP6 provides the services like - Web Service consumer, JMS server/consumer, RMI server. The JDK under WL 8.1 being 1.4.
    We have a mix of client application that are essentially JMS clients/senders and RMI clients. These clients will also be upgraded to Oracle Weblogic 10.3 but not at the same time as JMS server/consumer. So some clients may still be running on WL 8.1 JDK 1.4 while the server is running on WL 10.3 (that needs JDK 1.6)
    Please share any TIPs on compatibility issues (and how to overcome) for this mismatch between WL versions as well as JDK.
    Are there any specific details as for as JMS configuration setup from WL 8.1 to WL10.3.
    Appreciate your help!

    Some thoughts:
    * WL 10.3 fully supports 8.1 clients, so you can simply continue to use the 8.1 client jars. The drawback is that the clients won't be able to use new features like unit-of-order, and you may not get some performance benefits of the later clients.
    * I think WL 10.3 clients support the 1.5 and 1.6 JVMs.
    * I think WL 9.2 clients support 1.5 and 1.4 JVMs, so you might consider using 9.x clients during your transition period. This will give you access to more new features without forcing the client to use the 1.5 or 1.6 JVM.
    * As for mix-and-matching of JDK versions, you will need to develop your applications and serializable applications objects so that they continue to use the lowest common denominator. For example, if the same application code must run on 1.4 and a 1.5 client, then don't use generics. Also, avoid using new 1.5 or later JDK classes for serializable objects, if the objects must be passed to older clients (which, of course, will not be able to unmarshal such classes).
    * WL 10.3 and later stand-alone "full clients" can no longer always simply just use the "weblogic.jar". You can only include the weblogic.jar in the client classpath if the jar is embedded with a full weblogic install, otherwise, you must generate a "full client jar" using a command line utility and reference the generated jar instead. See [ Overview of Stand-alone Clients | http://download.oracle.com/docs/cd/E12839_01/web.1111/e13717/basics.htm#i1062773 ].
    * WL 10.3 configuration is quite different than 8.1 configuration. Some things to keep in mind:
    -- You now must also configure "WL Stores" (target to same target as the JMS server that uses the store). For JMS purposes, I recommend configuring a custom store per server and avoiding use of the default store.
    -- You still must configure JMS server(s) (configure each to reference a WL store that has the same target)
    -- You now must configure "JMS Modules", which contains definitions for destinations.
    -- In most cases, best practice is that you should configure one system module per set of JMS servers in a cluster and define a single "subdeployment" target for the module that directly lists each JMS server, target the module itself to a cluster, target destinations within the module to the subdeployment. Avoid "default targeting" for destinations, but its OK for connection factories.
    -- If some destinations are distributed across multiple JMS servers, while others are restricted to a single JMS server, then use two modules each with its own subdeployment. One module for the restricted case that uses regular destinations, and the other for the distributed case.
    Hope this helps,
    Tom

  • Error with RMI method call

    Hi,
    I am trying to access a stateless session bean from a client running under JBuilder.
    The method returns a basic object that is serializable, but I get the following
    error.
    java.lang.ArrayIndexOutOfBoundsException
         at com.sun.corba.se.internal.corba.AnyImpl.read_value(AnyImpl.java:345)
         at com.sun.corba.se.internal.iiop.CDRInputStream.read_any(CDRInputStream.java:572)
         at com.sun.corba.se.internal.javax.rmi.CORBA.Util.readAny(Util.java:199)
         at javax.rmi.CORBA.Util.readAny(Util.java:92)
         at com.sun.corba.se.internal.io.IIOPInputStream.inputObjectField(IIOPInputStream.java:1486)
         at com.sun.corba.se.internal.io.IIOPInputStream.inputClassFields(IIOPInputStream.java:1768)
         at com.sun.corba.se.internal.io.IIOPInputStream.inputObject(IIOPInputStream.java:897)
         at com.sun.corba.se.internal.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:264)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:250)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:212)
         at com.sun.corba.se.internal.iiop.CDRInputStream.read_value(CDRInputStream.java:1060)
         at com.sun.corba.se.internal.io.IIOPInputStream.inputObjectField(IIOPInputStream.java:1555)
         at com.sun.corba.se.internal.io.IIOPInputStream.inputClassFields(IIOPInputStream.java:1768)
         at com.sun.corba.se.internal.io.IIOPInputStream.inputObject(IIOPInputStream.java:897)
         at com.sun.corba.se.internal.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:264)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:250)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:212)
         at com.sun.corba.se.internal.iiop.CDRInputStream.read_value(CDRInputStream.java:906)
         at com.sun.corba.se.internal.core.UEInfoServiceContext.<init>(UEInfoServiceContext.java:33)
         at java.lang.reflect.Constructor.newInstance(Native Method)
         at com.sun.corba.se.internal.core.ServiceContextData.makeServiceContext(ServiceContextData.java:113)
         at com.sun.corba.se.internal.core.ServiceContexts.<init>(ServiceContexts.java:106)
         at com.sun.corba.se.internal.iiop.ReplyMessage.read(ReplyMessage.java:133)
         at com.sun.corba.se.internal.iiop.IIOPInputStream.<init>(IIOPInputStream.java:89)
         at com.sun.corba.se.internal.iiop.ClientResponseImpl.<init>(ClientResponseImpl.java:29)
         at com.sun.corba.se.internal.iiop.IIOPConnection.createInputStream(IIOPConnection.java:622)
         at com.sun.corba.se.internal.iiop.ReaderThread.run(IIOPConnection.java:109)
    org.omg.CORBA.UNKNOWN: minor code: 0 completed: Maybe
         at com.sun.corba.se.internal.core.UEInfoServiceContext.<init>(UEInfoServiceContext.java:37)
         at java.lang.reflect.Constructor.newInstance(Native Method)
         at com.sun.corba.se.internal.core.ServiceContextData.makeServiceContext(ServiceContextData.java:113)
         at com.sun.corba.se.internal.core.ServiceContexts.<init>(ServiceContexts.java:106)
         at com.sun.corba.se.internal.iiop.ReplyMessage.read(ReplyMessage.java:133)
         at com.sun.corba.se.internal.iiop.IIOPInputStream.<init>(IIOPInputStream.java:89)
         at com.sun.corba.se.internal.iiop.ClientResponseImpl.<init>(ClientResponseImpl.java:29)
         at com.sun.corba.se.internal.iiop.IIOPConnection.createInputStream(IIOPConnection.java:622)
         at com.sun.corba.se.internal.iiop.ReaderThread.run(IIOPConnection.java:109)
    Could you please point out some possible errors? Thanks.
    Charles

    [email protected] (Shawn Samuel) writes:
    Its quite likely that this is fixed in SP3. I suspect that the Map you
    are using is custom marshaled. There were some problems with this in
    SP2 which got fixed in 7.0 but weren't backported until recently.
    Can you be more explicit about the implementation class you are using?
    It seems unlikely that this is the null problem since the Map does not
    contain extra space. Unless you are putting nulls in it? Are you, the
    JDK won't cope with the correct encoding of null.
    andy
    I'm having a similar problem and getting nowhere.
    I'm calling a method on a stateless session bean with a serializable
    object as an argument that returns the same type of serializable
    object. This error comes back somewhere after the session bean returns
    on the server side. I'm running WL6.1SP2, jdk1.3.1_02, using rmi/iiop
    with the jdk orb and com.sun.jndi.cosnaming.CNCtxFactory on the
    client. I am able to make calls to the EJB that only take String
    arguments with no problems whatsoever.
    The serializable object contains Strings and a Map. Weblogic would
    give me a CORBA error on receiving the function call when I populated
    the Map. Leaving the Map null and setting only the Strings resulted in
    the call going all the way through the session bean method with no
    problem, but after populating a return object of the same type with
    only Strings, leaving the Map member null, and returning, I get the
    below error on the client.
    I'm getting a similar stack trace, but running a debugger on weblogic
    doesn't seem to indicate any unchecked exceptions being thrown.
    Is there something I'm overlooking here?
    thanks,
    Shawn
    my stack trace:
    java.lang.ArrayIndexOutOfBoundsException
         at com.sun.corba.se.internal.corba.AnyImpl.read_value(AnyImpl.java:345)
         at com.sun.corba.se.internal.iiop.CDRInputStream.read_any(CDRInputStream.java:572)
         at com.sun.corba.se.internal.javax.rmi.CORBA.Util.readAny(Util.java:199)
         at javax.rmi.CORBA.Util.readAny(Util.java:92)
         at com.sun.corba.se.internal.io.IIOPInputStream.inputObjectField(IIOPInputStream.java:1486)
         at com.sun.corba.se.internal.io.IIOPInputStream.inputClassFields(IIOPInputStream.java:1768)
         at com.sun.corba.se.internal.io.IIOPInputStream.inputObject(IIOPInputStream.java:897)
         at com.sun.corba.se.internal.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:264)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:250)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:212)
         at com.sun.corba.se.internal.iiop.CDRInputStream.read_value(CDRInputStream.java:1060)
         at com.i2.cis.operation.ejb._EJBOperation_Stub.invoke(Unknown Source)
         at com.i2.cis.transport.ejb.CISTransportEJB.invoke(CISTransportEJB.java:46)
         at com.i2.cis.transport.CISTransportBasic.execute(CISTransportBasic.java:138)
         at com.i2.cis.api.connector.CISConnection.execute(CISConnection.java:59)
         at com.i2.cis.api.connector.CISInteraction.execute(CISInteraction.java:45)
         at com.i2.cis.api.connector.test.CISClient.main(CISClient.java:55)
    Andy Piper <[email protected]> wrote in message news:<[email protected]>...
    "Charles Canning" <[email protected]> writes:
    This indicates that the server threw an unchecked exception but the
    client was unable to unmarshal it. Please make sure you are using SP2
    of WLS 6.1. Also what version of the JDK are you using?
    andy
    Hi,
    I am trying to access a stateless session bean from a client running under JBuilder.
    The method returns a basic object that is serializable, but I get the following
    error.
    java.lang.ArrayIndexOutOfBoundsException
         at com.sun.corba.se.internal.corba.AnyImpl.read_value(AnyImpl.java:345)
         at com.sun.corba.se.internal.iiop.CDRInputStream.read_any(CDRInputStream.java:572)
         at com.sun.corba.se.internal.javax.rmi.CORBA.Util.readAny(Util.java:199)
         at javax.rmi.CORBA.Util.readAny(Util.java:92)
         at com.sun.corba.se.internal.io.IIOPInputStream.inputObjectField(IIOPInputStream.java:1486)
         at com.sun.corba.se.internal.io.IIOPInputStream.inputClassFields(IIOPInputStream.java:1768)
         at com.sun.corba.se.internal.io.IIOPInputStream.inputObject(IIOPInputStream.java:897)
         at com.sun.corba.se.internal.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:264)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:250)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:212)
         at com.sun.corba.se.internal.iiop.CDRInputStream.read_value(CDRInputStream.java:1060)
         at com.sun.corba.se.internal.io.IIOPInputStream.inputObjectField(IIOPInputStream.java:1555)
         at com.sun.corba.se.internal.io.IIOPInputStream.inputClassFields(IIOPInputStream.java:1768)
         at com.sun.corba.se.internal.io.IIOPInputStream.inputObject(IIOPInputStream.java:897)
         at com.sun.corba.se.internal.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:264)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:250)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:212)
         at com.sun.corba.se.internal.iiop.CDRInputStream.read_value(CDRInputStream.java:906)
         at com.sun.corba.se.internal.core.UEInfoServiceContext.<init>(UEInfoServiceContext.java:33)
         at java.lang.reflect.Constructor.newInstance(Native Method)
         at com.sun.corba.se.internal.core.ServiceContextData.makeServiceContext(ServiceContextData.java:113)
         at com.sun.corba.se.internal.core.ServiceContexts.<init>(ServiceContexts.java:106)
         at com.sun.corba.se.internal.iiop.ReplyMessage.read(ReplyMessage.java:133)
         at com.sun.corba.se.internal.iiop.IIOPInputStream.<init>(IIOPInputStream.java:89)
         at com.sun.corba.se.internal.iiop.ClientResponseImpl.<init>(ClientResponseImpl.java:29)
         at com.sun.corba.se.internal.iiop.IIOPConnection.createInputStream(IIOPConnection.java:622)
         at com.sun.corba.se.internal.iiop.ReaderThread.run(IIOPConnection.java:109)
    org.omg.CORBA.UNKNOWN: minor code: 0 completed: Maybe
         at com.sun.corba.se.internal.core.UEInfoServiceContext.<init>(UEInfoServiceContext.java:37)
         at java.lang.reflect.Constructor.newInstance(Native Method)
         at com.sun.corba.se.internal.core.ServiceContextData.makeServiceContext(ServiceContextData.java:113)
         at com.sun.corba.se.internal.core.ServiceContexts.<init>(ServiceContexts.java:106)
         at com.sun.corba.se.internal.iiop.ReplyMessage.read(ReplyMessage.java:133)
         at com.sun.corba.se.internal.iiop.IIOPInputStream.<init>(IIOPInputStream.java:89)
         at com.sun.corba.se.internal.iiop.ClientResponseImpl.<init>(ClientResponseImpl.java:29)
         at com.sun.corba.se.internal.iiop.IIOPConnection.createInputStream(IIOPConnection.java:622)
         at com.sun.corba.se.internal.iiop.ReaderThread.run(IIOPConnection.java:109)
    Could you please point out some possible errors? Thanks.
    Charles--

  • T3 or rmi?

    Hello,
    I'm quite new to the EJB and WebLogic app server subject.
    I often heard people complain about RMI as a very resource consuming
    technology: two TCP/IP connection per client, much protocol overhead.
    Can anybody tell me, what t3 is? Is it an optimized RMI implementation
    from BEA?
    In my opinion it is not good idea to use RMI for communication between
    clients and server if there are potentially many clients? Does that also
    apply to t3 clients?
    Any comments or pointers to documentation would be gladly appreciated.
    Thanks, Xaver Fischer

    Xaver,
    RMI is an interface. The JavaSoft RMI included in the JDK is an
    implementation of this interface that uses the JRMP protocol, which has
    the resource problems you mention (although beware that versions of RMI
    in JDK 1.1, 1.2 and 1.3 are quite different). WebLogic RMI is another
    implementation of RMI that does not use JRMP but WebLogic's own T3
    protocol. You'll find more explanations here:
    http://www.weblogic.com/docs45/classdocs/API_t3.html
    Note that using the T3 API directly is now deprecated in favor of JNDI,
    but don't let that confuse you.
    WL 5 will also support RMI-IIOP, ie RMI interface with IIOP as the
    wire-level protocol, for letting non-Java clients call WL services.
    Alain.
    Alain Rogister
    Ubiquity s.a.
    http://www.ubiquity.be

  • Out of Memeory Error

    Hi All,
    My application is RMI based running in JDK .1.3.1_12 And JRE 1.3.1_09, Server is Windows 2000, 6GB RAM.
    Four different RMI services are running. 2 services are configured as JVM heap size intial memory as 1100 Mb and Max mem as 1600 Mb. Remaining are Max is 64 Mb only.
    When i change one of the sevice(1600 mb ) Max memeory is 1700 Mb, during the RMI service start up,i'm geeting this error.
    NFO | jvm 2 | 2005/10/14 08:26:34 | Error occurred during initialization of VM
    INFO | jvm 2 | 2005/10/14 08:26:34 | Could not reserve enough space for object heap
    What could be the problem, Eventhough i'm having 6 Gb Ram.Please advise me

    Hi,
    eventhouif u set maxheap sizeof JVM to 1700 MB, may be JVM failing to get the enugh memoryfrom OS.
    and also if u change the minimum heap size of JVM then other processes will effect. so itis not advisable to change the minimum heap size of JVM.
    i sugget that better keep minimum heap size as 256MB max heap size as 100MB.
    ex:
    -Xms256MB -Xmx1700MB

  • Java debugging - problems with standard input

    Hi
    I hope somebody can help me with this problem.
    I'm developing a Java app that reads from the standard input. I use System.in.read() to do that. When I debug it, I use the Standard I/O window instead of the Run Log window to pass in values, but nothing happens (i.e. the line following the read() is never reached). I also tried to run the app and then attach the debugger to use the Run Log window as standard input, with the same result. If I add a breakpoint before the call to read(), the debugger pauses the execution, so I suppose the breakpoints are OK.
    In the executable Info window, Debugging tab, I use the pseudo terminal with the Java debugger.
    So my question is: how can I enter values from the standard input in debugging mode?

    I believe that you are seeing these problems because we have found the
    current versions of RMI found in the JDK to be inherently unscalable -- we
    do not listen for them. As you noticed, we recommend that you use our
    packages for now, and then do the simple change that you found if you decide
    that you do not like WLS. (If you do decide that you do not like us, please
    definitely let us know why you chose the way you did!)
    Thanks,
    Michael
    Michael Girdley
    Product Manager, WebLogic Server & Express
    BEA Systems Inc
    "Tim Dawson" <[email protected]> wrote in message
    news:397b8cc2$[email protected]..
    We're developing a J2EE application on NT using WLS 5.1, SP3, but we don't
    want to be tied to any particular J2EE server, so we're making sure that
    none of our code is weblogic specific.
    In keeping with this philosophy, I created an RMI service that used the
    standard java.rmi.* imports instead of weblogic.rmi.* and used thestandard
    RMIC compiler rather than the weblogic.rmic compiler.
    Unfortunately, I couldn't get the system to work. I kept getting
    "java.rmi.MarshalException: Error marshaling transport header; nested
    exception is: java.io.EOFException" whenever I'd call Naming.lookup().
    Of course, when I did the search & replace with java.rmi.* with
    weblogic.rmi.*, and switched from the standard rmic to weblogic.rmic,
    everything started working just fine. This is the ONLY change I made!
    Has anyone else run into similar problems?
    Tim Dawson
    Sr. Software Architect
    is.com

  • OutOfMemory error in Weblogic jvm even when enough heap is still available

    Hi Everyone,
    We get a strange OutOfMemory error that happens only once in our Weblogic server in production environment.The Server immediately recovers and there is no issue as far as the application functionality is concerned.
    This is the exact error as seen in weblogic console.log file :
    caused by: java.lang.OutOfMemoryError: Java heap space
    I enabled the verbose gc logging too with the jvm parameter "-XX:+PrintHeapAtGC".Am copying the gc.log file excerpt when we got the Out of Memory issue in console.log.
    gc.log when error was seen in console.log:
    172047.050: [GC {Heap before gc invocations=28392:
    par new generation   total 49088K, used 49024K [0xb8000000, 0xbb000000, 0xbb000000)
      eden space 49024K, 100% used [0xb8000000, 0xbafe0000, 0xbafe0000)
      from space 64K,   0% used [0xbaff0000, 0xbaff0000, 0xbb000000)
      to   space 64K,   0% used [0xbafe0000, 0xbafe0000, 0xbaff0000)
    concurrent mark-sweep generation total 737280K, used 364191K [0xbb000000, 0xe8000000, 0xe8000000)
    concurrent-mark-sweep perm gen total 262144K, used 166556K [0xe8000000, 0xf8000000, 0xf8000000)
    172047.050: [ParNew: 49024K->0K(49088K), 0.1014386 secs] 413215K->382087K(786368K)Heap after gc invocations=28393:
    par new generation total 49088K, used 0K [0xb8000000, 0xbb000000, 0xbb000000)
    eden space 49024K, 0% used [0xb8000000, 0xb8000000, 0xbafe0000)
    from space 64K, 0% used [0xbafe0000, 0xbafe0000, 0xbaff0000)
    to space 64K, 0% used [0xbaff0000, 0xbaff0000, 0xbb000000)
    concurrent mark-sweep generation total 737280K, used 382087K [0xbb000000, 0xe8000000, 0xe8000000)
    concurrent-mark-sweep perm gen total 262144K, used 166556K [0xe8000000, 0xf8000000, 0xf8000000)
    , 0.1021810 secs]
    172055.735: [GC {Heap before gc invocations=28393:
    par new generation   total 49088K, used 49008K [0xb8000000, 0xbb000000, 0xbb000000)
      eden space 49024K,  99% used [0xb8000000, 0xbafdc128, 0xbafe0000)
      from space 64K,   0% used [0xbafe0000, 0xbafe0000, 0xbaff0000)
      to   space 64K,   0% used [0xbaff0000, 0xbaff0000, 0xbb000000)
    concurrent mark-sweep generation total 737280K, used 382087K [0xbb000000, 0xe8000000, 0xe8000000)
    concurrent-mark-sweep perm gen total 262144K, used 166616K [0xe8000000, 0xf8000000, 0xf8000000)
    172055.735: [ParNew: 49008K->0K(49088K), 0.0536844 secs] 431095K->387656K(786368K)Heap after gc invocations=28394:
    par new generation total 49088K, used 0K [0xb8000000, 0xbb000000, 0xbb000000)
    eden space 49024K, 0% used [0xb8000000, 0xb8000000, 0xbafe0000)
    from space 64K, 0% used [0xbaff0000, 0xbaff0000, 0xbb000000)
    to space 64K, 0% used [0xbafe0000, 0xbafe0000, 0xbaff0000)
    concurrent mark-sweep generation total 737280K, used 387656K [0xbb000000, 0xe8000000, 0xe8000000)
    concurrent-mark-sweep perm gen total 262144K, used 166616K [0xe8000000, 0xf8000000, 0xf8000000)
    , 0.0544288 secs]
    172059.106: [Full GC {Heap before gc invocations=28394:
    par new generation   total 49088K, used 22668K [0xb8000000, 0xbb000000, 0xbb000000)
      eden space 49024K,  46% used [0xb8000000, 0xb9623158, 0xbafe0000)
      from space 64K,   0% used [0xbaff0000, 0xbaff0000, 0xbb000000)
      to   space 64K,   0% used [0xbafe0000, 0xbafe0000, 0xbaff0000)
    concurrent mark-sweep generation total 737280K, used 387656K [0xbb000000, 0xe8000000, 0xe8000000)
    concurrent-mark-sweep perm gen total 262144K, used 166616K [0xe8000000, 0xf8000000, 0xf8000000)
    172059.106: [CMS: 387656K->335512K(737280K), 6.1797673 secs] 410325K->335512K(786368K), [CMS Perm : 166616K->166119K(262144K)]Heap after gc invocations=28395:
    par new generation total 49088K, used 0K [0xb8000000, 0xbb000000, 0xbb000000)
    eden space 49024K, 0% used [0xb8000000, 0xb8000000, 0xbafe0000)
    from space 64K, 0% used [0xbaff0000, 0xbaff0000, 0xbb000000)
    to space 64K, 0% used [0xbafe0000, 0xbafe0000, 0xbaff0000)
    concurrent mark-sweep generation total 737280K, used 335512K [0xbb000000, 0xe8000000, 0xe8000000)
    concurrent-mark-sweep perm gen total 262144K, used 166119K [0xe8000000, 0xf8000000, 0xf8000000)
    , 6.1804623 secs]
    172073.913: [GC {Heap before gc invocations=28395:
    par new generation   total 49088K, used 49024K [0xb8000000, 0xbb000000, 0xbb000000)
      eden space 49024K, 100% used [0xb8000000, 0xbafe0000, 0xbafe0000)
      from space 64K,   0% used [0xbaff0000, 0xbaff0000, 0xbb000000)
      to   space 64K,   0% used [0xbafe0000, 0xbafe0000, 0xbaff0000)
    concurrent mark-sweep generation total 737280K, used 335512K [0xbb000000, 0xe8000000, 0xe8000000)
    concurrent-mark-sweep perm gen total 262144K, used 166146K [0xe8000000, 0xf8000000, 0xf8000000)
    172073.913: [ParNew: 49024K->0K(49088K), 0.0616737 secs] 384536K->341716K(786368K)Heap after gc invocations=28396:
    par new generation total 49088K, used 0K [0xb8000000, 0xbb000000, 0xbb000000)
    eden space 49024K, 0% used [0xb8000000, 0xb8000000, 0xbafe0000)
    from space 64K, 0% used [0xbafe0000, 0xbafe0000, 0xbaff0000)
    to space 64K, 0% used [0xbaff0000, 0xbaff0000, 0xbb000000)
    concurrent mark-sweep generation total 737280K, used 341716K [0xbb000000, 0xe8000000, 0xe8000000)
    concurrent-mark-sweep perm gen total 262144K, used 166146K [0xe8000000, 0xf8000000, 0xf8000000)
    , 0.0623851 secs]
    I read at some forums that Heap fragmentation could be the reason when you get the OutOfMemory error?Also the rate with which GC is running if it consumes more than 98% of time and releases less than 2% of heap,this error could be thrown.
    Could any of the above be a cause for this?We dont have the flexibilty of increasing the Xmx anymore.
    We are using a Concurrent Mark Sweep collector as can be seen from script below.
    Here are the jvm parameters am using in Server start script:
    JAVA_HOME/bin/java -server -Xms768m -Xmx768m -XX:MaxPermSize=256m -XX:MaxNewSize=64m -Xbootclasspath/a:$BOOTCLASSPATH -classpath $CLASSPATH -Dbea.home=$BEA_HOME -Dweblogic.Domain=$DOMAIN_NAME -Dweblogic.Name=$SERVER_NAME -Djava.security.auth.login.config=../properties/login.config -Dcom.sun.management.jmxremote.port=7003 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -XX:+UsePerfData -verbose:gc -XX:+PrintGCDetails -XX:+PrintHeapAtGC -XX:+PrintGCTimeStamps -Xloggc:../log/gc.log -Djava.security.policy==$WL_HOME/lib/weblogic.policy -Dweblogic.ProductionModeEnabled=true -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled -Dweblogic.management.discover=false -XX:-TraceClassUnloading -Dweblogic.management.server=scc-prd-admin.XXX.com:7001 weblogic.Server
    We are using jdk1.5.0_06 version of java with Weblogic.
    Could someone please help resolve this issue?Any thoughts?

    Are you using RMI? Have you adjusted sun.rmi.dgc.server.gcInterval and sun.rmi.dgc.client.gcInterval from their default values for calling System.gc()? I gather (from the format of your logs) that you are running an older JVM, where the default RMI GC intervals were 60000 milliseconds (1 minute). In later JVM's, the default RMI GC interval was increased to 1 hour. See the [JavaTM RMI Release Notes for JDK 6|http://java.sun.com/javase/6/docs/technotes/guides/rmi/relnotes.html] for some details on this.
    Otherwise you might be using some third party code that calls System.gc() periodically. A later JVM will show "(System)" in the full GC output for collections that were caused by a call to System.gc(). You can effectively disable that behavior with the -XX:+DisableExplicitGC command line option, though that might have bad effects on your application if the third party code needed those full collections. But it would be diagnostic.

  • Conditions in which UnmarshalException occurs?

    Hi,
    I have got the following RMI Exception build with 1.4.2_04-b05
    java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is:
         java.io.EOFException
         at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
         at sun.rmi.server.UnicastRef.invoke(Unknown Source)
    Caused by: java.io.EOFException
         at java.io.DataInputStream.readByte(Unknown Source)
    When I restarted the Server, it starts working fine. Any idea regarding the cause of this?
    Is there any known issues with 'rmid'
    1. when it is used continuosly for long?
    2. when it is used with large amounts of data?
    Whether any of the issues(like this) with RMI is fixed with JDK 1.5? If so, where we can get the bug details.
    Thanks
    Thomas

    Saritha,
            This itself it your item quantity. check for one of your order. first get header guid from CRMD_ORDERADM_H from order number, then go to CRMD_ORDERADM_I and get item guid providing header guid. take this item guid and go to table CRMD_SCHEDLIN and provide that item guid and it gives you item quantity which itself is schedule line quantity.
    Alternatively you can use CRM_ORDER_READ function module as well to get details of item.
    let me know if there are any issues
    Siva
    Message was edited by:
            Siva Velama

  • Full GC even when Max Heap is more than enough

    Hi,
    I have searched through the forum and I still cannot find something that is specific to this. Maybe I have misread or misunderstood so I am posting to see if anyone has a better insight.
    Currently we have a JVM running in production and after some time, it will run a Full GC about every minute. There are plenty of heap size allocated (16GB) but it never get around to that number.
    Below are the JVM settings and part of in the log where the Full GCs keep occurring.
    JVM Settings:
    java.extended.properties=-server -XX:+UseParallelGC -XX:ParallelGCThreads=8 -XX:NewRatio=1 -Xloggc:<filename_including_path> -XX:+PrintGCDetails -XX:+PrintGCTimeStamps
    Log:
    Prior to this, there have been normal GC and no Full GC.
    8008.860: [GC [PSYoungGen: 80490K->3128K(201536K)] 598949K->524407K(1599680K), 0.0100450 secs]
    8008.870: [Full GC [PSYoungGen: 3128K->0K(201536K)] [PSOldGen: 521278K->168262K(1398144K)] 524407K->168262K(1599680K) [PSPermGen: 48726K->48726K(48896K)], 0.9232270 secs]
    8016.336: [GC [PSYoungGen: 198400K->1572K(198784K)] 366662K->169834K(1596928K), 0.0077210 secs]
    8017.353: [GC [PSYoungGen: 198756K->1696K(198784K)] 367018K->170486K(1596928K), 0.0079480 secs]
    8018.315: [GC [PSYoungGen: 197650K->1533K(196352K)] 366440K->170427K(1594496K), 0.0066220 secs]
    8021.174: [GC [PSYoungGen: 196349K->733K(196544K)] 365243K->169819K(1594688K), 0.0058580 secs]
    8026.985: [GC [PSYoungGen: 194397K->2018K(194560K)] 363483K->171282K(1592704K), 0.0055860 secs]
    8027.982: [GC [PSYoungGen: 194530K->2464K(194240K)] 363794K->172613K(1592384K), 0.0071310 secs]
    8029.121: [GC [PSYoungGen: 193824K->3967K(194240K)] 363973K->189987K(1592384K), 0.0125690 secs]
    8029.753: [GC [PSYoungGen: 194239K->5636K(198592K)] 380259K->193888K(1596736K), 0.0126180 secs]
    8030.945: [GC [PSYoungGen: 194555K->7823K(195968K)] 382807K->196768K(1594112K), 0.0086320 secs]
    8037.747: [GC [PSYoungGen: 195919K->5195K(196544K)] 384864K->194605K(1594688K), 0.0083580 secs]
    8038.561: [GC [PSYoungGen: 192203K->2858K(188800K)] 381613K->196308K(1586944K), 0.0089920 secs]
    8039.445: [GC [PSYoungGen: 188778K->1536K(193984K)] 382228K->195431K(1592128K), 0.0062260 secs]
    8041.325: [GC [PSYoungGen: 186368K->1201K(185024K)] 380263K->195310K(1583168K), 0.0055030 secs]
    8046.393: [GC [PSYoungGen: 185009K->1091K(191552K)] 379118K->195810K(1589696K), 0.0069350 secs]
    8049.140: [GC [PSYoungGen: 183875K->1884K(183680K)] 378594K->197150K(1581824K), 0.0086420 secs]
    8050.023: [GC [PSYoungGen: 183644K->2336K(188352K)] 378910K->198290K(1586496K), 0.0075260 secs]
    8050.883: [GC [PSYoungGen: 183072K->760K(180480K)] 379026K->196847K(1578624K), 0.0063370 secs]
    8055.104: [GC [PSYoungGen: 180472K->653K(186304K)] 376559K->197021K(1584448K), 0.0059920 secs]
    8060.021: [GC [PSYoungGen: 179405K->1824K(179648K)] 375773K->198383K(1577792K), 0.0062650 secs]
    8060.824: [GC [PSYoungGen: 179616K->1728K(183232K)] 376175K->198716K(1581376K), 0.0055290 secs]
    8062.169: [GC [PSYoungGen: 178560K->896K(176768K)] 375548K->197960K(1574912K), 0.0056060 secs]
    8063.377: [GC [PSYoungGen: 176768K->597K(181120K)] 373832K->197864K(1579264K), 0.0079390 secs]
    8068.465: [GC [PSYoungGen: 175509K->2509K(176512K)] 372776K->200014K(1574656K), 0.0052340 secs]
    8069.802: [GC [PSYoungGen: 47592K->482K(180544K)] 245096K->198601K(1578688K), 0.0058060 secs]
    8069.808: [Full GC [PSYoungGen: 482K->0K(180544K)] [PSOldGen: 198118K->169154K(1398144K)] 198601K->169154K(1578688K) [PSPermGen: 50863K->50863K(86016K)], 0.6434610 secs]
    8071.821: [GC [PSYoungGen: 173952K->2464K(175488K)] 343106K->171619K(1573632K), 0.0071720 secs]
    8072.577: [GC [PSYoungGen: 175456K->1162K(177152K)] 344611K->170547K(1575296K), 0.0059360 secs]
    8073.323: [GC [PSYoungGen: 173258K->1440K(172672K)] 342643K->171187K(1570816K), 0.0058680 secs]
    8077.257: [GC [PSYoungGen: 172640K->672K(174912K)] 342387K->170614K(1573056K), 0.0052860 secs]
    8083.703: [GC [PSYoungGen: 170976K->1706K(171136K)] 340918K->171817K(1569280K), 0.0047670 secs]
    8084.518: [GC [PSYoungGen: 171114K->2400K(172672K)] 341225K->173057K(1570816K), 0.0070080 secs]
    8085.335: [GC [PSYoungGen: 170912K->1504K(169152K)] 341569K->172760K(1567296K), 0.0047610 secs]
    8090.280: [GC [PSYoungGen: 169120K->704K(170496K)] 340376K->172151K(1568640K), 0.0066940 secs]
    8094.745: [GC [PSYoungGen: 167424K->1312K(167232K)] 338871K->173002K(1565376K), 0.0064510 secs]
    8095.480: [GC [PSYoungGen: 167200K->2016K(168512K)] 338890K->173955K(1566656K), 0.0034560 secs]
    8096.580: [GC [PSYoungGen: 167072K->864K(165120K)] 339011K->172939K(1563264K), 0.0062540 secs]
    8098.771: [GC [PSYoungGen: 165088K->667K(166592K)] 337163K->172963K(1564736K), 0.0042480 secs]
    8105.528: [GC [PSYoungGen: 164059K->1425K(164032K)] 336355K->174009K(1562176K), 0.0043110 secs]
    8106.532: [GC [PSYoungGen: 163985K->3047K(165504K)] 336569K->176177K(1563648K), 0.0058110 secs]
    8107.305: [GC [PSYoungGen: 164775K->2560K(163456K)] 337905K->176491K(1561600K), 0.0060040 secs]
    8108.011: [GC [PSYoungGen: 163456K->2228K(163584K)] 337387K->176346K(1561728K), 0.0056100 secs]
    8111.550: [GC [PSYoungGen: 162356K->932K(160320K)] 336474K->175304K(1558464K), 0.0061080 secs]
    8116.379: [GC [PSYoungGen: 160292K->1920K(161600K)] 334664K->176740K(1559744K), 0.0048300 secs]
    8117.094: [GC [PSYoungGen: 160512K->2821K(160704K)] 335332K->178210K(1558848K), 0.0060000 secs]
    8117.782: [GC [PSYoungGen: 160645K->1580K(160064K)] 336034K->177700K(1558208K), 0.0053460 secs]
    8118.328: [GC [PSYoungGen: 158636K->1819K(158144K)] 334756K->178403K(1556288K), 0.0071820 secs]
    8121.513: [GC [PSYoungGen: 158052K->3745K(159296K)] 334637K->180761K(1557440K), 0.0074850 secs]
    8127.213: [GC [PSYoungGen: 159265K->2056K(156864K)] 336281K->179362K(1555008K), 0.0063830 secs]
    8127.986: [GC [PSYoungGen: 156808K->2072K(157056K)] 334114K->180479K(1555200K), 0.0047890 secs]
    8128.563: [GC [PSYoungGen: 156056K->1536K(154816K)] 334463K->180242K(1552960K), 0.0063460 secs]
    8129.491: [GC [PSYoungGen: 154816K->661K(155904K)] 333522K->179586K(1554048K), 0.0045530 secs]
    8130.461: [GC [PSYoungGen: 36243K->320K(156544K)] 215168K->179612K(1554688K), 0.0057870 secs]
    8130.467: [Full GC [PSYoungGen: 320K->0K(156544K)] [PSOldGen: 179292K->169917K(1398144K)] 179612K->169917K(1554688K) [PSPermGen: 50866K->50866K(86016K)], 0.6929110 secs]
    8138.407: [GC [PSYoungGen: 152576K->1440K(154816K)] 322493K->171357K(1552960K), 0.0063690 secs]
    The pattern repeats itself...
    Adrian

    Are you using RMI? Have you adjusted sun.rmi.dgc.server.gcInterval and sun.rmi.dgc.client.gcInterval from their default values for calling System.gc()? I gather (from the format of your logs) that you are running an older JVM, where the default RMI GC intervals were 60000 milliseconds (1 minute). In later JVM's, the default RMI GC interval was increased to 1 hour. See the [JavaTM RMI Release Notes for JDK 6|http://java.sun.com/javase/6/docs/technotes/guides/rmi/relnotes.html] for some details on this.
    Otherwise you might be using some third party code that calls System.gc() periodically. A later JVM will show "(System)" in the full GC output for collections that were caused by a call to System.gc(). You can effectively disable that behavior with the -XX:+DisableExplicitGC command line option, though that might have bad effects on your application if the third party code needed those full collections. But it would be diagnostic.

  • Urgent!! Lookup names having space(s) in them

    Hi
    I had developed an RMI client program and some time ago somebody
    reported a bug in the porgram that when they have space in their names
    (e.g. Current Date) the program exits with a MalformedURLException or
    something like that. That time I debugged and found that Naming.lookup call
    is not respecting the space in the url so I encoded that to
    Current%20Date and it worked fine. Now they came up with another bug because of
    this as it throws an exception java.rmi.NotBoundException:
    Current%20Date. I am able to get it fixed by commenting out the statements that I
    used to encode the url (keeping the space as it is).
    But I am really confused about why this was causing the problem before.
    How come it suddenly working the other way now ???? Does it depends on the jdk versions?
    thanks in advance,
    dw

    Prior to JDK 1.4, Naming used a hand-written URL parser for the RMI: URLs. From JDK 1.4 it uses the java.net.URI class to do this. Whatever worked before was fortuitous; whatever works now is correct.
    Are you using %20 when binding as well as when looking-up?

  • RemoteException: java.rmi.UnmarshalException in jdk 1.4.2

    i'm implementing an RMI over the jdk 1.4.2 (can't do it in the 1.5 or 1.6) i've seen this topic [http://forum.java.sun.com/thread.jspa?threadID=370196&messageID=1808449] but it didn't help me, or i'm doing something wrong...
    i know the RMI code is ok because it runs on java 1.6 (with the automatic generation of stubs and skeletons) but when i change the platform to 1.4 it throws the exception:
    RemoteException: java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
    java.lang.ClassNotFoundException: servidor.MensageiroImpl_Stub
    the VM is configured to use the -Djava.security.policy=C:\Projecto\Policy\permissions.policy both in the client and server
    please help me :S i've been burning my head with this for 3 days
    i leave my code here:
    The interface:
    package rmiinterface;
    import java.rmi.Remote;
    import java.rmi.RemoteException;
    public interface Mensageiro extends Remote {
        public void sendMsg(String msg) throws RemoteException;
        public String readMsg() throws RemoteException;
    }the implementation:
    package servidor;
    import rmiinterface.Mensageiro;
    import java.rmi.RemoteException;
    import java.rmi.server.UnicastRemoteObject;
    public class MensageiroImpl extends UnicastRemoteObject implements Mensageiro {
        public MensageiroImpl() throws RemoteException {
            super();
        public void sendMsg(String msg) throws RemoteException {
            System.out.println(msg);
        public String readMsg() throws RemoteException {
            return "This is not a Hello World! message";
    }the server:
    package servidor;
    import rmiinterface.Mensageiro;
    import java.rmi.Naming;
    import java.rmi.RMISecurityManager;
    public class MensageiroServer {
        public MensageiroServer() {
            System.setSecurityManager(new RMISecurityManager());
            try {
                Mensageiro m = new MensageiroImpl();
                java.rmi.registry.LocateRegistry.createRegistry(1099);
                System.out.println("RMI registry successfully initiated");
                Naming.rebind("MensageiroService", m);
                System.out.println("Servidor Online");
            } catch (Exception e) {
                System.out.println("Trouble: " + e.getMessage());
        public static void main(String[] args) {
            new MensageiroServer();
    }and the client:
    package cliente;
    import rmiinterface.Mensageiro;
    import java.rmi.RMISecurityManager;
    import java.rmi.Naming;
    import java.rmi.RemoteException;
    import java.rmi.NotBoundException;
    import java.net.MalformedURLException;
    public class MensageiroClient {
        public MensageiroClient() {
        public static void main(String args[]) {
            System.setSecurityManager(new RMISecurityManager());
            try {
                Mensageiro m = (Mensageiro) Naming.lookup("//localhost/MensageiroService");
                System.out.println(m.readMsg());
                m.sendMsg("Hello World!");
            } catch (MalformedURLException e) {
                System.out.println();
                System.out.println("MalformedURLException: " + e.toString());
            } catch (RemoteException e) {
                System.out.println();
                System.out.println("RemoteException: " + e.toString());
            } catch (NotBoundException e) {
                System.out.println();
                System.out.println("NotBoundException: " + e.toString());
            } catch (Exception e) {
                System.out.println();
                System.out.println("Exception: " + e.toString());
    }NOTE: my IDE is Netbeans 6.1. and the client and server are in diffrent projects
    thanks in advance
    Best Regards,
    Carlos Daniel Ribeiro

    the stub and the skeleton are being generated, and they are there, in the server project! i don't know why the class defs for the stub filearen't downloded by the client project...I don't know why you think they will be downloaded. They won't be, unless you're using the codebase feature. The client needs the remote interface and the stub on its classpath, and all classes that the remote interface depends on, and so on recursively until closure. You have to do something about that.
    It works under 1.6 because it doesn't need the stub at all.

  • RMI with varing JDK versions?

    Hi,
    I have a question about using RMI and differing versions of the
    JDK. I
    have a server written in 1.1.7 and a client written in 1.2.1.
    I don't pass any JDK classes as arguments or return codes, only
    primatives and java arrays. Should this be working???
    Are there any papers that write about this situation to let me
    know the
    pros/cons??
    Thanks,
    Frank
    null

    Thanks for the suggestion.
    Sure enough, when checking the version it returns "1.3.1_01"; however, this is really confusing. When searching for "java.exe", I only return two entries: "C:\Programs\JBuilder\jdk1.4\bin\java.exe" and "C:\Programs\JBuilder\jdk1.4\jre\bin\java.exe". These are both in a folder labeled as JDK version 1.4, and are the files that JBuilder is using (which works correctly).
    Is it possible for a "java.exe" to use alternate jar files for its built-in Java functionality? Any other ideas?

  • Is JDK 5.0 support RMI?

    Hi,
    Is JDK5.0 support RMI(remote method invocation)?
    Thanks,

    I'm not sure I understand the question, but RMI has been part of J2SE for years now.
    See this chart: http://java.sun.com/j2se/1.5.0/docs/images/j2se5.gif
    hth,
    -Alexis

  • Very Urgent Unable to Launch Application using Web Start using JDK 1.4.2

    Hi all
    I am very serious issue i have ejb client swing application that uses
    RMI to contact a session bean deployed in JBoss now i want the client app to be installed in the client machine using web start . Also i understand i require security permission to access network resources. so i have signed all the JAR files with same certificate created using self certificate avialiable in JDK by default also in the JNLP file in have included the following tag
    <security>
    <all-permissions/>
    </security>
    Now when I launch my application using Web start it gives an error that " Unsigned application is trying to access local resources"
    I unable to understand what could be the problem . Please help me with the steps to be followed where in client should be able to RMI call to the server
    Thanks in Advance
    Naveen

    You may have tried this already, but you might have to sign the jars via command line, outside any export process from your IDE.
    $ jarsigner {filename}.jar {key from keystore}
    I also had problems using webstart and RMI through an RCP
    Ben

  • Is there any problems in IE if using RMI.?

    Hello buddies,
    this is my 3rd attempt to get answer. before it i tried 2 times but didn't get answered.
    actually i m making a chat application. in that there is a canvas on which we can draw something and send it to all users. i make an applet and from within the applet i m calling a frame. all this awt components like canvas and buttons etc. displays in the frame. applet is just a platform do call the frame. i m using RMI to do the chat. i tried to run it first in appletviewer and it works fine. but when i tried to run in IE from <applet> tag no frame is displays. i am trying to solve it from last 20 days but still unsolved. here is the code if anybody wishes to try it.
    // clinet frame...
    import java.rmi.*;
    import java.rmi.server.*;
    import canvas.Drawer;
    import java.awt.*;
    import java.applet.*;
    import java.applet.Applet;
    import java.awt.event.*;
    import java.util.*;
    import ru.zhuk.graphics.*;
    /*<applet code="ChatClient" width=600 height=300>
    </applet>
    public class ChatClient extends Frame implements IChatClient,ActionListener,MouseListener,MouseMotionListener
         // GLOBAL VARIABLES USED IN THE PROGRAMME...
         boolean flag=false;
         int n;
         String str="";
         String Coord=null;
         IChatService service=null;
         FrameApplet fa=null;
         TextField servername,serverport,username;
         Button connect,disconnect;
         TextField message;
         Button send,sendText;
         TextArea fromserver;
         int i=0,j=0;
         int x[] = new int[1000];
         int y[] = new int[1000];
         Drawer canvas;
         boolean connected=false;
         String title,user="";
         // Class Members //
         public ChatClient()
         public ChatClient(String str)
              super(str);
              setBounds(50,20,600,450);
              setLayout(new FlowLayout(FlowLayout.CENTER,45,10));
              title=str;
              setStatus();
              // Create controls //
              add(new Label("Chat Server Name : "));
              servername=new TextField(20);
              add(servername);
              servername.setText("localhost");
              add(new Label("Chat Server Port : "));
              serverport=new TextField(20);
              add(serverport);
              serverport.setText("900");
              add(new Label("Your User Name : "));
              username=new TextField(20);
              add(username);
              username.setText("Umesh");
              connect=new Button("Connect");
              connect.addActionListener(this);
              add(connect);
              disconnect=new Button("Disconnect");
              disconnect.addActionListener(this);
              add(disconnect);
              message=new TextField(30);
              add(message);
              sendText=new Button("Send Text");
              sendText.addActionListener(this);
              add(sendText);
              fromserver=new TextArea(10,50);
              add(fromserver);
              fromserver.setEditable(false);
    canvas = new Drawer();
              canvas.setSize(250,250);
              canvas.setBackground(Color.cyan);
              add(canvas);
              canvas.addMouseListener(this);
              canvas.addMouseMotionListener(this);
              send=new Button("Send");
              send.addActionListener(this);
              add(send);
              try
                   UnicastRemoteObject.exportObject(this);
              catch(Exception e)
              setVisible(true);
              for(j=0;j<1000;j++)
                   x[j]=0;
                   y[j]=0;
              Coord = new String();
              Coord = "";
    //          fa=new FrameApplet();
         public void mousePressed(MouseEvent me){}
         public void mouseReleased(MouseEvent me)
              Coord = Coord + "r";
         public void mouseClicked(MouseEvent me){}
         public void mouseEntered(MouseEvent me){}
         public void mouseExited(MouseEvent me){}
         public void mouseDragged(MouseEvent me)
              if (Coord == "")
                   Coord = me.getX() + "," + me.getY();
              else
                   Coord = Coord + " " + me.getX() + "," + me.getY();
         public void mouseMoved(MouseEvent me){}
         // RMI connection //
         private void connect()
              try
                   service = (IChatService)Naming.lookup("rmi://pcname/ChatService");
                   service.addClient(this);
                   connected=true;
                   setStatus();
                   user=username.getText();
                   Coord = "";
              catch(Exception e)
                   fromserver.append("Error Connecting ...\n" + e);
                   System.out.println(e);
                   connected=false;
                   setStatus();
                   service=null;
         private void disconnect()
              try
                   if(service==null)
                        return;
                   service.removeClient(this);
                   service=null;
              catch(Exception e)
                   fromserver.append("Error Connecting ...\n");
              finally
                   connected=false;
                   setStatus();
         private void setStatus()
              if(connected)
                   setTitle(title+" : Connected");
              else
                   setTitle(title+" : Not Connected");
         // IChatClient methods //
         public String getName()
              return user;
         public void sendMessage(String msg)
              fromserver.append(msg+"\n");
         public void SendCanvasObject(String str)
              this.str = str;
              fromserver.append(str + "\n");
              Graphics g = canvas.getGraphics();
              paint(g);
         // Actionlistener //
         public void actionPerformed(ActionEvent e)
              if(e.getSource()==connect)
                   connect();
                   if(connected)
                        servername.setEnabled(false);
                        serverport.setEnabled(false);
                        username.setEnabled(false);
                        connect.setEnabled(false);
                        Coord = "";
              else
              if(e.getSource()==disconnect)
                   disconnect();
                   servername.setEnabled(true);
                   serverport.setEnabled(true);
                   username.setEnabled(true);
                   connect.setEnabled(true);
              else
              if(e.getSource()==send)
                   flag = true;
                   if(service==null)
                        return;
                   try
                        fromserver.append("Sending an image...\n");
                        service.SendCanvasObject(this,Coord);
                        i=0;
                        for(j=0;j<1000;j++)
                             x[j]=0;
                             y[j]=0;
                        Coord = "";
                        fromserver.append("\n" + "Image Sent...");
                   catch(RemoteException re)
                        fromserver.append("Error Sending Message ...\n" + re);
                   catch(Exception ee)
                        fromserver.append("Error Sending Message ...\n" + ee);
              else
              if(e.getSource()==sendText)
                   if(service==null)
                        return;
                   try
                        service.sendMessage(this,message.getText());
                        message.setText("");
                   catch(RemoteException exp)
                        fromserver.append("Remote Error Sending Message ...\n" + exp);
                   catch(Exception ee)
                        fromserver.append("Error Sending Message ...\n" + ee);
         public void paint(Graphics g)
              if(flag==true)
                   i=0;
                   StringTokenizer stoken = new StringTokenizer(str,"r");
                   String strin = "";
                   while(stoken.hasMoreTokens())
                        strin = stoken.nextToken();
                        fromserver.append("\n" + strin + "\n");
                        StringTokenizer stoken1 = new StringTokenizer(strin," ");
                        String strin1 = "";
                        j=0;
                        while(stoken1.hasMoreTokens())
                             strin1 = stoken1.nextToken();
                             fromserver.append("\n" + strin1 + "\n");
                             x[j]=Integer.parseInt(strin1.substring(0,strin1.indexOf(",")));
                             y[j]=Integer.parseInt(strin1.substring(strin1.indexOf(",")+1,strin1.length()));
                             j++;
                        for(int k=0;k<j-1;k++)
                             g.drawLine(x[k],y[k],x[k+1],y[k+1]);     
                   i++;
    import java.rmi.*;
    import java.rmi.server.*;
    import canvas.Drawer;
    import java.util.*;
    import ru.zhuk.graphics.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    public class FrameApplet extends Applet implements ActionListener
         ChatClient f;
         public void init()
              Button b = new Button("Start Chat");
              b.addActionListener(this);
              add(b);
         public void actionPerformed(ActionEvent ae)
              f=new ChatClient("Chat");
              f.show();
              f.setSize(400,400);
    here is html file which i calls from IE
    <html>
    <title>Micky Chat</title>
    <body>
    <br>
    <br>
    <center>
    <applet code="FrameApplet.class" width=200 height=200>
    </applet>
    </center>
    </body>
    </html>
    and at last a shocking thing is it is runs in Netscape displaying frames but not calling paint method.
    pls. help me
    thanks a lot
    umesh

    Hi Umesh!
    Sorry that I cannot be too concrete about that since it has to be centuries ago when I fell over this problem.
    As far as I can remember, the JDK provided by MS has no RMI built-in. These was probably one of the main reasons why Sun sued Microsoft concering its handling of Java.
    Afterwards MS released a path for its Java Runtime that included RMI support, but AFAIK they never included it in the standard package. So much luck when searching for the ZIP! (-;
    A little bit of googling might help, e.g.:
    http://groups.google.com/groups?hl=de&lr=&ie=UTF-8&oe=UTF-8&threadm=37f8ddf6.4532124%40news.online.no&rnum=17&prev=/groups%3Fq%3Dmicrosoft%2Bjvm%2Brmi%2Bsupport%26start%3D10%26hl%3Dde%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26selm%3D37f8ddf6.4532124%2540news.online.no%26rnum%3D17
    cheers,
    kdi

Maybe you are looking for