Trouble in storing and retrieving RMI object in Weblogic 7 JNDI tree.

I have created a simple server (BankImpl), implementing a RMI interface
called Bank. A stub class (BankImpl_Stub.class) is generated from BankImpl
class using
"rmic -v1.2". Then I bind an instance of the BankImpl class to the JNDI tree
in Weblogic
server 7 under the name of "PeopleBank".
After the binding, I can see the stub class in the JNDI tree, but with a
different name: BankImpl_WLStub.class). when a
client program is trying to lookup the stub associated with "PeopleBank", it
failed with a puzzling message:
java.io.NotSerializableException: BankImpl_WLStub
Why a stub of a RMI object is not serializable? Does Weblogic needs a
different rmic to generate RMI stubs?
Thanks,
Lian

I have created a simple server (BankImpl), implementing a RMI interface
called Bank. A stub class (BankImpl_Stub.class) is generated from BankImpl
class using
"rmic -v1.2". Then I bind an instance of the BankImpl class to the JNDI tree
in Weblogic
server 7 under the name of "PeopleBank".
After the binding, I can see the stub class in the JNDI tree, but with a
different name: BankImpl_WLStub.class). when a
client program is trying to lookup the stub associated with "PeopleBank", it
failed with a puzzling message:
java.io.NotSerializableException: BankImpl_WLStub
Why a stub of a RMI object is not serializable? Does Weblogic needs a
different rmic to generate RMI stubs?
Thanks,
Lian

