[WL6.1 SP2] RMI and Serialization problems

Greetings. I've got a strange question.
I have a rather large object graph that's produced by an EJB. This
object graph is then serialized and sent across the network to a waiting
client, or is passed to the web tier.
The object graph is of variable size, but huge in any case - some
examples are 10 megs in size when serialized to disk.
The big problem is that it takes a lot of ram to serialize this object
to push it over the network. Now, this wouldn't be a big problem (because
objects are not requested very often), but for the fact that weblogic
doesn't seem to release the memory for these objects after the serialization
takes place.
Is there some way to make sure that the object stream is closed after
the object is sent, so the memory can be GC'd for other processes? We're
currently giving the server about 600 Megs of ram max for the heap (the
server is a ES40 dual), and the server can die in a matter of hours.
Would SP3 help things at all?
Is there some way to force memory cleanup?
Thanks!
-Jim Nemesh

"Jim Nemesh" <[email protected]> writes:
The big problem is that it takes a lot of ram to serialize this object
to push it over the network. Now, this wouldn't be a big problem (because
objects are not requested very often), but for the fact that weblogic
doesn't seem to release the memory for these objects after the serialization
takes place.This sounds like a bug, although if you leave any reference to the
object it will not get GC'd. Are nulling out all your references after
you are done with the object?
Is there some way to make sure that the object stream is closed after
the object is sent, so the memory can be GC'd for other processes? We're
currently giving the server about 600 Megs of ram max for the heap (the
server is a ES40 dual), and the server can die in a matter of hours.If the stream is not being closed then its a bug.
Would SP3 help things at all?
Is there some way to force memory cleanup?Garbage collection should do this.
andy

