Weblogic.rmi.cluster.CallRouter, how to place classes?

Hi,
I,m using Weblogic 7.0. I want a class to be loaded on different cluster servers
depending on an argument.
I've defined a remote interface for the class, the class implementation that implements
that remote interface, and a class that implements the CallRouter interface to
decide what cluster should be used depending on an argument sent to one function
from the class implementation.
After that, I've compiled those 3 classes using java weblogic.rmic -clusterable
-callRouter <callRouterClass> <remoteObjectClass>
It just has created two ---RTD.XML files. My application is outspread as we are
still developing. It's not using WAR or EAR files yet, but we have our web.xml
and application.xml files.
Am I following steps correctly? If so, where should I put the classes and xmls
in the server? Should they all be in the classpath and that's all? If not, what
more should I do, create a jar with 3 classes and xmls? How?

One last question. How should I call the class from client code?
"Ignacio Sanchez" <[email protected]> wrote:
>
Hi,
I,m using Weblogic 7.0. I want a class to be loaded on different cluster
servers
depending on an argument.
I've defined a remote interface for the class, the class implementation
that implements
that remote interface, and a class that implements the CallRouter interface
to
decide what cluster should be used depending on an argument sent to one
function
from the class implementation.
After that, I've compiled those 3 classes using java weblogic.rmic -clusterable
-callRouter <callRouterClass> <remoteObjectClass>
It just has created two ---RTD.XML files. My application is outspread
as we are
still developing. It's not using WAR or EAR files yet, but we have our
web.xml
and application.xml files.
Am I following steps correctly? If so, where should I put the classes
and xmls
in the server? Should they all be in the classpath and that's all? If
not, what
more should I do, create a jar with 3 classes and xmls? How?