Similar Messages

  • Regular RMI server object with WebLogic JNDI

    Is that possible to register a regular RMI object with WebLogic JNDI
    tree? I was building a simple program (using javac and rmic only) based
    on the java.rmi.* (without changing the import statements to
    weblogic.rmi.*) and using the weblogic.jndi to register the server
    object. Below is some piece of code,
    Context ctx = null;
    Hashtable ht = new Hashtable();
    ht.put(Context.INITIAL_CONTEXT_FACTORY,
    "weblogic.jndi.WLInitialContextFactory");
    ht.put(Context.PROVIDER_URL, "t3://172.20.20.20:7001");
    ctx = new InitialContext(ht);
    ctx.bind("HelloServer", obj);
    The code failed for the following reason,
    javax.naming.NamingException. Root exception is
    java.rmi.MarshalException: failed to marshal public abstract void
    weblogic.jndi.internal.NamingNode.bind(java.lang.String,java.lang.Object,java.util.Hashtable)
    throws javax.naming.NamingException,java.rmi.RemoteException; nested
    exception is:
    java.rmi.server.ExportException: A description for
    examples.rmi.hello.HelloImpl was found but it could not be read due to:
    [Failed to find examples.rmi.hello.HelloImpl_WLStub or
    examples.rmi.hello.Hello_WLStub for class examples.rmi.hello.HelloImpl]
    java.rmi.StubNotFoundException: Failed to find
    examples.rmi.hello.HelloImpl_WLStub or examples.rmi.hello.Hello_WLStub
    for class examples.rmi.hello.HelloImpl
    at
    weblogic.rmi.internal.BasicDescriptor.<init>(BasicDescriptor.java:101)
    at
    weblogic.rmi.internal.BasicRuntimeDescriptor.<init>(BasicRuntimeDescriptor.java:50)
    at
    weblogic.rmi.internal.DescriptorManager.resolveClass(DescriptorManager.java:55)
    at
    weblogic.rmi.internal.DescriptorManager.getDescriptor(DescriptorManager.java:39)
    at
    weblogic.rmi.internal.DescriptorManager.getDescriptor(DescriptorManager.java:30)
    at
    weblogic.rmi.internal.OIDManager.getRequestDispatcher(OIDManager.java:281)
    at
    weblogic.rmi.internal.OIDManager.getReplacement(OIDManager.java:270)
    at
    weblogic.rmi.internal.OIDManager.replaceObject(OIDManager.java:98)
    at
    weblogic.common.internal.ChunkedObjectOutputStream.replaceObject(ChunkedObjectOutputStream.java:55)
    at
    weblogic.common.internal.ChunkedObjectOutputStream$NestedObjectOutputStream.replaceObject(ChunkedObjectOutputStream.java:239)
    Any idea?
    - SteveC

    "Pyung Yoon" <[email protected]> writes:
    MediatorInterface mediator = (MediatorInterface) java.rmi.Naming.lookup("rmi://localhost:7001/TestMediator);This implies JRMP which the server does not support. You need to use t3 or iiop.
    andy

  • Registering standalone RMI server in WebLogic JNDI

    Hi,
    I need to register a standalone RMI server in WebLogic JNDI. I'm sure I've done this before, but now I'm having problems!
    I have a standalone program which creates a remote object (implements Remote and extends UnicastRemoteObject). I am compiling my stubs with the Sun rmic compiler. I then create a JNDI InitialContext using wlclient.jar and a t3 url, and attempt to bind my remote object. It fails with the following exception:
    javax.naming.NamingException: Unhandled exception in rebind() [Root exception is org.omg.CORBA.MARSHAL:   vmcid: 0x0  minor code
    : 0  completed: No]I am using WLS 8.1sp4 and Sun JDK 1.4.2_05 (as shipped with WLS).
    If I use the RMI registry (Naming.bind(), etc.) it works fine.
    Thanks
    Dan.

    Danny Yates <> writes:
    You should use PortableRemoteObject and generate iiop ties for your
    impl. wlclient.jar runs on top of iiop.
    andy
    Hi,
    I need to register a standalone RMI server in WebLogic JNDI. I'm sure I've done this before, but now I'm having problems!
    I have a standalone program which creates a remote object (implements Remote and extends UnicastRemoteObject). I am compiling my stubs with the Sun rmic compiler. I then create a JNDI InitialContext using wlclient.jar and a t3 url, and attempt to bind my remote object. It fails with the following exception:
    javax.naming.NamingException: Unhandled exception in rebind() [Root exception is org.omg.CORBA.MARSHAL:   vmcid: 0x0  minor code
    : 0  completed: No]I am using WLS 8.1sp4 and Sun JDK 1.4.2_05 (as shipped with WLS).
    If I use the RMI registry (Naming.bind(), etc.) it works fine.
    Thanks
    Dan.

  • Binding huge object to the jndi tree.

    Hi we are loading all the master tables in to objects at the app server startup (SUN ONE 7) and then binding the whole object to the jndi tree. All the tables data in text files comes to about 5 MB and the serilized object with data to about 8 MB. But when the app server tries to bind the object the app server process consumes over 500MB of ram and gives OutOfmemoryError as the total ram is 512MB. why is it consuming so much memory. It does bind an object of about 5 MB but when trying to lookup subsequent to the first lookup it fails. Is this a bug or what??? the same thing works perfectly with Weblogic and Websphere and also Weblogic is very efficient in memory consumption and response time is amazing. For a 5 MB object the lookup takes about 5Secs in Weblogic and about 15Mins in Sun One. We might have to drop the Sun One App Srv and go for Weblogic though we dont want. This same thing is working with about 4MB object in Sun One but takes about 45 Mins to 1 Hour to finish the serialization etc for jndi .Kindly provide some guidance.Thanks in advance.

    True. At the end I configured the value as a "server property". The cool thing about configuring the jndi tree is that it is replicated in a cluster.
    Obviously the values that I inserted affected all the applications, like the url of our SOA server.

  • How to add a custom jndi object into weblogic jndi context.

    Hi,
    I noticed that there is a standard way of adding jndi entry in the weblogic jndi context. One is through the console by specifying the jndi name (e.g DataSource) and this is added in config.xml and in its appropriate "jdbc/xxx-jdbc.xml". The question now is, I have an object which I would like to be included in the global weblogic jndi context.
    <entry key="java:comp/env/jms/wsnotificationCF">
    <bean class="org.apache.activemq.ActiveMQConnectionFactory">
    <property name="brokerURL" value="tcp://localhost:61616"/>
    </bean>
    </entry>
    or
    <entry key="java:comp/env/obj/UUID_CLASS_KEY" value="org.apache.servicemix.bpe.uuid.ActiveMQUUIDService"/>
    This is just a sample of a possible entry. Is there then a way I could add this object in weblogic jndi context ?
    Regards,
    Fritz

    Hi,
    I noticed that there is a standard way of adding jndi entry in the weblogic jndi context. One is through the console by specifying the jndi name (e.g DataSource) and this is added in config.xml and in its appropriate "jdbc/xxx-jdbc.xml". The question now is, I have an object which I would like to be included in the global weblogic jndi context.
    <entry key="java:comp/env/jms/wsnotificationCF">
    <bean class="org.apache.activemq.ActiveMQConnectionFactory">
    <property name="brokerURL" value="tcp://localhost:61616"/>
    </bean>
    </entry>
    or
    <entry key="java:comp/env/obj/UUID_CLASS_KEY" value="org.apache.servicemix.bpe.uuid.ActiveMQUUIDService"/>
    This is just a sample of a possible entry. Is there then a way I could add this object in weblogic jndi context ?
    Regards,
    Fritz

  • Oracle forms 6.0 Image storing and retrieval

    Hello to all,
    Iam new to oracle forms, Iam using oracle forms 6.0, i was trying to insert the image into database using blob datatype.. i was continuously getting lot of error...
    Can any one give a sample application for inserting and retrieving the images. If it is a .fmb (form), i would be very thankfull to you.....'

    Mr. manvar khan, can u plz send me this fmb file for inserting and retrieving images in forms 6.0, i would be very grateful to you.
    [email protected]

  • Unable to retreive RMI object bound to JNDI

    Hi
    I am trying to retrieve an rmi object that appears to have been sucessfully
    deployed to the weblogic server. Upon startup the nt command console shows
    the message below and the class name appears in the Distributed objects/rmi
    area in the Weblogic console.
    Invoking main-style startup Guid xxxxxx.GuidImpl
    However if I try to write a test client using either one of the following
    calls I get a NameNotFoundException.
    I have tried both the name Guid (which is what is in the startup entry) and
    the fully qualified name. They all have the same results.
    Sample calls:
    Naming.lookup("Guid");
    or
    getInitialContext();
    jndiContext.lookup("Guid");
    In my weblogic properties files I have the following entry:
    weblogic.system.startupClass.Guid=xxx.GuidImpl
    in the main of GuidImpl class I have the following entry:
    Naming.bind("xxx.Guid");
    any ideas as to what might be wrong?
    Thanks

    Hi, all:
    Currently I evaluate BEA Weblogic 6.1 server. I've read the "Programming
    WebLogic JNDI" section of the documentation for Weblogic server 6.1.
    However, I couldn't find the answer for my question. What problem I have
    now is that
    (1): How I can create a object in the Java VM when the Weblogic server
    startup? Note:
    This class need to read a property files and
    store all of properties information into its instance for the
    client program to lookup it later.
    (2): How can the previous created object to be bound in the Weblogic
    JDNI server and the bounded
    object can be shown up in the JDNI tree in the Weblogic server's
    console?
    (3): How do I code my servlet to lookup that object I
    just created in the step1? What configuration settings need to be
    done before Weblogic server is started?
    Because I am stopped by this problem, if anyone can give me the example
    code or some explanation of the solution ASAP,
    it would be very appreciated....Thanks in advance.......
    Merry Christmas
    Long

  • Binding custom objects in weblogic JNDI

    I noticed that if I bind a custom object, the object is not available after the weblogic
    restart. Is there anyway to bind an object permanently in the weblogic JNDI..

    In article <[email protected]>, [email protected] says...
    Murali <[email protected]> wrote:
    I noticed that if I bind a custom object, the object is not available after the weblogic
    restart. Is there anyway to bind an object permanently in the weblogic JNDI..No.
    Perhaps what your trying to accomplish could be handled via a startup
    class that did the bind for you.
    Bob

  • Storing and retrieving pdf

    I've stored pdf files in oracle database in BLOB field. Now I want to retrieve it by using xsql or some Java program to show it in the browser(the pdf file itself). Is it possible? Can I've some example code?
    I'm also using Tomcat server and my overall aim is to combine the power of oracle, xml and other suporting utilities like xsql etc.
    Thanks in advance.
    null

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Faisal:
    I've stored pdf files in oracle database in BLOB field. Now I want to retrieve it by using xsql or some Java program to show it in the browser(the pdf file itself). Is it possible? Can I've some example code?
    I'm also using Tomcat server and my overall aim is to combine the power of oracle, xml and other suporting utilities like xsql etc.
    Thanks in advance.<HR></BLOCKQUOTE>
    Db Prism can manage ulpoad/download functionality like IAs mod_plsql and runs on Tomcat 3.2.+.
    You could see a demo on line at, obviusly DB Prism is an Open Source Framework then, you could see the code of download adapter for Oracle 8i database and create your custom servlet whith the same functionality.
    Best regards, Marcelo.
    PD: DB Prism 1.2.0-dev web page is at including source code in download section.
    null

  • Where is the binary data of this icon stored and retrieved from Application server?

    Hello guys,
    Today I observed one phenomenon and could not explain it per my knowledge.
    I have one url which points to an icon in application server:
    https://<host name>:44301/sap/public/bc/ur/nw5/themes/sap_corbu/common/libs/Icon/SuccessMessage.gif
    I could successfully open it via chrome:
    and after that I could see an entry in ICM server cache. Everything works perfectly.
    Then I tried to check this icon in mime browser in SE80. To my surprise, the folder /sap/public/bc/ur/nw5/themes is empty.
    However, the ICM cache shows that there is a subfolder called "sap_corbu" under "themes" folder. But why I cannot find it in mime browser?
    Then I write a report to retrieve the binary data of icon via CL_HTTP_CLIENT, and clear the ICM buffer via tcode SMICM.
    I expect this time some database table will be queried to load the content of the icon, since now the buffer is not available.
    To my surprise again, in SAT no database table is involved.
    So now I am confused: since I have already cleared the ICM server cache, where does the icon binary data come from when I run the report to access the icon?
    Best regards,
    Jerry

    Hello guys,
    one colleague today told me that there is a zip file "ur_mimes_nw7.zip" in MIME repository /PUBLIC/BC/UR/ur_mines_nw7.zip. I download it locally and unzip it and indeed find many theme folders including sap_corbu folder and its resource files. So I guess there must be some logic done in web application server which will unzip this archive file and put each theme folder to the corresponding folders in application server. I would assume those logic are done outside ABAP stack side, this is the reason I cannot find any hint of them in ABAP backend via tcode SAT even I clear both client and server side cache.
    Best regards,
    Jerry

  • Storing and retrieving arabic in SQL Server 2000

    hello, i realize this problem has been posted lots before but i read in the forum and i couldn't find a solution to fix my problem
    i am developing a desktop application in java and sql server 2000, and i'm using JBuilder for writing my java codes
    here's the problem
    i can MANUALLY store arabic text in my database (directly in SQL Sever Query Analyzer) and can read it in arabic properly in SQL Server, but if i want to retrieve the arabic text in a query in JAVA, for example: select * from person i see weird characters (not question marks) but not the original arabic text
    and if i type arabic text in a java textfield and use the value entered in an sql query, for example:
    sqlQuery = "insert into person (fname) values ('" + jtfFName.getText() + "')";it is inserted in SQL Server as ?????s and when i retrieve the values from the table i also see it as ?????s
    even when i converted all the data types in the database to unicode data types (*nchar* instead of char and nvarchar instead of varchar) and modified the sql query to the following:
    sqlQuery = "insert into person (fname) values (N'" + jtfFName.getText() + "')";(N outside the single quotation mark since according to rules on msdn)
    it still didn't solve the problem
    please i need urgent help with this issue!

    problem was solved by setting the charSet encoding to "UTF-8" in the connection to sql server using the jdbc-odbc bridge

  • Storing and Retrieving Zipped Word Templates

    Hi there,
    I was wanting to know if anyone has tried zipping a Word templage, then saving it into an oracle table using Blobs, and then retrieving it back and unzipping it.
    I would like to know if there are any issues doing this and also see some examples if you'd like to share.
    Thanks in advance.
    Emilio.

    you may set the mime type in the meta tag, but i still think it's safter to use the html codes

  • Implement the storage and retrieval of object descriptors

    I need to get the name of a class, methods etc from the console and then some how store them and then retrieve ... them...
    the user can enter
    employee
    int id;
    String name;
    printMe();
    }

    THought this might help you
    http://forum.java.sun.com/thread.jsp?forum=62&thread=444118&tstart=15&trange=15

  • CAR configuration storing and retrieving

    Hi,
    I am looking for ways to save the current configuration and to retrieve it for later purposes. Is it possible to do so?
    We have only one CAR and multiple people are using it. So the CAR has to re-configured for different people purpose. It will be useful if we are able to store the current working configuration of CAR and later be able to retrieve it.
    Please tell me whether this is possible. I couldn't find same information from Cisco CAR documentation.
    Thanks,
    Salai.

    You can use TFTP server to backup & Restore the configuration file. Here is the step by step procedure to back & restore the configuration file click this link.
    http://www.cisco.com/en/US/products/sw/iosswrel/ps1835/products_tech_note09186a008020260d.shtml#bcb

  • Storing and retrieving multiple values into one cookie.

    Hi Everyone,
    I am wondering if anybody knows of any good tutorials involving storing multiple values into one cookie. Any URLs will be greatly apprecated. Thanks heaps.
    Regards
    Davo

    These are normally delimted in HTTP by a semicolon. You can concatenate the string yourself and on the reverse trip use StringTokenizer to get the values back out.
    - Saish

