Object package from object name

Say I had:
int num;
double dec;
String str;
ArrayList arr;
Object obj;
I want to take a String that is the name of an Object and return a String that is the package of the Object.
For example, if the String was "arr", the method would return "java.util.ArrayList".
I looked at the Reflection API, but I couldn't find anything that did this. How do I do this?

Objects don't have names. There's no association from an object to the names of the variables that are pointing at it, and reflection does not work on method variables.
If those are member variables, then you can use reflection to get their types.
http://java.sun.com/docs/books/tutorial/reflect/

Similar Messages

  • Objects made from objects - how to manipulate?

    Hello all - my first post here and new to OOP from procedural
    I am trying to construct an object ("Box") from 2 Things. The Things have a colour and can be on or off.
    I can construct the Box from a RED Thing and a BLUE Thing, and initialise them as being on, but....
    How do I manipulate the Things in the Box once constructed?
    I don't know how to address the Thing methods from the Box Class... please could someone help as I am sure this is really simple - I just can't find the answer in any of my books!
    public class Thing {
         boolean on;
         String colour;
    public Thing(String s) {
         colour = s;
         on = false;
    // this main is just to test this class
    public static void main (String[] args){
         Thing test = new Thing("TEST");
         test.turnOn();
         test.getState();
         try {
              System.out.println ("Pause.....");
              Thread.sleep(1000);
         catch (Exception e) {
              System.out.println ("CarCrash!");
         test.turnOff();
         test.getState();
    public void turnOn() {
         on = true;
    public void turnOff() {
         on = false;
    public void getState() {
         if (on) {
              System.out.println (colour + ": ON");
         else {
              System.out.println (colour + ": OFF");
    and here is the box class...
    public class Box {
    public Box() {
         Thing thingOne = new Thing ("RED");
         Thing thingTwo = new Thing ("BLUE");
         thingOne.turnOn();
         thingTwo.turnOn();
    public void getBoxState() {
         System.out.println (thingOne.getState());
         System.out.println (thingTwo.getState());
    public static void main (String[] args) {
         Box boxOne = new Box();
         boxOne.getBoxState(); // does not compile - this is the crux of the matter...
    }

    NickM999 wrote:
    I've simplified Box to get to the root of the problem:
    Nice.
    public class Box {
        public Box() {
             Thing thingOne = new Thing ("RED");
             Thing thingTwo = new Thing ("BLUE");
             thingOne.turnOn();
             thingTwo.turnOn();
        public static void main (String[] args) {
             Box boxOne = new Box();
             thingOne.getState();   <--- this is the problem...(line 22)
    }Box.java:22: cannot find symbol
    symbol : variable thingOne
    location: class Box
    thingOne.getState();
    ^
    1 error
    You've got much worse problems than you think.
    If you look at your constructor, you create two instances of Thing. The variables that point to them are local to the constructor, so as so as you leave that method those objects are eligible for garbage collection.
    I'd like to create a number of Box instances (all with the same Things (Red/Blue) in them), then manipuate the Things within each box
    example: Box 1 - Red Thing ON, Blue Thing OFF... Box 2 - Red Thing OFF, Blue Thing OFF... Box 2 - Red Thing ON, Blue Thing Off... and so on.
    I also tried to address the methods in Thing as boxOne.thingOne.turnOff();
    Is there a better design?
    Thanks for your time!Here's what I'd recommend: don't expose those objects in public. Give clients an interface that they can use to get at them in a way that YOU can control internally.
    You should follow the Java Beans conventions for Thing:
    public class Thing
        boolean on;
        public boolean isOn() { return on; }
        public void setOn(boolean state) { on = state; }
    }Since the state is really two flags, not one, I'd create a State object that would hold the variables. Less atomic that way. The more you can encapsulate in objects the better.
    public class Box {
        private Thing thingOne;
        private Thing thingTwo;
        public Box() {
             thingOne = new Thing ("RED");
             thingTwo = new Thing ("BLUE");
             thingOne.turnOn();
             thingTwo.turnOn();
        public boolean getThingOne() { return thingOne.getState(); }
        // same thing for thing two.
        public setThingOne(boolean isOn)
            if (isOn)
                thingOne.turnOn();  //  I assume you have these methods.
            else
                thingOne.turnOff();
        public static void main (String[] args) {
             Box boxOne = new Box();
             thingOne.getState();   <--- this is the problem...(line 22)
    }

  • How i will retrive rows from object type

    test is object type(varchar2,varchar2)
    test1 is a object derived from test
    test1(varchar2,varchar2,test);
    how i will retrive rows from test1.
    declare
    type recf is ref cursor;
    v_tab test1 := test1('a','b',test('c','d'));
    rec recf;
    begin
    open rec for
    select * from table(cast(v_tab as test1));
    dbms_output.put_line('the rows are'||rec.test1.test11);
    end;
    when i compile this it return
    ERROR at line 7:
    ORA-06550: line 7, column 35:
    PL/SQL: ORA-22907: invalid CAST to a type that is not a nested table or VARRAY
    ORA-06550: line 7, column 1:
    PL/SQL: SQL Statement ignored
    ORA-06550: line 8, column 48:
    PLS-00487: Invalid reference to variable 'REC'
    ORA-06550: line 8, column 1:
    PL/SQL: Statement ignored
    error.

    hi ur previous example really helping me but please help me in this current senario,
    PROCEDURE reserveNumbers (
         TheNumberRange IN NumberRange,
         UserID IN userid,
         ReturnStatus OUT CallStatus ); which is in P_Numbermgr_Api package.
    here NumberRange is a object
    TYPE NumberRange IS OBJECT (
         StartNumber               VARCHAR2(40),
         EndNumber               VARCHAR2(40),
         NumberAttributes          NumberAttr)
    NumberAttributes field based on NumberAttr object
    TYPE NumberAttr IS OBJECT (
         NumberType          VARCHAR2(15),
         CountryCode          VARCHAR2(10),
         CityCode      VARCHAR2(3))
    i write a package within package i am calling P_Numbermgr_Api.reserveNumbers:
    CREATE or replace TYPE My_numberrange IS TABLE OF numberrange;
    CREATE OR REPLACE PACKAGE numberrange_wrapper AS
    TYPE cursor_type IS REF CURSOR;
    TYPE cursor_type1 IS REF CURSOR;
    TYPE cursor_type2 IS REF CURSOR;
    v_userid number;
    PROCEDURE Getnumberrange (userid IN number,
    p_recordset OUT numberrange_wrapper.cursor_type);
    END numberrange_wrapper;
    within package body i write
    CREATE OR REPLACE PACKAGE body numberrange_wrapper AS
    PROCEDURE Getnumberrange (userid IN number,p_recordset IN OUT numberrange_wrapper.cursor_type)
    is
    v_tab My_numberrange := My_numberrange();
    refc numberrange_wrapper.cursor_type2;
    BEGIN
    numberrange_wrapper.v_userid:= userid;
    OPEN p_recordset FOR
    SELECT
         * FROM
         Table(Cast(v_tab As My_numberrange));
    P_Numbermgr_Api.reserveNumbers (My_numberrange,v_userid,p_recordset);
    END Getnumberrange;
    end numberrange_wrapper;
    it return
    PLS-00330: invalid use of type name or subtype name
    please help me how i will solve this problem

  • How to get attribute value from an object inside an object in Xpress

    Does anyone know how to get an attribute value from an object in Xpress in a workflow? I have an object structured as follows:
    <ResourceInfo accountId='mj628' tempId='3483372b787ce7dd:-5d99a0c5:130cb238483:-3600'>
    <ObjectRef type='Resource' name='Google Apps'/>
    </ResourceInfo>
    I need if possible to get the name='Google Apps', which is inside the ObjectRef, so I guess its an attribute value of an object inside an object.

    If the ResourceInfo object is accessible in a variable, i.e. named "myResInfo", you just have to check the Java API and call the relevant method:
    <invoke name='getResourceName'>
      <ref>myResInfo</ref>
    </invoke>

  • How to create an collection/array/object/thingy from a bunch of objects for eventual export to CSV.

    This is a follow-up to an earlier post (How
    to output a bunch of variables into a table.) Now that I can ouput data for a single computer I need to to do the same for a list of computers into a CSV. In more general terms how do I get a bunch of $Computer objects into a single collection/array/object/thingy
    with a clever name like $Computers?
    # http://ss64.com/ps/get-wmiobject-win32.html
    # http://social.technet.microsoft.com/Forums/en-US/da54b6ab-6941-4e45-8697-1d3236ba2154/powershell-number-of-cpu-sockets-wmi-query?forum=winserverpowershell
    # http://serverfault.com/questions/10328/determine-cpu-processors-vs-sockets-though-wmi
    # http://social.technet.microsoft.com/Forums/windowsserver/en-US/8443fcfd-5a0b-4c3d-bda7-26df83d2ee92/how-to-output-a-bunch-of-variables-into-a-table?forum=winserverpowershell
    Param(
    [Parameter(Mandatory=$false,ValueFromPipeline=$true)]
    [string]$ComputerName = $env:COMPUTERNAME,
    [Parameter(Mandatory=$false,ValueFromPipeline=$false)]
    [ValidateScript(
    If ( $_ -ne $null ) { Test-Path $_ }
    [String]$ComputerListFile
    Function Get-Computer
    Param(
    [string]$ComputerName
    $Win32_PingStatus = $null
    $Win32_PingStatus_Result = $null
    $Win32_OperatingSystem = $null
    $Win32_Processor = $null
    $Win32_PhysicalMemory = $null
    $Win32_ComputerSystem = $null
    $Win32_BIOS = $null
    $Computer = $null
    $Win32_PingStatus = "select * from Win32_PingStatus where address = '$ComputerName'"
    $Win32_PingStatus_Result = Get-WmiObject -query $Win32_PingStatus
    If ( $Win32_PingStatus_Result.protocoladdress )
    "$ComputerName ping succeeded."
    $Win32_OperatingSystem = Get-WmiObject Win32_OperatingSystem -computer $ComputerName -ErrorAction SilentlyContinue
    If ( $Win32_OperatingSystem -eq $null)
    "$ComputerName WMI failed."
    } Else {
    "$ComputerName WMI succeeded."
    $Win32_Processor = [object[]]$(Get-WmiObject Win32_Processor -computer $ComputerName)
    $Win32_PhysicalMemory = [object[]]$(Get-WmiObject Win32_PhysicalMemory -computer $ComputerName)
    $Win32_ComputerSystem = Get-WmiObject Win32_ComputerSystem -computer $ComputerName
    $Win32_BIOS = Get-WmiObject Win32_BIOS -computer $ComputerName
    $Computer = New-Object -Type PSObject -Property @{
    Name = $Win32_OperatingSystem.CSName
    Win32_BIOS_SerialNumber = [string]$Win32_BIOS.SerialNumber
    Win32_ComputerSystem_Manufacturer = [string]$Win32_ComputerSystem.Manufacturer
    Win32_ComputerSystem_Model = [string]$Win32_ComputerSystem.Model
    #Win32_ComputerSystem_NumberOfLogicalProcessors = [int32]$Win32_ComputerSystem.NumberOfLogicalProcessors
    #Win32_ComputerSystem_NumberOfProcessors = [int32]$Win32_ComputerSystem.NumberOfProcessors
    Win32_ComputerSystem_TotalPhysicalMemory = [long]$Win32_ComputerSystem.TotalPhysicalMemory
    Win32_ComputerSystem_TotalPhysicalMemory_GB = [float]($Win32_ComputerSystem.TotalPhysicalMemory / (1024*1024*1024))
    Win32_OperatingSystem_Caption = [string]$Win32_OperatingSystem.Caption
    Win32_OperatingSystem_CSName = [string]$Win32_OperatingSystem.CSName
    #Win32_OperatingSystem_OSArchitecture = [string]$Win32_OperatingSystem.OSArchitecture
    #Win32_OperatingSystem_SerialNumber = [string]$Win32_OperatingSystem.SerialNumber
    Win32_OperatingSystem_ServicePackVersion = [string]$Win32_OperatingSystem.ServicePackMajorVersion + "." + [string]$Win32_OperatingSystem.ServicePackMinorVersion
    Win32_PhysicalMemory_Capacity = ($Win32_PhysicalMemory | ForEach-Object { $_.Capacity } | Measure-Object -Sum).sum
    Win32_PhysicalMemory_Capacity_GB = (($Win32_PhysicalMemory | ForEach-Object { $_.Capacity } | Measure-Object -Sum).sum / (1024*1024*1024))
    Win32_Processor_Count = [int]$Win32_Processor.Count
    Win32_Processor_NumberOfCores = [string]$Win32_Processor[0].NumberOfCores
    Win32_Processor_NumberOfLogicalProcessors = [string]$Win32_Processor[0].NumberOfLogicalProcessors
    #Win32_Processor_Description = [string]$Win32_Processor[0].Description
    Win32_Processor_Manufacturer = [string]$Win32_Processor[0].Manufacturer
    Win32_Processor_Name = [string]$Win32_Processor[0].Name
    } ## end new-object
    $Computer
    } Else {
    "$ComputerName ping failed."
    $ComputerNameMgmt = $ComputerName + "-mgmt"
    $Win32_PingStatus = "select * from Win32_PingStatus where address = '$ComputerNameMgmt'"
    $Win32_PingStatus_Result = Get-WmiObject -query $Win32_PingStatus
    If ( $Win32_PingStatus_Result.protocoladdress )
    "$ComputerNameMgmt ping succeded."
    } Else {
    "$ComputerNameMgmt ping failed."
    "$(Get-Date -Format o) Starting script $($MyInvocation.MyCommand.Name)"
    If ( $ComputerListFile -eq $null -or $ComputerListFile.Length -eq 0 )
    "Processing computer $ComputerName"
    Get-Computer( $ComputerName )
    } Else {
    "Processing computer list $ComputerList"
    $ComputerList = Get-Content $ComputerListFile
    $Computers = @{}
    $Results = @()
    ForEach( $ComputerListMember in $ComputerList )
    "$(Get-Date -Format o) $ComputerListMember"
    # Get-Computer( $ComputerListMember ) | Add-Member -InputObject $Computers -MemberType NoteProperty -Name $_
    # http://social.technet.microsoft.com/Forums/windowsserver/en-US/e7d602a9-a808-4bbc-b6d6-dc78079aafc9/powershell-to-ping-computers
    # $Compuers += New-Object PSObject -Property $Props
    # $Computers += New-Object PSObject -Property Get-Computer( $ComputerListMember )
    Get-Computer( $ComputerListMember )
    "$(Get-Date -Format o) Ending script $($MyInvocation.MyCommand.Name)"
    If I try something like this:
    Get-Computer( $ComputerListMember ) | Add-Member -InputObject $Computers -MemberType NoteProperty -Name $_
    I get the following, even though $_.Name is not null.
    Add-Member : Cannot bind argument to parameter 'Name' because it is null.
    At <path to my script>Get-Hardware_Memory_OSVersion_CPU_Cores_ver04_sanitized.ps1:111 char:107
    + Get-Computer( $ComputerListMember ) | Add-Member -InputObject $Computers -MemberType NoteProperty -Name <<<< $_
    + CategoryInfo : InvalidData: (:) [Add-Member], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.AddMemberCommand
    Or if I try this:
    $Computers += New-Object PSObject -Property Get-Computer( $ComputerListMember )
    I get this:
    New-Object : Cannot bind parameter 'Property'. Cannot convert the "Get-Computer" value of type "System.String" to type "System.Collections.Hashtable".
    At <path to my script>Get-Hardware_Memory_OSVersion_CPU_Cores_ver04_sanitized.ps1:114 char:47
    + $Computers += New-Object PSObject -Property <<<< Get-Computer( $ComputerListMember )
    + CategoryInfo : InvalidArgument: (:) [New-Object], ParameterBindingException
    + FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.PowerShell.Commands.NewObjectCommand

    Hi Aenagy,
    If you want to combine all the computers' information to a single array, and add the property computername in the output, please also try the script below, which I make a little modification of the function Get-Computer, pleaese make sure the account running
    the script has the admin permission of the remote computers, or you need to privide cridentials in get-wmiobject, also note I haven't tested:
    $output = @()#to output information of the all the computers
    ForEach( $ComputerName in $ComputerList ){#loop all the computers
    $Win32_PingStatus = "select * from Win32_PingStatus where address = '$ComputerName'"
    $Win32_PingStatus_Result = Get-WmiObject -query $Win32_PingStatus
    If ( $Win32_PingStatus_Result.protocoladdress )
    "$ComputerName ping succeeded."
    $Win32_OperatingSystem = Get-WmiObject Win32_OperatingSystem -computer $ComputerName -ErrorAction SilentlyContinue
    If ( $Win32_OperatingSystem -eq $null)
    "$ComputerName WMI failed."
    Else {
    "$ComputerName WMI succeeded."
    $Win32_Processor = [object[]]$(Get-WmiObject Win32_Processor -computer $ComputerName)
    $Win32_PhysicalMemory = [object[]]$(Get-WmiObject Win32_PhysicalMemory -computer $ComputerName)
    $Win32_ComputerSystem = Get-WmiObject Win32_ComputerSystem -computer $ComputerName
    $Win32_BIOS = Get-WmiObject Win32_BIOS -computer $ComputerName
    $Computer = New-Object -Type PSObject -Property @{
    Computername = $ComputerName #add the property computername
    Name = $Win32_OperatingSystem.CSName
    Win32_BIOS_SerialNumber = [string]$Win32_BIOS.SerialNumber
    Win32_ComputerSystem_Manufacturer = [string]$Win32_ComputerSystem.Manufacturer
    Win32_ComputerSystem_Model = [string]$Win32_ComputerSystem.Model
    #Win32_ComputerSystem_NumberOfLogicalProcessors = [int32]$Win32_ComputerSystem.NumberOfLogicalProcessors
    #Win32_ComputerSystem_NumberOfProcessors = [int32]$Win32_ComputerSystem.NumberOfProcessors
    Win32_ComputerSystem_TotalPhysicalMemory = [long]$Win32_ComputerSystem.TotalPhysicalMemory
    Win32_ComputerSystem_TotalPhysicalMemory_GB = [float]($Win32_ComputerSystem.TotalPhysicalMemory / (1024*1024*1024))
    Win32_OperatingSystem_Caption = [string]$Win32_OperatingSystem.Caption
    Win32_OperatingSystem_CSName = [string]$Win32_OperatingSystem.CSName
    #Win32_OperatingSystem_OSArchitecture = [string]$Win32_OperatingSystem.OSArchitecture
    #Win32_OperatingSystem_SerialNumber = [string]$Win32_OperatingSystem.SerialNumber
    Win32_OperatingSystem_ServicePackVersion = [string]$Win32_OperatingSystem.ServicePackMajorVersion + "." + [string]$Win32_OperatingSystem.ServicePackMinorVersion
    Win32_PhysicalMemory_Capacity = ($Win32_PhysicalMemory | ForEach-Object { $_.Capacity } | Measure-Object -Sum).sum
    Win32_PhysicalMemory_Capacity_GB = (($Win32_PhysicalMemory | ForEach-Object { $_.Capacity } | Measure-Object -Sum).sum / (1024*1024*1024))
    Win32_Processor_Count = [int]$Win32_Processor.Count
    Win32_Processor_NumberOfCores = [string]$Win32_Processor[0].NumberOfCores
    Win32_Processor_NumberOfLogicalProcessors = [string]$Win32_Processor[0].NumberOfLogicalProcessors
    #Win32_Processor_Description = [string]$Win32_Processor[0].Description
    Win32_Processor_Manufacturer = [string]$Win32_Processor[0].Manufacturer
    Win32_Processor_Name = [string]$Win32_Processor[0].Name
    } ## end new-object
    $output+=$Computer #combine all the "$computer" to "$output"
    Else {
    "$ComputerName ping failed."
    $output
    If you have any feedback on our support, please click here.
    Best Regards,
    Anna
    TechNet Community Support

  • Error: Component failed to run due to a Object Package scheduling failure

    Hi,
    BusinessObjects XI R2 SP 5, FP 5.1
    I am trying to schedule a group of reports (crystal reports) via a package where the output destination is to an email. At the event of execution of the scheduled time for the package; the package fails with the error: Component failed to run due to a Object Package scheduling failure. (Note: When scheduled individually it is successful and it was copied to the package from its original location, so there is no mistake in parameters or ODBC connections)
    When we go to the history and within the instance, we see that some of the reports have the status as success and some are failed with the same error message. Even though some of the reports are made to fail at the event of 'NO DATA'; what I do not understand is that how come some of the other reports (which contains data and which works when trying to run manually or scheduled individually) are failing.
    I would understand something is wrong when the entire package fails which is not the case here as say of 50 reports, 5 are successful and the rest fails with the same error.

    Sorry posted on the wrong section...
    Edited by: Deepu Philip on Mar 18, 2010 5:38 PM

  • Error when determining a number from object BI_TSDTEL and number 01

    Hi BW Experts,
    After Transporting Infosources (Master & Transaction) to BW QA, the transfer rules were not getting activated in QA. The following error message was diaplyed.
    "Error when determining a number from object BI_TSDTEL and number 01
    Object name can only contain characters from syntactical character set
    Object name can only contain characters from syntactical character set
    Data element for InfoObject KOKRS 0CO_AREA could not be created
    Data element for InfoObject KOKRS 0CO_AREA could not be created
    Transfer structure 0IM_FA_IQ_2_SB activated under the name 0IM_FA_IQ_2_SA
    It is not necessary to copy dependent objects for transfer structure 0IM_FA_IQ_2_SA
    Transfer structure 0IM_FA_IQ_2_SA does not exist
    Error RSAR 440 when handling objects with type R3TR ISTS."
    I have gone through the Note: 674818.
    Could someone clear me about BI_TSDTEl, By using this do we need to maintain object intervals manually in all the systems like BW ( Dev & QA ), R/3 (Dev & QA).
    Because  I have not seen the Intervals in R/3 ( Dev & QA) systems.
    please could someone provide Inputs for this.
    Thanks in Advance
    Regards
    SK

    Hi,
    Try to see that transfer structure is existing in the sytem which is connecting in
    the BW quality.
    You need the same to be transported from the development server of R/3 to quality server of R/3.
    Just check if this helps.
    Regards
    Rahul Bindroo

  • RE: multiple named objects with the same name andinterface

    David,
    First I will start by saying that this can be done by using named anchored
    objects and registering them yourself in the name service. There is
    documentation on how to do this. And by default you will get most of the
    behavior you desire. When you do a lookup in the name service (BindObject
    method) it will first look in the local partition and see if there is a
    local copy and give you that copy. By anchoring the object and manually
    registering it in the name service you are programmatically creating your
    own SO without defining it as such in the development environment. BTW in
    response to your item number 1. This should be the case there as well. If
    your "mobile" object is in the same partition where the service object he is
    calling resides, you should get a handle to the local instance of the
    service object.
    Here is the catch, if you make a bind object call and there is no local copy
    you will get a handle to a remote copy but you can not be sure which one!
    It end ups as more or less a random selection. Off the top of my head and
    without going to the doc, I am pretty sure that when you register an
    anchored object you can not limit it's visibility to "User".
    Sean
    -----Original Message-----
    From: [email protected]
    [<a href="mailto:[email protected]">mailto:[email protected]]On</a> Behalf Of David Foote
    Sent: Monday, June 22, 1998 4:51 PM
    To: [email protected]
    Subject: multiple named objects with the same name and interface
    All,
    More than once, I have wished that Forte allowed you to place named
    objects with the same name in more than one partition. There are two
    situations in which this seems desirable:
    1) Objects that are not distributed, but are mobile (passed by value to
    remote objects), cannot safely reference a Service Object unless it has
    environment visibility, but this forces the overhead of a remote method
    call when it might not otherwise be necessary. If it were possible to
    place a copy of the same Service Object (with user visibility) in each
    partition, the overhead of a remote method call could be avoided. This
    would only be useful for a service object whose state could be safely
    replicated.
    2) My second scenario also involves mobile objects referencing a Service
    Object, but this time I would like the behavior of the called Service
    Object to differ with the partition from which it is called.
    This could be accomplished by placing Service Objects with the same name
    and the same interface in each partition, but varying the implementation
    with the partition.
    Does anyone have any thoughts about why this would be a good thing or a
    bad thing?
    David N. Foote
    Consultant
    Get Your Private, Free Email at <a href=
    "http://www.hotmail.com">http://www.hotmail.com</a>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:<a href=
    "http://pinehurst.sageit.com/listarchive/">http://pinehurst.sageit.com/listarchive/</a>>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:<a href=
    "http://pinehurst.sageit.com/listarchive/">http://pinehurst.sageit.com/listarchive/</a>>

    David,
    First I will start by saying that this can be done by using named anchored
    objects and registering them yourself in the name service. There is
    documentation on how to do this. And by default you will get most of the
    behavior you desire. When you do a lookup in the name service (BindObject
    method) it will first look in the local partition and see if there is a
    local copy and give you that copy. By anchoring the object and manually
    registering it in the name service you are programmatically creating your
    own SO without defining it as such in the development environment. BTW in
    response to your item number 1. This should be the case there as well. If
    your "mobile" object is in the same partition where the service object he is
    calling resides, you should get a handle to the local instance of the
    service object.
    Here is the catch, if you make a bind object call and there is no local copy
    you will get a handle to a remote copy but you can not be sure which one!
    It end ups as more or less a random selection. Off the top of my head and
    without going to the doc, I am pretty sure that when you register an
    anchored object you can not limit it's visibility to "User".
    Sean
    -----Original Message-----
    From: [email protected]
    [<a href="mailto:[email protected]">mailto:[email protected]]On</a> Behalf Of David Foote
    Sent: Monday, June 22, 1998 4:51 PM
    To: [email protected]
    Subject: multiple named objects with the same name and interface
    All,
    More than once, I have wished that Forte allowed you to place named
    objects with the same name in more than one partition. There are two
    situations in which this seems desirable:
    1) Objects that are not distributed, but are mobile (passed by value to
    remote objects), cannot safely reference a Service Object unless it has
    environment visibility, but this forces the overhead of a remote method
    call when it might not otherwise be necessary. If it were possible to
    place a copy of the same Service Object (with user visibility) in each
    partition, the overhead of a remote method call could be avoided. This
    would only be useful for a service object whose state could be safely
    replicated.
    2) My second scenario also involves mobile objects referencing a Service
    Object, but this time I would like the behavior of the called Service
    Object to differ with the partition from which it is called.
    This could be accomplished by placing Service Objects with the same name
    and the same interface in each partition, but varying the implementation
    with the partition.
    Does anyone have any thoughts about why this would be a good thing or a
    bad thing?
    David N. Foote
    Consultant
    Get Your Private, Free Email at <a href=
    "http://www.hotmail.com">http://www.hotmail.com</a>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:<a href=
    "http://pinehurst.sageit.com/listarchive/">http://pinehurst.sageit.com/listarchive/</a>>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:<a href=
    "http://pinehurst.sageit.com/listarchive/">http://pinehurst.sageit.com/listarchive/</a>>

  • Approval task SP09: Evaluation of approvalid failed with Exception: while trying to invoke the method java.lang.String.length() of an object loaded from local variable 'aValue'

    Hi everyone,
    I just installed SP09 and i was testing the solution. And I found a problem with the approvals tasks.
    I configured a simple ROLE approval task for validate add event. And when the runtime executes the task, the dispatcher log shows a error:
    ERROR: Evaluation of approvalid failed with Exception: while trying to invoke the method java.lang.String.length() of an object loaded from local variable 'aValue'
    And the notifications configured on approval task does not start either.
    The approval goes to the ToDO tab of the approver, but when approved, also the ROLE stays in "Pending" State.
    I downgraded the Runtime components to SP08 to test, and the approvals tasks works correctly.
    Has anyone passed trough this situation in SP09?
    I think there is an issue with the runtime components delivered with this initial package of SP09.
    Suggestions?

    Hi Kelvin,2016081
    The issue is caused by a program error in the Dispatcher component. A fix will be provided in Identity Management SP9 Patch 2 for the Runtime component. I expect the patch will be delivered within a week or two.
    For more info about the issue and the patch please refer to SAPNote 2016081.
    @Michael Penn - I might be able to assist if you provide the ticket number
    Cheers,
    Kristiyan
    IdM Development

  • Can we call a prepop adapter from object form ?

    Hi,
    I have written a prepop adapter in object form which will take the valus of one attribute from object form field , in prepop adapter Im giving that field as the input parameter for one procedure and the output I should get in the process form.If I am giving the attribute value in the adapter mapping as literal it is workin fine. But I want to input that filed in object form. I have given "ObjectData" in the map to field and "attribute name" in the Qualifier. But it is not picking up the value.help me out please..What I am doing wrong?
    Thanks

    The functionality of pre-population, as the name suggests, is that the form field gets populated at the time of form is loaded onto the browser. The functionality you are looking for somewhat sounds like auto-fill at the keystroke event. This is not possible using pre-pop adapter; rather you can look for something like javascript based solution.

  • How to get caller object reference from a method

    Hi,
    I am working a already existing Java Swing project, now I got a problem, in a method I need to get the caller object reference otherwise, I can't succeed this operation. So please tell me a way how to get the caller object reference from a method. that method would be static or regular method anything will do for me.
    Edited by: navaneeth.j on Jan 29, 2010 11:20 PM

    navaneeth.j wrote:
    Actually my doubt is, I have a method "addition" method, which is using by many classes so my requirement is in the addition method I want to write a code snippet which will identify and get the the caller object. Actually I tried Reflection.getcallerclass but there I am getting "CLASS" object not the actual object reference, but I want object reference.
    Actually we have a huge project which is writen plain JAVA, so in this project the authors written the Database connection package for single database transaction. so now we are using this project source code for JSF application in this web application the DB package has serve based on the dynamic db connection parameters, so if we want to change this package fully means need to solve the dependency problem in hundreds of classes, so my point is if I can access the caller object in the DB package when ever it gets called by any class from any where of the project. So actually I liked Reflection.getcallerclass, the way of implementation perfectly works for me but it is not giving caller object reference, if something gives the caller object then I can get the DB connection parameters then there is no need to pass the parameters in the hierarchy.You can add a parameter (of type Object) to your addition() method
    and everywhere you call the addition() method also pass this (which from the POW of the addition() method will be a reference to the calling class instance).
    There may be alternative solutions
    but none that require less effort.

  • No mapping exists from object type Telerik.Web.UI.RadMaskedTextBox to a known

    hi for all i got this problem when i try to update record in a database actually it's first
    time happining with me
    No mapping exists from object type Telerik.Web.UI.RadMaskedTextBox to a known
    managed provider native type
    and this is my code
    SqlCommand cmd = new SqlCommand("update RealEstate set DestinationEntity=@speechDirect,FULLName=@name,Individual_Iqama_NR=@egamhNo,Individual_Passport_NR_ID=@passport,Individual_Gender=@six,Individual_Sociall_Status=@martialstate,Individual_Passport_Issue_Date=@passportdate,Individual_Nationality_ID=@nationality,IqamaIssued_From=@egamhsource,Total_Staying_Time_KSA=@stayduration,Individual_Work_Address=@workdisc,Possess_Type=@omntype,Apartment_No=@estateno,Apartment_Floor_No=@storyno,Possess_City_ID=@city,QuarterID=@area,Deed_No=@InstrumentNo,Deed_Date_HijriAfter=@Instrumentdate,Deed_Issue_City_ID=@Instrumentsource,Request_Status=@orderstate,Real_Estate_Area=@estatespace,[notes]=@notes,Incomming_No=@waredno,Incomming_Date_HijriAfter=@wareddate,Qaied_No=@ghaidno,Qaied_Date_HijriAfter=@ghaiddate,ExportNumber=@jihtsdor, ExportDateHijriAfter=@job where Possess_ID=@id", _con);
    cmd.CommandType = CommandType.Text;
    _con.Open();
    cmd.Parameters.AddWithValue("@id", int.Parse(Request.QueryString["Serial"].ToString()));
    cmd.Parameters.AddWithValue("@speechDirect", RadComboBox1.SelectedValue);
    cmd.Parameters.AddWithValue("@name", txtname.Text);
    cmd.Parameters.AddWithValue("@egamhNo",txtegamhno.Text);
    cmd.Parameters.AddWithValue("@passport", txtpassportno.Text);
    cmd.Parameters.AddWithValue("@six",RDSix.SelectedValue);
    cmd.Parameters.AddWithValue("@martialstate", Rdstatus.SelectedValue);
    cmd.Parameters.AddWithValue("@passportdate", DateTime.Now);
    cmd.Parameters.AddWithValue("@nationality", RdNationality.SelectedValue);
    cmd.Parameters.AddWithValue("@egamhsource", txtegamhsou.Text);
    cmd.Parameters.AddWithValue("@stayduration", txtstayduration.Text);
    cmd.Parameters.AddWithValue("@workdisc", txtjobdirec.Text);
    cmd.Parameters.AddWithValue("@omntype", RdownType.SelectedValue);
    cmd.Parameters.AddWithValue("@estateno",txtflatNo.Text);
    cmd.Parameters.AddWithValue("@storyno", txtstoryNo.Text);
    cmd.Parameters.AddWithValue("@city", RDcity.SelectedValue);
    cmd.Parameters.AddWithValue("@area", RadComboBox2.SelectedValue);
    cmd.Parameters.AddWithValue("@InstrumentNo",txtskno.Text);
    cmd.Parameters.AddWithValue("@Instrumentdate", txtskdate.Text);
    cmd.Parameters.AddWithValue("@Instrumentsource", Rdsksource.SelectedValue);
    cmd.Parameters.AddWithValue("@orderstate", Rdordercase.SelectedValue);
    cmd.Parameters.AddWithValue("@estatespace",txtspace.Text);
    cmd.Parameters.AddWithValue("@notes", txtcomments.Text);
    cmd.Parameters.AddWithValue("@waredno",txtwaredno.Text);
    cmd.Parameters.AddWithValue("@wareddate", txtkitabno.Text);
    cmd.Parameters.AddWithValue("@ghaidno", txtgaidno.Text);
    cmd.Parameters.AddWithValue("@ghaiddate",txtghaiddate.Text);
    cmd.Parameters.AddWithValue("@jihtsdor",Rdsksource.SelectedValue);
    cmd.Parameters.AddWithValue("@job", txtsaderdate);
    int x =cmd.ExecuteNonQuery();
    any one could provide suggestion to solve this problem
    thanks

    Hello,
    I would like suggest you posting it to:
    http://www.telerik.com/support
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Adding objects to an object package

    I am using DESKi XI and I am trying to add a .rep report to the CMC so I can schedule it every day in InfoView.
    On page 189 of the BO Enterprise Administrator's Guide it says to open the object package in the CMC, click the New Object button and a list of object tabs will appear. It says to click on the appropriate tab, REPORT or PROGRAM.
    I see icons on the left side of the window for Program, Microsoft Excel and Word, Adobe, Text, Rich Text, Power Point and hyperlink. Nothing for "Report". If I select Program or any of the other choices a browse window comes up so you can identify the location of the object. When I identify the .rep file I get an error warning that it did not expect a .rep extension, do you want to continue? I have said yes, but when scheduling the object it never runs.
    There are other DESKi objects that came with this copy of our CMC, so I know you can load a .rep object...Please help...

    Thank you for getting me on track...I just searched for every reference to EXPORT in that Admin guide and didn't see this anywhere in the document.  I just went to the Deski Access and Analysis guide and found the instructions you referenced.
    I have successfully exported the files and successfully scheduled them from InfoView.  I have a follow-on problem, but I will put it in a new thread so you get credit for solving another problem if you want to...
    Thank you very much!

  • Internationalized Object data from database

    Hi...
    I like to know which concepts you use in web application in case you need dynamic object data internationalized. For static web pages I can use ResourceBoundles to get the data but I'm still searching for the ideal way to do this with Object data.
    Let�s say you have a Product object which has a name and description in many different languages.
    Preferably I like to do something like this
    <c:out value="${product.name}"/>
    to display the users preferred (session) language, and for the special case to force a language I might use something like this
    <c:out value="${product.name}" locale="en_US"/>
    Now my big question is how should I implement something like this. Should the product.getName() method include the logic to determine the users session to call something like product.getName(Locale)? Or should I implement a custom tag to handle cases like this?
    What is your preferred way of doing this?
    Thanks,
    Gregor

    How can use hashtable or Vector to create Jtree ?
    the Hashtable's Data or Vector's Data from Database.

  • Need to get IRole object using Roles Display Name

    Hi,
    I need to get IRole object using Roles Display Name. I had the below code in EP 2004 SP12 and it works. But the same code dont work in EP 2004s SP13
    user = request.getUser();
    profile = request.getComponentContext().getProfile();     
    String strRoles = profile.getProperty("Roles");
    String strRole[] = strRoles.split(",");
    IRoleFactory roleFactory = UMFactory.getRoleFactory();
    String roleUniqueId = null;
    int i = 0;
    boolean flagRedirect = false;
    for(i = 0; i < strRole.length; i++){
         try
              com.sap.security.api.IRole role = roleFactory.getRoleByUniqueName(strRole<i>);
              roleUniqueId = role.getUniqueID();
              if(!user.isMemberOfRole(roleUniqueId, true))
                   continue;
              flagRedirect = true;                    
              break;
         catch(UMException ex)
         catch(IOException ex)
    if(!flagRedirect){
    Where property Roles will have comma separated roles display names like "com.ABC.ortho_reports,com.ABC.lawns_ortho_reports,com.ABC.executive_reports"
    Please advise.

    Thanks Mrudula for the response. Sorry for the delay in responding.
    I get UMEException with the message "Role with uniqueName com.ABC.general not found"
    But it works fine if i specify Role unique role (like pcd:portal_content/com.abc.Marketing_Workbench/com.abc.Roles/com.abc.general).
    We are in the process of upgrading Portal environment from EP6.0 SP12 to EP7.0 SP13. Above scenario works fine in the older environment.

Maybe you are looking for

  • How can I get Windows (v7 x64) to open in Dreamweaver (CS5) if I right click it?

    Hi How can I get Windows (v7 x64) to open in Dreamweaver (CS5) if I right click it? None of the normal mechanisms of setting an application to be the DEFAULT application for the .HTML file type seem to work... Extremely irritating. J

  • App.refresh bug in CS5???

    Hi, I have this sample script: #target photoshop app.bringToFront(); var dlg = new Window('dialog', 'test'); w = dlg.add('button', undefined, 'cm1',{name:'ok'}); var docRef = app.activeDocument; w.onClick = run; dlg.show(); function run()    docRef.a

  • Calling two Business service using split join in osb

    Hi, While trying to call two business service using Split Join in osb i am getting selection failure message in Bpel em console. i am using invoke activity to invoke the BS and assign to assign the input. in the assign i am assigning *$request.payloa

  • How to download duplicate songs from album "A" and album "B" in iTunes

    Hello! In iTunes I've bought Album "A" that has "track 2."  More recently I purchased Album "B" which also has "track 2" but it will not download stating that I already have it as part of Album "A."  I would really like to only have the newer album o

  • Bc4j Package Path/name Question

    I am using this below mentioned package name, I just want to make sure my customizations are free from PATCHes. oracle.apps.pay.xxxabc.... is it going to be ok? Please help.