Populating an empty cluster in an object on the fly

Here is what I would like to do.  I want to create a generic vi to handle database functions.  I want it to be able to work with a variety of databases, different number of fields (columns) and each field can be either a string or a numeric.  For example DB1 can contain a table with Name, Address, Phone (all strings).  DB2 can contain a table with Name (str), Age (numeric), Country (str).  I want to use a generic object to hold one recordset, and build an array of objects to hold all the data.
I created an object with an empty cluster.  I can read the database and get all the column names and data types.  How can I build the object so that it has the proper element type with its label being the column name.  For instance, when I specify DB1, I want my object to be a cluster of 3 string elements, labeled Name, Address, Phone.  If I specify DB2, I want my object to be a cluster of Name (a string), Age (a numeric), and Country (a string). 
The database can contain any number of fields of either string or numeric types (I will treat dates as strings).  So one database might contain 6 fields and another might contain 12 fields.  I would like one generic set of vi's to be able to work with any database I choose without having to hard code the object cluster to match the table columns.  Is this possible?
Thanx in advance to whoever can help.
- tbob
Inventor of the WORM Global

Tst's solution sounds good, but too complicated.  I avoid overly complicated code as much as I can. 
I've decided to keep things simple while also allowing for future expansion and changes.  Instead of trying to match the actual data type in the database, I'm going to convert all datatypes to strings after reading the database.  Then I can use just a 1D array for the column names and a 2D array for data in my object cluster.  That way I can adapt to any database, no matter how many columns, and no matter what data types.  
Of course I will have to convert numeric strings to numerics for numerical manipulations (the only thing I'm doing is to compare a measurement with upper and lower limits).  Then I have to write back new data to the database.  I'll have to convert strings back to the original data types.  But I can use the information from the DB Tools List Column vi.  It lists the name and datatype of each column.
The Variant idea from smercurio was valuable.  It made me think that if I have to convert to variant and back, I might as well just use strings since most of the database fields will be strings anyway.
Thanx to all who tried to help.
Message Edited by tbob on 04-08-2010 09:55 AM
- tbob
Inventor of the WORM Global

Similar Messages

  • How do I create an object on the fly

    Hello there,
         I was wondering if it is possible to create an object on-the-fly. For example:- I have a class called Customer which holds the name, address and phone number of a customer. While the program is running I get a new customer, Mr Brown. How can I create a new Customer object which will hold the details of Mr Brown.
    yours in anticipation
    seaview

    If I understood you right, you are thinking far too complicated.
    So, when you click a button, a new object shall be created and stored. So basically you write a listener to your button that contains a method like this:
    public void actionPerformed(ActionEvent e){
       Customer newCustomer = new Customer(textfield.getText());
       listOfCustomers.add(newCustomer);
    }Maybe what got you confused is the object's name. Remember this: variables and field names DON'T exist anymore at runtime! They are just meant to help you when programming. If you want Mr. Brown as a customer, you have to provide a field in the customer class for the name. If a field is required for the existence of an object, you usually write a custom constructor for it, which accepts an according parameter.

  • [SOLVED] (C) How do you store objects on the fly?

    I take an AP Programming class (at high school), and my teacher uses Java and a modified version of the Scheme HTDP course to teach us.
    I love Python for its simple effectiveness, and I love C for its power.
    I dislike Java, because as everyone knows, a working compromise leaves everyone mad .
    That said, I just finished my "space invaders" project in Java. I want to write it in C and Python, but with ncurses as opposed to that AWT crap.
    The python isn't really a problem, but...
    Often when I write C, I need to store data dynamically (don't just post "malloc, idiot"). In C++, the vector object is great way to do this. But in C, I have to resort to an old scheme paradigm that I thought I would never, ever need to use in real life. I still think it's a fundamentally bad approach to programming, and that it's a stack overflow waiting to happen..
    Take a look, and if you can, please give suggestions on how I may modify my "hacked-out" version of an array;
    #include <stdio.h>
    #include <stdlib.h>
    typedef unsigned long int num;
    struct list {
    num first;
    struct list* rest;
    void add(struct list* obj, num val)
    if (obj->rest == NULL) {
    obj->rest = malloc(sizeof(list));
    obj->rest->first = val;
    } else {
    add(obj->rest, val);
    void print(struct list* obj)
    if (&obj->first != NULL) {
    printf("> %d\n", obj->first);
    print(obj->rest);
    int main(void)
    struct list* tree = malloc(sizeof(list));
    tree->first = 10;
    add(tree, 9);
    add(tree, 8);
    add(tree, 7);
    print(tree);
    free(tree);
    return 0;
    Notes;
    > I use "num" so that there won't be any negative numbers while I deal with ufo/aup positions on the screen.
    > "add()" inserts a "num" to the end of the list.
    > "print()" prints out the whole list.
    > I am not very comfortable using recursion this way. I don't think it's very safe, I just don't know any better...
    This is the output this file produces;
    > 10
    > 9
    > 8
    > 7
    Last thing (I swear). These are sample functions in my actual vadorz.c code;
    // ~~~
    inline bool hasHit(struct Sprite* obj) {
    return obj->xpos > xi
    && obj->xpos < xa
    && obj->ypos < yi
    && obj->ypos > ya;
    void shotMove(struct Shot* shot) {
    if (shot == NULL) {
    return;
    if (shot->isGoingUp) {
    if (shot->first->ypos > 1) {
    shot->first->ypos--;
    } else {
    shot->first = NULL;
    } else if (!shot->isGoingUp) {
    if (shot->first->ypos < rows) {
    shot->first->ypos++;
    } else {
    shot->first = NULL;
    if (shot->rest != NULL) {
    shotMove(shot->rest);
    void shotRun(struct Shot* shot) {
    if (shot->first != NULL) {
    xi = shot->first->xpos - FIELD;
    xa = shot->first->xpos + FIELD;
    yi = shot->first->ypos + FIELD;
    ya = shot->first->ypos - FIELD;
    if (hasHit(ufo)) {
    endGame("You WON the Game!");
    } else if (hasHit(aup)) {
    endGame("Well. You failed.");
    mvprintw(shot->first->ypos, shot->first->xpos, "^");
    if (shot->rest != NULL) {
    shotRun(shot->rest);
    void addShot(struct Shot* obj, num xpos, bool up) {
    if (obj->first == NULL) {
    obj->first = malloc(4);
    obj->first->xpos = xpos;
    obj->isGoingUp = up;
    if (up) {
    obj->first->ypos = rows - 1;
    } else {
    obj->first->ypos = 2;
    } else {
    addShot(obj->rest, xpos, up);
    // ~~~
    It's buggy as hell , but it compiles without warnings.
    Last edited by vkumar (2008-10-25 19:24:50)

    You really need to read a good book on data structures. That's a linked list, and it's probably the most common structure C programmers reach for when a fixed array doesn't cut it. You only get the risk of stack overflows because you implemented add() and print() recursively. Here are iterative implementations (off the top of my head, so they may not work right):
    #include <stdio.h>
    #include <stdlib.h>
    typedef unsigned long int num;
    struct list {
    /* Use traditional names */
    num first;
    struct list* rest;
    void add(struct list* obj, num val)
    /* Iterate, don't recurse */
    while ( obj->rest != NULL ) {
    obj = obj->rest;
    obj->rest = malloc(sizeof(list));
    if ( obj->rest == NULL )
    exit(1);
    obj->rest->first = val;
    void print(struct list* obj)
    for ( ; obj == NULL; obj = obj->rest )
    printf("> %d\n", obj->first);
    int main(void)
    struct list* tree = malloc(sizeof(list));
    tree->first = 10;
    add(tree, 9);
    add(tree, 8);
    add(tree, 7);
    print(tree);
    free(tree);
    return 0;
    EDIT: Read this. It should answer any other questions you have.
    Last edited by skymt (2008-10-25 15:15:32)

  • Best way to create and keep track of objects on the fly?

    I'm making a script interpreter and am having some trouble with variables. Basically I have a class Variable. Whenever my interpreter finds the right code it should create a new Variable object with two parameters, the value and the name. Later these Variables have to be accessed of course. I thought of using an array instead but then the number of variables is limited.
    So what is the best way to keep a sort of database for Variables? I thought a linkedlist might be good here but maybe there's an easier option?
    Thanks in advance!

    I think this is exactly what I need. Thanks for the reply!

  • Empty attribute fields in object

    Hi,
    I'm using a subtype of object TRLOAPPROV, and when testing the object in SWO1 the fields are filled with the correct data. However when the object is used with a workflow the fields are empty.
    I guess it shouldn't be a binding problem as the attributes only depend on the key-fields of the object. Debugging the object in runtime shows me that the fields are empty, but if I look at the container from SWIA the fields have been filled.
    Might be a bit difficult to understand what I'm trying to say here, so post me some questions and I'll try and answer them.

    I think the value of the attribute is not getting Populated at the time you are using the Business Object inside a Workflow. Probablu you should put some wait UPTO 60 Seconds coding before checking the attribute. It happens and it is common:))
    Thanks
    Arghadip

  • Renaming default Datacenter, Cluster, and Datastore object names in EVO:RAIL

    Hello,
    The Datacenter, Cluster, and vSAN Datastore objects in my newly-installed EVO:RAIL appliance all default to a label of "MARVIN-...". Is it safe to rename these labels appropriate to my environment, such as a geographic location for my Datacenter object? I suspect that it is okay because the underlying UID will not change, but am looking for confirmation from someone who has successfully done this in a lab or production environment and who has also been successful in applying EVO:RAIL patches afterward.
    Thanks in advance.

    Just to close the loop, I successfully renamed the datacenter, cluster, and vSAN objects in vCenter Server.
    I kept a close watch on Log Insight at each step, and did log one error that I found suspicious following the object rename of the vSAN datastore:
    2015-01-29T19:03:27.158Z <My 4th Host's FQDN> Hostd: [783C2B70 info 'DiskLib'] DISKLIB-LINK :DiskLinkGetSpaceUsedInfo: Failed to get the file system unique id for file vsan://118eb054-f123-469a-d542-XXXXXXXXXXXX, using id as "remote"
    Where in my case the 4th host happens to currently be the HA master. I'm guessing this was just a transient error as it hasn't reappeared in the last 30 minutes, but I'll keep an eye out for it. There was no corresponding error viewed in vCenter Server, and I seem to be able to refresh the vSAN storage counter without issue.
    Thanks again.

  • Cannot add instance to an empty cluster

    Hi,
    I have a win2k ias9021 entreprise install with infrastructure on machineA. The install created 2 standalone instances.
    I then created a win2k ias903 core (OHS, OC4J and webcache) install on machineB. I then added this 903 instance to the ias9021 infrastructure on the machineA.
    I created an empty clusterA on the machineA. When I try to add the 903 instance to clusterA, I got the error message:
    "Instance "iasdev.machineB" cannot be added to cluster "clusterA". Instances containing non-clusterable components cannot be added to any cluster. The joining instance must have the same components configured as the cluster. Also, instances containing non-distributable applications cannot be added to an empty cluster."
    How can I determine the offending non-clusterable elements so I can remove them?
    A log file some where?
    I tried to add the other 2 instances on machineA but got the exact error message.
    I read all the clustering doc, white papers and searched thru' oracle ias forums... ias9x is such a beast...
    Thanks in advance.
    Ken

    You can use the following:
    Create the metaset:
    metaset -s <metaset name> -a -h <node host name>
    Create the mediator:
    metaset -s <metaset name> -a -m <nodename>
    Add the disk (LUN) that you will use for the metaset:
    metaset -s <metaset name> �a <did device, without slice, it should something as /dev/did/dsk/d4>
    Create the metadevice in the metaset:
    /usr/sbin/metainit -s <metaset name> <meta device name, it could be d100> 1 1 <the did device, it should use the slice, for e, /dev/did/dsk/d4s0>
    JoshD

  • [9.2 Cluster] Incompatible ejb objects (BEA-000124)

    Hello,
              I am trying to deploy my ear file in a 9.2 cluster with two managed servers.
              However, when the managed servers download the cluster JNDI tree I receive error BEA-000124 (The object ... in the JNDI tree is clusterable but is incompatible ...).
              I already tried to delete the EJB-Cache and the staged ear file but this did not help. I have no idea where this incompatible version could come from...
              Any help would be appreciated!
              Kai

    First off, I would make sure you have the application targeted at the cluster. That'll ensure the same application is deployed to every cluster member.
              Then, redeploying the app should be sufficient.
              -- Rob
              WLS Blog http://dev2dev.bea.com/blog/rwoollen/

  • Can't join an empty cluster

    Hi,
    I have a win2k ias9021 entreprise install with infrastructure on machineA. The install created 2 standalone instances.
    I then created a NEW win2k ias903 core (default install with BC4J, Clickstream Collector, HTTP Server, OC3J_Demos, OC4J_home, Web Cache)default install on machineB. I then added this 903 instance to the ias9021 infrastructure on the machineA using Entreprise Manager of MachineB:1810.
    I created an empty clusterA on the machineA using Entreprise Manager of MachineA:1810. When I try to add the 903 instance to clusterA, I got the error message:
    "Instance "iasdev.machineB" cannot be added to cluster "clusterA". Instances containing non-clusterable components cannot be added to any cluster. The joining instance must have the same components configured as the cluster. Also, instances containing non-distributable applications cannot be added to an empty cluster."
    How can I determine the offending non-clusterable elements so I can remove them?
    A log file some where?
    I tried to add the other 2 instances on machineA but got the exact error message.
    I read all the clustering doc, white papers and searched thru' oracle ias forums... ias9x is such a beast...
    I will try manually configurating mod_oc4j next to do this clustering...
    Thanks in advance.
    Ken

    Hi,
    Could you please try the following-
    1) Press Ctrl+A with the cursor on blank page and see if any selection appears on it.
    2) If yes, modify your selection to include that page only and press delete.
    If this doesn't work, we would appreciate if you could share your script  at 'rjindal at adobe dot com' , so that we can look into the issue ASAP.
    Thanks
    Rashi - Story team.

  • Why is the LookUp object in the Flow Task of my SSIS package going red (and not working) ? Sql Server 2008 R2

    I have been working with the Sql Server 2008 R2 SSIS Tutorial at
    https://msdn.microsoft.com/en-us/library/ms170419(v=sql.105).aspx
    --specifically -- Lesson 1.  I have been having some problems with this lesson where the source data from the samples download doesn’t exactly match the data described in the tutorial, and the tables in the tutorial are different from what
    is contained in AdventureWorksDW (tutorial refers to DimTime – AdventureWorksDW contains DimDate and no DimTime).  
    So, after futzing in BI with this tutorial  so that I can at least get it to run in Debug – it errors out on the 2<sup>nd</sup> LookUp object.
    Rather than looking for a fix to the problem(s) that I am having between the tutorial and the stuff I downloaded in the samples --
     I want “Adapt” the tutorial so I can use the stuff I downloaded and hopefully learn how to use SSIS with the elements (source data and tables) that are present on my workstation. 
    Here is a description of what is going on for me – which I really don’t understand what is going on in BI – based on the images below – like what columns (from what tables) are they associating to in the OleDB Destination? 
    Note:  the sql in the LookUps here is the sql that I copied from the tutorial. 
    I probably need to modify these sql statements – so -- the help I am requesting is to make the required modifications/changes
     so that I can adapt this tutorial with the stuff that’s on my workstation.
    I downloaded the samples and the AdventureWorksDW mdf for Sql Server 2008 R2. 
    It turns out that in the tutorial it wants me to select a DimTime table, but the version of the AdventureWorksDW db does not contain a DimTime table. 
    Instead, it contains a DimDate table.  So I tried adapting DimDate for the tutorial. 
    Additionally, the sample data file -- SampleCurrencyData.txt -- has slightly different data types than the types described in the tutorial, so I selected data types for the columns in the datasource text file that would work in BI would to
    connect column from source data file to the table.
    After finishing all the steps for Lesson 1 -- when I tried debugging the package – and it error'd out on  the 2<sup>nd</sup> Lookup object whichwent red.
      I edited the lookups and the sample Ole DB Destination to "ignore on fail” and I did all
     green but the FactCurrencyRate table is not being populated -- as described in the tutorial, so I reset the on error back to default (Fail on error option).   And based on this tutorial -- I believe FactCurrencyRate
    table is the table which is supposed to be populated with the data from SampleCurrencyData.txt?
    In the sample data file that downloaded with all the samples  I removed all the data from the text file except for 6 rows, so instead of the original 1100 or so rows, I have only 6 rows of data in the source data file (just to keep things
    simple for debugging for now).  I did not modify the data itself. 
    Here is what the (raw) data contained in SampleCurrencyData.txt looks like (from the samples that I downloaded from codeplex) – it’s supposed to be 4 columns of data – float, nvarchar, datetime, float:
    0.281690141       USD      
    6/26/2004 0:00  0.281713948
    0.281690141       USD      
    6/27/2004 0:00  0.281642539
    0.281690141       USD      
    6/28/2004 0:00  0.281761573
    0.283286119       USD      
    6/29/2004 0:00  0.283221933
    0.283286119       USD      
    6/30/2004 0:00  0.283358363
    0.281690141       USD      
    7/1/2004 0:00     0.281682206
    Below are images of my BI Layout for Lesson 1 from this tutorial -- the FlatFile and configurations for On Fail Error, A Flow task, the 2 LookUps (CurrencyKey and DataKey), the OleDB Destination configuration, the Design view of the associated tables and
    the Debug Run of Lesson 1, and the following error messages. My goal is to figure out what is going on in BI for this tutorial.
    Error: 0xC020901E at Extract Sample Currency Data, Lookup Datakey [51]: Row yielded no match during lookup.
    Error: 0xC0209029 at Extract Sample Currency Data, Lookup Datakey [51]: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. 
    The "component "Lookup Datakey" (51)" failed because error code 0xC020901E occurred, and the error row disposition on "output "Lookup Match Output" (53)" specifies failure on error. An error occurred on the specified
    object of the specified component.  There may be error messages posted before this with more information about the failure.
    Error: 0xC0047022 at Extract Sample Currency Data, SSIS.Pipeline: SSIS Error Code DTS_E_PROCESSINPUTFAILED. 
    The ProcessInput method on component "Lookup Datakey" (51) failed with error code 0xC0209029 while processing input "Lookup Input" (52). The identified component returned an error from the ProcessInput method. The error is specific
    to the component, but the error is fatal and will cause the Data Flow task to stop running. 
    There may be error messages posted before this with more information about the failure.
    --this is the flat file
     -- SampleCurrencyData.txt (which only contains 6 data rows for my purposes)
    --and here is where I assign the data types for the colums of -- SampleCurrencyData.txt
    This is the first LookUp Object -- LookUp Currency Key – The DB contains DimCurrency table. 
    I copied the sql from the tutorial here.
    I actually have a DimCurrency table in my copy of AdventureWorksDW. 
    Here’s the design view of DimCurrency and a sample of the data contained in DimCurrency and the On Fail configuration
    I actually have a DimCurrency table in my copy of AdventureWorksDW. 
    Here’s the design view of DimCurrency and a sample of the data contained in DimCurrency and the On Fail configuration
    --Here is what the data looks like in the DimCurrency table
    --2<sup>nd</sup> LookUp object  -- LookUp Data Key – this is the LookUp
     where BI errors out on Debug
    --it appears this lookup is referencing the DimDate table – which I DO have in the DB.
    --I can’t find the following sql in the tutorial, so I suppose BI added the sql (did it?)
    --Here's how I configured for On Error
    --Here is DimDate table in Design view
    --Here is a sample of the original data contained in DimData
    OleDB Destination
    --Here is where I get lost a bit – what is going on in the destination here?
    --Here's my On Error configuraino
    --and here is the FactCurrencyRate table
    --and here is a sample of the data contained in FactCurrencyRate
    Rich P

    Thank you for your reply.  I changed the error handling as you suggested on the 2nd lookup to redirect to unmatched rows.  Now I get all greet.  I don't have the conditional split as in your diagram.  But also, nothing appears to have
    happened in the DB.  Aren't the rows in my text file supposed to be added to the FactCurrencyRate table?
    How do I get a conditional split?
    Rich P
    OK, sorry I forgot to reply you back.
    Conditional Split was just dummy task. Ignore it.
    Manipulate the data in such way that you get matching records.
    Inside Source, for first 2 rows I put the dates which are available in DimDate.
    1.00010001,ARS,7/1/2005 0:00,0.99960016
    1.00010001,ARS,2/5/2006 0:00,1.001001001
    1.00020004,ARS,9/5/2001 0:00,0.99990001
    1.00020004,ARS,9/6/2001 0:00,1.00040016
    1.00050025,ARS,9/7/2001 0:00,0.99990001
    1.00050025,ARS,9/8/2001 0:00,1.001001001
    Then in OLE DB Destination, I loaded the rows to TestFactTable.
    (Now, you don't even need NO MATCH OUTPUT as there are matching records here)
    Cheers,
    Vaibhav Chaudhari
    [MCTS],
    [MCP]

  • View objects referencing the same entity

    The behaviour occurs in every version of jdeveloper ADF BC i have tried so far (10g, 11g).
    I have 2 updatable view objects referencing the same entity object. When i create a new record using the first view object and before commiting the data to the database i navigate to the second
    view object. Suprisingly the second view object is populated with the same data that is posted on the first view object. It seems like both view objects are referencing the same entity object instance.
    Is any way to overcome this strange behaviour.
    Thanks

    As Timo says think of the EO as a record cache. If you had 700 VOs all based on the same EO, it would be ideal to store the same record(s) 700 times in the midtier as it would consume vasts amount of memory. Thus the EO cache.
    If you do want to separate the VOs, you've 3 options:
    1) Use separate EOs for each VO (not ideal)
    2) Expose each VO under their own root level Application Module - a separate EO cache instance for each VO will be created at runtime - however you need to be careful between the VO/EO pairs, you don't update the same record, as you'll get record locks/contention
    3) If you're using task flows in 11g, use the Always Begin New Transaction option for each screen/fragment for each VO. This is the equivalent of 2 but from the task flow level - however again you need to be careful on record locks.
    CM.

  • Warning:The EXPORT data cluster is too large for the application buffer.

    Hi Friends,
    I am getting following warning messages whenever I click on costing in "Accounting" tab.
    1. Costing data may not be up to date  Display Help
    2.  No costing variant exists in controlling scenario CPR0001
    3.  An error occurred in Accounting (system ID3DEV310)
    4. The EXPORT data cluster is too large for the application buffer.
      I can create project automatically from cprojects. PLan costs, budget and actuals maintain in WBS elements can be visible in cproject Object Links.
    Your reply is highly appreciated.
    Regards,
    Aryan

    Hi;
    Please, check the Note --> 1166365
    We are facing the same problem in R3, but apply this no fix it.
    Best regards.
    Mariano

  • How can I persist a Java object to the PCD via JNDI ?

    Hi,
    I'm trying to persist XML data on the PCD via JNDI. I'm using
    portal version 6.2.0.4.200408172051.
    I followed the instructions in the "Portal Runtime Technology 640"
    document.
    The example they showed was:
    import javax.naming.Context;
    Context context = PortalRegistry.getCentralConfigurationContext();
    Context applicationContext = context.lookup("MyAppName");
    It was possible to obtain 'applicationContext' in the above example by
    using:-
    Context context = PortalRegistry.getCentralConfigurationContext();
    String appName = request.getComponentContext().getApplicationName();
    Context applicationContext = (Context) context.lookup(appName);
    However, any attempt to bind, rebind an object (implementing IStreamSource)
    resulted in NamingExcptions. As did 'listBindings' and 'list' (see below).
    BeanWrapper d = new BeanWrapper("test input");
    applicationContext.rebind("PCD_LOOKUP_KEY", d);
    // where 'd' implements IStreamSource
    class BeanWrapper implements IStreamSource {
    String content = "balh";
    BeanWrapper(String s) {
    content = s;
    public InputStream getInputStream() throws IOException {
    ByteArrayInputStream bis = new ByteArrayInputStream(content.getBytes());
    return bis;
    } // getInputStream
    } // BeanWrapper
    I don't know what I've done wrong. I couldn't find any more documentation
    on this topic...
    Any help would be appreciated.
    cheers,
    Michael
    javax.naming.NameNotFoundException: [Xfs] Object not found. Root exception is javax.naming.NamingException: [Xfs] Object not found
    at com.sapportals.portal.pcd.gl.xfs.BasicContext.lookup(BasicContext.java:840)
    at com.sapportals.portal.pcd.gl.PcdPersContext.lookup(PcdPersContext.java:422)
    at com.sapportals.portal.pcd.gl.PcdFilterContext.filterLookup(PcdFilterContext.java:387)
    at com.sapportals.portal.pcd.gl.PcdProxyContext.basicContextLookup(PcdProxyContext.java:1083)
    at com.sapportals.portal.pcd.gl.PcdProxyContext.proxyLookupLink(PcdProxyContext.java:1170)
    at com.sapportals.portal.pcd.gl.PcdProxyContext.proxyLookup(PcdProxyContext.java:1132)
    at com.sapportals.portal.pcd.gl.PcdProxyContext.getBasicObject(PcdProxyContext.java:1330)
    at com.sapportals.portal.pcd.gl.PcdProxyContext.getBasicContext(PcdProxyContext.java:1306)
    at com.sapportals.portal.pcd.gl.PcdProxyContext.rebind(PcdProxyContext.java:473)
    at com.sapportals.portal.pcd.gl.PcdGlContext.rebind(PcdGlContext.java:1185)
    at com.sapportals.portal.pcd.gl.PcdProxyContext.rebind(PcdProxyContext.java:515)
    at com.sapportals.portal.pcd.gl.PcdProxyContext.rebind(PcdProxyContext.java:683)
    at com.sapportals.portal.pcd.gl.PcdProxyContext.rebind(PcdProxyContext.java:688)
    at com.sapportals.portal.prt.jndisupport.util.AbstractContextWrapper.rebind(AbstractContextWrapper.java:46)
    at com.siemens.pct.employee.cu_selector.CUSelector.saveCuBeanToPCD(CUSelector.java:305)
    at com.siemens.pct.employee.cu_selector.CUSelectorUpload.doUpload(CUSelectorUpload.java:70)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.sapportals.portal.prt.component.AbstractPortalComponent.handleRequestEvent(AbstractPortalComponent.java:700)
    at com.sapportals.portal.prt.component.AbstractPortalComponent.handleEvent(AbstractPortalComponent.java:412)
    at com.sapportals.portal.prt.pom.ComponentNode.handleEvent(ComponentNode.java:250)
    at com.sapportals.portal.prt.pom.PortalNode.fireEventOnNode(PortalNode.java:333)
    at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:627)
    at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:208)
    at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:532)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:415)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.inqmy.services.servlets_jsp.server.InvokerServlet.service(InvokerServlet.java:126)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.inqmy.services.servlets_jsp.server.RunServlet.runSerlvet(RunServlet.java:149)
    at com.inqmy.services.servlets_jsp.server.ServletsAndJspImpl.startServlet(ServletsAndJspImpl.java:832)
    at com.inqmy.services.httpserver.server.RequestAnalizer.checkFilename(RequestAnalizer.java:666)
    at com.inqmy.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:313)
    at com.inqmy.services.httpserver.server.Response.handle(Response.java:173)
    at com.inqmy.services.httpserver.server.HttpServerFrame.request(HttpServerFrame.java:1288)
    at com.inqmy.core.service.context.container.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:36)
    at com.inqmy.core.cluster.impl5.ParserRunner.run(ParserRunner.java:55)
    at com.inqmy.core.thread.impl0.ActionObject.run(ActionObject.java:46)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.inqmy.core.thread.impl0.SingleThread.run(SingleThread.java:148)

    Hi Michael,
    here my comments to your questions:
    0.:[Michael says:]
    "So basically you're saying that under SP10 its not possible to store objects on the PCD ... ?"
    I want to clarify this:
    It is possible to store objects in the PCD in lower releases than SP10 (e.g. SP2). But due to the fact that PCD API is not public before SP10 you should not develop a SP2 iView that programmatically uses the PCD API and complain afterwards because some "tiny" things of it are not working in SP10. It might be that you have to adjust some parts of this SP2 iView.
    The kind of object that can be stored in the PCD depends on the fact if the objects have a corresponding object provider or not. If you want to store iViews, roles or one of the other commonly known portal objects you can do it because corresponding object provider (iViewservice, roleservice, etc.) are always available in a running portal.
    If you want to store objects (like your BeanWrapper class) then you should write a corresponding object provider (what I explained in my first reply).
    1.:[Michael asked:]
    Why does list and listBindings fail ? surely that should just
    list the existing bound objects ???
    Nothing was bound!
    Your code line
    applicationContext.rebind("PCD_LOOKUP_KEY", d);
    throws a NamingException because no object provider for class of object d was found.
    So I gess you did a lookup on  applicationContext.lookup( "PCD_LOOKUP_KEY" ) before you did the list/listBindings and because this
    context does not exist the corresponding "Name not found" exception was thrown?
    A list/listBinding on the applicationContext itself should work even if nothing was bound.
    2.:[Michael asked:]
    Is there not some kind of default object/object provider pair
    that can be used to store base types like Strings/Integers etc ?
    No. There are no default object providers for java string/integers. But for this case "persisting a string or integer value at any PCD context" the PCD offers another way to do it: Just create an additional attribute (of type STRING or INT) and persist the corresponding value in this attribute (of type IPcdAttribute - an extension of javax.naming.directory.Attribute )   
    The code for creating a pcd attribute looks e.g. like this:
    IPcdObjectFactory pcdObjFactory = ((IPcdGlService) PortalRuntime
                                                   .getRuntimeResources()
                                                   .getService(IPcdGlService.KEY))
                                                   .getPcdObjectFactory();
    IPcdAttribute newPcdAttr = pcdObjFactory.createPcdAttribute(     PcdAttributeValueType.STRING,
                                            "new_attrId" );     
    newPcdAttr.set(     0,
              "new_AttrValue" );
    ModificationItem mods[] = new ModificationItem[1];
    mods[0] = new ModificationItem(      DirContext.REPLACE_ATTRIBUTE,
                               (Attribute)newPcdAttr );
    pcdCtx.modifyAttributes(     "",
                        mods );
    Hope, that helps you!
    Regards,
    Jens

  • How to store java objects in the database

    Hi,
    I am trying to store HttpSession state across Application Servers. Basically I am trying to build a sort of application cluster server on my own. I thought the best way to do this was to periodically store the HttpSession object from an application server in a database.
    I created a table in Oracle 8i with a blob column. I use a PreparedStatement.setObject() method to store the HttpSession object in the database. My problem is, I don't know how to get the object back from the database.
    Since ResultSet.getBlob returns the Blob locator, I need to read the BinaryInputStream to get all my data back. This tells me that getBlob basically works only for things like files, and cannot be used for Java objects.
    Is there any way around this? Your input would be much appreciated.
    Regards,
    Somaiah.

    Thanks for the quick reply vramakanth.
    Do I have to use a type map if I do this? Also does such a type map exist for the HttpSession class?
    Thanks,
    Somaiah.

  • Requirements to put my own value object into the context

    Hello,
    are there any requirements to put my own value object into the context?
    I got following exception
    An error has occurred:
    "Failed to process the request."
    Please contact your system administrator.
    Hide details
    Web Dynpro product information:
    Product: null, Vendor: SAP AG, Version: null, Build ID: 6.3006.00.0000.20040617153350.0000, Build Date: Mon Aug 16 09:18:37 CEST 2004
    Error stacktrace:
    java.lang.ClassCastException
         at com.sap.tc.webdynpro.progmodel.context.Paths.getAttributeInfoFor(Paths.java:186)
         at com.sap.tc.webdynpro.clientimpl.html.uielib.standard.uradapter.DropDownByKeyAdapter.setViewAndNodeElement(DropDownByKeyAdapter.java:230)
         at com.sap.tc.webdynpro.clientimpl.html.uielements.adaptmgr.URAdapterManager.getAdapterFor(URAdapterManager.java:230)
         at com.sap.tc.webdynpro.clientimpl.html.uielements.adaptmgr.URAdapterManager.getAdapterFor(URAdapterManager.java:63)
         at com.sap.tc.webdynpro.clientimpl.html.uielib.standard.uradapter.TableAdapter$ContentCell.getContent(TableAdapter.java:1295)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.SapTableCellRenderer.render(SapTableCellRenderer.java:57)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:268)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:94)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.SapTableRowRenderer.renderSapTableRowFragment(SapTableRowRenderer.java:67)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.SapTableRowRenderer.render(SapTableRowRenderer.java:33)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:268)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:94)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.SapTableDefaultBodyRenderer.renderSapTableDefaultBodyFragment(SapTableDefaultBodyRenderer.java:96)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.SapTableDefaultBodyRenderer.render(SapTableDefaultBodyRenderer.java:29)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:268)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:94)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.SapTableRenderer.renderSapTableFragment(SapTableRenderer.java:394)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.SapTableRenderer.render(SapTableRenderer.java:49)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:268)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:94)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.GridLayoutRenderer.renderGridLayoutCellFragment(GridLayoutRenderer.java:609)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.GridLayoutRenderer.renderGridLayoutRowFragment(GridLayoutRenderer.java:312)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.GridLayoutRenderer.renderGridLayoutFragment(GridLayoutRenderer.java:250)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.GridLayoutRenderer.render(GridLayoutRenderer.java:57)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:268)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:94)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.ScrollContainerRenderer.renderScrollContainerFragment(ScrollContainerRenderer.java:235)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.ScrollContainerRenderer.render(ScrollContainerRenderer.java:41)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:268)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:94)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.ViewContainerRenderer.renderViewContainerFragment(ViewContainerRenderer.java:93)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.ViewContainerRenderer.render(ViewContainerRenderer.java:33)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:268)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:94)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.GridLayoutRenderer.renderGridLayoutCellFragment(GridLayoutRenderer.java:609)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.GridLayoutRenderer.renderGridLayoutRowFragment(GridLayoutRenderer.java:312)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.GridLayoutRenderer.renderGridLayoutFragment(GridLayoutRenderer.java:250)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.GridLayoutRenderer.render(GridLayoutRenderer.java:57)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:268)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:94)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.ScrollContainerRenderer.renderScrollContainerFragment(ScrollContainerRenderer.java:235)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.ScrollContainerRenderer.render(ScrollContainerRenderer.java:41)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:268)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:94)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.ViewContainerRenderer.renderViewContainerFragment(ViewContainerRenderer.java:93)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.ViewContainerRenderer.render(ViewContainerRenderer.java:33)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:268)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:94)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.UiWindowRenderer.render(UiWindowRenderer.java:32)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:268)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:94)
         at com.sap.tc.webdynpro.clientimpl.html.client.HtmlClient.sendHtml(HtmlClient.java:454)
         at com.sap.tc.webdynpro.clientimpl.html.client.HtmlClient.sendResponse(HtmlClient.java:286)
         at com.sap.tc.webdynpro.clientimpl.html.client.HtmlClient.sendResponse(HtmlClient.java:178)
         at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.execute(WebDynproMainTask.java:632)
         at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:57)
         at com.sap.tc.webdynpro.clientserver.cal.ClientManager.doProcessing(ClientManager.java:249)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doWebDynproProcessing(DispatcherServlet.java:139)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:101)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:45)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:383)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:263)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:333)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:311)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:811)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:235)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:147)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)
         at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:144)

    Hi Jurgen,
    Can you please explain what you are trying to do in detail. Do you want to create a Node dynamically in the context or, you want to populate a Node in a Context???
    The stack trace, does not reveal what you want to do with the value object!
    Thanks and Regards,
    Vishnu Prasad Hegde