Maybe you are looking for

  • EJB 3.0 App won't run on OAS 10.1.3.1 AIX5L

    Hi All, I'm developing Application with Struts + JSP + EJB3.0 with JDev 10.1.3. It runs well on embedded OC4J with JDev. And it runs well also on Oracle Application Server 10.1.3.1 + Windows XP Prof. But when I deployed it on Oracle Application Serve

  • I want to sell my iphone 4s to a friend but i have a carrier question

    I want to sell my iphone 4s to a friend and i have it on att and they have sprint. is that possible since its a world phone? is there anything i have to do? cuz the software and hardware is the same for each 4S on each carrier.

  • SOAP Mime Attachments

    I'm new to web services.. before actually getting my hands dirty.. I need to figure out some things before deciding i will undertake a project.. I'm thinking of an asynchronous setup..were clients submit batches of data to a web method...clients will

  • Text becomes garbled when sequences transferred to new computer

    I transferred a bunch of sequences to my editor's computer. they look fine -- except the text (and there is a lot of it) moved, grew exponentially bigger, and in general was garbled. This seems to happen every time I open a sequence in final cut on s

  • How do I used HTTP compression with Oracle Business suite

    Hi Team, We having problem with accessing Oracle EBS for large number of users from over the network. At the peak time network bandwidth getting flooded. Can we used any kind of software compression mechanism to reduced network bandwidth . Thanks & R