RMS Retrieving an Object

Hi i have an RMS that stores an "AppointmentItem" I have managed to store the Item but am unsure of how to write the method that will get the record and return it as an "AppointmentItem"
the code for adding it is
public synchronized void add(AppointmentItem Patients) throws IOException {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
DataOutputStream outputStream = new DataOutputStream(baos);
outputStream.writeInt(Patients.getVisitID());
outputStream.writeUTF(Patients.getName());
outputStream.writeUTF(Patients.getAddress());
outputStream.writeUTF(Patients.getSymptom());
outputStream.writeUTF(Patients.getAction());
outputStream.writeUTF(Patients.isVisited());
byte[] b = baos.toByteArray();
try {
name.addRecord(b, 0, b.length);
} catch (RecordStoreException rse) {
System.out.println(rse);
rse.printStackTrace();
any help or pointing in the right direction would be appreciated... thanks

For deletion I dont need to ever delete a single record in my store unless you have to do that for update? but however my record store has a delete method in which i just delete the whole record store therefore avoiding single deletes :)

Similar Messages

  • Unable to retrieve system object

    An exception occurred while processing a request for :
    iView : pcd:portal_content/com.sap.pct/specialist/com.sap.pct.crm/com.sap.pct.crm.roles/com.sap.pct.crm.salesrepresentative/com.sap.pct.crm.sal.sales/com.sap.pct.crm.ord.orders
    Component Name : com.sap.portal.appintegrator.sap.BSP
    Exception in SAP Application Integrator occured: Cannot retrieve system object for this alias. System Alias: 'SAP_CRM', System ID: 'pcd:portal_content/PCR_CRM-IDES'. User: 'SALESREPS', Reason: Access denied (Object(s): portal_content/PCR_CRM-IDES).
    Exception id: 10:50_24/06/07_0034_4060050
    See the details for the exception ID in the log file
    any hope for solving this ERROR

    Hi rahul,
    1) check your permission setting as mentioned above and with read/write for "Everyone"
    2) In the same screen, next to "Everyone", there is a checkbox. Make sure that you have the "Enduser" flag
    Those are the 2 settings you have to make sure that is done in order to process iviews connected to your backend (system alias) systems.
    Hope that help.

  • Could not retrieve System Object  for the alias.

    Hi all,
    I have installed a business package (Maintenance Technician) and created system SAP_PM with aliases SAP_ECC_Manufacturing, and SAP_ECC_Common.  When I am logged into portal using Super Admin role, all the iviews of business package are working fine.  But when I am logged in using normal user, all iviews in the business packages are throwing the following exception.  Any ideas why? I appreciate your input.
    <b>Exception in SAP Application Integrator occured: Cannot retrieve system object for this alias. System Alias: 'SAP_ECC_Manufacturing', System ID: 'pcd:portal_content/com.xyz.fl_systems/com.xyz.SAP_PM'. User: 'abcuser',
    Reason: Access denied (Object(s): portal_content/com.xyz.fl_systems/com.xyz.SAP_PM).</b>
    Thanks
    Vicky R.

    Hi Vicky,
    can u pls share ur experience how did u solve this problem, i too facing the same problem.
    what i did  created one user who is already existed in BI System and created few iviews related to BI Reports.
    when i logged in through that user id in portal , while executing system is throughing the error what u have faced.
    Could u please let me know how did u solve that problem.
    Thanks in Advance
    RamanaRao V

  • Retrieving All Objects From Session

    I'm developing a JSP shopping cart application, i have problem with sessions. A user can add a product to their cart, this adds the product name and the product price to the cart using:
    <%
    session.setAttribute("pname", pname);
    session.setAttribute("pprice", pprice);
    %>
    The problem I have is viewing the cart. The page must display all items the user has added to the cart. I need to retrieve all the objects from the users session.
    session.getAttribute("pname") will only return the last object which was added to the session. Is there a method or mechansim to loop through all the objects in a users session?
    Any suggestions appreciated.

    session.getAttribute("pname") will only return the
    last object which was added to the session. Is there a
    method or mechansim to loop through all the objects in
    a users session?You can't use session.setAttribute("pname",pname); repeatedly. Each time it will overwrite contents of existing attribute. Thats the reason why you are always getting last added value.
    You can do one thing. Add pname to the Vector or Hashtable, like this,Vector v = (Vector) session.getAttribute("pname"); // Get the existing Vector in the session.
    if(v == null) v = new Vector(); //If there is no attribute "pname" in the session, create an object of Vector.
    v.add(pname) //add item to the Vector.
    session.setAttribute("pname",v); //Now add this vector to the session.Hope this helps.
    Sudha

  • How To Retrieve an Object's Value Defined Using c:set ... Tag?

    I have the value of a variable defined in JSP#1 (JSP#1 is not a form) using JSTL tag:
       <c:set var="id" value="${articleForm.article}" scope="session"/>Now, I have an object 'id' in the session scope. The object 'id' and all the information, which are defined in JSP#1, are forwarded to JSP#2.
    JSP#2 is a form. But, the 'id' is not used in JSP#2.
    JSP#2 has a submit button and then, a servlet takes over the control after that button is clicked. All the text fields in JSP#2 together with the object 'id' are forwarded to this servlet.
    I have two questions:
    1. I should put this object 'id' in a request scope or a session scope? Currently, it is in a session scope.
    2. How to retrieve the value of this object 'id' in this servlet? (I do not want to print the value out. I want to retrieve the value and store it in a database.)
        int articleID = Integer.parseInt( session.getAttribute( "id" ) );   or, it should be retrieved in another way?

    I'm not sure you understand the concept of a session object.
    Java objects stay on the server. There is no transmission between the web browser and the client.
    The scope just sets how long the server "remembers" that variable.
    request scope - only lasts one request. Once a web page is returned to the client, the server forgets all request variables.
    session scope - lasts for one user - across multiple requests/web pages.
    1. I should put this object 'id' in a request scope or a session scope? Currently, it is in a session scope.From your description, you appear to have it right - your object should be in session scope.
    2. How to retrieve the value of this object 'id' in this servlet? (I do not want to print the value out. I want to retrieve the value and store it in a database.)If articleForm.article is an String then that looks the right way to access it.
    You might have to do it like this:
    int articleID = Integer.parseInt( (String)session.getAttribute("id"));
    The Integer.parseInt method takes a String as a parameter - while session.getAttribute() returns an Object.
    This code will work if the object stored in the session is a String.
    The object stored in the session is ${articleForm.article} What type does articletForm.getArticle() return? That is the type you need to cast it to when retrieving it from the session.
    Cheers,
    evnafets

  • Error in retrieving tables / object already exists (UNV0035)

    In XiR2 Designer we are usually able to invoke the table browser without issue, however after working in the app for some time... when invoking the table browser the error msg "Error in retrieving tables / This object already exists. (UNV0035)" pops up.  Then you are still able to open the table browser.  I've seen the same or similar msg when trying to insert or edit derived tables.  As mentioned, usually the table browser functions ok, so the db rights seem in order.  Has anyone else experienced / solved this?
    -Bob

    Hi,
    From the error no unv0035, i came to konw that The object that you are trying to create already exists in the class. Objects must have unique names within the same class.
                              Try to Rename the existing object, or give the new object another name. If you
    change the name of an existing object, documents using this object may not refresh correctly.
    Thanks,
    SK.

  • Retrieve multiple objects with MVC/FrontController for view in JSP.

    I have made a MVC system (front-end only); a link call the url: ?page=createSomething to the FrontController, that is implemented as a Servlet, and then dispatch to createSomething.jsp. That�s all fine, but I need to retrieve 2-3 list to use in dropdowns, and that�s here I give up!
    A simple scenario is to retrieve a single object eg a member: I call the url: ?page=viewmemeber&command=viewMemeber&id=5. The Servlet call a commandHandler witch return a member, use setAttribute(�member�, member); and then dispatch to viewmember.jsp and use JSTL to view the member. That�s all fine, as long I only need to set a single object or a list of objects.
    The problem is now I want to create a member and need to retrieve 2-3 list to use in a dropdown when creating a member.. I can do a ?page=createmember&command=getAllCountries, but that will only allow a dropdown of countries.
    Is the solution to use a command pattern and use: ?page=createmember&command=getAllCountrysAndCitysAnd� ?
    My servlet
    commandhandlerclass = Class.forName("controllers.CommandHandler");
                    commandhandlerobject = commandhandlerclass.newInstance();
                    Object arguments[] = new Object[] { requestContextMap };
                    commandhandlermethod = commandhandlerclass.getMethod(
                        getString(requestContextMap, "command"),
                        new Class[] { requestContextMap.getClass() }
                    commandhandlerreturndata = commandhandlermethod.invoke(commandhandlerobject, arguments);
    request.setAttribute("bean", commandhandlerreturndata);

    Hi Dear,
    I think you want to create a member and in create member page you want two to three combo box.
    If my understanding is right then you can create a wrapper method that get all required data like city,state,countries and return all that data as map or collection. After getting all that required data set it to request or whereever you like and forward request to the JSP page. Then in JSP page you can get all that data from the map (Country data, city data ...).
    If you required help, i am ready for the same...
    Regard
    Patel Vinod

  • Problem retrieving mapped objects after SQL defined readAllQuery

    Working with toplink 9.0.4 I am trying to implement a retrieval mechanism where a number of toplink read queries are created, and are then executed all together in a UnitOfWork. Most of the queries are built up using expression builder or just by getting mapped properties from a base object. However, one of the queries is too complex for expression builder and is therefore defined with raw SQL something like this:
    String theSQL = "SELECT otherPeople.* FROM PEOPLE otherPeople, /* several more tables */ WHERE /*horribly complex where clause */";
    ReadAllQuery formQuery = new ReadAllQuery(Person.class, new SQLCall(theSQL));
    When this query is executed it returns a List of Person objects with the correct primary key (Id) fields.
    The problem is that when an attempt is made to retrieve properties mapped from the Person objects, toplink issues a query which is lacking the foreign key = specific value (e.g. PERSON_ID='437216' ) part of the where clause. This, of course tries to retrieve an entire table ending with an OutOfMemory error.
    My question is how do the objects retrieved by the SQL based ReadAllQuery differ from those retrieved by an expression builder based query, since mapped properties on those work correctly.
    I feel sure that I am missing something quite simple.
    Any thoughts ?
    Mike

    Relationship queries should work correctly when the original object is read through custom SQL.
    My guess would be that either batch reading has been specified with the read all query, or the object has a relationship that has been marked to always be batch read in the mapping. Batch reading is not supported with custom SQL queries, so you must not use batch reading if using custom SQL.
    You can also try contacting Oracle technical support to see if a patch is available that either throws an exception when batch reading with custom SQL is attempted, or ignores the batch setting with custom SQL.

  • Trouble in storing and retrieving RMI object in Weblogic 7 JNDI tree.

    I have created a simple server (BankImpl), implementing a RMI interface
    called Bank. A stub class (BankImpl_Stub.class) is generated from BankImpl
    class using
    "rmic -v1.2". Then I bind an instance of the BankImpl class to the JNDI tree
    in Weblogic
    server 7 under the name of "PeopleBank".
    After the binding, I can see the stub class in the JNDI tree, but with a
    different name: BankImpl_WLStub.class). when a
    client program is trying to lookup the stub associated with "PeopleBank", it
    failed with a puzzling message:
    java.io.NotSerializableException: BankImpl_WLStub
    Why a stub of a RMI object is not serializable? Does Weblogic needs a
    different rmic to generate RMI stubs?
    Thanks,
    Lian

    I have created a simple server (BankImpl), implementing a RMI interface
    called Bank. A stub class (BankImpl_Stub.class) is generated from BankImpl
    class using
    "rmic -v1.2". Then I bind an instance of the BankImpl class to the JNDI tree
    in Weblogic
    server 7 under the name of "PeopleBank".
    After the binding, I can see the stub class in the JNDI tree, but with a
    different name: BankImpl_WLStub.class). when a
    client program is trying to lookup the stub associated with "PeopleBank", it
    failed with a puzzling message:
    java.io.NotSerializableException: BankImpl_WLStub
    Why a stub of a RMI object is not serializable? Does Weblogic needs a
    different rmic to generate RMI stubs?
    Thanks,
    Lian

  • Retrieve the Object Code in se38

    Hi,
    I have devoloped a report in se38 and saved in a Request.
    I was actually intending in chaging the code by calling into another program.Unfortunately the code was been overwritten and i am not able to see the old code.
    Even i tried to get the old version by version management.
    Please sugget me how i can retrieve the code.
    FYI, all the custom FM and all the structures were been visible which was been used in the main prog.
    Kindly suggest.
    Thanks,
    Tayi

    Hi Ravi,
    I have devoloped a program in se38 and when i tired to submit the output of the program in PDF and then later to be sent it the same to mail using the code in
    https://wiki.sdn.sap.com/wiki/display/Snippets/Send%20email%20in%20background%20-PDF%20output%20of%20the%20any%20report 
    and my program was replaced with another code in the above link and below is the replaced code.
    REPORT ZR_SYSTEM_MONITOR .
    INCLUDE zrep_print .
    *IF flag ne 'X' AND Sy-subrc eq 0 .
      SUBMIT ZR_SYSTEM_MONITOR
    TO SAP-SPOOL SPOOL PARAMETERS print_parameters
    *ARCHIVE PARAMETERS archi_parameters RETURN.
    SELECT rqident FROM tsp01
    INTO gd_spool_nr WHERE rq2name = print_parameters-plist .
    *export gd_spool_nr to MEMORY ID 'SPOOLNO' .
    *ENDIF .
    Can anyone help me out how i can retrieve the old code.
    1) I havent released the task .
    2)also through the version management  but not been able to get.
    Thanks,
    Anjani

  • Implement the storage and retrieval of object descriptors

    I need to get the name of a class, methods etc from the console and then some how store them and then retrieve ... them...
    the user can enter
    employee
    int id;
    String name;
    printMe();
    }

    THought this might help you
    http://forum.java.sun.com/thread.jsp?forum=62&thread=444118&tstart=15&trange=15

  • I need to retrieve an Object[] of all keys in java.util.Hashtable

    public abstract class ArrayFunctionality {
         * Construct {@link java.lang.Object} array of keys from {@link java.util.Hashtable}
         * @param h {@link java.util.Hashtable}
         * @return array {@link java.lang.String}
         * @throws java.lang.IndexOutOfBoundsException Exception thrown if initial {@link java.lang.Object} array paramater cannot be indexed
        public static Object[] arrayKeys(Hashtable<Object, Object> h) throws IndexOutOfBoundsException {
            Vector<Object> v = new Vector<Object>();
            Enumeration keys = h.keys();
            while (keys.hasMoreElements()) v.add(keys.nextElement());
            return v.toArray();
    // HOWEVER, this occurs with Hashtable<String, String> attrs:
    if (hasSetHashtable) String[] keyArray = ArrayFunctionality.arrayKeys(attrs);
    // DOES NOT COMPILE: ".class expected - not a statement"I am not understanding why this is occurring, please advise, I'm lost on this one.
    Thanx
    Phil

    I still don't understand what you mean but it now
    works..
    I am sorry I just don't understand the difference
    between
    if (hasSetHashtable) {
    String[] keyArray;
    keyArray = ArrayFunctionality.arrayKeys(attrs);
    }AND
    if (hasSetHashtable) {
    String[] keyArray =
    ArrayFunctionality.arrayKeys(attrs);PhilThere is no difference between those two you posted. The difference is between
    String[] keyArray;
    if (...) {
        keyArray = ArrayFunctionality.arrayKeys(attrs);
    }and
    if (...) {
         String[] keyArray;
         keyArray = ArrayFunctionality.arrayKeys(attrs);
    }In the first, the keyArray will exist outside of the scope of the if statement. In the second, the keyArray will no longer exist once you leave the if statement. Which is the same thing jbish said.

  • FRM-10060: Database connection required for retrieveing referenced objects

    Hi,
    When I open a form, I get this error. This form is referencing a form stored in the database for some item properties. How do I get find out which item is being referenced from the database?. This is quite a big form with lots of blocks & canvases.
    Thanks

    after pressing OK connect to the database.
    I think, Check for the pre-form trigger code.
    The objects used in the pre-form trigger might be referenced by the database.

  • How to retrieve Calender object without Time Zone.

    I need to Generate the xml file with JAXB. JAXB requires the Calendar class for the Calendar class. So i am converting the Date Object into the claendar Object as follows.
    Calendar calendar = Calendar.getInstance();
    calendar.setTime(date) // date is the parameter
    return date;
    It was taking the default Time zone and creating the XML element as
    <Resource employmentType="Employee" externalId="104718"
    hireDate="2000-02-29+05:30" includeInDatamart="true"
    isActive="true">
    But i need hireDate="2000-02-29" without the time zone.
    In server side it accepts the "yyyy-mm-dd" formate only.

    I need to Generate the xml file with JAXB. JAXB
    requires the Calendar class for the Calendar class.
    So i am converting the Date Object into the claendar
    Object as follows.
    Calendar calendar = Calendar.getInstance();
    calendar.setTime(date) // date is the parameter
    return date;use this
    //return date;
    return calendar.getTime();
    s taking the default Time zone and creating the XML
    element as
    <Resource employmentType="Employee"
    externalId="104718"
    hireDate="2000-02-29+05:30"
    includeInDatamart="true"
    isActive="true">
    d hireDate="2000-02-29" without the time zone.
    In server side it accepts the "yyyy-mm-dd" formate
    only.

  • Retrieve applet object

    I'm fairly new to Java and I've been concentrating my efforts in applet programming. One thing I've noticed is that I seem to require the Applet object a lot in my code as I'm doing a lot of file reading (applet.getCodeBase, etc). I have a few instances in my code where I pass the applet object to different packages to perform basic operations and I'm starting to feel as if I'm doing this wrong.
    Is there a way to obtain the applet object using a global static function?

    Hi Mr Lob, will you think about the fact seriously that still no one seems to have understood your problemI know, the talent here is shocking.
    As often illustrations could help...I agree when you are demonstrating algorithms, discussing implementation, compilation errors etc. Mind, I would have knocked something up for you if you'd have responded with some decency and not made out there was a problem with my post. Telling me to post a demo is impolite, you could have asked to see something and I would have gladly responded. You don't know me & I don't you know, so you shouldn't assume you have superiority over me.
    I just wanted a brief code that could illustrate your problem/issue.You'd have a class declaration (unrelated to 'Applet') with an empty function member, in it would be a comment saying:
    // I would like to get applet object the libraries invoked at this point in the code...Close your eyes and imagine it...
    So it is plain obvious that the looser in these word battle is you, not petes1234 et al.LOL. Firstly, I never said petes1234 was a 'loser', he's just an idiot for posting unrelated & directly offensive comments. It's water off a ducks back, mind. Secondly, there's no way I'm a loser posting what I have. However, I will settle for 'loser in the quest to find an accomplished Java programmer within this public forum.'
    I thought I was a part of the 'do-not-help' list? Why are you still posting? Let it lie...
    Just so you know, I found an answer to my question elsewhere asking exactly the same thing. Now, .... "Think about that!"

Maybe you are looking for

  • Want to take me ipod into a MRI

    Hi all, I have noticed that my burned Cd's are skipping and jittering on every song in a Cd player. Any fix would be nice. Now the real question , I have to have 2 MRI's . I have the remote for iPod , can I leave the iPod out of the MRI and just use

  • Documentation bug?

    Is the documentation right when it states that the getKeyPartition mathod must be in the range [0..N), where N is the value returned from PartitionedService.getPartitionCount()? I would have guessed it should be in the range [0 .. N - 1]? /Magnus

  • 5700 XpressMusic themes

    Hi All, Need 5700 XpressMusic themes any one please help me.....It would be better if you can give me some S/W by which I can create my own themes.... I dowloaded some .sis files from some sites but those were not working in my 5700..... Thanks in ad

  • Does OS X 10.4.5 have a  Hard Drive Size Limitation in a PowerBook G4?

    I just read about the new Seagate Momentus 5400.3 (Perpendicular Recording) 160GB 2.5" ATA-6 Notebook Hard Drive. It seems pretty cool the way it records and uses less space than standard hard drives. My question is: In a PowerBook 12" 1.5 GHz PPC G4

  • I have no COLOR TYPE in my EARTHLINK email..but DO on INTERNET EXPLORER.

    I am a "newbie" on the computer. I use EARTHLINK as my email provider. When I use FIREFOX .... I can NOT TYPE in "COLOR" when sending email. When I use INTERNET EXPLORER .... I DO HAVE COLOR when sending email. WHY? HOW can I correct this?