RMI Observer probs

Hi, I'm having serious probs getting my head round using Observable/Observer classes as well as RMI. Because double-inheritance isn't allowed, you can't use both - I've search around for answers but they either don't explain directly what to do or not at all.
I've read that you need to implement your own classes which have the functionality of the observerable/observer classes and use them. The problem is I have no idea how to go about this - the more I read the more confused I get as most sites seem to have a different way of doing it.
Any help would be most appreciated. Thanks

Well you just need a RemoteObserver interface and remote implementation class, and a RemoteObservable interface that specifies all the methods of Observable, and a remote implementation of that. How you do it is up to you.

Similar Messages

  • RMI + Observable/Observer trouble

    I'm trying to develop the following:
    Local:
    A Swing JFrame object which contains some JPanels that should Observe the actions of server's BusinessLogic.java
    Both sides:
    An interface that contains the declaration of the methods in server's business logic.
    RemoteObserver.java
    RemoteObservable.java
    RemoteObserverImpl.java
    RemoteObservableImpl.java
    Server:
    One Observable class that contains the business logic and notifies some changes and implements the Interface.
    Other classes.
    I'm using the latest JDK version.
    I have some classes to do the RMI + Observable/Observer thing but I don't know how to apply them to my application.
    Here's what i've done so far:
    public class MainFrame extends JFrame {
         public static final String serviceName = "RemoteServer";
         private String host = "localhost";
         private RemoteBusinessLogicInterface remoteLogic;
         public MainFrame(String frameTitle) {
              super();
              setTitle(frameTitle);
              setSize(700, 600);
              setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              System.setProperty("java.security.policy", "client.policy");
              setRemoteServer();
              ObserverPanel observerPanel = new ObserverPanel(
                        remoteLogic);
              getContentPane().setLayout(new BorderLayout());
              getContentPane().add(observerPanel, BorderLayout.CENTER);
              this.setVisible(true);
         public void setRemoteServer(){
              try {
                   if (System.getSecurityManager() == null)
                        System.setSecurityManager(new RMISecurityManager());
                   String rmiUrl = "rmi://" + host  + "/" + serviceName;
                   remoteLogic = (RemoteBusinessLogicInterface) Naming.lookup(rmiUrl);
              } catch (ConnectException ex) {
              } catch (UnknownHostException ex) {
              } catch (Exception ex) {
         public static void main(String[] args) {
              MainFrame f = new MainFrame("Title");
    public class ObserverPanel extends JPanel{
         private DefaultListModel items;
         private JList list;
         public ObserverPanel(RemoteBusinessLogicInterface remoteLogic) {
              items = new DefaultListModel();
              list = new JList(items);
              list.setVisibleRowCount(24);
              JScrollPane scrollPane;
              scrollPane = new JScrollPane(list);
              setLayout(new BorderLayout());
              add(scrollPane,BorderLayout.CENTER);
         public void update(RemoteObservable observable, Object objektua) {
              System.out.println("Change notified");
    public interface RemoteBusinessLogicInterface extends RemoteObservable{
         public void insertData(int number, String code, Date date) throws RemoteException;
         public void submit() throws RemoteException;
         public void clear() throws RemoteException;
    class RemoteBusinessLogic extends RemoteObservableImpl implements
              RemoteBusinessLogicInterface {
         public static final String serviceName = "RemoteServer";
         public RemoteBusinessLogic() throws RemoteException {
         public void clear() throws RemoteException {
              setChanged();
              super.notifyObservers();
         public void insertData(int number, String code,
                   Date date) throws RemoteException {
              System.out.println("Something");
              setChanged();
              super.notifyObservers();
         public void submit() throws RemoteException {
              System.out.println("Something");
              setChanged();
              super.notifyObservers();
         public static void main(String[] args) {
              System.setProperty("java.security.policy", "client.policy");
              if (System.getSecurityManager() == null)
                   System.setSecurityManager(new RMISecurityManager());
              try {
                   RemoteBusinessLogic serverObject = new RemoteBusinessLogic();
                   try {
                        java.rmi.registry.LocateRegistry.createRegistry(1099);
                        Naming.rebind(serviceName, serverObject;
                        System.out.println("Server launched");
                   } catch (MalformedURLException e) {
                   } catch (Exception e) {
              } catch (RemoteException e1) {
    }RMI works OK, but I don't know how to tell the server which are his observers. I know I have to use the addObserver (RemoteObserver ro) method but I don't know how to tell the server which are the GUI instances (which are the observers) so that I can add them.
    Any help will be welcomed. Thanks.
    Bye.

    Hello Vitor,
    Simply have your clients give your observable server object a remote reference to their observer object.
    It would look something like this:
    server.addObserver(new Remote(myObserver));Your server object would keep a list of its observers, and call them whenever it wants, using some interface method like:observer.stateChanged(someData);Essentially, design it just as if the observers were local.
    John

  • RMI observer problem

    Hello
    I want to write a client server application using rmi and eclipse, where many clients are able to register to the server. The server has a string attribute and a client should be able to pass a string object to the server and the server replaces the value of his attribute with the sent string and notifies all registered clients of the new value. In a later step the server writes to a mysql database and notifies the clients about changes in the database, but that is later...
    I use eclipse for developing.
    Here is the remoteinterface of the server:
    package com.iz.rmi.server;
    import java.rmi.*;
    import java.rmi.server.*;
    import com.iz.rmi.client.IObserver;
    public interface ISubject extends Remote
         public void registerClient(IObserver obs) throws RemoteException, ServerNotActiveException;
         public void notifyObervers() throws RemoteException, ServerNotActiveException;
    } the remoteinterface of the client:
    package com.iz.rmi.client;
    import java.rmi.*;
    import java.rmi.server.*;
    public interface IObserver extends Remote
         public void sendNotify(String notification) throws RemoteException, ServerNotActiveException;
    }the implementation of the server interface:
    package com.iz.rmi.server;
    import java.net.MalformedURLException;
    import java.rmi.*;
    import java.rmi.server.*;
    import java.rmi.registry.*;
    import java.util.*;
    import com.iz.rmi.client.*;
    public class Subject extends UnicastRemoteObject implements ISubject
         private Vector<IObserver> obs;
         private String service;
         public Subject() throws java.rmi.RemoteException
              super();
              this.obs = new Vector<IObserver>();
         @Override
         public void notifyObervers() throws RemoteException, ServerNotActiveException
              Iterator<IObserver> obsIt = this.obs.iterator();
              while(obsIt.hasNext())
                   IObserver o = obsIt.next();
                   try
                        o.sendNotify("blabla");
                   catch (Exception e)
                        e.printStackTrace();
         @Override
         public void registerClient(IObserver obs) throws RemoteException, ServerNotActiveException
              System.out.println("client registered");
              this.obs.add(obs);
         public static void main(String[] args)
              if (System.getSecurityManager() == null)
                System.setSecurityManager(new SecurityManager());
              try
                String name = "Observable";
                ISubject engine = new Subject();
                //ISubject stub = (ISubject) UnicastRemoteObject.exportObject(engine, 0);
                LocateRegistry.createRegistry(1099);
                Registry registry = LocateRegistry.getRegistry(1099);
                registry.rebind(name, engine);
                System.out.println("ComputeEngine boundlll");
              catch (Exception e)
                System.err.println("ComputeEngine exception:");
                e.printStackTrace();
    } and the implementation of the client interface
    package com.iz.rmi.client;
    import java.rmi.*;
    import java.rmi.server.*;
    import com.iz.rmi.server.*;
    public class Observer extends UnicastRemoteObject implements IObserver
         private String host;
         private String service;
         private ISubject sub;
         public Observer(String host, String service) throws RemoteException
              this.host = host;
              this.service = service;
              System.out.println("Service: " + service);
              try
                   this.sub = (ISubject) Naming.lookup(this.service);
                   this.sub.registerClient(this);
                   System.out.println(" istered");
              catch(Exception e)
                   System.out.println("Unable to connect and register with subject.");
                   e.printStackTrace();
         @Override
         public void sendNotify(String notification) throws RemoteException,
                   ServerNotActiveException
         public static void main(String[] args)
              try {
                   new Observer("192.168.1.34:1099", "Observable");
              } catch (RemoteException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
    }Both programs get started with this vm-argument:
    -Djava.security.policy=C:\daten\noSpring\Obsv\wideopen.policy
    where wideopen.policy looks like this for testing:
    grant {
         // Allow everything for now
         permission java.security.AllPermission;
    };when I start the server all looks fine, but when I start the a client i become just the output.
    Service: Observable
    isteredinstead of
    Service: Observable
    client registerd
    isteredThere are no exceptions or something like that, but it seems that the registerClient()-method does not get called on the server when the client starts. There were many changes since the last time I used rmi, so I don't know what's wrong here. I hope some one can help me with this problem.
    Kind regards,
    Michael

    The server's System.out.prints will go to the server's console on the server host.
    Not interleaved wih the client's output on the client's console on the client host.

  • Chat Server and Client Design

    Ola,
    I just want to make a simple Chat Program for intranet (LAN). I'm planning to use socket connection. What would be a good design for Chat Program? Both the Client and the Server are Java Application.
    Here is the diagram that I have in mind:
    ---- First the client login to Server:
    [Client A] ----> [Server]
    [Client B] ----> [Server]
    ---- Then Server add client in the container, Server put each connection from client to separate Thread, so it can handle multiple clients.
    ---- Then let's say Client A send message to Client B (or others). Server get the message from Client A, and my problem is how to get the Server to send the message to B. The only way that I know is to make each client act like its own server and listening to certain port number. That way the server can send the incoming message directly to the client.
    [Client A] ------> [Server] -----???---> [Client B]
    At this point I just have the Server listening to a port (ex. 10000). Should I have each client listening to a port number?
    Another design that I have in mind is to have only Server listening to port 10000. And have the client to poll the Server (ex. every 2 seconds) to check whether the server has new message for the client.
    The last design that I was considering is using RMI.
    Which approach that will best fit my case? What is the ideal design for making chat client server program? If you know any URL or Books that explains all these issue, please post them here. Any help will be appreciated.

    My approach (with tcp sockets) was the following:
    The server has two serversockets running.
    The client connects at the first one, which it will use
    for sending (any messages) and receiving a reply from the
    server ( an "ok" confirmation or so) .
    The client then connects at the second serversocket,
    which it uses for listening to the server.
    The second socket then also can be used for "alive" calls
    from the server periodically ( to kick out users, who
    have lost connection silently)
    Also the second socket, of course, is used as broadcast channel.
    Broadcasted messages can contain chat messages, information
    about a user, which has logged in or out ..
    When the server receives a (chat)message from a client, it
    first enters that message in its model and then broadcasts
    this message ( or more generally the changes in its model)
    to all clients including the client, who has
    sent the message, which only displays the message, when he
    has received it back from the server.
    This way, the order of messages displayed is the same for
    all clients - its a sort of synchronization process.
    Also, you don't need different ports ( for anything in principle ).
    Port 80 is enough.
    For multiple connections, you can send an integer as first
    data transfer, which acts as "virtual portnumber" and the
    receiver then can forward the socket to the associated threads.
    One thing to note for the broadcast process is, that you
    can't simply broadcast the messages in a loop, because this
    way, one veeery slow client would slow down the whole
    server. Therefore you will have to use threads for that.
    In the old (jdk1.3) way, the server would create a thread
    for each user who connects at the first serversocket,
    pass the socket (which it gets from the accept() method )
    to that thread, and this thread then would block while
    trying to receive, and after it had received something,
    it would call a synchronized method from the server,
    in which the server datamodel would be updated and
    broadcasts would be started ( in an other thread context ).
    A good way to speed up chat systems with heavy load is
    to use MultiCast sockets. But then you would have to
    use Datagrams (UDP).
    Another problem arises, when you want to go through
    firewalls. RMI has probs, and bidirectional transfer
    isn't allowed (some firewalls allow 1 request followed by
    1 answer and then cut the connection to my knowlegde)
    It's possible, but it's more complicated.

  • Failure upon Socket.accept

    We are seeing our logs filling with the following exception:
    Wed Sep 20 20:23:14 PDT 2000:<E> <ListenThread> Listen failed, failure
    count: '1'
    java.net.SocketException: Software caused connection abort
    at java.net.PlainSocketImpl.socketAccept(Native Method)
    at java.net.PlainSocketImpl.socketAccept(Compiled Code)
    at java.net.PlainSocketImpl.accept(Compiled Code)
    at java.net.ServerSocket.implAccept(Compiled Code)
    at java.net.ServerSocket.accept(Compiled Code)
    at weblogic.t3.srvr.ListenThread.run(Compiled Code)
    Has anyone else experienced this?
    We are running WLS 5.1, Solaris 7, and Solaris_JDK_1.2.1_04. The soft
    limit for file descriptors is 1024, the hard limit is 4096. We are no
    where near the file descriptor limit.
    Thanks
    Kevin

    Adam,
    I am fairly new to WL development. Are you implying that the server my client startup class is connecting to is somehow calling close on my server? I am not sure how or where this would be possible as I am connecting to the remote server on a different port.
    During the 15 or so failure messages and reconnect attempts, my client can still receive messages from the remote server; I am just assuming that port 7001 just became unavailable for some reason.
    Any ideas?
    -Nathan
    "Adam Messinger" <[email protected]> wrote:
    Nathan,
    It appears that client socket is calling connect() and then close(). This
    makes the server's call to accept() fail because the socket is already
    closed.
    Regards,
    Adam
    "Nathan Yeager" <[email protected]> wrote in message
    news:3a314bee$[email protected]..
    Hi,
    I am running 4.5.1 SP13. I have a startup class which registers itself asan RMI observer with a remote server. It initially connects, and receives
    the first message.
    Not long after receiving the first message, the following is outputnumerous times before the server shuts itself down:
    Fri Dec 08 14:53:39 CST 2000:<E> <ListenThread> Listen failed. Failurecount: 1
    Fri Dec 08 14:53:39 CST 2000:<E> <ListenThread> java.net.SocketException:socket closed
    at java.net.PlainSocketImpl.socketAccept(Native Method)
    at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:413)
    at java.net.ServerSocket.implAccept(ServerSocket.java:241)
    at java.net.ServerSocket.accept(ServerSocket.java:222)
    at weblogic.t3.srvr.ListenThread.run(ListenThread.java:280)
    Fri Dec 08 14:53:39 CST 2000:<E> <ListenThread> Attempting to close andreopen server socket
    This appears to be a fairly generic error message and I don't have much togo by. Any ideas?
    -Nathan Yeager

  • Socket Accept failure

    Hi,
    I am running 4.5.1 SP13. I have a startup class which registers itself as an RMI observer with a remote server. It initially connects, and receives the first message.
    Not long after receiving the first message, the following is output numerous times before the server shuts itself down:
    Fri Dec 08 14:53:39 CST 2000:<E> <ListenThread> Listen failed. Failure count: 1
    Fri Dec 08 14:53:39 CST 2000:<E> <ListenThread> java.net.SocketException: socket closed
    at java.net.PlainSocketImpl.socketAccept(Native Method)
    at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:413)
    at java.net.ServerSocket.implAccept(ServerSocket.java:241)
    at java.net.ServerSocket.accept(ServerSocket.java:222)
    at weblogic.t3.srvr.ListenThread.run(ListenThread.java:280)
    Fri Dec 08 14:53:39 CST 2000:<E> <ListenThread> Attempting to close and reopen server socket
    This appears to be a fairly generic error message and I don't have much to go by. Any ideas?
    -Nathan Yeager

    Adam,
    I am fairly new to WL development. Are you implying that the server my client startup class is connecting to is somehow calling close on my server? I am not sure how or where this would be possible as I am connecting to the remote server on a different port.
    During the 15 or so failure messages and reconnect attempts, my client can still receive messages from the remote server; I am just assuming that port 7001 just became unavailable for some reason.
    Any ideas?
    -Nathan
    "Adam Messinger" <[email protected]> wrote:
    Nathan,
    It appears that client socket is calling connect() and then close(). This
    makes the server's call to accept() fail because the socket is already
    closed.
    Regards,
    Adam
    "Nathan Yeager" <[email protected]> wrote in message
    news:3a314bee$[email protected]..
    Hi,
    I am running 4.5.1 SP13. I have a startup class which registers itself asan RMI observer with a remote server. It initially connects, and receives
    the first message.
    Not long after receiving the first message, the following is outputnumerous times before the server shuts itself down:
    Fri Dec 08 14:53:39 CST 2000:<E> <ListenThread> Listen failed. Failurecount: 1
    Fri Dec 08 14:53:39 CST 2000:<E> <ListenThread> java.net.SocketException:socket closed
    at java.net.PlainSocketImpl.socketAccept(Native Method)
    at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:413)
    at java.net.ServerSocket.implAccept(ServerSocket.java:241)
    at java.net.ServerSocket.accept(ServerSocket.java:222)
    at weblogic.t3.srvr.ListenThread.run(ListenThread.java:280)
    Fri Dec 08 14:53:39 CST 2000:<E> <ListenThread> Attempting to close andreopen server socket
    This appears to be a fairly generic error message and I don't have much togo by. Any ideas?
    -Nathan Yeager

  • MFP Anomaly help

    Hi Folks,
    I just spotted this on our WCS6.0
    MFP Anomaly Detected - 3,461 'Invalid MIC' violation(s) have originated from the AP with BSS '00:16:9d:44:65:d0'. This was detected by the radio with Slot ID '0' of the AP with MAC '00:19:aa:f5:5b:a0' when observing 'Probe Response, Beacon, and Deauthentication' frames.
    3,461 seems like far too much - is this an attack? What should I do?
    The message reads "originated from the AP", I've id'd the AP in WCS - are one of our APs acting up?
    What is going on?
    Thanks
    Scott

    This is a problem on the controller, the WCS is just reporting what the controller says in this case.
    There are quite a few bugs on this depending the code of WLC you have:
    4.2:
    CSCsq87439 "MFP Anomaly Detected - 'Invalid MIC' violation(s)" messages seen on WLC
    5.0,5.1 and 5.2:
    CSCsl59308 EW: Many 'MFP Anomaly Detected' alarms being reported

  • RMI Remote Observer

    Sorry for the cross-post but getting answers out of the JINI forum is like pulling teeth...
    I'm looking to improve performance of an application I wrote which has a server generating remote events and distributing them to clients who have previously signaled interest. One thing I noticed is that when one of the clients has a slow connection the whole system suffers. So I was wondering if introducing a threaded architecture would help in the following piece of code.
    currently...
    Iterator hashMapKeySetIterator = hashMap.keySet().iterator();
    while ( hashMapKeySetIterator.hasNext() )
    Object key = hashMapKeySetIterator.next();
    Observer observer = (Observer)hashMap.get(key);
    try
    observer.notify( event[] ); <-------- Thread this???????
    } catch (RemoteException re)
    try
    removeObserver( key, observer );
    }catch(Exception e)
    //handle exception
    System.out.println("Provider.notify() Error --> " + re.getMessage() );
    So, if I instead just created a new thread for each of the calls to notify(), would that improve the overall performance? Would it introduce any problem areas or would there be anything I should be concerned about? Thanks in advance.
    Dave

    Yes. Your solution seems to be the way to solve this type of problem.
    I would recommend some type of Thread pool so that you don't have as much Thread creation overhead.

  • SIMPLE RMI PROB

    I have created a very simple rmi test class passing a bk obkect to a remote library class - the code is below but i keep getting the oops error as specified in the client class - any ideas would be appreciated.
    public class bk{
    String st;
    public bk(String s){
    st=s;
    import java.rmi.*;
    public interface libint extends Remote{
    public void addbook(bk b)throws RemoteException;
    import java.rmi.*;
    import java.rmi.server.*;
    import java.util.*;
    public class lib extends UnicastRemoteObject implements libint{
    Vector v;
    public lib()throws RemoteException{
    Vector v = new Vector();
    System.out.println("lib created");
    public void addbook(bk b){
    v.add(b);
    System.out.println("BOOK ADDED");
    import java.rmi.Naming;
    public class Server{
    public static void main(String args[]){
    try{
    Naming.rebind("libs", new lib());
    System.out.println("System ready");
    catch(Exception e){}
    import java.rmi.Naming;
    public class client{
    public static void main(String args[]){
    try{
    bk b = new bk("john");
    libint li = (libint)Naming.lookup("//127.0.0.1/libs");
    li.addbook(b);
    }catch(Exception e){System.out.println("oops2");}

    I kind of guessed it was something to do with the addbook method but i have no idea why - any suggestions would again be welcome - cheers
    java.lang.NullPointerException
    at lib.addbook(lib.java:15)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
    at sun.rmi.transport.Transport$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.Transport.serviceCall(Unknown Source)
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source)
    at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
    at sun.rmi.server.UnicastRef.invoke(Unknown Source)
    at lib_Stub.addbook(Unknown Source)
    at client.main(client.java:8)

  • URGENT - Help on RMI & Proxy - Call back prob

    Hi
    I have made small RMI, where RMI server is running in Webserver [ which is not even Proxy]. It is working fine for all the clients except clients under firewall/Proxy.
    Please let me know, Can we implement RMI Server able to call back the clients [ which are under proxy ]
    If so , what modifications i have to do ???
    Note
    1. Client Able to access the RMI Server. But From the Server, i can not able to Call back the Client.
    2. I am passing clientRef through remotemethod on the remoteObject . Then the ClientRef will be stored in Server. When trying to call back throgh the ClientRef, I am getting Exception, RemoteException such that i could not able to connect/not found. The same concept is working if the Clients are not in Proxy
    Please help immediately.
    Sampath Ramanujan.

    If I am not wrong RMI multiplexing protocol wsa a temporary solution to this problem. It was introduced in JDK 1.02 pre release of RMI. But this Protocol has been disabled since JDK 1.2.2.
    If however JDK1,4 if the improved RMI protocol is biderectional this will solve the problem.

  • Prob in

    hi friends
    i am using java version 1.5 and sun application server 8.5....
    I am beginner learning ejb...when i try to call a ejb program from jsp i m encounting the prob with the line
    <% HelloHome hh=(HelloHome) PortableRemoteObject.narrow(obj,HelloHome.class);%>......
    my jsp prog is
    <jsp:directive.page import="javax.naming.Context"/>
    <jsp:directive.page import="javax.naming.InitialContext"/>
    <jsp:directive.page import="java.util.Properties"/>
    <jsp:directive.page import="javax.rmi.PortableRemoteObject"/>
    <jsp:directive.page import="java.rmi.Remote"/>
    <html>
    <head>
    <title>
    </title>
    </head>
    <body>
    have a nice day
    <%InitialContext ic=new InitialContext();%>
    <%Object obj=(Object) ic.lookup("HelloBeanjndi");%>
    <% HelloHome hh=(HelloHome) PortableRemoteObject.narrow(obj,HelloHome.class);%>
    <% Hello h=hh.create();%>
    </body>
    </html>
    i seached google and tried in many ways...but failed
    pls anybody help me to sort out my prob..
    thanks

    hi friends
    I tried everything ...that is all the ans .....i run them in tomcat and sun application server i am not getting the result
    after doing everything now i am getting these errors
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 16 in the jsp file: /Helloo.jsp
    Generated servlet error:
    C:\jakarta-tomcat-5.0.19\work\Catalina\localhost\MyJsp\org\apache\jsp\Helloo_jsp.java:65: cannot find symbol
    symbol : class HelloHome
    location: class org.apache.jsp.Helloo_jsp
    HelloHome hh=(HelloHome) PortableRemoteObject.narrow(obj,HelloHome.class);
    ^
    An error occurred at line: 16 in the jsp file: /Helloo.jsp
    Generated servlet error:
    C:\jakarta-tomcat-5.0.19\work\Catalina\localhost\MyJsp\org\apache\jsp\Helloo_jsp.java:65: cannot find symbol
    symbol : class HelloHome
    location: class org.apache.jsp.Helloo_jsp
    HelloHome hh=(HelloHome) PortableRemoteObject.narrow(obj,HelloHome.class);
    ^
    An error occurred at line: 16 in the jsp file: /Helloo.jsp
    Generated servlet error:
    C:\jakarta-tomcat-5.0.19\work\Catalina\localhost\MyJsp\org\apache\jsp\Helloo_jsp.java:65: cannot find symbol
    symbol : class HelloHome
    location: class org.apache.jsp.Helloo_jsp
    HelloHome hh=(HelloHome) PortableRemoteObject.narrow(obj,HelloHome.class);
    ^
    An error occurred at line: 16 in the jsp file: /Helloo.jsp
    Generated servlet error:
    C:\jakarta-tomcat-5.0.19\work\Catalina\localhost\MyJsp\org\apache\jsp\Helloo_jsp.java:65: cannot find symbol
    symbol : variable PortableRemoteObject
    location: class org.apache.jsp.Helloo_jsp
    HelloHome hh=(HelloHome) PortableRemoteObject.narrow(obj,HelloHome.class);
    ^
    An error occurred at line: 17 in the jsp file: /Helloo.jsp
    Generated servlet error:
    C:\jakarta-tomcat-5.0.19\work\Catalina\localhost\MyJsp\org\apache\jsp\Helloo_jsp.java:68: cannot find symbol
    symbol : class Hello
    location: class org.apache.jsp.Helloo_jsp
    Hello h=hh.create();
    pls pls anybody help me.else i will be mad
    thanks

  • Prob in loading

    Hi 2 all               i am new to BI .i got a prob while iam loading from r/3 to dso. actualLY in r/3 there is 9000 rec  i put load to psa .THEN 10000 rec came to psa from therE  i put load to dso  .There I GOT ONLY 75OO  rec this  is my prob can any one hepltome its vey urgent
    thnks
    satish

    Hi Satish,
    The problem you are saying may not be a problem actaully
    Reasons of your observation:
    1.Firstly ,where did u check the no. of records??Is the loading delta..then why should no.of records be the 9000???(only new/changed records come in delta)
    2.Now...your observation can happen in three cases:
    a.Your functionmodule which is used in extraction may be having some filter criteria
    b.Your Infopackage has some selection condition
    c.Your Infopackage is loading delta request
    d.Now your DTP which is loading to target is having some filter
    e.Your transformation/update rules etc having routine to filter records..
    It is never mandatory to have transferred records same as added records.In some cases the transferred records can be greater than added records..(filter)
    or in some cases transferred records can be less than added records(appending data to result package)
    Regards,
    rocks

  • Potential Memory Leak in rmi

    We have a service that is being monitored via JMX. The JVM heap usage is growing and even major collections are not able to remove the garbage. Inspecting the heap shows garbage consisting of RMI related references (mostly, if not all, related class loaders). The only way to alleviate the issue is to issue explicit gc call through JMX (that removes all accumulated garbage). Our gc related options are:
    -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:SurvivorRatio=8 -XX:MaxTenuringThreshold=1 -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly
    And we have not touched either of: DisableExplicitGC or sun.rmi.dgc.server.gcInterval
    I believe the problem is supposed to addressed by the code in sun.misc.GC.Daemon:
    public void run() { for (;;) { long l; synchronized (lock) {  l = latencyTarget; if (l == NO_TARGET) { /* No latency target, so exit */ GC.daemon = null; return; }  long d = maxObjectInspectionAge(); if (d >= l) { /* Do a full collection. There is a remote possibility * that a full collection will occurr between the time * we sample the inspection age and the time the GC * actually starts, but this is sufficiently unlikely * that it doesn't seem worth the more expensive JVM * interface that would be required. */ System.gc(); d = 0; }  /* Wait for the latency period to expire, * or for notification that the period has changed */ try { lock.wait(l - d); } catch (InterruptedException x) { continue; } } } }
    For some reason the above System.gc is not being invoked (that has been verified by looking at gc logs). Anyone has a suggestion as to how to address the issue?

    Thanks for pointing to MOS notes, they were quite helpful. Though sometime on our system, ohasd.bin consumes more resources. Is it safe to kill it?
    Also, we have observed that there are multiple oraagents belonging to different users such as root,grid and oracle.
    grid 14620 1 0 20:32 ? 00:00:14 /u01/app/11.2.0/grid/bin/oraagent.bin
    root 14625 1 0 20:32 ? 00:00:02 /u01/app/11.2.0/grid/bin/orarootagent.bin
    root 14627 1 0 20:32 ? 00:00:00 /u01/app/11.2.0/grid/bin/cssdagent
    grid 14803 1 0 20:32 ? 00:00:06 /u01/app/11.2.0/grid/bin/oraagent.bin
    oracle 14807 1 0 20:32 ? 00:01:53 /u01/app/11.2.0/grid/bin/oraagent.bin
    root 14811 1 0 20:32 ? 00:00:38 /u01/app/11.2.0/grid/bin/orarootagent.bin
    When these are killed, not all are re-spawned automatically - typically oraagent belonging to "oracle" user is left out. Is this an expected behaviour or it will cause some instability in the clusterware?
    Thanks

  • ClassDefiner.defineClass() leaking memory in a RMI method invocation.

    Hi,
    My application uses RMI for communicating between two java processes.
    I'm observing some kind of memory leak in one of the classes in RMI
    library. When observed through OptimizeIT, I see a large number of
    Object[] being created by the ClassDefiner.defineClass() &
    ClassDefiner$1().run().
    These Object[] arrays keep accumulating, never get garbage collected.
    Attached is the screen shot of OptimizeIT, which shows object allocation
    hierarchy.
    Any help in this regard would be appreciated.
    The JDK version being used is, 1.4.2_05.
    thanks in advance.
    Vijayendra

    Update -
    The reason for this was found to be "-Xnoclassgc" After removing this option from the startup script, I didn't notice any increase in object[]/int[] count.
    Hoping this would fix the issue.

  • RMI method invocation leading to Memory Leak

    My application uses RMI for communicating between two java processes.
    I'm observing some kind of memory leak in one of the classes in RMI
    library. When observed through OptimizeIT, I see a large number of
    Object[] being created by the ClassDefiner.defineClass() &
    ClassDefiner$1().run().
    These Object[] arrays keep accumulating, never get garbage collected.
    Attached is the screen shot of OptimizeIT, which shows object allocation
    hierarchy.
    Any help in this regard would be appreciated.
    The JDK version being used is, 1.4.2_05.
    thanks in advance.
    Vijayendra

    The reason for this was found to be "-Xnoclassgc" After removing this option from the startup script, I didn't notice any increase in object[]/int[] count.
    Hoping this would fix the issue.

Maybe you are looking for

  • Some of my music and all of my playlists gone!

    I recently upgraded from a macbook to an iMac + macbook air. I did the whole macbook to macbook file shuffle, but somehow I did not get all the music from my old itunes into my new itunes. Additionally, none of my playlists came through. I've resiste

  • With classification release procedure for PO

    Dear Experts , here one issue is with classification release procedure for PO when I create characteristics in Additional data table name :-- Cekko field name  :-- match code enter click all sec charars then which block I select to go next screen and

  • Issues with upgrade from os x 10.7.5

    hi had 2 attempts in upgrade down load from os x 10.7.5 to os x mountain lion so i can use my apple tv correctly.... however im getting this error An error occurred while running scripts from the package "mzps8185591984996783701.pkg". and then the fi

  • Row spacing in SQL*Plus

    Hi, Is there a way to reduce the row spacing on an output with col format? The default row spacing is to big - times bigger than output with no col format. Is there anything as BREAK ON ROW - 2 (NEGATIVE)? Thx, Dobby

  • Mars: trouble resolving switch ports

    Our MARS device seems to be up and running correctly. Most of our equipment seems to be correctly configured and appears in the topology. However, when an incident occurs MARS does not list the switch the device is connected to. How would I go about