Similar Messages

  • Version ID and Serializable problem...

    Ok the problem is this. I have a class for some items that will be saved to disk using the Serializable interface. Now to be able to load old files after I have edited the class I need to include the version id in the class like:
    static final long serialVersionUID = 1407381982932730981L;The thing is, to get that version ID you need to compile the class and go into a commandline and run the serialver tool on the class.
    Now, i will have a lot of new files that will extend the main class. And these will also be saved down to files (and it is critical that old files can be deserialized when the program starts again). So for each new class, i will have to go and get the version id.
    Is there some easier way for this?

    It's not entirely clear to me what your problem is. You talk about new classes that extend the main class. Serialization version issues cannot be a problem there.
    However, it is possible to run the serialver program directly from another class by invoking its main method. It's the class sun.tools.serialver.SerialVer. You'll need to include the tools. jar file in your class path. By capturing its output (using System.setOut()) you can automate this process to whatever degree you feel is worthwhile.
    Sylvia.

  • 2D objects Serialization problem

    Welcome!
    I'm making a net game using RMI and I have this problem.
    When I'm trying to join my client with the server an error occures:
    Error: error marshalling arguments; nested exception is:
         java.io.NotSerializableException: java.awt.geom.Ellipse2D$Double
    My client contains an Object extending a JPanel class. There are 2D object used to make the map, and that's why this error occures.
    It's a funny thing, cause I'm not sending a whole Object of my client, but only it's refference (using "this" in the join() method) so I dont know why does the 2D object need to be serialized and sent :|?
    Any way, my question is how to make 2D objects serializable!? I have jdk1.5.0_06 and as far as I remember they should be srializable in this version. Mabey I'm dooing something wrong!? Mabey it's nessesary to ad an appropreate code-line or import sth... i don't know
    please help me... I have little time to finish my project, and this thing is blocking my work.
    Big thanks to anybodey who will help.
    regards floW

    I'll tel u the whole story then, my problem is as follows:
    public class BounceThread{
       public static void main(String[] args)   {
          JFrame ramka = new BounceFrame();
             ramka.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
             ramka.setVisible(true);
    class BounceFrame extends JFrame{
    public BounceFrame()
          setSize(DEFAULT_WIDTH, DEFAULT_HEIGHT);
          setTitle("MiniGolf v 1.0");
          panel = new BallPanel(); // this contains maps made with 2D objects
          panel.setBackground(Color.green);
          panel.setVisible(panel.czy_wida&#263;_panel());
          add(panel, BorderLayout.CENTER);
    // I add a menu bar, that starts a net game:
    JMenuBar pasekMenu = new JMenuBar();
              setJMenuBar(pasekMenu);
              JMenu menuGra = new JMenu("Game");
           // and so on... and finaly I add an option:
              menuGame_Nowa.add(new
                        AbstractAction("Net game")
                             public void actionPerformed(ActionEvent event)
                                  net_game(panel);
    // here i write my net_game method:
    public void net_game(BallPanel aPanel)
         //here, i make an Client object, and connect him with my server
         client = new mgClient(panel);
         client.join();
         // I give panel as a paramete, cause I cant think of another way of leting my server to uce it's (panels) methods
         // If I join only a name of my client, then how can I change the panel in my BounceFrame from the Clients method
         // "shouted" by the server!? It has to be a field in the client's object.
         // Is there any other way out!?
    // Class BouceFrame holds the panel as a field:
    private mgClient client;
    private BallPanel panel;
    //and so on...
    }and that's the real problem I'm facing here. Is there any solution!? I think, that making a Client's field out of my panel is the only way ot. And that means I need those 2D objects serialized... :(
    Please help if u can.
    Regards floW

  • Performanceproblem with WL6.1 JDBC and Oracle

    Hi!
    I have a big performance-problem using wl6.1, jdbc and oracle.
    My Server is sending a Vector with NodeBeans via JDBC to a OracleDB. The answer
    comes immediately with the timeout.
    Why is the EJB waiting for the timeout?
    Is it a problem of configuration?
    Thanks
    Thomas

    Hi Sree,
    here I send You the class with the main problem. The call queryDataSet.refresh();
    is the timeconsuming part.
    We are using WL6.1sp2, Oracle 8.1.7 with classes12. In our environment we can
    not use connectionpools.
    It comes back with a timeout AND the data. Calling it again immediately it takes
    2/3 of the time the timeout is set.
    Do You have a fine solution?
    Thanks
    Thomas
    package ppif.db;
    import java.rmi.*;
    import ppif.bo.*;
    import java.util.*;
    import com.borland.dx.dataset.*;
    import com.borland.dx.sql.dataset.*;
    import java.math.*;
    public class connector {
         private ppif.mapping.NodeDescriptions nodeDescriptions;
         public connector(ppif.mapping.NodeDescriptions nodeDescriptions) {
              this.nodeDescriptions = nodeDescriptions;
         public connector() {
              this.nodeDescriptions = nodeDescriptions;
         public Vector fetchNodes(ppif.bo.Node filterNode) throws RemoteException {
              String childClassName = null;
              Vector nodeVector = new Vector();
              Node node = null;
              if (nodeDescriptions == null) throw new RemoteException("nodeDescriptions ==
    null");
              // childClassName zu gegebenen filterNode ermitteln
              if (filterNode.getClassName().equals("DefaultRoot")) childClassName = "ST";
              if (filterNode.getClassName().equals("PrismaProjectsRoot")) childClassName =
    "PrismaProjects";
              if (childClassName == null) throw new RemoteException("Zum übergebenen filterNode
    wurde kein chlidClassName gefunden.");
              if (nodeDescriptions.getNodeDescription(childClassName) == null) throw new RemoteException("Für
    die ChildClass "+childClassName+" ist kein Mapping definiert.");
              // Vector mit Child-Knoten erzeugen durch DB-Zugriff
              ppif.mapping.NodeDescription nodeDescription = nodeDescriptions.getNodeDescription(childClassName);
    Database database = new Database();
    ParameterRow parameterRow = null;
    Column column = null;
    QueryDataSet queryDataSet = new QueryDataSet();
    // DB-Connect generieren
    database.setConnection(new com.borland.dx.sql.dataset.ConnectionDescriptor(nodeDescription.dbUrl,
    nodeDescription.dbUser, nodeDescription.dbPassword, false, "oracle.jdbc.driver.OracleDriver"));
    int queryCount = 0;
    // Schleife über alle queries der childKlasse, gemäss Mapping
    for (Iterator it = nodeDescription.mappingQueries.iterator(); it.hasNext();
                   ppif.mapping.MappingQuery mappingQuery = (ppif.mapping.MappingQuery)it.next();
                   String queryString = mappingQuery.getQueryString();
                   parameterRow = mappingQuery.getParameterRow();
                   // ParameterRow mit Input-Werten füllen
                   for (int i=0; i<parameterRow.getColumnCount(); i++) {
                        String columnName = parameterRow.getColumn(i).getColumnName();
                        String filterAttributeName = columnName;
                        Object filterAttributeValue = filterNode.getAttribute(filterAttributeName).getVal1();
                        switch (parameterRow.getColumn(i).getDataType()) {
                             case com.borland.dx.dataset.Variant.BIGDECIMAL:
                                  BigDecimal val = (BigDecimal)filterAttributeValue;
                                  parameterRow.setBigDecimal(i, val);
                                  break;
                             case com.borland.dx.dataset.Variant.STRING:
                                  parameterRow.setString(i, (String)filterAttributeValue);
                                  break;
                             default:
                                  throw new RemoteException("Unbekannter Datentyp");
                   // Query generieren
                   queryDataSet.setQuery(new com.borland.dx.sql.dataset.QueryDescriptor(database,
    queryString, parameterRow, false, Load.ALL));
                   // DB-Verbindung öffnen
                   queryDataSet.open();
                   // Rolle setzen
                   if (nodeDescription.dbRole != null) {
                        java.sql.Statement setRole;
                        String roleName = nodeDescription.dbRole;
                        String rolePwd = nodeDescription.dbRolePassword;
                        try {
                             java.sql.Connection jdbcConnection = database.getJdbcConnection();
                             setRole = jdbcConnection.createStatement();
                             setRole.execute("SET ROLE " + roleName + " IDENTIFIED BY " + rolePwd);
                        } catch (java.sql.SQLException exception) {
                             throw new RemoteException(exception.getMessage());
                        } catch (Exception exception) {
                             throw new RemoteException(exception.getMessage());
                   // Query ausführen
                   queryDataSet.refresh();
                   // Datensätze in Node-Objekte umwandeln
                   int columnCount = queryDataSet.getColumnCount();
                   String columnArray[];
                   columnArray = queryDataSet.getColumnNames(columnCount);
                   for(queryDataSet.first(); queryDataSet.inBounds(); queryDataSet.next()) {
                        Node rNode = nodeDescriptions.createNodeInstance(childClassName);
                        // Abfrageergebnissen in eine Attributliste übertragen
                        for (int i=0; i<columnCount; i++) {
                        nodeVector.add(rNode);
                   queryCount++;
              return nodeVector;
         public ppif.mapping.NodeDescriptions getNodeDescriptions() {
              return nodeDescriptions;
         public void setNodeDescriptions(ppif.mapping.NodeDescriptions nodeDescriptions)
              this.nodeDescriptions = nodeDescriptions;
    "Sree Bodapati" <[email protected]> wrote:
    hi Thomas,
    please post more detail on what your code is doing. if possible a code
    snippet/error messages/thread dump
    sree
    "Thomas Eberhard" <[email protected]> wrote in message
    news:[email protected]...
    Hi!
    I have a big performance-problem using wl6.1, jdbc and oracle.
    My Server is sending a Vector with NodeBeans via JDBC to a OracleDB.
    The
    answer
    comes immediately with the timeout.
    Why is the EJB waiting for the timeout?
    Is it a problem of configuration?
    Thanks
    Thomas

  • Connection to CRX via RMI and getting WeakReference value..... with an exception!

    Hi there,
    I have the following problem.
    I opened a ticket in Day Care Support system, about CRX users/group membership that got lost while synchronization with our LDAP server.
    Although when the user and the group had been created (and therefore taken from that same LDAP server), the membership was good.... but after some time the membership got lost......
    So what i am trying to do now is a Java program that connects to CRX via RMI.
    And gets the list of all the users from a group (aka membership).
    The idea is to monitor the membership each seconds.
    But when trying to get the property "rep:members" of the group, I have the following exception :
    javax.jcr.ValueFormatException: Unknown value type 10
              at org.apache.jackrabbit.rmi.server.ServerObject.getRepositoryException(ServerObject.java:13 9)
              at org.apache.jackrabbit.rmi.server.ServerProperty.getValues(ServerProperty.java:71)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
              at java.lang.reflect.Method.invoke(Method.java:611)
              at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)"
    I searched a little bit and found that "10" is the number for type WeakReference.
    That's normal to me because memberships are stored in the group as a list reference to users linked to that group....
    Anyways, what's not normal to me is that when the type is "10" the API does not let me get the Value (cf. ServerProperty.getValues() method)
    Here is the program:
    import java.util.HashMap;
    import java.util.Iterator;
    import java.util.Map;
    import javax.imageio.spi.ServiceRegistry;
    import javax.jcr.Node;
    import javax.jcr.NodeIterator;
    import javax.jcr.Property;
    import javax.jcr.PropertyIterator;
    import javax.jcr.Repository;
    import javax.jcr.RepositoryException;
    import javax.jcr.RepositoryFactory;
    import javax.jcr.Session;
    import javax.jcr.SimpleCredentials;
    import javax.jcr.Value;
    public class Test {
              public static void main(String[] args) {
                        String uri = "rmi://sma11c02.............:1234/crx";
                        String username = "admin";
                        char[] password = {....................};
                        String workspace = "crx.default";
                        String nodePath = "/home/groups/a";
                        Repository repository = null;
                        Session session = null;
                        try {
                                  // Connection to repository via RMI
                                            Map<String, String> jcrParameters = new HashMap<String, String>();
                                            jcrParameters.put("org.apache.jackrabbit.repository.uri", uri);
                                            Iterator<RepositoryFactory> iterator = ServiceRegistry.lookupProviders(RepositoryFactory.class);
                                            while (null == repository && iterator.hasNext()) {
                                                      repository = iterator.next().getRepository(jcrParameters);
                                  if (repository == null) {
                                            throw new IllegalStateException("Problem with connection to the repository...");
                                  // Creation of a session to the workspace
                                  session = repository.login(new SimpleCredentials(username, password), workspace);
                                  if (session == null) {
                                            throw new IllegalStateException("Problem with creation of session to the workspace...");
                                  // Get the targetted node
                                  Node node = session.getNode(nodePath);
                                  System.out.println("Node : " + node.getName());
                                  System.out.println();
                                  PropertyIterator properties = node.getProperties();
                                  System.out.println("List of properties for this node :");
                                  while (properties.hasNext()) {
                                            Property property = properties.nextProperty();
                                            System.out.print("\t"+property.getName() + " : ");
                                            if (property.isMultiple()) {
                                                      Value[] values = property.getValues();
                                                      for (int i = 0; i < values.length; i++) {
                                                                System.out.print(values[i]);
                                                                if (i+1 != values.length) {
                                                                          System.out.print(", ");
                                                      System.out.println();
                                            } else {
                                                      Value value = property.getValue();
                                                      System.out.println(value);
                                  System.out.println();
                                  NodeIterator kids = node.getNodes();
                                  System.out.println("List of children nodes for this node :");
                                  while (kids.hasNext()) {
                                            Node kid = kids.nextNode();
                                            System.out.println("\tChild node : "+kid.getName());
                                            PropertyIterator kidProperties = kid.getProperties();
                                            System.out.println("List of properties for this child :");
                                            while (kidProperties.hasNext()) {
                                                      Property property = kidProperties.nextProperty();
                                                      System.out.print("\t"+property.getName() + " : ");
                                                      if (property.isMultiple()) {
                                                                Value[] values = property.getValues();
                                                                for (int i = 0; i < values.length; i++) {
                                                                          System.out.print(values[i]);
                                                                          if (i+1 != values.length) {
                                                                                    System.out.print(", ");
                                                                System.out.println();
                                                      } else {
                                                                Value value = property.getValue();
                                                                System.out.println(value);
                                            System.out.println();
                        } catch (RepositoryException e) {
                                  e.printStackTrace();
                        } finally {
                                  if (session != null) {
                                            session.logout();
    Here is the output of the below program:
    Node : a
    List of properties for this node :
              jcr:createdBy : admin
              jcr:mixinTypes : mix:lockable
              jcr:created : 2011-10-25T16:58:48.140+02:00
              jcr:primaryType : rep:AuthorizableFolder
    List of children nodes for this node :
              Child node : administrators
    List of properties for this child :
              jcr:createdBy : admin
              rep:principalName : administrators
              rep:members : javax.jcr.ValueFormatException: Unknown value type 10
              at org.apache.jackrabbit.rmi.server.ServerObject.getRepositoryException(ServerObject.java:13 9)
              at org.apache.jackrabbit.rmi.server.ServerProperty.getValues(ServerProperty.java:71)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
              at java.lang.reflect.Method.invoke(Method.java:611)
              at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)
              at sun.rmi.transport.Transport$1.run(Transport.java:171)
              at java.security.AccessController.doPrivileged(AccessController.java:284)
              at sun.rmi.transport.Transport.serviceCall(Transport.java:167)
              at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:547)
              at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:802)
              at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:661)
              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919)
              at java.lang.Thread.run(Thread.java:736)
              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 org.apache.jackrabbit.rmi.server.ServerProperty_Stub.getValues(Unknown Source)
              at org.apache.jackrabbit.rmi.client.ClientProperty.getValues(ClientProperty.java:173)
              at Test.main(Test.java:96)
    Here is the list of jar files i'm using with this program:
              2862818581          61388           crx-rmi-2.2.0.jar
              732434195           335603           jackrabbit-jcr-commons-2.4.0.jar
              1107929681           411330           jackrabbit-jcr-rmi-2.4.0.jar
              3096295771           69246           jcr-2.0.jar
              1206850944           367444           log4j-1.2.14.jar
              685167282           25962           slf4j-api-1.6.4.jar
              2025068856           9748           slf4j-log4j12-1.6.4.jar
    Finally, we are using CQ 5.4 (CRX 2.2) with the latest hotfix and under Websphere 7.0
    Best regards,
    Vincent FINET

    Je suis absent(e) du bureau jusqu'au 17/04/2012
    Je suis absent.
    Je répondrai à votre sollicitation à mon retour le 17 avril 2012.
    Cordialement,
    Vincent FINET
    Remarque : ceci est une réponse automatique à votre message  "[CQ5]
    Connection to CRX via RMI and getting WeakReference value..... with an
    exception!" envoyé le 13/4/12 0:32:14.
    C'est la seule notification que vous recevrez pendant l'absence de cette
    personne.
    Le papier est un bien precieux, ne le gaspillez pas. N'imprimez ce document que si vous en avez vraiment besoin !
    Ce message est confidentiel.
    Sous reserve de tout accord conclu par ecrit entre vous et La Banque Postale, son contenu ne represente en aucun cas un engagement de la part de La Banque Postale.
    Toute publication, utilisation ou diffusion, meme partielle, doit etre autorisee prealablement.
    Si vous n'etes pas destinataire de ce message, merci d'en avertir immediatement l'expediteur.

  • RMI and Swing Events

    Hi,
    I have a problem, integrating an application with RMI and a Client side with swing.
    I have un RMI object that does something, and in any time I want to inform to the client side rmi... I did something like:
    // This is the REmote implementation
    public MyRemoteImpl extends Activatable implements MyRemote{
      EventListenerList listeners;
    // code for activation, etc.......
      public void addListener(MyListener l){
        // add the listener in the list...
      public void fireEvent(String msgEvent){
        // in each listener that is MyListener, .doEvent(String msg)
      // Methods that calls fireEvent...
    // Mylistener interface..
    public MyListener implements EventListener{
      public void doEvent(String msg);
    // The swing client side.
    public MyClient extends JPanel implements MyListener{
      MyRemote rem=null;
      // In the start of ui.. Ido:
      rem.addListener(this);
      public void doEvent(String msg){
        // Puts the message at one component....
    }The problem is that when the doEvent of the Swing side is called, it is executing in the rmid... And the UI is not updated...
    What I do wrong??
    Thanks and Best Regards.

    I wrote an application that does something similar, it receives some event and modifies a JTree accordingly. You should try using the java.awt.EventQueue.invokeLater(Runnable) method. Something like this:
    public void doEvent(String msg) {
        // Determine what changes need to be made
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                // Only the GUI component modification calls need to go here
    }

  • RMIC compiling the server to get the stub and skelton problem

    i have this problem
    i'm new to RMI
    and i tried to simulate the same interfaces and class in the RMI java tutorial and when i tried to use rmic to create the stub and skeleton i didnt get any thing
    my RMI server application is called
    c:\samplestep\ServerAPP\ServerEngine.java
    and i complied this java file with
    c:\samplestep\ServerAPP>javac ServerEngine.java and it works well
    i have d:\jdk1.3
    and i have D:\ORANT\jdev(which is Oracle JDeveloper IDE)
    my classpath system variable (windows 2000 professional)
    Looks like this
    D:\jdk1.3\bin;D:\jdk1.3\jre\lib\rt.jar; some other paths;
    c:\samplestep\ServerAPP;
    D:\ORANT\jdk\bin;D:\ORANT\jdk\jre\lib\rt.jar
    and at the command line prompt i wrote
    c:\samplestep\ServerAPP>rmic -d c:\samplestep\ServerAPP -classpath c:\samplestep\ServerAPP\ServerEngine
    and the result was the help associated to the rmic command
    and no stub or skelton class are generated
    could any one help me please(required urgently)
    my email is [email protected]

    Hi Batal,
    Did you follow all the steps required to create a RMIServer and RMI Client.
    Step1: Define an interface(IRMIInterface) that extends Remote
    Step2 : Define a class(RMIServer) that implements extends UnicastRemovetObject and extends IRMIInterface
    Step3 : Compile the IRMIInterface.
    Step4: Compile the RMIServer.
    Step5: Try RMI compile.
    If you have tried all these, just verify whether the class files are there, before you do rmi compile.
    You could have got some errors while compiling, why cant you post them
    LathaDhamo

  • Standard Java RMI and WLS5.1?

     

    I would surmise that the problem you are seeing is the result of the fact
    that we do not except standard Java RMI calls using the functionality in the
    JDK. You must use the WebLogic implementation of RMI. It is exactly the
    same in terms of APIs, but we have gone through and optimize the underlying
    protocol.
    Please see the documentation for more details.
    We offer both RMI over IIOP and RMI over T3.
    Thanks,
    Michael
    Michael Girdley
    Product Manager, WebLogic Server & Express
    BEA Systems Inc
    Mario Felarca <[email protected]> wrote in message
    news:[email protected]..
    Hello,
    I was trying to get a simple callback demo working using standard java
    RMI and the WLS5.1. Unfortunately, although things seemed to compile
    and launch smoothly, when the client started up and tried to talk to the
    WLS I would get the following error:
    weblogic.rmi.server.ExportException: A description for CallbackImpl was
    found but it could not be read due to: [Failed to find a stub for [class
    CallbackImpl] implements at least one interface [interface Callback]
    which extends Remote.]
    weblogic.rmi.StubNotFoundException: Failed to find a stub for [class
    CallbackImpl] implements at least one interface [interface Callback]
    which extends Remote.
    I tried determining if this was a classpath problem, but all my efforts
    kept producing this result.
    On the flip side, if I retool my objects slightly in order to make them
    use weblogic.rmi.*, then everything works perfectly.
    Is there a tradeoff to using weblogic.rmi over java.rmi?
    Also, does anyone have any ideas as to what might be causing my error
    when using standard rmi?
    Thanks so much in advance,
    Mario-

  • RMI and concurrency (newbie)

    Hi
    I have a simple question related to RMI and concurrency.
    I have a server and several clients calling remote objects concurrently.
    How is concurrency usually handled when one used RMI ?
    Can we make use of "synchronized" on some method of the remote objects ?
    I have read about risk related to performance and worse, some problems of deadlock if the synchronize is not well organized.
    Is there other ways to deal with that ?
    Thanks in advance for providinge me any information or suggestion.

    RMI is inherently multithreaded. If you have specific remote resources that you want protected from concurrency, then define all of the accessor methods to be synchronized. (I don't think you can get away with making the remote methods synchronized; I would instead figure out what which resources I want to protect, and only protect those particular objects.)
    Could there be problems? Maybe. But these are absolutely standard coding techniques.

  • Rmi and wireless

    Hello!
    I'm using the RMIAdapter sample of Oracle to check the basic mechanism of rmi and wireless.
    Does anybody now, if there are some known problems with wireless regarding this subject?
    I have written both: the adapter and the client code. So far so good. But when I try to point a masterservice
    to this adapter, there are some strange results:
    If I define the RMI Service URL in this way: rmi://localhost:port, ASW accepts the input, but using the
    service returns an IllegalArgumentException in the logfile.
    If I define the RMI Service URL with its ServiceName (= rmi://localhost:port/ServiceName, ASW doesn't accept
    the input.
    So my question is: where's the error? As far as I know, a "correct" RMI URL consists of the following parts:
    rmi://<hostname>[:<port>]/servicename. It would be the second above-mentioned trial.
    Why does ASW rejects this kind of RMI Service URL?
    So it would be great, if someone could help me out with the RMI magic of ASW.
    Thanks a lot in advance,
    Heike Skok

    Hello Heike,
    Here are the values for the RMIAdapter Init Parameters:
    RMI Server URL: rmi://localhost:2099/Sample
    Remote interface: oracle.panama.adapter.rmi.SampleInterface
    (assuming that you didn't make any changes in the sample source code).
    Here are some steps that the documentation does not describe in details (assuming that developers are familiar with RMI).
    1. I copied SampleInterface.class and SampleImpl.class in $ORACLE_HOME/wireless/server/classes/oracle/panama/adapter/rmi directory
    2. I ran
    rmic -d . oracle.panama.adapter.rmi.SampleImpl
    from $ORACLE_HOME/wireless/server/classes directory to generate SampleImpl_Stub.class and SampleImpl_Skel.class
    3. I ran
    java oracle.panama.adapter.rmi.SampleImpl
    from $ORACLE_HOME/wireless/server/classes directory to start my RMI server.
    You have to start the remote RMI server first before you can create the MasterService. The RMIAdapter will connect to the remote RMI server during initialization. The remote RMI server will print out
    "Sample bound in registry" if started correctly.
    If you have problems with the RMI registry then you may have to change JAVA_HOME\jre\lib\security\java.policy file and add the following:
    grant {
    permission java.net.SocketPermission "*:1024-65535",
    "connect,accept";
    permission java.net.SocketPermission "*:80", "connect";
    After doing all that I was able to successfully run RMIAdapter based services.
    Thanks,
    Hristo Tonev

  • RT 6.03 and ActiveX problem

    If a have installed RT 6.03 the ActiveX does not work (I select activeX
    in a container but I dont see anything on it). If remove RT the ActiveX work
    fine.
    I need solution.
    Thanks.

    I have install the DAQ 6.9.1 SP2 and my problem fixed.
    Thanks.
    "Lab Viewer" wrote in message
    news:506500000005000000BD6A0000-1016899309000@exch​ange.ni.com...
    > As RT FAQ states (
    > href="http://amp.ni.com/niwc/labviewrt/lvrt_faq.js​p?node=2381#8">What
    > are the programming differe...
    ), ActiveX is not supported (being a Windows-specific
    > functionality).
    >
    > Hope this helps

  • WRVS4400N and WPC4400N Problems

    This is part rant and part problem report.I don't know who's listening, maybe someone who knows more than I do.
    Let me preface this by telling you I am a reseller of Linksys products and a Linksys Partner. I have had pretty good experience with the products. I am currently installing several of their products a week. I've been doing IT support for over 12 years. I have configured a lot of routers.
    So I think why not treat myself to a top of the line router and test out 802.11N at the same time.
    Here is the setup:
    Dell D520 with fresh reload of WinXP SP2
    Linksys WRV4400N
    Linksys WPC4400N
    First problem was I installed the card with the CDROM it shipped with. Big mistake. The driver and utility would not connect when WPA was configured. Ok my mistake, always download the latest drivers.
    Second problem was my HP2600n that is connected to the router was unable to get print jobs. It was connected on the LAN, could ping but print jobs would fail, more on this later.
    Third problem is that my wife could no longer get connected to her corporate VPN over this router. They use a Cisco VPN solution. Yes, VPN passthrough is enabled. Hey it  worked fine on my WRT54G! She has a dell D630 with an Intel Pro 2200 WLAN card. It worked PERFECT with the WRT54G.
    Fourth problem is the wireless connection would periodically disconnect.
    Fifth problem is that I pulled the WRVS4400N and reinstalled the WRT54G and now the Linksys WPC4400N has a fluctuating signal level. The router is in the next room and with my build in Dell WLAN card the signal stays strong.
    Yes, I upgraded the firmware on the router to the latest version.
    IN regard to problem number two, it turns out the WRVS4400N uses 192.168.1.3 for the WLAN interface. That was the same IP I had on my printer. OK, now you all know that you need to resever 192.168.1.3 on your LAN if you use a WRVS4400N
    IN regard to number three, no amount of tinkering allowed the Cisco VPN client to connect. I changed MTU size, turned off the firewall, added port triggers, you name it. Nothing worked but replacing the router. Now this is just supposed to work. I should not need to be a network engineer to make a WRVS4400N work. VPN's are supposed to pass through!!!
    In regard to number 4, periodic dropping of Wireless, connection, I tried going to channel 1, even removing wireless security. Nothing seems to work except revert to the Dell WLAN card. This issue was seen on the WRVS4400N and the WRT54G. Acutally worse on the WRT54G and WPC4400N combination. I also noticed my Dell card was picking up about 10 WLAN's in my neighbor hood and the Linkys only 2.
    So there is a special support phone number for partners. I waited for 55 minutes on hold and did not get an answer.
    One Disapointed Linksys Reseller

    ---- quote "cmartell" ----
    Fourth problem is the wireless connection would periodically disconnect.
    In regard to number 4, periodic dropping of Wireless, connection, I tried going to channel 1, even removing wireless security.
    ---- end quote ----
    I have a WPC4400N PCMCIA card, and I am having this same exact problem too. I am using drivers 1.0.2.5, which also carries the designation of "Lite" - what the heck is up with "Lite" anyway? I want the full blown drivers!
    Anyway, I can't seem to stay connected for too long, even though my router (ALSO a Linksys product, a WRT350N, with updated Linksys firmware 1.03.7) is only 4 feet away, if that.
    My wireless card (the WPC4400N) keeps dropping connection, even if the router is right next to it! And of course, when I had my wireless router all the way across my apartment (roughly 20 feet) it would keep doing the same thing too, kept disconnecting periodically! Any kind of adjustment to driver parameters in my network card settings would just simply not help it at all, and I don't know what the problem is!
    Can anyone please help?
    My brother is a CISCO C.C.I.E. (Linksys is owned by Cisco), and I have yet to ask his help, but somehow I doubt even he could help me with this one.
    I should not have to change my channel #, nor my security method, in order to keep a connection, especially when it has problems while the PCMCIA network card is being only 3-4 feet away from the router!!

  • Help Please!!!!!  RMI and Threads

    My server has 10 threads doing constant polling of network equipment through use of SNMP. I have a servlet that connects to my server and retrieves collected information by using RMI and displays it in the browser window. Browser refreshes the information very often. So, there is a constant flow of RMI traffic between the server and the servlet.
    Here is the problem:
    There are times when my server stops responding to RMI requests issued by the servlet. All 10 threads that are doing SNMP polling stop being scheduled by the JVM. They block! This picular situation occurs with the server only during RMI requests coming from servlet. It doesn't always happen though. Also, I've noticed that if RMI load is high this problem emerges again.
    I get no RMI exceptions.
    I am using Apache and Jserv.
    All of my attempts to understand and fix the problem have been futile so far. Could a heavy RMI load between my server and servlet be causing my threads to block? Should I decrease my RMI traffic?

    You have the same problem I had. You need to set the timeout .. so once the timeout is exceeded, an exception is thrown. You need to create a custom RMISocketFactory ... trust me, its easier than it sounds ..check the answers to my post at:
    http://forums.java.sun.com/thread.jsp?forum=58&thread=167287
    hope that helps.

  • Serialization problem with FlashPlayer 10.1

    Hi,
    here is a message that I have post in the AS3 section (http://forums.adobe.com/message/2938096), but someone gave the hint that this section should be more appropriate.
    A call in remote method, using amf/BlazeDS, is failing for the following reason :
    "The expected argument types are  (int, myPackage.MyClassVO[])  but the supplied types were (java.lang.Double, java.lang.Object[]) and converted to (java.lang.Integer, null).
    Cannot convert typeflex.messaging.io.amf.ASObject with remote type specified as 'null' toan instance of class myPackage.MyClassVO"
    So the serialization is failing.
    MyClassVO have only int variables, so nothing fancy.
    The point is that it works perfectly with previous versions of Flash, except 10.1
    So the definitions of the VOs are not the problem.
    Does any change have been done in the new flash player, with the serialization ? Does someone have also experience serialization problems with this new flash player ?
    Thanks for any help.
    M.
    Environment : Windows 32bits (but happens on Mac OS as well)
    Flash version : WIN 10,1,53,64
    Browser : Firefox, Opera, IE... they all have the problem

    Hi,
    by digging more and more, it appears that the problem is really on flash side.
    This error appears on java side :
    "Cannot convert type flex.messaging.io.amf.ASObject with remote type specified as 'null' to an instance of class myPackage.MyClassVO
    flex.messaging.io.amf.translator.decoder.DecoderFactory.invalidType(DecoderFact ory.java:369)"
    So after a look on the function invalidType in DecoderFactory, it apprears that
    object.getClass().getName();
    returns "flex.messaging.io.amf.ASObject" instead of "myPackage.MyClassVO"
    So Java don't recieve the correct type MyClassVO, but ASObject.
    And that only in FlashPlayer 10.1, but not FlashPayer 9 or FlashPlayer 10, where Java recieve the correct type, MyClassVO.
    Any help will be gladly appreciated, I'm running out of idea !
    Thanks !
    M.

  • Comparable and Serializable interfaces

    Hi All,
    I have developed a program in java which implements Comparable and Serializable Interfaces. After, I decided to run the program in J2ME. But later on, I found that MIDP doesn't implement these interfaces.
    Some one can help me how to implement my own interfaces.
    Thank you

    Hi Supareno
    I need urgently your help.
    I developed Java program which works as predicitive text system for my mother tongue.I would like to move from Java to J2ME. But until now I have problems. please can u help me. the following code run in command line.
    I tried to develop my own interfaces as you told me but it doesn't work.
    Help me also for reading and writing text files.
    Thank you
    import java.util.*;
    import java.io.*;
    import java.util.Vector;
    import java.util.Enumeration;
    public class PredText {
    private Vector dict;
    public static final String dictionaryFile = "C:/java/words.txt";
    // convert a string to the corresponding signature
    public static String toNumeric (String word) {
    String lowerWord = word.toLowerCase();
    StringBuffer result = new StringBuffer("");
    for (int i = 0; i < lowerWord.length(); i++) {
    char c = lowerWord.charAt(i);
    if ("abc".indexOf(c) > -1) result.append("2");
    else if ("def".indexOf(c) > -1) result.append("3");
    else if ("ghi".indexOf(c) > -1) result.append("4");
    else if ("jkl".indexOf(c) > -1) result.append("5");
    else if ("mno".indexOf(c) > -1) result.append("6");
    else if ("pqrs".indexOf(c) > -1) result.append("7");
    else if ("tuv".indexOf(c) > -1) result.append("8");
    else if ("wxyz".indexOf(c) > -1) result.append("9");
    else if (" ".indexOf(c) > -1) result.append("9");
    else result.append("?");
    return result.toString();
    // find all the words corresponding to a signature
    public Vector findMatches(String sig) {
    WordSig ws = new WordSig(sig, "");
    WordSig newws;
    Vector results = new Vector();
    int index;
    index = Collections.binarySearch(dict, ws);
    if (index < 0){
    // no matches! :(
    // try to get the string that starts with a substring like ours.
    index=-1-index;
    if (((WordSig)dict.get(index)).getSig().startsWith(sig)) {
    // no word found. we return those starting with the
    // same signature
    newws = (WordSig) dict.get(index);
    results.addElement(newws.getWord().substring(0,sig.length()));
    return results;
    } else{
    //no match
    return results;
    } else {
    // go back to the first match
    while(((WordSig)dict.get(index)).getSig().equals(sig) && index>0)
    index--;
    if (index != 0)
    index++;
    while ((newws = (WordSig) dict.get(index)).equals(ws)){
    results.addElement( newws.getWord() );
    index++;
    return results;
    // intialises the dictionary
    public PredText () {
         String word;
    String sig;
    Vector dict = null;
    // first try to load dict.dat
    try {
    System.out.print("Trying to load dict.dat...");
    FileInputStream fileStream = new FileInputStream("C:/java/dict.dat");
    ObjectInputStream objectStream = new ObjectInputStream(fileStream);
    dict = (Vector) objectStream.readObject();
    fileStream.close();
    System.out.println(" done.");
    }catch (ClassNotFoundException classNotFoundException) {
         System.out.println("Unable to create an object");     
    catch (IOException e) {
    // exception: create the dictionary
    System.out.println("Error. I'm going to recreate the dictionary file");
    try {
    dict = createDict();
    catch (IOException ioe) {
    System.err.println("Error while creating dictionary file. Exiting." + e);
    System.exit(1);
    this.dict = dict;
    // create the dictionary serialised file
    public Vector createDict () throws IOException {
    String word;
    Vector dict = new Vector();
    //open the dictionary file
    System.out.print("Reading the dictionary... ");
    BufferedReader dictFile = new BufferedReader(
    new FileReader(dictionaryFile));
    //insert each word into the data structure
    while ((word = dictFile.readLine()) != null) {
    word = word.toLowerCase();
    dict.addElement(new WordSig(toNumeric(word), word));
    // List list = dict.subList(0, dict.size());
    List list = dict.subList(0, dict.size());
    Collections.sort(list);
    System.out.println("done.");
    System.out.print("Writing the dictionary... ");
    FileOutputStream fileStream = new FileOutputStream("C:/java/dict.dat");
    ObjectOutputStream objectStream = new ObjectOutputStream(fileStream);
    objectStream.writeObject(dict);
    objectStream.flush();
    fileStream.close();
    System.out.println("done.");
    return dict;
    public static void main (String args[]) {
         PredText pt = new PredText();
    if (args.length == 0) {
    // no arguments, find the largest clash
         Vector result;
         Enumeration e = pt.dict.elements();
    String currentSig = "";
    String prevSig = "";
    int clash = 0;
    int maxClash = 0;
    String clashSig = "";
    while (e.hasMoreElements()) {
    WordSig ws = (WordSig) e.nextElement();
    currentSig = ws.getSig();
    if (currentSig.equals(prevSig)) {
    // another word with the same signature
    clash ++;
    } else {
    // new signature: check if the previous one led
    // to a maximal clash
    if (clash > maxClash) {
    clashSig = prevSig;
    maxClash = clash;
    clash = 1;
    prevSig = currentSig;
    result = pt.findMatches(clashSig);
    System.out.println("The signature leading to most clashes is "
    + clashSig + " with " + result.size() +
    " number of clashes");
    for (int j = 0; j < result.size(); j++) {
    System.out.println((String)result.get(j));
    } else if ("0123456789".indexOf(args[0].charAt(0)) > -1){
    // numeric input: find the matches for the argument
    Vector result;
    result = pt.findMatches(args[0]);
    for (int j = 0; j < result.size(); j++) {
    System.out.println((String)result.get(j));
    } else {
    // convert each word to the corresponding signature
    for (int i = 0; i < args.length; i++) {
    System.out.print(toNumeric(args) + " ");
    class WordSig implements Comparable, Serializable {
    String word;
    String sig;
    public WordSig (String sig, String word) {
    this.sig = sig;
    this.word = word;
    public String getSig () {
    return this.sig;
    public String getWord() {
    return this.word;
    public int compareTo (Object ws) {
    return sig.compareTo(((WordSig) ws).getSig());
    public boolean equals (Object ws) {
    return sig.equals(((WordSig) ws).getSig());
    public String toString () {
    return sig + ", " + word;

Maybe you are looking for

  • Where are the Boot Camp Drivers?

    Running Boot Camp 3.0.4 and it gets to the part about drivers. Download drivers doesn't work and the drivers don't seem to be anywhere on my original Snow Leopard install discs. Anybody have a clue how to proceed from here?

  • Error: Could not resolve s:SolidColor to a component implementation

    So I have a library project and in that project I have a CustomDataGridBackgroundSkin file which is as follows: <?xml version="1.0" encoding="utf-8"?> <s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009"              xmlns:s="library://ns.adobe.com/

  • Photogallery jQuery plugin doesn't show thumbnails

    I have built 2 sites using Adobe Business Catalyst. Both use the built in photogallery which is a jQuery plugin. The first is HTML4. The second is HTML5. The HTML4 site runs perfectly on all iOS devices. The HTML5 site, doesn't show the thumbnails. O

  • Photos not syncing in order

    The photos I want loaded to my ipod are not syncing in the same order they are in the file on my computer. I have tried renaming them in the order I want them and as far as I can tell they aren't loading based on file size, or the date they were crea

  • IPhoto 6 - Imports by Roll!  WHY!!!

    So, after being very excited about getting iLife 6 and doing the upgrade, I'm dismayed to find that some nut at Apple thought importing by roll would make things better in some way. Yes we can use iPhoto to edit, but I don't, I use Photoshop and now