EJB3 Stateful:ClassCastException when casting the object returned in lookup

Hi,
I'm developing a web application that make use of EJB3 stateless and stateful beans. The application server is the Websphere Application Server 6.1.0.15 with the EJB3 Feature Pack installed and the web server is the IBM HTTP Server running in another machine.
The problem I'm facing is that for every stateful bean after the lookup, it throws a ClassCastExcption when casting the object returned. See part of the log below.
[7/13/08 3:15:48:869 CDT] 0000001c SystemErr R java.lang.ClassCastException: cannot cast class com.spcs.dsa.ejb.authenticationmanager._AuthenticationManager_Stub to class com.spcs.dsa.ejb.authenticationmanager._AuthenticationManager_Stub
at com.ibm.rmi.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:396)
at com.spcs.dsa.ejb.client.DsaEjbClient.getAuthenticationRemote(DsaEjbClient.java:37)
at com.spcs.dsa.action.NewCardAction.execute(NewCardAction.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
Please notice in the log above that the cast was done for the correct class.
Here is the java code:
AuthenticationManager auth =
(AuthenticationManager) javax.rmi.PortableRemoteObject.narrow(
context.lookup("com.spcs.dsa.ejb.authenticationmanager.AuthenticationManager"),
AuthenticationManagerStub.class);
This problem doesn't happen for statless beans. If you simply change the class to be stateless, this problem stop to happen.
If you run this code in a stand alone program, this problem doesn't happen. It only happen when running in the web server.
Does anybody know what should be done to solve this problem ??
Thanks,
Marcos.

I'm not familiar with any specifics of IBM's implementation but from an EJB 3 spec perspective there is no need to use PortableRemoteObject.narrow() if you're retrieving an EJB 3.0 Remote Business interface, regardless of the component type( stateful vs. stateless). In addition, the "_Stub" class should never have to be part of your client programming model. That should be hidden within the vendor's implementation, if present at all.
If AuthenticationManager is the Remote 3.0 Business Interface
@Remote
public interface AuthenticationManager {
your client lookup should be :
AuthenticationManager am = (AuthenticationManager) context.lookup("...");

Similar Messages

  • Casting the Object dynamically

    Hi All,
    I am looking for a way to dynamically cast the object. I am receiving an object which is JAXB object as parameter of a method. This object can be type pf one the 5 jaxb objects my logic is handling. I need to identify the actual type of object and perform some operations on it.
    Each of these 5 JAXB objects have some common method (although these objects does not inherit from any common class) and some methods which are specific to them.
    I can not make changes to JAXB classes as i am importing those as jar.
    I know it will need reflection somehow but i am not sure how to do it exactly. Below code will give you idea what i am trying to achieve. Its giving compile time error as xngEvent is typecasted in if-else block. This is just to show what i want to achieve using reflection.
    public void processMessage(Object inputObject)
    if(inputObject instanceof com.att.granite.jaxb.xngevents.dtd.equipment.XngEvent){
                        com.att.granite.jaxb.xngevents.dtd.equipment.XngEvent xngEvent = (com.att.granite.jaxb.xngevents.dtd.equipment.XngEvent)inputObject;
                   }else if(inputObject instanceof com.att.granite.jaxb.xngevents.dtd.cable.XngEvent){
                        com.att.granite.jaxb.xngevents.dtd.cable.XngEvent xngEvent = (com.att.granite.jaxb.xngevents.dtd.cable.XngEvent)inputObject;
                   }else if(inputObject instanceof com.att.granite.jaxb.xngevents.dtd.ipaddress.XngEvent){
                        com.att.granite.jaxb.xngevents.dtd.ipaddress.XngEvent xngEvent = (com.att.granite.jaxb.xngevents.dtd.ipaddress.XngEvent)inputObject;
                   }else if(inputObject instanceof com.att.granite.jaxb.xngevents.dtd.ipsubrange.XngEvent){
                        com.att.granite.jaxb.xngevents.dtd.ipsubrange.XngEvent xngEvent = (com.att.granite.jaxb.xngevents.dtd.ipsubrange.XngEvent)inputObject;
                   }else if(inputObject instanceof com.att.granite.jaxb.xngevents.dtd.path.XngEvent){
                        com.att.granite.jaxb.xngevents.dtd.path.XngEvent xngEvent = (com.att.granite.jaxb.xngevents.dtd.path.XngEvent)inputObject;
                   }else{
                        com.att.granite.jaxb.xngevents.dtd.site.XngEvent xngEvent = (com.att.granite.jaxb.xngevents.dtd.site.XngEvent)inputObject;
    String database = xngEvent.getDatabase();
    String elementType = xngEvent.getElementType();
    String editOperation = xngEvent.getEditOperation();
    validateEvent(elementType,editOperation,xngEvent);Thanks,
    Aashu

    What you are talking about is called runtime class working. It can do the job you want but for reasons the other responders already mentioned I cannot recommend it for your use case. The primary reasons being the complexity involved, the likelihood that you will need changes that will not be backward compatible, the difficulty in testing and debugging and the difficulty in finding developers that will even understand this approach that can take over after you are gone.
    This type of functionality is very roughly related to the use of dynamic proxies and code injection used by Spring and other frameworks.
    With those caveats in mind this is a link with an excellent example of how to do it and the issues involved.
    http://www.ibm.com/developerworks/java/library/j-dyn0610/
    For your use case I would recommend the approach you have probably already settled on. But first follow gimbal2's advice and document your requirements and use case and the dependencies on possibly duplicated code sections you previously mentioned.

  • ClassCastException on casting same objects differing in canonical name

    Hi all,
    I have got a problem with class casting. Some years ago I comitted the error not to bundle my classes in packages and now I need to do so. Unfortunately I can't deserialize previously saved objects from files anymore using ObjectInputstream, I get a ClassNotFoundException.
    file = new File(filename);
    FileInputStream fos = new FileInputStream(filename);
    ObjectInputStream oos = new ObjectInputStream(fos);
    try
         _transaktionen = (ArrayList) oos.readObject();
    catch (ClassNotFoundException e)
         JOptionPane.showMessageDialog(null, "Loading error (transaction)" +
                                            "\n"+e.getMessage());
    } Finding out their serialVersionID and make it explicit does not help either, so I created a copy of the class to deserialize in a package, since I need to reference to the class, and left anotherone in the default package.
    My problem now is that I can deserialize the objects, but cannot cast the object from the file to the type of the class in the package.
    //getting transactions from the arraylist previoulsy loaded from the file with iterator "it"
    DBFensterSeite aktuelleSeite =
                        new DBFensterSeite((Transaktion) it.next(), 1, null);Both have been loaded by the same ClassLoader, have the same serialVersionID and only differ in the canonical name (one is called Transaction, the new one is called packagename.Transaction). I am not quite sure whether this is the error, maybe you can help me. Thanks in advance!
    Regards,
    S�ren

    >
    Yes, technically you can. It does however require
    that you compile the new classes using a pre 1.3
    compiler. Then you just use them with the newer
    compiler.You mean, in Java 1.3 it was possible to reference classes in the default package?
    >
    You should look into providing a migration process
    however. Before installing the new application run
    another application that 'reads' the old stuff and
    'writes' it to a new location. That way your new
    application doesn't need to deal with the old stuff
    at all.Well, yes and no. The program implicitly executes a conversion on reading the file. Once you save it, it's in the new format (and thus unreadable for the old program). I do not want to provide a static conversion at installation time, because the customer, hopefully, backups data in the old format. He would not be able to read it after restoring data or, if there was something like a conversion function or program, would find it annoying having to think about it. In the end, they asked me to write the program for keeping it as simple as possible :-)
    I'm quite happy about the way it works now; the new cast-methods enable me to change the data types interfaces without having to bother about anything. ;-)
    Who gets the dukes now? :-p

  • Should I use the object returned from em.merge()

    I am still confused how to use em.merge() correctly. I need to know if I should use the result of em.merge().
    PersistentObject obj = new PersistentObject();
    obj.setSomething("Value#1");
    // Should I do this and continue to use the object returned from merge().
    obj = em.merge(obj);
    obj.setSomething("Value#2");

    Chris,
    First thanks for your and your teams awesome support.
    The reason I always get confused with merge() is my misunderstanding about how clones and caching are handled. Let me give you 2 scenerios and could you tell me what the problems are, is any?
    Scenerio #1: (using return from merge)
    -- Start of Transaction #1
    EntityObject obj = new EntityObject();
    obj.setName("chris");
    obj = em.merge(obj);
    -- End of Transaction #1
    -- Start of Transaction #2
    obj.setName("scott");
    obj = em.merge(obj);
    -- End of Transaction #2
    Is this ok, will I lose data, are the clones and cache ok?
    Scenerio #2: (NOT using return from merge)
    -- Start of Transaction #1
    EntityObject obj = new EntityObject();
    obj.setName("chris");
    em.merge(obj);
    -- End of Transaction #1
    -- Start of Transaction #2
    obj.setName("scott");
    em.merge(obj);
    -- End of Transaction #2
    Is this ok, ?
    These 2 scenerios are different in the fact that one uses the return from merge and one does not. Which one is correct, and what would the problem be with the wrong one?

  • Urgent: Failed to get the object returned from the server

    Hi there,
    I'm debugging someone's code which make use of RMI to implement the client/server.
    I found that when the client request the object from the server, the server return the object properly. But on the client side, it returned "java.io.EOFException". Don't know how to resolve it. Pls HELP !!
    Thanks.
    -Maggie
    ==============
    Here is the output:-
    java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
         java.io.EOFException
    java.io.EOFException
         at java.io.DataInputStream.readInt(DataInputStream.java:343)
         at java.io.ObjectInputStream.readInt(ObjectInputStream.java:1980)
         at javax.swing.ImageIcon.readObject(ImageIcon.java:371)
         at java.lang.reflect.Method.invoke(Native Method)
         at java.io.ObjectInputStream.invokeObjectReader(ObjectInputStream.java:2214)
         at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1411)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
         at java.util.Hashtable.readObject(Hashtable.java:792)
         at java.lang.reflect.Method.invoke(Native Method)
         at java.io.ObjectInputStream.invokeObjectReader(ObjectInputStream.java:2214)
         at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1411)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386)
         at java.io.ObjectInputStream.inputClassFields(ObjectInputStream.java:2263)
         at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:519)
         at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1412)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386)
         at java.io.ObjectInputStream.inputClassFields(ObjectInputStream.java:2263)
         at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:519)
         at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1412)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
         at sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:300)
         at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:134)
         at com.ptec.rms.app.olap.modelbuilder.OlapMBServiceImpl_Stub.getPanel(Unknown Source)
         at com.ptec.rms.app.sc.SystemConsoleDesktop.changeService(SystemConsoleDesktop.java:141)

    at least you have the benefit of the code to work with! :)

  • Trying to find out when was the object last referenced?

    Hi All,
    Is there a way I can find out when was an object or all the objects in a schema were last referenced along with the time it was referenced (May be a standard code all_references as such)? Just want to find out if there are any dormant objects. Thanks for the help,
    Reddy

    Hello,
    No.
    You can query user_dependencies and compare to all_objects, but this will only show you objects that have no direct dependencies. You will not be able to identify objects used only by e.g. shell scripts or a JAVA application.
    Regards
    Marcus

  • LSO---- Authoring Environment----Error when synchronizing the objectives

    Hi All
    I am getting this error  when i am creating  new learning objectives in Authoring environment.
    ""A fatal error occurred when synchronizing the off-line objectives catalog with online catalog""
    Any advises????
    Regards
    Rajya

    Hi
    Authorizations is one issue. First try with authorization.
    If you have a Learning Portal Installed, you will also find this problem there. In that case, tell your Basis Admin to check the RFC connection.
    Regards
    Waz

  • Identify object returned by lookup

    Hi!
    Does anybody know how to define an instance of an object received from lookup() method?
    Object object = context.lookup("jdbc");
    object.getClass(); //return class but I need to know the actual class which is instantiated
    Thanks.

    No, it doesn't answer my question. I'll try to explain better. Let's say I have a code:
    Object object = ctx.loookup("jdbc");
    I can check the instance like this:
    if(object instanceof String)
    ;//do something
    else if(object instanceof Vector)
    ;//do something
    And so on. But what if I don't have a slightest idea what object it is? Or I have to list 100 of them? Method getclass() sometimes return a stub from a server, not a real class. I have to cast it like this:
    String string = (String)object;
    or
    Vector vector = (Vector)object;
    And then I can access real class methods. From a stub I can only call naming context related methods.
    Does anybody know the answer?
    Thanks.

  • ClassCastexception when casting a Class that extends HttpServletRequestWrap

    I have inherited some code that runs OK in JDK 1.4.2 in a JSP, but give s an exception when the JSP runs unfer 1.5.0. My Class is a as follows:
    public class WrappedRequest extends HttpServletRequestWrapper {
         public WrappedRequest(HttpServletRequest req) {
              super(req);     
         /** Return value string of requested parameter.
         * <ul>
         * <li> If htmlEncode == NO_HTML_ENCODE, return the native request param, un-html encoded
         * <li> If htmlEncode == HTML_ENCODE, return an html encoded copy of the requested parameter
         * <li> If htmlEncode is neither, return the html encoded copy of the requested parameter     
         * </ul>
         * @param     name               name of the request parameter
         * @param     htmlEncode          whether html encoded/un-encoded parameter value should be returned.
         * @return     String of the requested parameter value. If parameter name is null, return null
         public String getParameter(String name, int htmlEncode) {
              if(name != null && (htmlEncode == NO_HTML_ENCODE)) {
                   String str = super.getParameter(name);
                   return str;
              else
                   return getParameter(name);     
         public String getParameter(String name) {
              String str = super.getParameter(name);
              if(str != null)
                   str = Utils.htmlEncode(str); //Another package class
              return str;               
    This class in normally invoked as follows:
         String changeApproval = ((WrappedRequest)request).getParameter("CrApp" , WrappedRequest.NO_HTML_ENCODE);
    I get a ClassCastException exception on this line. Any suggestions?
    Regards,

    Stuart_Millington wrote:
    Further to my original post I have another question. Please bear in mind that I am fairly new to Java and this is code that I have inherited. In the following line of code (which is the line that causes the exception:
    String changeApproval = ((WrappedRequest)request).getParameter("CrApp" , WrappedRequest.NO_HTML_ENCODE);
    Why is the request being cast? The following code SEEMS to run OK:
    WrappedRequest wr = new WrappedRequest(request);
    String CrApproval = wr.getParameter("CrApp" , WrappedRequest.NO_HTML_ENCODE);
    Any ideas?
    Regards,
    Stuart MillingtonOkay, then I understand your problem.
    You can only cast request to WrappedRequest when request IS A WrappedRequest - ie the statement request = new WrappedRequest(request) was called. You are apparently trying to convert a default implementation of HttpServletRequest into a WrappedRequest without first 'Wrapping' the request.
    What does Wrapping a Request mean and do? A request object is generated by the servlet container and it isn't easy to switch in your own implementation. So instead you make a WrappedRequest which takes the original instance of the HttpServletRequest generated from by the container and adds functionality to it. A WrappedRequest would have to extend an HttpServletRequest, and implement all the public API of said parent class. Most of the time the methods would look something like this:
    public String getParameter(String key) { return this.parentRequest.getParameter(key); } That is, it simply delegates most of the work to the HttpServletRequest it is wrapping. But some functions it may want to change behavior for and for those you insert your implementation.
    What you need to do:
    1) Learn how to use Java before you touch Servlets and server side stuff. You are adding too much complication by going straight to the end game. Use a book and the tutorials to get you through.
    2) Take the time to run the JavaEE tutorial.
    3) Start with your own code. Taking code snippets you see around the net and trying to get them to work is tough when you don't understand the concepts. For example, using a WrappedRequest is normally fairly useless if it isn't implemented using a Filter, and they work the best when they don't require a change to the request interface (i.e. when you never actually have to do a cast). Since you don't know Filters, and don't yet understand how the wrapper works I would suggest not using them.
    This is probably a mis-use of the RequestWrapper idea anyway (since, like I said, it requires a change in interface). What you would be better off doing is simply choosing to pass the parameter through a utility function that does the encoding for you. Example like:
    String changeApproval = HTMLEncoder.encode(request.getParameter("CrApp");when you want the parameter encoded and
    String changeApproval = request.getParameter("CrApp");when you don't.
    If you don't want to make your own utility for this purpose (and why would you) you can download a library that does it for you. One example is the [org.apache.commons.lang.StringEscapeUtils#escapeXML|http://commons.apache.org/lang/apidocs/org/apache/commons/lang/StringEscapeUtils.html#escapeXml(java.lang.String)] class#method from the Apache Foundation. The StringEscapeUtils is part of the Apache Commons Lang project, which you can reach [At the Commons/lang website.|http://commons.apache.org/lang/]

  • Bizarre ClassCastException when sending serialized objects

    I have two programs communicating with each other over a network using TCP and serialized objects. One of the programs uses an ObjectOutputStream to send the message, and the other uses an ObjectInputStream to receive it. The receiver has a thread that simply loops, receiving and processing messages one at a time.
    Under normal circumstances, this works fine. However, sometimes the sender program has to send more than one message, one right after the other. I guess my assumption was that on the receiving end, they would somehow just "queue up" in the ObjectInputStream and the receiver would be able to read them one at a time. But instead, I get this bizarre ClassCastException whose message talks about members and objects from both messages that were sent. It is as though somehow the two objects received are being mangled together and interpreted somehow as one object. This is strange to me, since I am pretty sure TCP is supposed to guarantee in-order delivery of packets.
    Can I not send multiple messages right after each other through an ObjectOutputStream and have them received in an ObjectInputStream? If not, what would be a good workaround?
    If you need more details, it works like this. I have two classes that look like this:
    class Class1 extends SerializableSuperclass
      Member1 m1;
    class Class2 extends SerializableSuperclass
      Member2 m2;
    }Sender sends an instance of Class1 and then immediately an instance of Class2. Receiver attempts to readObject() from the input stream and gets this exception:
    Exception in thread "Thread-4" java.lang.ClassCastException: cannot assign instance of Class2 to field Class1.m1 of type Member1 in instance Class1
    Isn't that bizarre? Two separate classes, and it is attempting to merge the two in some odd way.
    How do I fix or work around this?
    Thanks

    These classes do not have those methods. They are simply message classes designed to hold data. Do you need to see the methods that call ObjectOutputStream's writeObject() and ObjectInputStream's readObject() methods?
    The serializable superclass is there because it has other stuff including a field identifying the sender. It's basically a base message class.
    Also, the member classes are serializable (serializability isn't the issue anyway; "class cast" is the issue).

  • Getting ClassCastException when accessing Blob object

    I am using weblogic 5.1 with service pack 10.
    I need to query pdf data stored in a blob field in Oracle
    8.1.6 server. The native code c:\weblogic\bin\oci816_8
    is part of the path. When I query the database with
    Oracle 8 client, I can get data.
    driver: weblogic.jdbc20.oci.Driver
    url: jdbc20:weblogic:oracle:mydb
    What I have done is to get the blob object with:
    Blob blob = rs.getBlob(5);
    long len = blob.length();
    But when I call the blob.length();
    I got the a ClassCastException. I really appreicate
    your comment.
    The exception message is:
    ====================================================
    java.lang.ClassCastException: java.lang.String
    at weblogic.jdbc20.oci.Blob.length(Blob.java:75)
    at com.agf.profile.ProfileServlet.doProcess(ProfileServlet.java:126)
    at com.agf.profile.ProfileServlet.doGet(ProfileServlet.java:37)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletSt
    pl.java:120)
    at weblogic.servlet.internal.ServletContextImpl.invokeServlet(Servle
    textImpl.java:922)
    at weblogic.servlet.internal.ServletContextImpl.invokeServlet(Servle
    textImpl.java:886)
    at weblogic.servlet.internal.ServletContextManager.invokeServlet(Ser
    ContextManager.java:269)
    at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP
    a:380)
    at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129)
    ====================================================
    Thanks,
    Jian

    hi jian,
    it seems you are trying to access a column as a blob type when the data in
    that column is not blob.
    Make sure that your column number 5 is defined as Blob in the database.
    I tried the following code and it worked fine for me.
    Blob b=rs.getBlob("data");
    long l=b.length();
    byte bt[]=b.getBytes(1,(int)b.length());
    File f=new
    File("d:\\bea\\wlserver6.1\\config\\jdbcdomain\\applications\\defaultwebapp\
    \blob_new.pdf");
    FileOutputStream fos=new FileOutputStream(f);
    fos.write(bt);
    fos.close();
    It was able to create the file blob_new.pdf
    But when I tried the following code it gave me the same exception as you are
    getting
    Blob bb=rs.getBlob("id");
    long ll=bb.length();
    Where id is a column in the database of varchar type
    I am using the following settings
    driver: weblogic.jdbc.oci.Driver
    url: jdbc:weblogic:oracle
    i am using wl 6.1 and oracle 8
    Hope this helps you.
    johnny
    "jian zhang" <[email protected]> wrote in message
    news:[email protected]...
    >
    I am using weblogic 5.1 with service pack 10.
    I need to query pdf data stored in a blob field in Oracle
    8.1.6 server. The native code c:\weblogic\bin\oci816_8
    is part of the path. When I query the database with
    Oracle 8 client, I can get data.
    driver: weblogic.jdbc20.oci.Driver
    url: jdbc20:weblogic:oracle:mydb
    What I have done is to get the blob object with:
    Blob blob = rs.getBlob(5);
    long len = blob.length();
    But when I call the blob.length();
    I got the a ClassCastException. I really appreicate
    your comment.
    The exception message is:
    ====================================================
    java.lang.ClassCastException: java.lang.String
    at weblogic.jdbc20.oci.Blob.length(Blob.java:75)
    atcom.agf.profile.ProfileServlet.doProcess(ProfileServlet.java:126)
    at com.agf.profile.ProfileServlet.doGet(ProfileServlet.java:37)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
    atweblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletSt
    pl.java:120)
    atweblogic.servlet.internal.ServletContextImpl.invokeServlet(Servle
    textImpl.java:922)
    atweblogic.servlet.internal.ServletContextImpl.invokeServlet(Servle
    textImpl.java:886)
    atweblogic.servlet.internal.ServletContextManager.invokeServlet(Ser
    ContextManager.java:269)
    atweblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP
    a:380)
    atweblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:
    >
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129)
    ====================================================
    Thanks,
    Jian

  • When would the program return back in this statement

    SUBMIT rsbdcsub 
    WITH mappe = m_name
    WITH von = sy-datum
    WITH bis = sy-datum
    WITH z_verab = 'X'
    WITH logall = 'X'
    AND RETURN.
    Am having little confusion on how this will work. From the ABAP help, I understand that Once program access is completed, program execution for the calling program continues after the SUBMIT statement. in this case, RSBDCSUB submits the session that was created. so will the system wait until the session gets executed completly?
    Thanks,
    Kiran

    Hi Kiran,
    This link will help you
    link:[http://www.sapfans.com/sapfans/forum/devel/messages/30331.html]
    Try like , calling the fm in a do statement and if it reaches 'F' exit the loop and proceed, if its E or A or anything else, exit from the program...hope you got the idea....or you can use a independent program to check the status..make sure the loops doesnt goes to infinity ..this is just a hint
    The logic is to check the status of the submitted session.

  • Tired of casting the return from ModelManager.getModel(), here is a tip

    If you have been coding in JATO, you may have found yourself
    frequently having to cast the value
    returned by ModelManager.getModel(Class interfaceClass), in order to
    operate on the returned model in the fashion you desire.
    That is because ModelManager.getModel(Class interfaceClass) returns a
    Model interface and in
    the current version of the iMT, most of the Model interfaces are
    under specified.
    By underspecified I mean that the iMT translation tool could have
    specified more interface support in each of the application specific
    Model interface declarations.
    For instance, take the migration of a MultiSQL data object in
    NetDynamics.
    e.g. MultiSQLProducts
    The current version of the iMT translates this into a Model interface
    and a corresponding implementation.
    e.g. MultiSQLProductsModel and MultiSQLProductsModelImpl.
    The current version of the iMT declares that
    public interface MultiSQLProductModel extends QueryModel
    while
    public class MultiSQLProductModelImpl extends QueryModelBase
    implements MultiSQLProductModel, SelectQueryModel,
    InsertQueryModel, UpdateQueryModel, DeleteQueryModel
    Now, this means that when you get a MultiSQLProductModel from the
    ModelManager by calling ModelManager.getModel
    (MultiSQLProductModel.class), you will get a
    MultiSQLProductModelImpl object but you will have to cast the
    returned value if you wish to take advantage of its SelectQueryModel,
    InsertQueryModel, UpdateQueryModel, DeleteQueryModel capabilities.
    This can be tiresome.
    The remedy is that the interface declaration can be improved.
    Specifically, we can rewrite the interface/impl declarations as
    follows:
    public interface MultiSQLProductModel extends QueryModel,
    SelectQueryModel, InsertQueryModel,
    UpdateQueryModel, DeleteQueryModel
    public class MultiSQLProductModelImpl extends QueryModelBase
    implements MultiSQLProductModel
    This way when you call ModelManager.getModel
    (MultiSQLProductModel.class), you will not have to cast the return in
    order to take advantage of its its SelectQueryModel,
    InsertQueryModel, UpdateQueryModel, DeleteQueryModel capabilities.
    The next release of the iMT will translate code in this fashion.
    The current translation style is not broken, nor will it be broken by
    the next release of the iMT.
    We are just giving current iMT users an FYI, so that you can manually
    adjust your models IF you
    wish to make your programming efforts lest cast intensive.

    For those having problems with 10.4.x, try this link and see if any of their fixes address your problems. Apparently, there are several issues with
    10.4.x that are unrelated to the fix for the 10.3.9 users that I posted.
    Apple Mac OS X Intel - 10.4.9
    http://www.macfixit.com/search.php?productID=29147
    Apple Mac OS X PPC - 10.4.9
    http://www.macfixit.com/search.php?productID=8848

  • Warning when casting object into generic type at run time.

    I am getting this message when casting an object at run time:
    Type safety: The cast from Object to Tree<V> is actually checking against the erased type TreeI'm overloading an equals(Object o) method in my class.
    Is there a way to get rid of the warning (besides turning the warning off :))

    I'm overloading an equals(Object o) method in my
    class.
    Is there a way to get rid of the warning (besides
    turning the warning off :))No. The best you can do is what is demonstrated in the previous link.

  • ClassCastException when running on invocable task

    The following exception has occurred when running a synchronous invocable task, It appears to be internal to Coherence as nowhere in my code am I casting from an Object to a List.
    +[2010-03-24 19:14:09.143 +0000] 5945635 [Logger@9264171 3.5.3/465] ERROR Coherence - 2010-03-24 19:14:09.143/5945.921 Oracle Coherence GE 3.5.3/465 <Error> (thread=DistributedCache:default, member=7): An exception occured while dispatching synchronous event:MapListenerSupport$FilterEvent{DistributedCache$BinaryMap inserted: key=Binary(length=4, value=0x02AE9A42), value=null, synthetic, filters=[null]}+
    +[2010-03-24 19:14:09.145 +0000] 5945637 [Logger@9264171 3.5.3/465] ERROR Coherence - 2010-03-24 19:14:09.143/5945.921 Oracle Coherence GE 3.5.3/465 <Error> (thread=DistributedCache:default, member=7):+
    java.lang.ClassCastException: java.lang.Object cannot be cast to java.util.List
    at com.tangosol.net.cache.CachingMap.validate(CachingMap.java:1245)
    at com.tangosol.net.cache.CachingMap$BackMapListener.onMapEvent(CachingMap.java:1628)
    at com.tangosol.util.MultiplexingMapListener.entryInserted(MultiplexingMapListener.java:33)
    at com.tangosol.util.MapEvent.dispatch(MapEvent.java:266)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$ViewMap$ProxyListener.dispatch(DistributedCache.CDB:22)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$ViewMap$ProxyListener.entryInserted(DistributedCache.CDB:1)
    at com.tangosol.util.MapListenerSupport$WrapperSynchronousListener.entryInserted(MapListenerSupport.java:856)
    at com.tangosol.util.MapEvent.dispatch(MapEvent.java:266)
    at com.tangosol.coherence.component.util.CacheEvent.dispatchSafe(CacheEvent.CDB:14)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.dispatch(DistributedCache.CDB:86)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onMapEvent(DistributedCache.CDB:43)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$MapEvent.onReceived(DistributedCache.CDB:3)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onMessage(Grid.CDB:9)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:136)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onNotify(DistributedCache.CDB:3)
    at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
    at java.lang.Thread.run(Unknown Source)
    +[2010-03-24 19:14:09.145 +0000] 5945637 [Logger@9264171 3.5.3/465] ERROR Coherence - 2010-03-24 19:14:09.143/5945.921 Oracle Coherence GE 3.5.3/465 <Error> (thread=DistributedCache:default, member=7): (The exception has been logged and execution is continuing.)
    The Object returned by the getResult() method of the Invocable is a Map so I really don't see where the List cast is coming from.
    Any Ideas?

    We have reported the same issue to Coherence support. This started happening in production when we switched to 3.5.3. In fact we get 3 exceptions together.
    2010-07-02 05:54:33.477/316855.583 Oracle Coherence GE 3.5.3/465 <Error> (thread=DistributedCache:DefaultDistributedCache, member=4): (The exception has been logged and execution is continuing.)
    2010-07-02 05:54:33.477/316855.583 Oracle Coherence GE 3.5.3/465 <Error> (thread=DistributedCache:DefaultDistributedCache, member=4):
    2010-07-02 05:54:33.477/316855.583 Oracle Coherence GE 3.5.3/465 <Error> (thread=DistributedCache:DefaultDistributedCache, member=4): An exception occured while dispatching synchronous event:MapListenerSupport$FilterEvent{DistributedCache$BinaryMap updated: key=Binary(length=31, value=0x061D656E67696E654865617274626561744F7574626F756E64576F726B6572), old value=null, new value=null, filters=[null]}

Maybe you are looking for

  • Registering a schema

    Help Please I am currently in the process of building a xml schema in a 10g release 2 DB and I am having trouble registering a schema here is a summary of what I have done SQL> BEGIN 2 3 DBMS_XMLSCHEMA.registerSchema('http://schemas.xmlsoap.org/wsdl/

  • Frequently "Lost" Files

    I've worked with Captivate at two institutions now and I repeatedly have this problem: I make great presentations-- no real bells & whistles, just demonstrations with audio-- and save them on the hard drive. For one reason or another (I got a new mac

  • Bulgarian as an input language for BlackBerry Q10

    Please add Bulgarian, a language of the European community, as an input language for BlackBerry smartphones. It's a great disappointment to find that your home language is not available on your phone, especially as Bulgaria has been part of the EU fo

  • Losing Sleep | {container.item} problem

    Hi <p> I have this problem in Weblogic Workshop 8.1. I've got an arrayList of Strings in a repeater. I need to submit one of the strings in the arrayList to a pageflow String variable. But whenever I try to submit it, I get a ClassCastException coz'

  • ITunes ***** my CPU

    Has anyone else noticed how itunes drains your cpu for the simplest tasks. Downloading podcast drains 100% of my CPU making multitasks almost impossible.