Similar Messages

  • Getting :java.lang.ClassCastException: weblogic.rmi.internal.MethodDescript

    Hi I am getting the following exception:
    java.lang.ClassCastException: weblogic.rmi.internal.MethodDescriptor
         at weblogic.rjvm.MsgAbbrevInputStream.readClassDescriptor(MsgAbbrevInputStream.java:186)
         at weblogic.common.internal.ChunkedObjectInputStream$NestedObjectInputStream.readClassDescriptor(ChunkedObjectInputStream.java:300)
         at java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStream.java:901)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:361)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:231)
         at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1181)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:381)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:231)
         at weblogic.common.internal.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:110)
         at weblogic.common.internal.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:123)
         at weblogic.jndi.internal.RootNamingNode_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:298)
         at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:93)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:267)
         at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:22)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    can any body explain the Cause for this exception and what will be the impact on the server.
    but if i restart the server the error is not coming

    Hi I am getting the following exception:
    java.lang.ClassCastException: weblogic.rmi.internal.MethodDescriptor
         at weblogic.rjvm.MsgAbbrevInputStream.readClassDescriptor(MsgAbbrevInputStream.java:186)
         at weblogic.common.internal.ChunkedObjectInputStream$NestedObjectInputStream.readClassDescriptor(ChunkedObjectInputStream.java:300)
         at java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStream.java:901)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:361)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:231)
         at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1181)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:381)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:231)
         at weblogic.common.internal.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:110)
         at weblogic.common.internal.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:123)
         at weblogic.jndi.internal.RootNamingNode_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:298)
         at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:93)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:267)
         at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:22)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    can any body explain the Cause for this exception and what will be the impact on the server.
    but if i restart the server the error is not coming

  • Urgent help: how to create data source for Weblogic RMI driver

    Hi,
    Please let me how to create data source for Weblogic RMI driver using Administrator
    console.
    I understand that the following steps are required:
    1.Create connection pool for the RMI driver by specfiying URL as
    jdbc:weblogic:rmi and Driver as weblogic.jdbc.rmi.Driver. Now
    comes the problem.. what do put in properties text area? I am
    talking about key/value pairs required?
    2. Having done step 1 ( which I was not able to do) , create a new DataSource
    mapping to the connection pool created from step 1.
    How to accomplish step 1 ? I want to finally connect to Oracle
    database. Please help me.
    pradeep bhat

    DataSource will internally do that for you (It will use RMI internaly) . You
    dont have to worry about the details of using RMI driver. Thats what is a
    DataSource is for.
    sree
    "pradeep bhat" <[email protected]> wrote in message
    news:[email protected]...
    Hi Sree,
    What u have written is abt configuting Datasource for type 2 and
    4 drivers.
    But I want to know how to create data source for RMI driver. If
    I map this datasource to connection pool that is created for
    type 2 or 4 drivers, i don't understand why RMI drivers are
    required in first place. If i do map the data source to connection pool
    created
    for type 2 or 4 drivers then where i
    would not have used the URL as jdbc:weblogic:rmi and Driver as
    weblogic.jdbc.rmi.Driver.
    Hope u will help me.
    pradeep bhat
    "Sree Bodapati" <[email protected]> wrote:
    Hi Pradeep
    To create a connection pool you have to use a database driver not RMI
    driver. So use a thin driver or the WebLogic jDriver for Oracle to setup
    your connection pool. Once the connection pool is created you can create
    a
    DataSource and use this datasource to connect to the database.
    The RMI driver can be used to get connections from the database via the
    connection pool and in that case you dont need a datasource. Recommended
    approach is to use a DataSource.
    hth
    sree
    "PRADEEP BHAT" <[email protected]> wrote in message
    news:[email protected]...
    Hi,
    Please let me how to create data source for Weblogic RMI driver using
    Administrator
    console.
    I understand that the following steps are required:
    1.Create connection pool for the RMI driver by specfiying URL as
    jdbc:weblogic:rmi and Driver as weblogic.jdbc.rmi.Driver. Now
    comes the problem.. what do put in properties text area? I am
    talking about key/value pairs required?
    2. Having done step 1 ( which I was not able to do) , create a new
    DataSource
    mapping to the connection pool created from step 1.
    How to accomplish step 1 ? I want to finally connect to Oracle
    database. Please help me.
    pradeep bhat

  • How to place header and footer  in OO-ALV program using class

    How to place header and footer  in OO-ALV program using class tell me wat r the class we shold use and their attributes as well

    Hi Venkatesh,
    Take a look at this how to [ABAP Objects - ALV Model - Using Header and Footer|https://wiki.sdn.sap.com/wiki/x/xdw]
    it's explaining how to define the classes and use it for display an ALV with Header and Footer.
    Regards,
    Marcelo Ramos

  • I have a question about weblogic RMI , how can I resolve it.Thank you

    I have a question about the weblogic RMI .
    I have a program.web services+weblogic RMI +Data Sources When I run the program in the console application.it is ok.But When i run it with the web services(it 'is mean Get some parameter and run the different program).it's fail.The Exception is
    cannot assign instance of yype weblogic.rmi.RMIServices_1033_WLStub to field demo.RMIServer_1033_WLStub.stubinfo of type weblogic.rmi.internal.StubInfo in instance of demo.RMIEsrver_1033_WLStub
    how to resolve .Thank you.

    Hi Charles,
    Parental Controls has always had problems with https sites, no idea if it's fixed in 10.9.x or not.
    When you setup your Mac it shouldv'e made an admin account, are you not running from that account, or did you somehow change it to a Managed account???

  • Questions on Weblogic RMI

    Hi
              I've a few questions on WL RMI that I couldn't figure out from the
              documentation.
              Suppose I have a cluster containing Weblogic servers server1 and server2.
              Server1 hosts an RMI object o1 that is bind to the cluster wide JNDI tree.
              O1 implements remote interface i1 that has a method m1 which takes as an
              argument an object o2 implementing remote interface i2. That is:
              public class o1 implements i1 {...}
              public interface i1 extends weblogic.rmi.Remote {
              public void m1 (i2 _o2);
              public class o2 implements i2 {...}
              public interface i2 extends weblogic.rmi.Remote {...}
              Now if inside server2 I create o2 using the default constructor, lookup a
              reference to o1 and call method m1, will o2 get passed by value or by
              reference? Is there any way to control this? What if I don't use the
              constructor to create the object but the object is hosted in server2 and I
              get a reference to the object using JNDI lookup? In short, how does WL RMI
              decide when to pass an object by reference and when by value.
              I'm trying to increase the scalability of a system by distributing its
              modules as RMI objects to several machines running Weblogic server, and I
              need to know the details on how WL RMI works. The documentation seems to be
              rather inadequate...
              Thanks for reading this far :)
              - Juha
              

    Actually, O2 will always be passed by reference because it is an RMI object
              (i.e., it implements weblogic.rmi.Remote). If O2 were a non-RMI object, it would
              be passed by value if O1 is in a different process and by reference if O1 and O2
              are in the same process.
              Edwin Marcial wrote:
              > My 2 cents on this:
              >
              > I believe in this case, since O2 is a remote object, it will get passed by
              > reference. If it were not a remote object, it would be passed by value.
              >
              > Edwin
              >
              > "Juha Lindström" wrote:
              >
              > > Hi
              > >
              > > I've a few questions on WL RMI that I couldn't figure out from the
              > > documentation.
              > > Suppose I have a cluster containing Weblogic servers server1 and server2.
              > > Server1 hosts an RMI object o1 that is bind to the cluster wide JNDI tree.
              > > O1 implements remote interface i1 that has a method m1 which takes as an
              > > argument an object o2 implementing remote interface i2. That is:
              > >
              > > public class o1 implements i1 {...}
              > >
              > > public interface i1 extends weblogic.rmi.Remote {
              > > public void m1 (i2 _o2);
              > > }
              > >
              > > public class o2 implements i2 {...}
              > >
              > > public interface i2 extends weblogic.rmi.Remote {...}
              > >
              > > Now if inside server2 I create o2 using the default constructor, lookup a
              > > reference to o1 and call method m1, will o2 get passed by value or by
              > > reference? Is there any way to control this? What if I don't use the
              > > constructor to create the object but the object is hosted in server2 and I
              > > get a reference to the object using JNDI lookup? In short, how does WL RMI
              > > decide when to pass an object by reference and when by value.
              > >
              > > I'm trying to increase the scalability of a system by distributing its
              > > modules as RMI objects to several machines running Weblogic server, and I
              > > need to know the details on how WL RMI works. The documentation seems to be
              > > rather inadequate...
              > >
              > > Thanks for reading this far :)
              > >
              > > - Juha
              

  • Error received when running weblogic in cluster

    I am trying out clusters to see what the benefit would be to our application but I keep getting an error in the background. I have obtained a test cluster license and it is loading it up on startup. Does anyone know what this error is or how to fix it? Thanks for the help.
    <Sep 14, 2007 7:06:03 PM UTC> <Warning> <RMI> <BEA-080003> <RuntimeException thrown by rmi server: weblogic.rmi.internal.dgc.DGCServerImpl.renewLease([I)
    java.lang.ClassCastException: weblogic.rjvm.ImmutableServiceContext.
    java.lang.ClassCastException: weblogic.rjvm.ImmutableServiceContext
    at weblogic.rjvm.MsgAbbrevInputStream.readClassDescriptor(MsgAbbrevInputStream.java:369)
    at weblogic.utils.io.ChunkedObjectInputStream$NestedObjectInputStream.readClassDescriptor(ChunkedObjectInputStream.java:265)
    at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1534)
    at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466)
    at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1591)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
    at weblogic.utils.io.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:195)
    at weblogic.rjvm.MsgAbbrevInputStream.readObject(MsgAbbrevInputStream.java:565)
    at weblogic.utils.io.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:191)
    at weblogic.rmi.internal.dgc.DGCServerImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:479)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:475)
    at weblogic.rmi.internal.BasicServerRef.access$300(BasicServerRef.java:59)
    at weblogic.rmi.internal.BasicServerRef$BasicExecuteRequest.run(BasicServerRef.java:1016)
    at weblogic.work.SelfTuningWorkManagerImpl.schedule(SelfTuningWorkManagerImpl.java:126)
    at weblogic.rmi.internal.BasicServerRef.dispatch(BasicServerRef.java:321)
    at weblogic.rmi.internal.BasicServerRef.dispatch(BasicServerRef.java:918)
    at weblogic.rjvm.RJVMImpl.dispatchRequest(RJVMImpl.java:1084)
    at weblogic.rjvm.RJVMImpl.dispatch(RJVMImpl.java:1001)
    at weblogic.rjvm.ConnectionManagerServer.handleRJVM(ConnectionManagerServer.java:230)
    at weblogic.rjvm.ConnectionManager.dispatch(ConnectionManager.java:877)
    at weblogic.rjvm.MsgAbbrevJVMConnection.dispatch(MsgAbbrevJVMConnection.java:446)
    at weblogic.rjvm.t3.MuxableSocketT3.dispatch(MuxableSocketT3.java:368)
    at weblogic.socket.AbstractMuxableSocket.dispatch(AbstractMuxableSocket.java:383)
    at weblogic.socket.SocketMuxer.readReadySocketOnce(SocketMuxer.java:872)
    at weblogic.socket.SocketMuxer.readReadySocket(SocketMuxer.java:818)
    at weblogic.socket.EPollSocketMuxer.dataReceived(EPollSocketMuxer.java:192)
    at weblogic.socket.EPollSocketMuxer.processSockets(EPollSocketMuxer.java:174)
    at weblogic.socket.SocketReaderRequest.run(SocketReaderRequest.java:29)
    at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:42)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:145)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:117)
    >

    I am trying out clusters to see what the benefit would be to our application but I keep getting an error in the background. I have obtained a test cluster license and it is loading it up on startup. Does anyone know what this error is or how to fix it? Thanks for the help.
    <Sep 14, 2007 7:06:03 PM UTC> <Warning> <RMI> <BEA-080003> <RuntimeException thrown by rmi server: weblogic.rmi.internal.dgc.DGCServerImpl.renewLease([I)
    java.lang.ClassCastException: weblogic.rjvm.ImmutableServiceContext.
    java.lang.ClassCastException: weblogic.rjvm.ImmutableServiceContext
    at weblogic.rjvm.MsgAbbrevInputStream.readClassDescriptor(MsgAbbrevInputStream.java:369)
    at weblogic.utils.io.ChunkedObjectInputStream$NestedObjectInputStream.readClassDescriptor(ChunkedObjectInputStream.java:265)
    at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1534)
    at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466)
    at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1591)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
    at weblogic.utils.io.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:195)
    at weblogic.rjvm.MsgAbbrevInputStream.readObject(MsgAbbrevInputStream.java:565)
    at weblogic.utils.io.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:191)
    at weblogic.rmi.internal.dgc.DGCServerImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:479)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:475)
    at weblogic.rmi.internal.BasicServerRef.access$300(BasicServerRef.java:59)
    at weblogic.rmi.internal.BasicServerRef$BasicExecuteRequest.run(BasicServerRef.java:1016)
    at weblogic.work.SelfTuningWorkManagerImpl.schedule(SelfTuningWorkManagerImpl.java:126)
    at weblogic.rmi.internal.BasicServerRef.dispatch(BasicServerRef.java:321)
    at weblogic.rmi.internal.BasicServerRef.dispatch(BasicServerRef.java:918)
    at weblogic.rjvm.RJVMImpl.dispatchRequest(RJVMImpl.java:1084)
    at weblogic.rjvm.RJVMImpl.dispatch(RJVMImpl.java:1001)
    at weblogic.rjvm.ConnectionManagerServer.handleRJVM(ConnectionManagerServer.java:230)
    at weblogic.rjvm.ConnectionManager.dispatch(ConnectionManager.java:877)
    at weblogic.rjvm.MsgAbbrevJVMConnection.dispatch(MsgAbbrevJVMConnection.java:446)
    at weblogic.rjvm.t3.MuxableSocketT3.dispatch(MuxableSocketT3.java:368)
    at weblogic.socket.AbstractMuxableSocket.dispatch(AbstractMuxableSocket.java:383)
    at weblogic.socket.SocketMuxer.readReadySocketOnce(SocketMuxer.java:872)
    at weblogic.socket.SocketMuxer.readReadySocket(SocketMuxer.java:818)
    at weblogic.socket.EPollSocketMuxer.dataReceived(EPollSocketMuxer.java:192)
    at weblogic.socket.EPollSocketMuxer.processSockets(EPollSocketMuxer.java:174)
    at weblogic.socket.SocketReaderRequest.run(SocketReaderRequest.java:29)
    at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:42)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:145)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:117)
    >

  • Weblogic RMI error

    Dear all,
    I am using weblogic rmi. When I run the client, the following error
    appeared:
    java.rmi.UnmarshalException: failed to unmarshal class
    java.lang.Object; nested
    exception is:
    java.lang.ClassNotFoundException: Hello_WLStub
    --------------- nested within: ------------------
    weblogic.rmi.MarshalException: Remapped jndi exception
    - with nested exception:
    [java.rmi.UnmarshalException: failed to unmarshal class
    java.lang.Object; nested
    exception is:
            java.lang.ClassNotFoundException: Hello_WLStub]
    at weblogic.rmi.Naming.toWeblogicRmiException(Naming.java:289)
    at weblogic.rmi.Naming.lookup(Naming.java:78)
    at HelloClient.main(HelloClient.java:40)
    Server and client are 2 separate machine.However, when I copy
    Hello_WLStub.class to the client machine, it runs without problem.
    When weblogic do not download the stub class to client instead?
    Moreover, I found that all my startup classes must be placed inside
    E:\bea\wlserver6.0, otherwise those startup classes will not work. How
    to change this default location?Thanks!

    Dear all,
    I am using weblogic rmi. When I run the client, the following error
    appeared:
    java.rmi.UnmarshalException: failed to unmarshal class
    java.lang.Object; nested
    exception is:
    java.lang.ClassNotFoundException: Hello_WLStub
    --------------- nested within: ------------------
    weblogic.rmi.MarshalException: Remapped jndi exception
    - with nested exception:
    [java.rmi.UnmarshalException: failed to unmarshal class
    java.lang.Object; nested
    exception is:
            java.lang.ClassNotFoundException: Hello_WLStub]
    at weblogic.rmi.Naming.toWeblogicRmiException(Naming.java:289)
    at weblogic.rmi.Naming.lookup(Naming.java:78)
    at HelloClient.main(HelloClient.java:40)
    Server and client are 2 separate machine.However, when I copy
    Hello_WLStub.class to the client machine, it runs without problem.
    When weblogic do not download the stub class to client instead?
    Moreover, I found that all my startup classes must be placed inside
    E:\bea\wlserver6.0, otherwise those startup classes will not work. How
    to change this default location?Thanks!

  • Weblogic.rmi.internal.BasicRemoteRef and ClusterableRemoteRef

    Hi,
    I have a ejb3 stateless session bean deployed on a wls 10 mp1 cluster (1 Admin + 2 Managed Servers).
    The client side reference is a:
    weblogic.rmi.internal.BasicRemoteRef when invocations go to Managed Server1
    and
    ClusterableRemoteRef when invocations go to Managed Server2
    Is this indicative of a problem in cluster setup etc. ?
    Thanx,

    Hi ! I have a similar problem.
    I have an EJB3 stateless bean on a WLS clustered server, in the same machine, server1 and sever2.This EJB3 is deployed in a application called appli.ear
    My client is messageDrivenBean mdb deployed in another ear application client.ear , in the same machine, in the same clustered server.
    Sometimes, my client call is succesfull, but most often, my lookup fails with java.lang.class.cast Exception.This exception is thrown because i get weblogic.rmi.internal.BasicRemoteRef class from my lookup.When my call is succeful ,i get weblogic.rmi.internal.CollocatedRemoteRef class.
    Is it the same problem ? Must i get patch you are talking about?

  • Applet : Why Weblogic RMI is so huge ???

    Hi,
    I'm using Weblogic RMI in an applet, and the applet startup time is unacceptable.
    In order to find out what files are actually needed by the applet , instead of
    using a JAR file, I uncompressed weblogic.jar and looked at my web server log
    file as the applet was coming up. The log file is attached, so please take a look.
    Is there a way to load less stuff ?
    Thanks,
    Jarek
    [applet_startup.log]

    Okay, you obviously don't understand how the String class works.
    Your code is slow because the "+" operator for String objects doesn't really concat to the string, it creates a new String. Object creation takes time. Try using a StringBuffer instead.

  • WebLogic RMI security

    Hello,
    I'm planning to create some client-server applications using the WebLogic
    RMI implementation but I'm a little bit worried about the security issues
    that can be raised.
    Basically, I don't know whether or not WebLogic provides dynamic class
    loading (RMIClassLoader). If so, how to prevent this to happen, since I want
    to make it sure that no hostile client will be able to hack my application
    in that it will download some classes that will mess with my data.
    Anybody has any comments on that?
    Thanks in advance for any help.
    Andre Mendonca
    [email protected]

    Just to make things clearer, this is the RMI specification from Javasoft
    (very interesting, by the way):
    "When parameters and return values for a remote method invocation are
    unmarshalled to become live objects in the receiving JVM, class definitions
    are required for all of the types of objects in the stream. The
    unmarshalling process first attempts to resolve classes by name in its local
    class loading context (the context class loader of the current thread). RMI
    also provides a facility for dynamically loading the class definitions for
    the actual types of objects passed as parameters and return values for
    remote method invocations from network locations specified by the
    transmitting endpoint. This includes the dynamic downloading of remote stub
    classes corresponding to particular remote object implementation classes
    (and used to contain remote references) as well as any other type that is
    passed by value in RMI calls, such as the subclass of a declared parameter
    type, that is not already available in the class loading context of the
    unmarshalling side."
    My question is: If a client invokes a method in the object residing in the
    weblogic server, passing as a parameter an object that the server doesn't
    know, will weblogic try to download the class from the client location?
    Continuing: later in the specification, one can read:
    "For every class descriptor read from an RMI marshal stream, the
    resolveClass method reads a single object from the stream. If the object is
    a String (and the value of the java.rmi.server.useCodebaseOnly property is
    not true), then resolveClass returns the result of calling
    RMIClassLoader.loadClass with the annotated String object as the first
    parameter and the name of the desired class in the class descriptor as the
    second parameter. Otherwise, resolveClass returns the result of calling
    RMIClassLoader.loadClass with the name of the desired class as the only
    parameter."
    So, can I set this property to false in the StartWebLogic.cmd file and
    expect weblogic not to download any unknown code? Will weblogic classloader
    understand it? What's the default behavior of weblogic server?
    By the way, I'm using WLS 4.5.1, in a windows NT environment.
    Thanks in advance.
    Andre Mendonca
    [email protected]
    "Andre Mendonca" <[email protected]> wrote in message
    news:[email protected]...
    Hello,
    I'm planning to create some client-server applications using the WebLogic
    RMI implementation but I'm a little bit worried about the security issues
    that can be raised.
    Basically, I don't know whether or not WebLogic provides dynamic class
    loading (RMIClassLoader). If so, how to prevent this to happen, since Iwant
    to make it sure that no hostile client will be able to hack my application
    in that it will download some classes that will mess with my data.
    Anybody has any comments on that?
    Thanks in advance for any help.
    Andre Mendonca
    [email protected]

  • Weblogic RMI MarshalledObject equivalent

    Has anyone had experience with serializing a WebLogic RMI object for
    later usage?
    I have a need to take a Weblogic RMI service and serialize it to a
    database.
    In standard JDK 1.2 RMI, I would do this: (server-side)
    interface IFoo implements java.rmi.Remote
    class FooImpl implements IFoo extends UnicastRemoteObject
    FooImpl myFoo= ...
    java.rmi.MarshalledObject javaMarshalledObj= new
    java.rmi.MarshalledObject( myFoo ); // MarshalledObject implements
    Serializable
    ByteArrayOutputStream bytearrayoutputstream = new
    ByteArrayOutputStream();
    ObjectOutputStream objectoutputstream = new
    ObjectOutputStream(bytearrayoutputstream);
    objectoutputstream.writeObject( javaMarshalledObj );
    byte[] objectAsBytes= bytearrayoutputstream.toByteArray();
    However, I cannot find a weblogic equivalent for
    java.rmi.MarshalledObject.
    I cannot find a weblogic.rmi.MarshalledObject class to use, or a
    mechanism to turn a weblogic.rmi.Remote object into a java.rmi.Remote
    object.
    It seems this must already be done in the WL JNDI implementation-- does
    anyone have suggestions on how to perform this conversion?
    Thanks!
    -Steve Roth, [email protected]

    Just a clarification--
    I'm looking to turn a weblogic.rmi.Remote object into a
    java.io.Serializable object.
    I'm looking for the call chain to make this transformation occur.
    There is a call chain for java.rmi.Remote:
    java.rmi.Remote someRemote= ...
    java.io.Serializable someSer= new java.rmi.MarshalledObject( someRemote );
    However, I cant find an equivalent chain taking a weblogic.rmi.Remote
    object to a java.io.Serializable object since there is no
    weblogic.rmi.MarshalledObject.
    Thanks!
    -Steve Roth, [email protected]
    Steve Roth wrote:
    Has anyone had experience with serializing a WebLogic RMI object for
    later usage?
    I have a need to take a Weblogic RMI service and serialize it to a
    database.
    In standard JDK 1.2 RMI, I would do this: (server-side)
    interface IFoo implements java.rmi.Remote
    class FooImpl implements IFoo extends UnicastRemoteObject
    FooImpl myFoo= ...
    java.rmi.MarshalledObject javaMarshalledObj= new
    java.rmi.MarshalledObject( myFoo ); // MarshalledObject implements
    Serializable
    ByteArrayOutputStream bytearrayoutputstream = new
    ByteArrayOutputStream();
    ObjectOutputStream objectoutputstream = new
    ObjectOutputStream(bytearrayoutputstream);
    objectoutputstream.writeObject( javaMarshalledObj );
    byte[] objectAsBytes= bytearrayoutputstream.toByteArray();
    However, I cannot find a weblogic equivalent for
    java.rmi.MarshalledObject.
    I cannot find a weblogic.rmi.MarshalledObject class to use, or a
    mechanism to turn a weblogic.rmi.Remote object into a java.rmi.Remote
    object.
    It seems this must already be done in the WL JNDI implementation-- does
    anyone have suggestions on how to perform this conversion?
    Thanks!
    -Steve Roth, [email protected]

  • How to place a JPanel at the center of another JPanel?

    Can anyone tell me how to place a JPanel inside another JPanel? The first JPanel consists of three JPanels each consisting of a label&textfield and are placed using BoxLayout. The second JPanel is a big blank screen. So, i would like to put the first JPanel at the center of second JPanel(horizontally & vertically). The problem is that i don't have any other component. So,if i try to use FlowLayout, i am able to put it at the center(horizontally, not vertically) only on the top edge. I tried to use BoxLayout. But, i couldn't(as i don't have any other elements). I tried to create some blank elements. But, they are messing up the elements of my JPanel. Any cluesssssssss??????????

    import java.awt.*;
    import javax.swing.*;
    public class CenteredLayout
        private JPanel getPanel()
            GridBagLayout gridbag = new GridBagLayout();
            GridBagConstraints gbc = new GridBagConstraints();
            gbc.insets = new Insets(2,2,2,2);
            JPanel p = new JPanel(gridbag);
            addComponents(new JLabel("label 1"), new JTextField(8), p, gbc);
            addComponents(new JLabel("label 2"), new JTextField(8), p, gbc);
            addComponents(new JLabel("label 3"), new JTextField(8), p, gbc);
            JPanel panel = new JPanel(gridbag);
            panel.setBackground(Color.pink);
            gbc.anchor = GridBagConstraints.CENTER;
            gbc.insets = new Insets(0,0,0,0);
            panel.add(p, gbc);
            return panel;
        private void addComponents(Component c1, Component c2, Container c,
                                   GridBagConstraints gbc)
            gbc.anchor = GridBagConstraints.EAST;
            gbc.gridwidth = GridBagConstraints.RELATIVE;
            c.add(c1, gbc);
            gbc.anchor = GridBagConstraints.WEST;
            gbc.gridwidth = GridBagConstraints.REMAINDER;
            c.add(c2, gbc);
        public static void main(String[] args)
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(new CenteredLayout().getPanel());
            f.setSize(400,400);
            f.setLocation(200,200);
            f.setVisible(true);
    }

  • How to place the "go" button at left size in dashboard prompt

    how to place the "go" button at left size in dashboard prompt

    Change your code to this and it should work:
    PARAMETERS : p_date LIKE sy-datum ,
                  p_uname LIKE sy-uname.
    DATA: field1(8) TYPE c .
    AT SELECTION-SCREEN .
       IF p_uname IS INITIAL.
         field1 = 'P_UNAME'.
         SET CURSOR FIELD field1 .
         MESSAGE e001.
       ENDIF .
    I think you need to have the MESSAGE statement (or something similar).  If you don't have a message class assigned to your program, instead of
    MESSAGE e001.
    you can use
    MESSAGE 'Please fill in all required fields' TYPE 'E'.
    - April
    Message was edited by:
            April King

  • How to implement classes and methods in badi's ?

    how to implement classes and methods in badi's? and where i have to write the code based on the requirement?can anyone explain me briefly?

    Hi
    Every BADI by default Implements an INTERFACE which already contains some methods with parameters.
    So you have to find the relavenet method based on the related paramters (by checking the fields in that paramters) you have to double click on the method and to write the code.
    see the doc
    DEFINING THE BADI
    1) execute Tcode SE18.
    2) Specify a definition Name : ZBADI_SPFLI
    3) Press create
    4) Choose the attribute tab. Specify short desc for badi.. and specify the type :
    multiple use.
    5) Choose the interface tab
    6) Specify interface name: ZIF_EX_BADI_SPFLI and save.
    7) Dbl clk on interface name to start class builder . specify a method name (name,
    level, desc).
    Method level desc
    Linese;ection instance methos some desc
    8) place the cursor on the method name desc its parameters to define the interface.
    Parameter type refe field desc
    I_carrid import spfli-carrid some
    I_connid import spefi-connid some
    9) save , check and activate…adapter class proposed by system is
    ZCL_IM_IM_LINESEL is genereated.
    IMPLEMENTATION OF BADI DEFINITION
    1) EXECUTE tcode se18.choose menuitem create from the implementation menubar.
    2) Specify aname for implementation ZIM_LINESEL
    3) Specify short desc.
    4) Choose interface tab. System proposes a name fo the implementation class.
    ZCL_IM_IMLINESEL which is already generarted.
    5) Specify short desc for method
    6) Dbl clk on method to insert code..(check the code in “AAA”).
    7) Save , check and activate the code.
    Some useful URL
    http://www.esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt
    http://www.esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf
    http://www.esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc
    http://www.esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc
    www.sapgenie.com/publications/saptips/022006%20-%20Zaidi%20BADI.pdf
    http://www.sapdevelopment.co.uk/enhance/enhance_badi.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/04/f3683c05ea4464e10000000a114084/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/e6/d54d3c596f0b26e10000000a11402f/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/c2/eab541c5b63031e10000000a155106/frameset.htm
    Now write a sample program to use this badi method..
    Look for “BBB” sample program.
    “AAA”
    data : wa_flights type sflight,
    it_flights type table of sflight.
    format color col_heading.
    write:/ 'Flight info of:', i_carrid, i_connid.
    format color col_normal.
    select * from sflight
    into corresponding fields of table it_flights
    where carrid = i_carrid
    and connid = i_connid.
    loop at it_flights into wa_flights.
    write:/ wa_flights-fldate,
    wa_flights-planetype,
    wa_flights-price currency wa_flights-currency,
    wa_flights-seatsmax,
    wa_flights-seatsocc.
    endloop.
    “BBB”
    *& Report ZBADI_TEST *
    REPORT ZBADI_TEST .
    tables: spfli.
    data: wa_spfli type spfli,
    it_spfli type table of spfli with key carrid connid.
    *Initialise the object of the interface.
    data: exit_ref type ref to ZCL_IM_IM_LINESEL,
    exit_ref1 type ref to ZIF_EX_BADISPFLI1.
    selection-screen begin of block b1.
    select-options: s_carr for spfli-carrid.
    selection-screen end of block b1.
    start-of-selection.
    select * from spfli into corresponding fields of table it_spfli
    where carrid in s_carr.
    end-of-selection.
    loop at it_spfli into wa_spfli.
    write:/ wa_spfli-carrid,
    wa_spfli-connid,
    wa_spfli-cityfrom,
    wa_spfli-deptime,
    wa_spfli-arrtime.
    hide: wa_spfli-carrid, wa_spfli-connid.
    endloop.
    at line-selection.
    check not wa_spfli-carrid is initial.
    create object exit_ref.
    exit_ref1 = exit_ref.
    call method exit_ref1->lineselection
    EXPORTING
    i_carrid = wa_spfli-carrid
    i_connid = wa_spfli-connid.
    clear wa_spfli.
    Reward points for useful Answers
    Regards
    Anji
    Message was edited by:
            Anji Reddy Vangala

Maybe you are looking for

  • Oracle DB 32-bit on a 64-bit architeceture

    All, I apologize up front if this question was already posted. We have a Dell Poweredge 2950 with 64bit architecture. Would it work if I install Oracle DB 10g Release 1 (10.1.0.3) Enterprise/Standard Edition x86, 32bit Edition? thanks in advance, chu

  • Photoshop CS3 and Photoshop Elements 7

    I have my Adobe Photoshop CS3 and then i install the trial version of Photoshop Elements 7.0. Is this possible and allowed? Then i decide to uninstall the trial version of PSE7. And some of the logo of PSCS3 are already not supported anymore. I was a

  • Using CSS With PHP..

    Hello! I need to create several PHP-based pages for use with a photo gallery and would like to use my existing CSS to style the pages.  Is this possible? Thanks!

  • Access figures which are not part of iPhoto

    Hello, as a MAC rookie, I have a question which has been potentially asked already many times. I want to import a picture or a figure into keynote / numbers / pages and the figure is not part of iPhoto. When I open 'Media' I can only access pictures

  • Export Failure

    I am having trouble exporting image versions from some of my projects. Some projects allow me to export as I normally would while others give me an error message: "Export Versions Complete with Errors . . . The export operation failed to create an im