EJB : How to return user defined object

hi,
i am a newbie in EJB. i have the following simple problem:
public interface MyApp extends EJBObject
   public String getResult() throws RemoteException;
}the above code will be ok because it is returning String object.
however, i need to return a user defined object like:
public interface MyApp extends EJBObject
   public MyResult getResult() throws RemoteException;
}then i got java.lang.ClassCastException during runtime.
please tell me how to resolve this problem.
thank you very much

since you are a newbie, let me explain something to you. Ask your question in the proper forum. In case, you still don't understand there is a forum for EJB questions.

Similar Messages

  • How to alter user defined  objects in  oracle

    Hi all,
    Can any one tell me how to alter user defined objects in oracle .
    Thanks,
    P Prakash

    prakash wrote:
    Hi all,
    Can any one tell me how to alter user defined objects in oracle .
    DROP
    then
    CREATE
    Handle:      prakash
    Email:      [email protected]
    Status Level:      Newbie (80)
    Registered:      Feb 3, 2011
    Total Posts:      185
    Total Questions:      67 (65 unresolved)
    so many questions & so few answers.
    How SAD!
    Edited by: sb92075 on Sep 22, 2011 9:22 AM

  • How to use user defined object with linked button

    Hi experts
    Can I use user defined table data with linked button. If yes then how. plz give me sample examples.
    Regards
    Gorge

    If you have an UDO in your form, or any other, the FormDataLoad eventhandler should be used.
    Take care, it is not inside the eventhandler.
    for VB:
    Select SBO_APPLICATION in the classes, and select FormDataLoad event
    Private Sub SBO_Application_FormDataEvent(ByRef BusinessObjectInfo As SAPbouiCOM.BusinessObjectInfo, ByRef BubbleEvent As Boolean) Handles SBO_Application.FormDataEvent
    in C#
    Add a new eventhandler as
    // declaration
    SBO_Application.FormDataEvent += new SAPbouiCOM._IApplicationEvents_FormDataEventEventHandler(ref SBO_Application_FormDataEvent);
    // eventhandler:
    public void SBO_Application_FormDataEvent(ref SAPbouiCOM.BusinessObjectInfo BusinessObjectInfo, out bool BubbleEvent)

  • How to add User defined return type in service interface of AppModule

    HI All,
    I am creating service interface using AppModule. Added custom method with Java primitives and working fine. Now i want to added custom method with return type is EMP object means user defined object. How can i do so?
    Thanks in advance.

    I looked it up in the mean time ...
    The docs state that you only can use simple data type or java.util.list or AttributeList (which is a wrapper for any viewRow). So I guess you have to somehow flatten your complex data type or create a custom VO which holds it.
    http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/bcextservices.htm#CJAEHFJD
    Scroll down to 11.2.3
    Timo

  • How can i send user defined Object as a argument to the MBean methods in authentication provider to create user?

    I developed our own Authentication, Identity Assertion & Authorization providers
    for weblogic 8.1 SP1. In the authenticator MBean i have one method which takes
    user defined object as a argument and returns a user defined object. i am able
    to call all the methods which takes java objects(for example: String, int, ArrayList,
    HashMap, Etc...) as a argument and returns also a java object but when i user
    any user defined object then it gives exception. if in the argument i used user
    defined object then it is not able to call that method telling NoSuchMethodException.
    Is there any way to use user defined object as an argument to MBean method?
    can anyone please help us as we r in the final stage of the project?
    Thanks
    Lakshmi

    "Lakshmi Padhy" <[email protected]> wrote in message
    news:3fc2f50c$[email protected]..
    >
    I developed our own Authentication, Identity Assertion & Authorizationproviders
    for weblogic 8.1 SP1. In the authenticator MBean i have one method whichtakes
    user defined object as a argument and returns a user defined object. i amable
    to call all the methods which takes java objects(for example: String, int,ArrayList,
    HashMap, Etc...) as a argument and returns also a java object but when iuser
    any user defined object then it gives exception. if in the argument i useduser
    defined object then it is not able to call that method tellingNoSuchMethodException.
    >
    Is there any way to use user defined object as an argument to MBeanmethod?
    >
    I seem to remember that jmx only supports scalar datatypes. Ask in the
    weblogic.developer.interest.management newsgroup.

  • How to assign a query retrived value to a user defined  object in a table

    how to assign a query retrived value to a user defined  object in a table

    Rajeshwar,
    If you use the "Search" feature in this forum, you should be able to find helpful links to similar questions.  You could also look at the RecordSet and DoQuery documentation in the SAP Business One SDK Help Center documentation to assist you with your question.
    HTH,
    Eddy

  • How to clone a user-defined object?

    Hello,
    I need to clone an Object[] array (propArray) that holds objects of Integer, Double, Boolean type, along with objects of user-defined ClassA, ClassB, ClassC type. The matter is that the ClassA object isn't being cloned, while the rest of the user-defined objects are cloned just fine.
    In more detail, ClassA has two properties:
    public class ClassA implements Cloneable{
       private String penaltyFor;
       private Penalty[] penaltyArray;
       protected Object clone(){
          try{
             ClassA o = (ClassA)super.clone();
             o.penaltyFor = this.penaltyFor;
    //         o.penaltyArray = (Penalty[])penaltyArray.clone();  //This ain't working.
             //But neither does this :(.
             int penCount = this.penaltyArray.length;
             o.penaltyArray = new Penalty[penCount];
             for(int i = 0; i < penCount; i++)
                o.penaltyArray[i] = (Penalty)this.penaltyArray.clone();
    return o;
    } catch(CloneNotSupportedException e){ throw new InternalError(); }
    The Penalty class contains properties of primitive type and here is its clone() method:
    public class Penalty implements Cloneable{
       private String penaltyDesc;
       private int lowLimit, upperLimit, penaltyValue;
       protected Object clone(){
          try{
             Penalty o = (Penalty)super.clone();
             o.penaltyDesc = this.penaltyDesc;
             o.lowLimit = this.lowLimit;
             o.upperLimit = this.upperLimit;
             o.penaltyValue = this.penaltyValue;
             return o;
          } catch(CloneNotSupportedException e){ throw new InternalError(); }
       }I don't know what else to try. I suppose the problem is the Penalty[] array, but I may be wrong. An alternative would be to use Copy Constructors, but it will cause too many changes to the code, since the clone() method is used for the propArray copy in many places and the ClassA object is a late addition to the propArray (unfortunately it wasn't planned to exist from the beginning).
    Thank's.

    class ClassA implements Cloneable{
       private String penaltyFor;
       private Penalty[] penaltyArray;
       public Object clone(){
          try{
             ClassA o = (ClassA) super.clone();
             if (penaltyArray!=null){
                o.penaltyArray = (Penalty[]) penaltyArray.clone();
                for(int i = 0; i < penaltyArray.length; i++) {
                    Penalty penalty = this.penaltyArray;
    if (penalty!=null)
    o.penaltyArray[i] = (Penalty) penalty.clone();
    return o;
    } catch(CloneNotSupportedException e){
    throw new InternalError();
    class Penalty implements Cloneable{
    private String penaltyDesc;
    private int lowLimit, upperLimit, penaltyValue;
    public Object clone(){
    try{
    return super.clone();
    } catch(CloneNotSupportedException e){
    throw new InternalError();
    If your Penalties are immutable, you don't need to clone them -- rather,
    make then unclonable, like Strings.

  • How to use user-defined packages in JAX-RPC web service

    I am trying to use Object of my class located in my package in jax-rpc webservice,the code is
    package supercomputer;
    import Hello.*;
    public class SuperImpl implements SuperIF
    public String sendParam(String data)
    Temp ob=new Temp();
    int i=ob.get1(10000);
    return data+"returned by supercomputer";
    Temp is located in Hello package,I have jar the Hello package as Hello.jar and has set its classpath in targets.xml of Ant tool.
    The code compiles well and service is deployed successfully,but when i try to call the service from the client its gives me following error.
    [echo] Running the supercomputer.SuperClient program....
    [java] java.rmi.ServerException: Missing port information
    [java] at com.sun.xml.rpc.client.StreamingSender._raiseFault(StreamingSender.java:357)
    [java] at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:228)
    [java] at supercomputer.SuperIF_Stub.sendParam(SuperIF_Stub.java:60)
    [java] at supercomputer.SuperClient.main(Unknown Source)
    I dont know if it deploys why it gives error on client side.
    Please tell how to use user-defined packages and class in jax-rpc service code ,i am not talking about passing user-defined parameters i am just talking about making objects of user defined classes in jax-rpc service.I think there is some problem in classpath.
    Please guide me in doing that.
    Thanks,
    Farrukh

    Farrukh,
    I don't know if your error is about a missing class from your custom package, ... what track did you followed to say that?
    To use your package in the implementation of you web service, you should only follow the rules of making a web application: put your package jar in your \lib directory inside WEB-INF/ or your package classes unjared in classes (also in WEB-INF/).
    As I already said, I have doubts that your error should be originated from a missing class from your package, but:
    -try to see the logs (errors?) when you deploy your web service that could give a hint about the problem.
    -try to see if you can access your endpoint through your browser to see if there is a online status
    -display your config/WSDL file, and the steps you did to build your web service.
    regards,
    Pedro Salazar.

  • Object to user defined object

    I pushed user defined objects in to the Vector or Stack.
    But they return an java defined Object type when I try to use them.
    Is there way that I can convert this Object into my defined object.
    MyClass a;
    MyClass b;
    Stack table = new Stack();
    table.push(a);
    table.push(b);
    //now when i use pop to get it back it returns an Object type
    Object temp = table.pop();
    //how do I change this object into MyClass so i can have access to MyClass stuff?

    dam..thank you so much I feel stupid..Don't.
    Casting is one of those things that can take a while to get used to.
    In your original post, you asked: how do I change this object into MyClass so i can have access to MyClass stuff?
    It's important that you understand that casting doesn't change the object in any way.
    All it does is cause a reference that's been declared as one type to be treated as a different type. So even though all the compiler knows about what's returned from pop() is that it refers to an Object, you're telling it you know better, and that the object pointed at will in fact be a MyClass, and so you can access MyClass' members.
    If, at runtime, the object you happen to pop off the stack isn't a MyClass, casting won't magically turn it into one. You'll get a ClassCastException.

  • UDO--user defined object

    how to use UDO--user defined object in sap b1????

    Creating UDO in SAP B1
    1. Create UDT, ( Create UDT as Document if want the code to be in auto increament form)
    2. Create UDFs for created UDT,
    3. Register Object using  "Object Registration Wizard",
                    (a) Put UDT's unique name in "UNIQUE ID" field of UDO (Image - UDO01.jpg) ,
                    (b) Do further as per requirements,
    4. After Registering the UDO, you can access it from where you have set it to access (@ UI Settings of "User - Defined Object Registration Wizard"),
    5. If you wana change the field location / change the design of the form, Open screen painter as and click on "Open User Defined Object List " (Mostly 3rd icon from Left in screen painter),
    6. Make required changes and save it by clicking "Save Form To Database" ( Mostly 2nd icon from Left in Screen Painter),
    7. Now the UDO is ready and can be used by user.

  • Link button to User Defined Object in Grid

    Hi,
    I'm using SAP B1 8.81 with B1DE.
    I have added a grid which is populated from a DataTable to a form.
    One of the columns in the grid contains the DocEntry of a User Defined Object.
    How can I display a link button on the grid ?
    Regards,
    Ben

    Hello Ben,
    You need to set the column object type.
    Dim oGrid As SAPbouiCOM.Grid = oForm.Items.Item("MyGrid").Specific
    oGrid.Columns.Item("DocEntry").Type = BoGridColumnType.gct_EditText
    Dim oEditCol As SAPbouiCOM.EditTextColumn = oGrid.Columns.Item("DocEntry")
    oEditCol.LinkedObjectType = "2" 'The SDK documentation says you should use the value 0, but in previous versions it didn't work, so I recommend you user a value other than -1 or 0
    You then need to catch the et_MATRIX_LINK_PRESSED event and other your user form...
    From the SDK Help File regarding the BoLinkedObjectType enum
    lf_None -1 No target object
    lf_UserDefinedObject 0 User-defined object
    lf_GLAccounts 1 G/L account object
    lf_BusinessPartner 2 Business Partner object
    lf_Items 4 Item object
    lf_SalesEmployee 53 Sales employee object
    Regards,
    Vítor Vieira

  • Dispose a user-defined object in Java

    Hello,
    Suppose I have the following loop :
    while ( some_condition) {
    UserDefinedClass abc = new UserDefinedClass();
    // do some work and exit loop.
    Everytime, I enter this loop I instantiate a new object "abc". I am worrying that if I keep doing this, after a while, I will run out
    of memory. Is there a way to dispose a user-defined object? Or is this scenario taken care of by Java garbage collection process?
    Any advice is much appreciated.
    Akino.

    Akino wrote:
    Hello,
    Thank you for your reply.
    I wonder if you could tell me how often Java does its garbage collection?That's pretty unpredictable.
    I ran a test and observed that
    my program's memory usage kept going up and up.If you gave it it 64M, and the most it ever needs at one time is 10M, it can still ramp up to the full 64M, even if it's doing frequent GC. Running GC does NOT mean that the JVM gives the memory back to the OS. It can do that, and I think it does under some circumstances, but there's no guarantee if, when, or how much it will give back. GC only means that the JVM has reclaimed space that is no longer in use by objects. Whether it holds onto that memory for future use or gives it back to the OS is up to it.

  • Using User Defined Object in B1if

    Hello Expert,
    I am trying to configure the B1if scenario for User Defined Object, But when i check the consistency of the scenario there are three issues
    1. 0142 vBIU warning - inbound - channel: defined object identifier is not listed in the repository 
    2. 0259 vBIU inconsistency - outbound - details: 'Service Method Identifier' is not correct
    3. 0262 vBIU inconsistency - outbound - details: 'Get Method Identifier' is not correct
    I have prepared the Test as a UDO in SAP B1.
    *CONFIGURATION*
    Scenario Step Definition INBOUND - CHANNEL
    Channel : INB_B1_EVNT_ASYN_EVT
    Type : SAP Business One
    Mode : Asynchronous
    Trigger : B1Event
    Object : Test
    Identification Parameter : n.a.
    Namespace Definition :  n.a.
    Retrieval
    Method  : Retrieval
    Adapter :  DI API
    Type : Service
    Rule Document  :
    id : GeneralService
    type : get
    method : getByParams
    tag : TestParams
    keys :  Code(Code)
    Outbound Phase
    Channel : OUT_B1
    Type : SAP Business One
    Format : DI Service
    Regards
    Vijay Barapatre

    Hi All,
    I have a UDO with one Table and Code and Name as fields, when I add data in SAP with the default screen I want to trigger it in B1IF, I have tried identifier 152, 153 and many more.
    But my trigger keeps returning blank so it doesn't go through to my processes.
    <?xml version="1.0" encoding="utf-8" ?>
    - <Msg xmlns="urn:com.sap.b1i.vplatform:entity" xmlns:b1il="urn:com.sap.b1i.sim:b1ilog" xmlns:b1im="urn:com.sap.b1i.sim:b1imessage" xmlns:bfa="urn:com.sap.b1i.bizprocessor:bizatoms" xmlns:sim="urn:com.sap.b1i.sim:entity" xmlns:vpf="urn:com.sap.b1i.vplatform:entity" MessageId="13102816541180273503C0A80079CC46" BeginTimeStamp="20131028165411" recording="true" logmsg="0009" msglogexcl="false" MessageLog="true"> 
    - <Header> 
    <msglog step="Default message log" always="false" b1ifactive="true" />  
    - <Resumption> 
    <starter ipo="/vP.0010000119.in_BEAE/com.sap.b1i.vplatform.runtime/INB_B1_EVNT_ASYN_EVT/INB_B1_EVNT_ASYN_EVT.ipo/proc" />  
    </Resumption>
    <IPO Id="INB_B1_EVNT_ASYN_EVT" tid="13102815571480273490C0A8007961AC" />  
    <Sender Id="0010000119" />  
    </Header>
    - <Body> 
    - <Payload Role="T" Type="B1Event" add=""> 
    - <Event xmlns="" B1EventFilter="false"> 
    - <b1e:b1events xmlns:b1e="urn:com.sap.b1i.sim:b1event"> 
    - <b1e:b1event> 
    <b1e:eventsource>MobiPay</b1e:eventsource>  
    <b1e:objecttype>FC_PODO</b1e:objecttype>  
    <b1e:transactiontype>A</b1e:transactiontype>  
    <b1e:usercode>manager</b1e:usercode>  
    <b1e:userid>manager</b1e:userid>  
    - <b1e:keys count="1"> 
    - <b1e:key> 
    <b1e:name>Code</b1e:name>  
    <b1e:value>test 2</b1e:value>  
    </b1e:key>
    </b1e:keys>
    <b1e:sourcesite>BDRAPER</b1e:sourcesite>  
    <b1e:sourceport>1433</b1e:sourceport>  
    <b1e:sourcetype>6</b1e:sourcetype>  
    <b1e:sld value="BDRAPER!!MobiPay" />  
    </b1e:b1event>
    </b1e:b1events>
    - <b1ie:B1IEvent xmlns:b1ie="urn:com.sap.b1i.sim:b1ievent" SysId="0010000119" SysTypeId="B1.9.0" Task="I" LocalObjectType="FC_PODO"> 
    - <b1ie:PrimaryKeyList> 
    <b1ie:PrimaryKey Key="Code" Value="test 2" />  
    </b1ie:PrimaryKeyList>
    </b1ie:B1IEvent>
    </Event>
    </Payload>
    <Payload Role="S" />  
    </Body>
    </Msg>
    Please help,
    Regards,
    Brenden Draper.

  • User Defined Object in orchestration

    We want to use user defined object as a type for the variable in orchestration. It there any way to do it?
    In other word we want to return 15 attributes as orchestration response so want to creating User Defined Object.
    Please advice.
    Thanks and Regards,
    Sourabh Lahoti

    Please look at the following article:
    http://livedocs.adobe.com/livecycle/8.2/programLC/programmer/help/000959.html
    Jasmin

  • Portal Entitlements for user defined objects

    Hi,
    The UUP aggregates the user profile information from different backed data sources.
    One of the properties in the propertyset is a multivalued property. I populate
    this by the following code:
    PropertyMapKey propertyMapKeyM = new PropertyMapKeyImpl(null,"DA_Privilege");
    String str="LAB1_CAPLinks_ViewReports" + "," + "LAB1_CAPLinks_EditReports"; //hardcoded
    for testing
    propertyCache.put(propertyMapKeyM,str);
    (This code resides in the MyEntityPropertyManager)
    When I go to the portal administration screen, I do not see the values, it instead
    only gives me the object id of the java String array.
    Could someone please help me with the following questions:
    1. How do I populate the multivalued property ? I see in documentation that there
    is 2 different PropertyCache implementation......confused which one to use and
    how.
    2. Is there a way to define user defined objects in UUP and have portlets entitled
    to the state of the object ? (a custom entitlement code)
    3. Any sample code would be helpfull
    Thanks,
    Uday

    Thank You Greg. Now it works.
    -Uday
    Gregory Smith <[email protected]> wrote:
    I'm not totally sure, but I would imagine you want to put a List of
    Strings into the propertyCache if the property is supposed to be
    multivalued text, e.g.:
    PropertyMapKey propertyMapKeyM = new PropertyMapKeyImpl(null,
         "DA_Privilege");
    List strs = new ArrayList(2);
    strs.add("LAB1_CAPLinks_ViewReports");
    strs.add("LAB1_CAPLinks_EditReports");
    propertyCache.put(propertyMapKeyM, strs);
    I know that all of the code that calls the UUP and property sets code
    expects a Collection back from a multivalued property (but I'm not sure
    about a UUP implementation).
    Greg
    Udayraj Nair wrote:
    Hi,
    The UUP aggregates the user profile information from different backeddata sources.
    One of the properties in the propertyset is a multivalued property.I populate
    this by the following code:
    PropertyMapKey propertyMapKeyM = new PropertyMapKeyImpl(null,"DA_Privilege");
    String str="LAB1_CAPLinks_ViewReports" + "," + "LAB1_CAPLinks_EditReports";//hardcoded
    for testing
    propertyCache.put(propertyMapKeyM,str);
    (This code resides in the MyEntityPropertyManager)
    When I go to the portal administration screen, I do not see the values,it instead
    only gives me the object id of the java String array.
    Could someone please help me with the following questions:
    1. How do I populate the multivalued property ? I see in documentationthat there
    is 2 different PropertyCache implementation......confused which oneto use and
    how.
    2. Is there a way to define user defined objects in UUP and have portletsentitled
    to the state of the object ? (a custom entitlement code)
    3. Any sample code would be helpfull
    Thanks,
    Uday

Maybe you are looking for