GetCallerPrincipal() returns wrong object

I have implemented my own realm and was successfull doing so. I also
created my own User object and that is returned in the authentication
method.
My problem is that when I call getCallerPrincipal() from within an EJB
the object returned has the correct login name but is an instance of
weblogic.security.acl.User. Is this normal? I fille my own object with
som extra info and was hoping that I could access them.
Has anyone the same experience? Is this a bug or is my
doing/understanding wrong?
// Björn Caroll
Itech AB
http://www.itech.se/

Did you happen to solve the issue? We are experiencing the exact same thing in our QA environment, although it doesn't appear to be the result of a heavy load. It happens from time to time when at most 3 users are unit testing the application. Problem is, nobody in development can replicate it.... Very frustrating to say the least. Anyhow, hopefully you figured it out, as I don't see any other posts on any other forums with a fix for this and I can't find a bug for OAS 10.1.3.1 for this either.

Similar Messages

  • Report returns wrong data when run on server

    Hi,
    I'm runing CRS XI R2 on Windows Server 2003 SP2.  When I refresh a report in the Crystal Reports XI Designer, I'm getting correct data.  But when I schedule the report to run on the server it returns wrong data.  The data is different from what I see when I refresh it from the designer.  In the report I have running totals set up to count customers that meet a certain criteria.  The report is very large.  It take almost 2 hours to refresh.
    I was wondering what is causing the difference in running total data between refreshing it on the designer and running it on the server.  Is it returning wrong data b/c of it not reading all the records?  Should I be making any changes to the server settings?  I saw that under pageserver, there are options for  setting the 'Minutes Before an Idle Report Job is Closed' and 'Database Records To Read When Previewing Or Refreshing a Report".  Do either of those have anything to do with the report returning incorrect data when being scheduled to run on the server?
    Thanks,
    Kim

    Hi Xuandao,
    You would need to Use Cell Binding and Trigger concept to accomplish this.
    Its simple, however, you would have to work on a trial and error basis to understand this concept as implementing the same is subject to your dashboard and WEBI Design.
    Open you LiveOffice.
    Insert your WEBI, Now, go to Object Properties of your WEBI, select the second tab that says Prompt, Here, it lists the prompts that you have for your WEBI. This would also enlist your BEx variables as well. Select this BEx variable and click on the button that says Prompt at the bottom of this window. Here, select choose Excel Data Range and click on the cell select button on the right (small button that lets you choose what cell you want to bind this prompt to), Now select a free cell that would not be even populated later on when you run the dashboard say A1 (remember the value that you select). Click on OK and again OK. The WEBI Refreshes and you can see all the prompt values at the cell A1. These are all the possible values stored for your BEx prompt variables (these values are fetched from BW system dynamically).
    Now, save this LiveOffice, Go to you dashboard. Connect your dashboard to your Live office. Go to Data-> connections-> Now, select the WEBI and in the right hand pane  go to Usage tab, here, Click on Trigger cell button on the right hand side and select A1 in you LiveOffice.
    It should work fine.
    Let me know.
    Rgds,
    Sreekul Nair

  • EXCEPTION [TOPLINK-7056] The wrong object was registered into the UnitOfWor

    Hello,
    I am using Toplink 9.0.3.4. I have a one to many relationship defined. One DTOStep can have several DTOStepTexte. The XML descriptions for the relationship are:
    DTOStep:
                        <database-mapping>
                             <attribute-name>texteList</attribute-name>
                             <read-only>false</read-only>
                             <reference-class>com.bnpparibas.bfi.ttk.dto.DTOStepTexte</reference-class>
                             <is-private-owned>true</is-private-owned>
                             <uses-batch-reading>true</uses-batch-reading>
                             <indirection-policy>
                                  <mapping-indirection-policy>
                                       <type>oracle.toplink.internal.indirection.NoIndirectionPolicy</type>
                                  </mapping-indirection-policy>
                             </indirection-policy>
                             <container-policy>
                                  <mapping-container-policy>
                                       <container-class>java.util.ArrayList</container-class>
                                       <type>oracle.toplink.internal.queryframework.ListContainerPolicy</type>
                                  </mapping-container-policy>
                             </container-policy>
                             <ascending-order-by-query-key>noSeq</ascending-order-by-query-key>
                             <source-key-fields>
                                  <field>BATCH_SP2.ID_BATCH</field>
                             </source-key-fields>
                             <target-foreign-key-fields>
                                  <field>BATCH_SP2_TEXTE.ID_BATCH</field>
                             </target-foreign-key-fields>
                             <type>oracle.toplink.mappings.OneToManyMapping</type>
                        </database-mapping>
    DTOStepTexte:
                        <database-mapping>
                             <attribute-name>step</attribute-name>
                             <read-only>false</read-only>
                             <reference-class>com.bnpparibas.bfi.ttk.dto.DTOStep</reference-class>
                             <is-private-owned>true</is-private-owned>
                             <uses-batch-reading>true</uses-batch-reading>
                             <indirection-policy>
                                  <mapping-indirection-policy>
                                       <type>oracle.toplink.internal.indirection.NoIndirectionPolicy</type>
                                  </mapping-indirection-policy>
                             </indirection-policy>
                             <uses-joining>true</uses-joining>
                             <foreign-key-fields>
                                  <field>BATCH_SP2_TEXTE.ID_BATCH</field>
                             </foreign-key-fields>
                             <source-to-target-key-field-associations>
                                  <association>
                                       <association-key>BATCH_SP2_TEXTE.ID_BATCH</association-key>
                                       <association-value>BATCH_SP2.ID_BATCH</association-value>
                                  </association>
                             </source-to-target-key-field-associations>
                             <type>oracle.toplink.mappings.OneToOneMapping</type>
                        </database-mapping>
    I do the following:
    - A DTOStep containing 4 DTOStepTexte is read from the Oracle database in a session bean and sent to a swing client.
    - The DTOStep is modified on the client.
    - The modified DTOStep is sent back to the session bean where the following code is executed:
    public DTOStep modifyStep(DTOStep step) throws TTKDataNotFoundException
    Session session = null;
    try
         // Récupération de la session.
         session = getSession();
         // Récupération de l'unité de travail.
         UnitOfWork uow = session.getActiveUnitOfWork();
         uow.performFullValidation();
         // Vérification que le step existe. Lecture sur clé primaire.
         if (!session.doesObjectExist(step))
         throw new TTKDataNotFoundException();
         // Registration du step à modifier en incorporant les modifs utilisateur.
         m_logger.debug("step = " + FmkCommonUtilities.toStringFromGetters(step));
         DTOStep stepClone = (DTOStep) uow.mergeCloneWithReferences(step);
         m_logger.debug("stepClone = " + FmkCommonUtilities.toStringFromGetters(stepClone));
         // Mise à jour des champs techniques.
         Date date = new Date(System.currentTimeMillis());
         stepClone.setCUtiMaj(getCUti());
         stepClone.setDMaj(date);
         // Renvoi du step tel que dans la base.
         // Une copie en est faite puisque le clone ne doit pas être
         // utilisé en dehors de la transaction.
         DTOUtilities.setFromGetters(stepClone, step);
         return step;
    catch (TTKDataNotFoundException e)
    context.setRollbackOnly();
    throw e;
    catch (EJBException e)
    context.setRollbackOnly();
    throw e;
    catch (Throwable t)
    context.setRollbackOnly();
    m_logger.error("Error in " + FmkCommonUtilities.getCurrentMethodName(), t);
    throw new EJBException(t.toString());
    finally
    // On libère la session.
    if (session != null)
    session.release();
    I have the folowing behaviour:
    - if the list of DTOStepTexte is not modified, everything is ok.
    - if a new DTOStepTexte is added, everything is ok.
    - if a DTOStepTexte is removed, I have the following exception on the mergeCloneWithReferences() call:
    EXCEPTION [TOPLINK-7056] (TopLink - 9.0.3.4 (Build 432)): oracle.toplink.exceptions.ValidationException
    EXCEPTION DESCRIPTION: The wrong object was registered into the UnitOfWork. The object [com.bnpparibas.bfi.ttk.dto.DTOStep@1a772d] should be the object from the parent cache [com.bnpparibas.bfi.ttk.dto.DTOStep@2cfd62].
         at oracle.toplink.exceptions.ValidationException.wrongObjectRegistered(Unknown Source)
         at oracle.toplink.publicinterface.UnitOfWork.checkExistence(Unknown Source)
         at oracle.toplink.publicinterface.UnitOfWork.internalRegisterObject(Unknown Source)
         at oracle.toplink.internal.sessions.MergeManager.getTargetVersionOfSourceObject(Unknown Source)
         at oracle.toplink.mappings.ObjectReferenceMapping.mergeIntoObject(Unknown Source)
         at oracle.toplink.internal.descriptors.ObjectBuilder.mergeIntoObject(Unknown Source)
         at oracle.toplink.internal.sessions.MergeManager.mergeChangesOfCloneIntoWorkingCopy(Unknown Source)
         at oracle.toplink.internal.sessions.MergeManager.mergeChanges(Unknown Source)
         at oracle.toplink.mappings.CollectionMapping.mergeIntoObject(Unknown Source)
         at oracle.toplink.internal.descriptors.ObjectBuilder.mergeIntoObject(Unknown Source)
         at oracle.toplink.internal.sessions.MergeManager.mergeChangesOfCloneIntoWorkingCopy(Unknown Source)
         at oracle.toplink.internal.sessions.MergeManager.mergeChanges(Unknown Source)
         at oracle.toplink.publicinterface.UnitOfWork.mergeCloneWithReferences(Unknown Source)
         at com.bnpparibas.bfi.ttk.server.ejb.TestToplinkServiceBean.modifyStep(TestToplinkServiceBean.java:795)
         at TestToplinkService_StatelessSessionBeanWrapper2.modifyStep(TestToplinkService_StatelessSessionBeanWrapper2.java:2032)
         at java.lang.reflect.Method.invoke(Native Method)
         at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:119)
         at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:48)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:479)
    Can someone please tell me what is wrong in the way I use toplink ?
    Thank you in advance for your answer.
    Best regards.
    Pierre Laroche

    What does the method DTOUtilities.setFromGetters(stepClone, step); do? If you are copying from step into stepClone you must ensure that all of the references from step are registered first. You should not need to perform this copy anyway as the mergeCloneWithReferences would have copied the data from step.
    --Gordon                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • JSObject returns wrong date. How can I extract correct date from digital signature?

    I'm trying to extract name and date from digital signatures by using JSObject in Excel VBA, but JSObject returns wrong date. Year, month, hour and minute are correct, but only day is incorrect.
    Here is my code. I'm using Acrobat 8.1.3.
    Please tell me what's wrong with this code and how I can extract correct date from digital signatures.
    Public Sub sbTest()
    Dim oApp As Acrobat.acroApp
    Dim oPDDoc As Acrobat.AcroPDDoc
    Dim jso As Object
    Dim f As Object
    Dim sig As Object
    Dim strFileName As String
    Set oApp = CreateObject("AcroExch.App")
    Set oPDDoc = CreateObject("AcroExch.PDDoc")
    strFileName = "C:\Test.pdf"
    If (oPDDoc.Open(strFileName)) Then
    Set jso = oPDDoc.GetJSObject
    Set f = jso.getField("Signature1.0")
    Set sig = f.signatureInfo()
    Debug.Print sig.Name
    Debug.Print sig.Date
    End If
    Call oPDDoc.Close
    Call oApp.Exit
    End Sub

    Hi
    You can use TDMS file format to save the data. I have attached a reference Vi.
    On button click you can log the data or remove the case structure and continuous log the complete acquisition data.
    Thanks and Regards
    Himanshu Goyal
    Thanks and Regards
    Himanshu Goyal | LabVIEW Engineer- Power System Automation
    Values that steer us ahead: Passion | Innovation | Ambition | Diligence | Teamwork
    It Only gets BETTER!!!
    Attachments:
    Data Save in File.vi ‏35 KB

  • Robot getpixelColor returns wrong color sometimes...

    Hey
    I ve got a problem. I read Pixels from a Game with the Robot getPixelColor method. Sometimes it returns right values, sometimes wrong! I check some pixels if they are white. The pixels dont move, so this same pixels are white everytime!.
    Now sometimes he returns wrong colors. Instead of 255,255,255 ...it returns 0,12,25 or something like that. (with the same x, y coordinate).
    My assumption is: My code is like following
    CheckPixel(MyRobot.getPixelColor(30,40);
    CheckPixel(MyRobot.getPixelColor(31,45);
    CheckPixel(MyRobot.getPixelColor(36,20);
    CheckPixel(MyRobot.getPixelColor(51,70);
    Now it has to return 255,255,255 but somtimes its not working, he return 0,0.12 .... 0,0,15..... 255,255,255 .. or something like that
    Could it be, that java does not refresh the robot object so fast when I call getPixelColor so fast in a row?
    Is there a command with which I force Java to wait until the pointer is on the right x,y coordinate? Except of Thread.Sleep();
    Thank you for your help..

    ok I try:
    Robot r = new Robot();
    int x, int y;
    x = getItSomehwere();
    y = getitsomehwere();
    for (int i= 0, i< 20; i++) {
    if (isThatPixelsWhite(x, y) != 0) {
      DoSomething;
    public int isThatPixelsWhite(int x, int y) {
    if  (
    r.getPixelColor(x+5,y+15).equals(Color.WHITE)  &&
    r.getPixelColor(x+7,y+19).equals(Color.WHITE) &&
    r.getPixelColor(x+9,y+11).equals(Color.WHITE) &&
    r.getPixelColor(x+21,y+5).equals(Color.WHITE) &&
    r.getPixelColor(x+13,y+2).equals(Color.WHITE) &&
    r.getPixelColor(x+23,y+7).equals(Color.WHITE) &&
    r.getPixelColor(x+9,y+9).equals(Color.WHITE) &&
    r.getPixelColor(x+10,y+21).equals(Color.WHITE) &&
    r.getPixelColor(x+11,y+22).equals(Color.WHITE)
    ) return 1;
    return 0;
    }Thats the relevant code.
    I guess the fast calling of getPixelColor in this if struct (in Method isthatPixelsWhite) overburd java ..

  • Returning an object that contains a collection WL 9.2

    Hello,
    I have a class like this:
    public class data {
    private Collection<MyObject> coll; //MyObject is another class
    If I return this object from a web service call, i.e.
    @WebService
    public class HelloWorld {
         @WebMethod
    public data hello() {
    I get an error saying java class MyObject is not known, which makes sense, because I only declared "HelloWorld" to jwsc task.
    How can I make this class known, by annotation etc.?
    Someone suggested to use "IncludeSchema" in the jwsc task, but apparently that has been deprecated.
    Thanks!
    Edited by ghosh007 at 02/21/2008 12:59 PM
    Edited by ghosh007 at 02/21/2008 1:23 PM

    Hi,
    As you have this "Artiicle" class, extend it to be serializable and then define an Array of type Artiicle. So the return type would be an Array of a complex type i.e. Articles. In WSDL there will be type that defines an Array and this type can be used as a return message for your methode.
    Try this, I think it will help you.
    Regards,

  • Returning an Object Array

    I am unable to figure out the way in which I can return an object
    array from a cpp file to java. Is there any obvious error which you can spot in
    my CPP file?
    When I try to return a single object in the native function,
    it works fine but when I try to extend it and return an array of the object, it
    throws an error.
    Please find below the details
    h1. Java Class
    public class Flight {
    public String ID;
    public class InterfaceClass {
    private native Flight[] GetFlights();
    public static void main(String[] args)
    Flight[] objFlight = new
    InterfaceClass().GetFlights();
    System.+out+.println(objFlight[0].ID);
    static {
    System.+loadLibrary+("main");
    h1. CPP File
    JNIEXPORT jobjectArray JNICALL Java_InterfaceClass_GetFlights(JNIEnv env, jobject obj)
    //1. ACCESSING THE FLIGHT CLASS
    jclass cls_Flight = env->FindClass("LFlight;");
    //2. CONSTRUCTOR FOR FLIGHT CLASS
    jmethodID mid_Flight = env->GetMethodID(cls_Flight,"<init>", "()V");
    //3. CREATING AN OBJECT OF THE FLIGHT CLASS
    jobject objFlight = env->NewObject(cls_Flight, mid_Flight);
    //4. ACCESSING THE FLIGHT's "ID" FIELD
    jfieldID fid_ID = env->GetFieldID(cls_Flight, "ID","Ljava/lang/String;");
    //5. SETTING THE VALUE TO THE FLIGHT's "ID" FIELD
    env->SetObjectField(objFlight,fid_ID, env->NewStringUTF("ABC"));
    //6. ACCESSING THE FLIGHT ARRAY CLASS
    jclass cls_Flight_Array = env->FindClass("[LFlight;");
    if(cls_Flight_Array == NULL)
    printf("Error-1");
    //7. CREATING A NEW FLIGHT ARRAY OF SIZE 1 jobjectArray arrFlightArray = env->NewObjectArray(1,cls_Flight_Array,NULL);
    if(arrFlightArray == NULL)
    printf("Error-2");
    //8. INSERTING A FLIGHT BJECT TO THE ARRAY
    env->SetObjectArrayElement(arrFlightArray,0,objFlight);
    return arrFlightArray;
    h1. Error
    # A fatal error has been detected by the Java Runtime Environment:
    # EXCEPTION_ACCESS_VIOLATION
    (0xc0000005) at pc=0x6d9068d8, pid=1804, tid=3836
    # JRE version: 6.0_18-b07
    # Java VM: Java HotSpot(TM) Client VM (16.0-b13 mixed mode, sharing
    windows-x86
    # Problematic frame:
    # V [jvm.dll+0x1068d8]
    # An error report file with more information is saved as:
    # C:\Users\Amrish\Workspace\JNI Test\bin\hs_err_pid1804.log
    # If you would like to submit a bug report, please visit:
    http://java.sun.com/webapps/bugreport/crash.jsp
    C:\Users\Amrish\Workspace\JNI Test\bin>java -Djava.library.path=.
    InterfaceClass
    Exception in thread "main" java.lang.ArrayStoreException
    at
    InterfaceClass.GetFlights(Native Method)
    at
    InterfaceClass.main(InterfaceClass.java:6)
    C:\Users\Amrish\Workspace\JNI Test\bin>java -Djava.library.path=.
    InterfaceClass
    Exception in thread "main" java.lang.ArrayStoreException
    at
    InterfaceClass.GetFlights(Native Method)
    at
    InterfaceClass.main(InterfaceClass.java:6)
    Edited by: amrish_deep on Mar 18, 2010 7:40 PM
    Edited by: amrish_deep on Mar 18, 2010 7:40 PM

    //6. ACCESSING THE FLIGHT ARRAY CLASS
    jclass cls_Flight_Array = env->FindClass("[LFlight;");The argument to NewObjectArray is the +element+ class of the array you're about to create, not the +array+ class itself.

  • When a Method Returns an Object, does it return a copy or a pointer?

    When you have a method that returns an Object, is the Object returning a copy of the Object returned inside
    of the Method or is it an Actual pointer to the Object inside of the method's coresponding Object?
    so say you have an object ...
    Class Something {
    JLabel myLabel = new JLable("myLabel");
    public JLabel getLabel() {
    return myLabel;;
    Something something = new Something();
    JLable theLabel = something.getLabel()
    theLable.setString("theLable");
    so when I setString on the Object theLabel , am I going to change the value of myLabel inside of the Object something?

    Yes, it returns a pointer.

  • Calling a method that returns an object Array

    Hello.
    During a JNICALL , I wish to call a method which returns an object array.
    ie my java class has a method of the form
    public MyObject[] getSomeObjects(String aString){
    MyObject[] theObjects=new MyObject[10];
    return theObjects
    Is there an equivalent to (env)->CallObjectMethod(...
    which returns a jobjectArray instead of a jobject, and if not could somebody suggest a way around this.
    Thanks,
    Neil

    I believe an array oj jobjects is also a jobject. You can then cast it to another class.

  • Returning cloned objects from EJB Local Interfaces

    We'd like to let our WAS 5/J2EE container manage our transactions/unit of work. However, we don't want to have our objects serialized, so we intend to use LocalInterfaces. Additionally, we want to return value objects that support Toplink indirection such that we are not returning the actual cache object but instead a clone.Our question is, how do we return a cloned object that supports indirection from Toplink that we can later do a deepMergeClone on in an explicit update method?

    Additional Information on the first post:
    The pattern we've been testing is as follows:
    1. We set up LocalInterfaces on our EJB's
    2. The EJB Getters are using acquireNonSynchronizedUnitOfWork() to get a NON-JTS transaction to perform a readQuery. This results in a Cloned Bis object being generated. We then release the UOW and return the object.
    3. The Returned Biz object Getters are using Indirection (probably using the released non-synchronized UOW).
    4. The pattern for UPDATE is that we allow the Web Container code (servlet) to change the Cloned Biz Object, they then submit the CLONED and changed object to an EJB update() method where we use getClientSession().getActiveUnitOfWork() to link to the JTS transaction and perform a uow.deepMergeClone(bizObjectClone);
    We are trying to use the pattern for the following reasons:
    1. Isolation of the Cache to upper layers
    2. Transaction Boundry is the EJB Container
    3. We understand that there is a performance overhead with CLoned Biz Objects but this more mirrors the ValueObject Pattern then anything else we've tried.
    BIG Question:
    1. Is this a supported TopLink Pattern?
    2. If its not supported, can it be?
    3. Do you have any other suggested patterns?

  • Try to create a method to return an object as xml

    I'm trying to create a method for an object to return the objects attributes in xml format.
    here is what I have done so far:
    -- create the object hierachy
    create or replace type ras4.atomic_tp as object
         (atomic_instance_id     varchar2(8),
         service_instance_id     varchar2(8),
         parent_atomic_instance_id varchar2(8),
         MEMBER FUNCTION return_xml RETURN varchar2)
    NOT INSTANTIABLE
    NOT FINAL;
    create or replace type ras4.parm_const_tp under ras4.atomic_tp
         (parameter_name          varchar2(75))
    NOT INSTANTIABLE
    NOT FINAL;
    create or replace type ras4.contact_tp under ras4.atomic_tp
         (address_line_1          varchar2(80),
         address_line_2          varchar2(80),
         address_line_3          varchar2(80),
         city               varchar2(20),
         state               varchar2(2),
         country               varchar2(20),
         postal_code          varchar2(20),
         voice_telephone          varchar2(20),
         dns_telephone          varchar2(20),
         fax               varchar2(20),
         email               varchar2(80),
         url               varchar2(20),
         contact_inst          varchar2(255))
    NOT INSTANTIABLE
    NOT FINAL;
    create or replace type PERSON_tp under contact_tp
         (prefix               varchar2(7),
         first_name          varchar2(50),
         middle_name          varchar2(50),
         last_name          varchar2(50),
         suffix               varchar2(20),
         nick_name          varchar2(50),
    OVERRIDING MEMBER FUNCTION return_xml return varchar2)
    INSTANTIABLE
    FINAL;
    create table ras4.person_tb of ras4.person_tp;
    insert into ras4.person_tb values
    (ras4.person_tp('00001', '00001', '00001', '1111 Trail Lake Dr.', null, null, 'Fort Worth',
    'TX', 'USA', '76233', '(817)346-0004', null, null, '[email protected]', 'www.tom.com', 'no calls after 10:00 please',
    'Mr.', 'Tom', 'Scott', 'Tiegen', null, 'Tom'));
    commit;
    -- now different things I have tried to get the member function to work:
    CREATE or replace TYPE BODY RAS4.PERSON_TP AS
         overriding MEMBER FUNCTION RETURN_XML RETURN VARCHAR2 IS
    qryCtx DBMS_XMLGEN.CTXHANDLE;
    result CLOB;
    BEGIN
         qryCtx :=
         DBMS_XMLGEN.NEWCONTEXT ('select self.first_name from dual;');
    result := DBMS_XMLGEN.GETXML(qryCtx);
              RETURN (RESULT);
         END;
    END;
    I try to invoke the method as below:
    DECLARE
    v_person ras4.person_tp;
    v_person_ref ref ras4.person_tp;
    V_string varchar2(2000);
    BEGIN
    select value(a)
    into v_person
    from ras4.person_tb a
    where a.atomic_instance_id = '00001';
    v_string := v_person.return_xml;
    DBMS_OUTPUT.PUT_LINE(v_string);
    END;
    I get the following error:
    DECLARE
    ERROR at line 1:
    ORA-19206: Invalid value for query or REF CURSOR parameter
    ORA-06512: at "SYS.DBMS_XMLGEN", line 83
    ORA-06512: at "RAS4.PERSON_TP", line 7
    ORA-06512: at line 12
    -- I try to use
    from the command line I type in this:
    select sys_xmlgen(value(p))
    from person_tb p
    where p.atomic_Instance_id = '00001';
    and it seems to work.
    trying to put this into a member function - I try this:
    CREATE or replace TYPE BODY RAS4.PERSON_TP AS
         overriding MEMBER FUNCTION RETURN_XML RETURN VARCHAR2 IS
    v_string varchar2(200);
    v_person ras4.person_tp;
    BEGIN
         v_person := self;
         select v_person.first_name into v_string from dual;
         return (select sys_xmlgen(value(v_person)));
         END;
    END;
    This fails to compile.
    any help is greatly appreciated.
    tom

    PN,
    First, it's impossible to create static method with WD IDE designers for controllers.
    Next, if you simply need to call method from wdDoModifyView, just create instance method createHTMLViewer in regular way then call it from wdDoModifyView via wdThis.createHTMLViewer().
    Third, you may create this method manually directly in source code, just place it at the end of controller between comments //@begin other ... //@end.
    Valery Silaev
    EPAM Systems
    http://www.NetWeaverTeam.com

  • Problem in returning the object + reflection + hashMap + list

    Hi All,
    i am very new to java forums...
    i'm sorry to disturb you all.. i don't exaclty know how to raise a question in forums..
    Here my query is ::::
    i have xlsReader file,which will read the data from the xls file.
    after reading it,i am adding the contents of the xls sheet in to a Arraylist.
    then i've put the list contents in to an object array,
    then i'm invoking the getter and setter method of the javabean class.
    and i'm returning object,but object contains only the last data of the list,instead of whole contents in that object.
    the code is here,where am returnung the object.
    kindly do reply...
    Thanks in advance...:)
    public static Object setDynamicValue ( Method setter2, List columnData, Object obj2 , Method getter2 )
    Object val2=null;
    try {
    for ( int i = 0 ; i < columnData.size() ; i++ ) {
    Object obj[] =( Object [] )columnData.get(i);
    for ( int j = 0; j < obj.length; j++) {
    // System.out.println("column Data:pppp: :"+obj[j].toString());
    setter2.invoke(obj2, new Object[] {obj[j].toString() });
    val2 = getter2.invoke(obj2, new Object[0]);
    //System.out.println("output:::"+val2.toString());
    // return val2;
    System.out.println("#########################");
    }catch (IllegalAccessException e) {
    System.out.println("IllegalAccessException came :::"+e);
    } catch (IllegalArgumentException e) {
    // TODO Auto-generated catch block
    System.out.println("IllegalArgumentException came :::"+e);
    e.printStackTrace();
    } catch (InvocationTargetException e) {
    System.out.println("InvocationTargetException came :::"+e);
    // TODO Auto-generated catch block
    e.printStackTrace();
    return val2;
    here,we are returning the object val2 , but its printing only the last data of the list
    Object o1 = setDynamicValue ( setter2, columnName ,columnData, obj2,getter2 );
    System.out.println("lastvalue of the list :"+o1);
    thanks...
    plz reply..

    You are getting only the last data of the list because you does not have any mechanism to hold other values.
    Check inf your code your the following code in the inner for loop (loop with index j)
    val2 = getter2.invoke(obj2, new Object[0]);
    Even if you are capturing some value into val2, it gets replaced next time the body of for loop runs. This way you are getting only the last data.
    If you want to capture all values use arraylist. Keep adding all values to arraylist and return it. While printing iterate over arraylist and print values.
    This is not a problem related to reflection or hashMap. Just the logic you have written is incorrect.

  • Statvfs returns wrong values

    Hi,
    I am developing a program the will check for disk space (used,blocks, available ...) and i am using the statvfs.h file.
    When tested with small capacity disks (~5G) it works fine (compared to df -k).
    When tested with large capacity disks (~400G) it returns wrong values(compared to df -k).
    I am using f_bavail and i am casting from fsblkcnt_t to integer/long.
    Please help.
    Thanx R.

    Thanks for your answer.
    I have discovered that it (statvfs.h) doe's not work with vxfs, only with ufs.
    I am using Veritas Cluster Server.
    Any chance of an answer ??
    thanks,
    R.

  • XI calling an Oracle Stored Procedure which returns an Object to XI

    I am currently trying to call an Oracle Packaged/Procedure from XI which accepts a couple of parameters as I/O and returns an Object as one of the parameters.
    I have created the Object within the Oracle Database CREATE OR REPLACE TYPE xy_jdbc AS OBJECT
    column_name type ...etc
    CREATE OR REPLACE TYPE xy_tab_jdbc AS TABLE OF xy_jdbc;
    One of the parameters for the stored procedure is set up as this type xy_tab_jdbc this will be populated based upon one of the parameters passed into the  Package/Procedure.
    Is this possible? If it is, how do I map the returned object within XI?

    Dear Hilary,
    the JDBC adapter does not support vendor-specific or non-scalar data types.
    Workaround: Change the stored proc's signature not to use an object, but the object's fields instead.
    Regards,
    Thilo

  • How to return a object from a method in a java program to a C++ call (JNI )

    Sir,
    I am new to java and i have been assigned a task to be done using JNI.
    My question is,
    How can i return an object from a method in a java program to a call for the same method in a C++program using JNI.
    Any help or suggesstions in this regard would be very useful.
    Thanking you,
    Anjan Kumar

    Hello
    I would like to suggest that JNI should be your last choice and not your first choice. JNI is hard to get right. Since the JNI code is executing in the same address space as the JVM, any problems (on either side) will take down the entire process. It dilutes the Write Once Run Anywhere (WORA) value proposition because you need to provide the JNI component for all hardware/OS platforms. If you can keep your legacy code(or whatever you feel you need to do in JNI) in a separate address space and communicate via some inter-process channel, you end up with a system that is more flexible, portable, and scalable.
    Having said all that, head over to the Java Native Interface: Programmer's Guide and Specification web page:
    http://java.sun.com/docs/books/jni/
    Scroll down to the Download the example code in this book in ZIP or tar.gz formats. links and download the example source. Study and run the example sources. The jniexamples/chap5/MyNewString demo creates a java.lang.String object in native code and returns it to the Java Language program.

Maybe you are looking for