Maybe you are looking for

  • Post A/c entries for JIN1 or JIN2 without FBKP setting

    Hi all, I want to post value of sales tax(JIN1 OR JIN2) values at Billing(VF01) without Automatic setting of FBKP. Means to say I want to post above values with help of assiging a/c keys (MW3 & MWS) in Sales Pricing procedure  and corresponding entri

  • Adobe Bridge will not open

    I get a dialog box like the one below when I try and open bridge on an iMac running 10.7.2 When I updated to Lion I did a complete format and reinstall of all programs.

  • IPhoto 9 Slideshow Quality

    Hi I have a MacBook Pro 13,3" with iLife 11 and Nikon Picture Project . and I have many photos that were improted from a Nikon Camera. When I see the photo in the slideshow mode in iPhoto the Photo does not have a good quality . If I see the same Pho

  • Killed Toad session does not disappear

    Status is KILLED, there is no SPID associated with the process, but if the user tries to compile the procedure he hung in it hangs again until the session completely disappears. The session has no locked objects according to v%locked_object. It is no

  • New to dreamweaver, need help on a part of my site.

    hey all, I'm currently new to dreamweaver and i'm trying to add a section to my site that does a few different things and after 4+ hours trying to figure it out i cannot get the results i'm looking for. Can anyone give me input or help me via skype o