Object Casting Issue

This is Driving me Crazy!
I have a method that Returns an Object
Object myconfig = (Object)digester.parse("d:/siteconfig.xml");
//Now, I always know in this case that the Object being returned
//is always a "SiteConfig" object.
//I know this for a fact I test that by doing object.GetClass().getName()
//and I am looking at the debugger and it says that the object is a "SiteConfig" object
//However for the life of me, I can not cast this object into a "SiteConifg" object even though it is. I get a ClassCastError Exception when I try to do..
SiteConfig siteconifg = (SiteConfig)myconfig
//Can anyone help me out?

This is the stack trace...
java.lang.ClassCastException
at techone.groups.DigesterTest.doPost(DigesterTest.java:69)
at techone.groups.DigesterTest.doGet(DigesterTest.java:34)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:386)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:530)
at java.lang.Thread.run(Thread.java:536)

Similar Messages

  • Object Casting confusion

    Hello,
    I have two classes used in the insurance business. One is a Member, which is someone covered by insurance (eg. an Employee, Spouse, Dependent) and one is a Employee which is more specificly the person who actually has the insurance.
    I am reading records of a database and creating each record into a Member Object. My Employee object extends Member. I want to know put the business logic in my main method to determine which Members is an Employee, Dependent, or Spouse.
    I am explicitly casting down the hierarchy, which I thought was allowable. I even implemented Cloneable on the Member object to try to get it work. The compiler seems to be fine with it, but I keep getting a runtime error: "ClassCastException".
    I am trying to avoid extracting the information from Member and having to reassemble it into Employee by using inheritance. What am I missing?
    Thanks.
    public class Member implements Cloneable
         private Object ssn;
         private Object planNumber;
         private Object locationCode;
         private Object coverageType;
         private Object benefit;
         private Object hireDate;
         private Object retireDate;
         private Object lastName;
         private Object firstName;
         private Object middleInitial;
         private Object address;
         private Object city;
         private Object state;
         private Object zip;
         private Object dob;
         private Object doh;
         private Object relationship;
         private Object gender;
         private Object effectiveDate;
         private Object status;
         private Object order; //represents order in spreadsheet
         //setters
         public void setOrder(Object order) {this.order = order;}
         public void setSSN(Object ssn){this.ssn = ssn;}
         public void setPlanNumber(Object planNumber){this.planNumber =planNumber;}
         public void setLocationCode(Object locationCode){this.locationCode = locationCode;}
         public void setCoverageType(Object coverageType){this.coverageType=coverageType;}
         public void setBenefit(Object benefit){this.benefit=benefit;}
         public void setHireDate(Object hireDate){this.hireDate=hireDate;}
         public void setRetireDate(Object retireDate){this.retireDate = retireDate;}
         public void setLastName(Object lastName){this.lastName= lastName;}
         public void setFirstName(Object firstName){this.firstName=firstName;}
         public void setMiddleInitial (Object middleInitial){this.middleInitial=middleInitial;}
         public void setAddress(Object address){this.address = address;}
         public void setCity(Object city){this.city = city;}
         public void setState(Object state){this.state = state;}
         public void setZip(Object zip){this.zip=zip;}
         public void setDOB(Object dob){this.dob=dob;}
         public void setDOH(Object doh){this.doh=doh;}
         public void setGender(Object gender){this.gender=gender;}
         public void setEffectiveDate(Object effectiveDate){this.effectiveDate=effectiveDate;}
         public void setStatus(Object status){this.status=status;}
         public void setRelationship(Object relationship){this.relationship = relationship;}
         //getters
         public Object getSSN(){return this.ssn;}
         public Object getPlanNumber(){return this.planNumber;}
         public Object getLocationCode(){return this.locationCode;}
         public Object getCoverageType(){return this.coverageType;}
         public Object getBenefit(){return this.benefit;}
         public Object getHireDate(){return this.hireDate;}
         public Object getRetireDate(){return this.retireDate;}
         public Object getLastName(){return this.lastName;}
         public Object getFirstName(){return this.firstName;}
         public Object getMiddleInitial(){return this.middleInitial;}
         public Object getAddress(){return this.address;}
         public Object getCity(){return this.city;}
         public Object getState(){return this.state;}
         public Object getZip(){return this.zip;}
         public Object getDOB(){return this.dob;}
         public Object getDOH(){return this.doh;}
         public Object getGender(){return this.gender;}
         public Object getEffectiveDate(){return this.effectiveDate;}
         public Object getStatus(){return this.status;}
         public Object getOrder() {return order;}
         public Object getRelationship(){return relationship;}
    }//end class
    import java.util.*;
    public class Employee extends Member
         Employee()
         private Spouse spouse;
         private Dependent dependent;
         private ArrayList dependents;
         private static int numberOfDependents;
         public void setSpouse(Spouse spouse){this.spouse = spouse;}
         public Spouse getSpouse(){return this.spouse;}
         public Dependent getDependent(int n)
              dependent = (Dependent)dependents.get(n);
              return dependent;
         public void setDependent(Dependent dependent)
              ++numberOfDependents;
              this.dependent = dependent;
              this.dependents.add(dependent);
         public ArrayList getDependents()
              return dependents;
         public void setDependents(ArrayList dependents)
              this.dependents = dependents;
         public int getNumberOfDependents()
              return numberOfDependents;
    }//end class
    import java.util.*;
    //Employee objects can be selfstanding Employee(String SSN)
    //The Spouse and Dependent objects - e.g. Spouse(String SSN, e)
    public class InsuranceObjectDriver
    //     ****************** START MAIN **********************************     
         public static void main(String[] args)
              //Open connection and query table
              DatabaseObjects db = new DatabaseObjects("LIBRARY", "", "");     
              db.queryDb("Table1");
              ArrayList memberList = db.getAllRecords();
              Member member;
                   member = (Member)memberList.get(0);
                   if (member.getRelationship().equals("E"))
                        Employee e =(Employee) member;
                   }

    >
    I see nothing wrong with the casting, since Employee
    is a Member.
    My only assumption is that the actual instance of
    "member" is not an Employee...so check your
    getRelationship().equals("E") condition...it may give
    you true, where it should have been false.This is why I'm casting it explicity to a Employee
    For design-wise, I see Employee, Spouse, and
    Dependent are more of a Member role..and not a
    "Member" superclass. I don't understand what you are trying to tell me here. Member is the superclass. Employee, Spouse, and Dependent are subclasses of the Member, which is one of the problems. I have to explicity cast down the hierarchy.
    Plus, what's with all the
    "Object" in the Member class? I never seen anyone
    did this before.
    I understand that by defining the Member attributes
    as Object, you can
    set the underlying type to anything in the
    future...without having to change the code...but i
    think this is a bad idea (just my thought).I like it. It dummy proofs things a bit. The input files are often sloppy and bad, plus I really don't care to maipulate most of these fields, I just need to make sure they populate the objects.
    E.g. I build a quick and dirty application for non-techies, who don't pay attention to data types much (in my many experiences). I don't want the program to bomb out on Date of Hire (doh) because it was brought in through the JDBC connection as an Object and not a Date.
    Data is brought into the application from the resultset via a getObject(n) call. Why change it? I guess I could use wrapper classes for them but I can't see why right now, but will consider this when I figure out the casting issue.

  • Getting Duplicate Object existing issue while deploying the BIAR file

    Hi All,
    We are trying to deploy BIAR File with XI R2 Command tool InstallEntSdkWrapper. But we are getting Duplicate Object exixting issue while deploying the BIAR file.
    Error Message:
    [report] [InstallEntSdkWrapper.main] Connecting to CMS plmdevapp31:6400 as administrator
       [report] [InstallEntSdkWrapper.CmsImportFile] Exception: An error occurred at the server :
       [report] Failed to commit objects to server : Duplicate object name in the same folder.
       [report]
       [report] [InstallEntSdkWrapper.main] BIAR File could not be imported
    If we are doing any promition with Import Wizard we have an option to "Overwrite object contents" option to overwite exixting objects. It will very helpful if any one suggest how we can achieve this through InstallEntSdkWrapper.
    Unfortunately there is no documentation availabe on InstallEntSdkWrapper.
    Cheers!

    That's a limitation with the XI Release 2 InstallEntSdkWrapper.jar tool.
    Sincerely,
    Ted Ueda

  • Type casting issue

    Hello All,
    I've a Type casting issue. Could yu please help me resolving it.
    I'm trying to initialize the variable v with sysdate ('mon-dd-yy:hh:mi:ss') but couldn't initialize. I was able to do that in the body but is it not possible to do it in the declaration part?
    I was able to do like this
    DECLARE
      v varchar2(25);
    BEGIN
      SELECT to_char(sysdate,'mon-dd-yy:hh:mi:ss') INTO v FROM dual;
      DBMS_OUTPUT.PUT_LINE(v);
    END;
    Output looks like this: jan-19-12:04:32:11But how to do it in delaration part?
    DECLARE
      v varchar2(25);
      v := to_date(sysdate, 'mon-dd-...') ? ? ?
    BEGIN
        DBMS_OUTPUT.PUT_LINE(v);
    END;Thx
    Shank.

    You don't need to cast a sysdate to a date. It already is a date.
    SQL> alter session set nls_date_format = 'mon-dd-yy:hh:mi:ss';
    Session altered.
    SQL>
    SQL> DECLARE
      2    v varchar2(25);
      3    v_date date:= sysdate;
      4  BEGIN
      5      DBMS_OUTPUT.PUT_LINE(v_date);
      6  END;
      7  /
    jan-19-12:04:46:40
    PL/SQL procedure successfully completed.Hope this helps.

  • Object Casting

    hi ,i have a question for .Base on this example below , i need to understand some casting basic .I understand how premitives values widening rules works but not on object casting rules.
    Question 1.
    Okay ,base on the example below why 'c=(Test) a' will always give compile error while "a=b" does not .Let takes this example , b already extends A and should have information of A class while A only have it own .I know i was thinking another way round.Can any one help.
    Question 2.
    How to make " c = (Test) a to run without any problem ,as long as a is assign to a is ok.
    Question 3.
    I have a statement from Khalid book page 202 and i don't understand .
    First statement:=Conversion which preserve the inheritance is a relationship are allowed ,other conversion      require an explicit case or are illegal.
    Fecond statement:=There is no notion of promotion for reference values.
    Question 4.
    What is the benefit of using casting and when we need to use it .Can give a short example.??
    class A {int Athing = 1;}
    class B extends A {int Bthing = 2;}
    class Test extends A
    { int Cthing = 3;
    public static void main(String args[])
    A a = new A();
    B b = new B();
    Test c = new Test();
    //c = (Test) a; //runtime error
    a = b;

    Ron, does your mommy know you're here? Shoudn't you be out riding your bike or doing homework or watching X Men or something instead of interrupting the grown-ups?
    Wikey: The answer to your question is that you can always (and implicitly) cast to a subclass because the subclass is always a member of the class, but you can't always even explicitly cast to the parent or higher class. To give a concrete example, all Toyota Camries are cars, but not all cars are Toyota Camries. There are things you can do with a Toyota Camry that you can't do with all cars. In your code, if you had coded A a = new Test();, you woudn't have a runtime error.
    Doug

  • Hi i just to want to know when we use object casting..

    sorry about this newbie question i ve already asked to my tutor but
    didn't get it...
    i just wonder what will happen if we cast object..
    i just can't imagin..coz im just bit slow on creative thinking...
    my currently writing code is like this..
    Integer nextCustID = new Integer("123456");
    Customer customer = new Customer(nextCustID, "Fred");
    customers.put("First", customer);
    customer = (Customer) customers.get("First");
    System.out.println(customer);i don't know about object casting...............................

    You don't cast objects. You just cast references - widening or narrowing their "scope" along the inheritance hierarchy.
    String s = new String("Hello");
    Object o = (Object) s; // Explicit cast not necessary, just for clarification
    String s = (String) o;While "hello" might appear as a String, then as an Object, then again as a String, it is always a String. Only the reference type to it changes.

  • Object Identification Issue with OATS

    please find below the details of the object identification issue, we are seeing with OATS.
    Environment:
    JRE Version     : JRE 7 Update: 65
    OATS Version : 12.4.0.2_129 (Build)
    Application Built on : Oracle EBS/Forms & Applets(11g Forms)
    Operating System: Win 7 32-Bit Professional
    Browser: Internet Explorer 9
    Object Identification Issue:
    1. Launch OATS Open Script
    2. Login to Test application by opening URL using IE9 browser.
    (Login was successful)
    3. Click on the button and check if forms are loading
    (Oracle forms are loading).
    4. Try spying or recording actions on any objects in the forms
    (Issue - Objects are not getting identified by OATS)
    Appreciate any help on this. Thanks in advance.

    Hi,
    I suggest you to select only 1.7.0.65 in Java Runtime Environment Settings and uncheck version 1.7.0.67.
    Try to launch application. If the application opens, then Openscript will identify objects. Else have to wait till next release of Openscript supporting JRE version 1.7.0.67.
    Please let me know if the above suggested method worked.
    Thanks and Regards,
    Vasanth Kumar S M

  • Casting issue, help someone.

    I'm having a casting issue taking an ArrayList of String[] objs converting to a single String array, separated... Anyone with clues?
    String[] allDataString = new String[mCapacity];
         for (int i=(mData.size()-1); i>0; i--)
         allDataString[i] = (String)mData.get(i);               
    PELEEEEZE HEEELLP. Thanks.

    String[] allDataString = new String[mCapacity];
    for (int i=(mData.size()-1); i>0; i--)
    allDataString = (String)mData.get(i);
    }

  • IPage - Casting Issue - Class Not Found

    EP6SP14...Encountering a funny issue...
    I am successfully compling the following code. All JAR are in place and NWDS is detecting the class and showing the methods properly. LookupObject() is able to find the object.
    import com.sap.portal.pcm.page.IPage;
    IPage page = (IPage) lookUpObject request,PcmConstants.ASPECT_SEMANTICS,pageUrl);
    lookUpObject() returns - com.sap.portal.pcm.page.admin.AttributeSetPage@81e75c
    but during Casting, it gives error...
    Caused by: java.lang.NoClassDefFoundError: com/sap/portal/pcm/page/IPage
    Any ideas what's missing???

    Hi Gulshan,
    For IPage (and IiView, ILayout, ...) you need the following reference:
    <property name="ServicesReference" value="com.sap.portal.ivs.api_iview"/>
    Hope this helps.
    Daniel

  • Open Hub Objects Tranport Issue

    Hi,
    Environment - BI 7, SP level - 17.
    Trying to transport Open Hub destination DTP object (DSO to Flat File) from the Dev to QA box. Output file name is defined (Created Logical file) using Tcode - FILE. The Logical File Name is available in Dev, QA.
    In Dev box, we are able to write Output to a FLAT File (Application Server).
    While transporting DTP getting Transport error - Return Code - 12. (No clear message for this Error Message or Dump file created).
    Also applied OSS Note - 1175391 and 1241173.
    To overcome this issue, your valuable suggestions highly appreciated.
    Thanks,
    Madhu.

    Hi Madhu,
    I think the below link will helps you...
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d063282b-937d-2b10-d9ae-9f93a7932403
    Regards
    Sudheer

  • Object casting: confusion in ABAP Objects: Complete Reference book

    Hi,
    During Object Assignments using casting, is a Type Test carried out during the syntax check or at runtime?
    A.5.2.2 (page 1008) of 'ABAP Objects: The Complete Reference' says about Widening Cast: "...you must check at runtime...". However on the next page under A.5.3.2 it says of Widening Cast in Data References: "The syntax check precludes...".
    A.5.4 (page 1010) concerns Assignments between Object Reference Variables, but makes no mention of whether checks are carried out by a syntax check or at runtime.
    Also nowhere does it mention when Type Tests for Narrow casting takes place. Can anyone clear my confusion please? Unfortunatly I don't know enough about this stuff to test by writing some code.
    Thanks.

    William,
    Your questions can be answered by the following rule for object references, which I found in the book "ABAP Objects" by Horst Keller and Sascha Krüger:
    "... that the static type of the target variable must be equal to or more general than the dynamic type of the source variable."
    Here "static type" means the type with which an object reference variable is declared. "Dynamic type" is the type that the object reference variable has at runtime. The dynamic type of an object reference is always more special than its static type, otherwise a runtime error occurs.
    With this rule all your questions can be answered:
    1. The Narrowing Cast is always checked during the syntax check. Example:
    DATA o_ref1 TYPE REF TO object.
    DATA o_ref2 TYPE REF TO class_1.
    o_ref1 = o_ref2.  
    Here the reference o_ref2 has a dynamic type "class_1" or a subclass of it, which is narrower than its static type "class_1", which is narrower than the static type "object" of the reference o_ref1. Therefore, the syntax check says that the assignment is OK.
    2. The Widening Cast is always checked at runtime and requires an assignment using the operator ?=. If you use the operator = in the assignment, a syntax error occurs. Therefore the following  example produces a syntax error (try it yourself):
    DATA o_ref1 TYPE REF TO object.
    DATA o_ref2 TYPE REF TO class_1.
    o_ref2 = o_ref1.  
    The correction for this syntax error is:
    DATA o_ref1 TYPE REF TO object.
    DATA o_ref2 TYPE REF TO class_1.
    o_ref2 ?= o_ref1.
    Now the syntax check is satified, and the correctness of the widening cast is checked at runtime.
    Kind regards,
    Michael Kraemer
    Message was edited by: Michael Kraemer

  • Replacing Business Objects - Modelling Issue

    I'm working on a large 'BI' project that is replacing Business Objects with OBIEE ( actually its not really a BI project its more of a give us what we've got now using OBIEE project ) - which is proving challenging in some areas.
    One example is with the Data Model that BO provides in its Universe, the model I'm replacing is pretty much 3NF (even though it uses DIM and FACT in the table names) they're joined pretty much all over the place, which enables the users to select from tables which can be 4,5,6 steps away from the original - including via M:M relationships!
    Anyway one specific issue is based around the old question of multiple fact tables where not all dimensions are conformed.
    Dim - Business Manager ---< Fact - Forecast >----- Dim - Product -----< Fact - Actuals >------ Dim Salesman
    I've setup the Dimensions for each Dimension Logical Table.
    I've created a single logical table containing a Forecast and Actual Amount from the 2 fact tables and set the logical levels appropriately at Table Level. For the Forecast measure I have a logical level set to 'Total - Salesman' and for the Actuals measure I have logical level set to 'Total - Business Manager'.
    This works great when I select an Attribute from Business Manager, and Salesman and both of the measures in the Answer.
    However the users want to be able to select from Business Manager, and Salesman dimensions without selecting the measures, is this possible - do I need to add a bridging table to resolve the relationships between a Business Manager and Salesman explicitly rather than implicitly via the facts?
    I have set Implict Fact at the Presentation Model, however this doesn't work (it misses off Total Level aggregation in the OBI Server SQL).
    Thanks in advance for any suggestions/answers.

    Thanks for the helpful reply Turribeach, along with the interesting and informative link.
    This is my first foray into the world of BO and I think some of the points you make in the link are right on the money. I've spent many years working with Oracle Tools (Dataquery,Data Browser, Discoverer and then OBIEE when Oracle acquired the tool ). There are difficulties in the modeling with OBIEE, certainly when it comes to trying to replicate a 'fairly' complex BO universe they become apparent.
    Many hoops to jump through to give the user a like for like, which I'm not convinced will be possible - maybe some negotiation is required :-)

  • Multiple resource objects provision issue in OIM10g

    Hi Team,
    We're facing an issue regarding multiple access policy trigger for a specific resource object in OIM.
    The scenario is whenever we try to process the enablement or creation of users through flat file recon, users are created / enabled with multiple resource objects in their resource profiles.
    When we checked in User Resource Access History report, we observe that the access policy has been triggering multiple times for these users resulting in users with multiple resource objects. Amongst these one shows provisioned/Enabled and the other shows provisioning/in some cases Provisioned/Enabled.
    Please advise as this has become an ongoing issue and also has led into data mess-up.
    Appreciate your help on this one..
    Regards,
    Sagar

    The terminology sounds a little confusing to me:
    If you mean you wanna create multiple IT Resources for a single IT Resource Instance so that the user can select the appropriate IT Resource during request creation -> All good upto here. But then since the Object/Request Form attached to a resource would be the same, so any user would always see the same form fields for creationg request.
    Example: Users creating request for Oracle Database Accounts but different server locations
    If it means you just need to create multiple Resource Objects then its a straighaway standard requirement and could be handled with normal Connector Development methodology.
    Example: Users creating requests for different resources like Oracle Database Accounts & Active Directory Accounts

  • Object Casting in a JSP

    When getting data from the usual HttpSession object, I understand how the following (for simplicity) hypothetical line of code works:
    AccountInfo someAccount = (AccountInfo) session.getAttribute( ... );
    Here, assume that "AccountInfo" is a bean i.e., implements serializable and has standad getters and setters. So far nothing special but wait... What about the following variation:
    AccountInfo someAccount = (AccountInfo) (List) session.getAttribute( ... );
    The surprising thing was that the someAccount object has its data populated with items from the list! Why do I say such silly things? Well the code that follows leads me to that conclusion:
    AccountInfo someAccount = (AccountInfo) (List) session.getAttribute( ... );
    this.doSomething(accInfo);
    It's not obvious to me when the getters and setters of accInfo were called?? Can someone provide an explanation? I was not aware of this mechanism. Should I get a new Java book?
    Thanks!

    EDITED VERSION OF THE ABOVE POST
    When getting data from the usual HttpSession object, I understand how the following hypothetical line of code works:
    AccountInfo someAccount = (AccountInfo) session.getAttribute( ... );
    Here, assume that "AccountInfo" is a bean i.e., implements serializable and has standad getters and setters. So far nothing special but wait... What about the following variation (I saw something like this in some code at work)
    AccountInfo someAccount = (AccountInfo) (List) session.getAttribute( ... );
    So its just two sequential casts, right? What surprised me, was that the someAccount bean has its data populated with items from the list! Can someone provide an explanation? I was not aware of this mechanism. Should I get a new Java book?
    Thanks

  • Int to Object casting

    This should be a simple question, I just cant seem to get it.
    I want to cast an int to an Object.
    // --- Does not work
    int num = 16;
    Object obj = num;
    // --- Does not work
    int num = 16;
    Object obj = (Object)num;
    // --- Does not work
    Object obj = (Object)16;
    Anyone know?

    You can't cast a primitive. You can do this for your problem:
    Integer intObject = new Integet(intPrimitive);Lee

Maybe you are looking for

  • Deactivate an Enhancement to a standard program

    Dear all, I'm facing the following problem. Our programmer apply an Enhancement to to a standard FI program. Now I would to deactivete this Enhancement: what is the t-code that allow me to do this? Sap Version: ECC 6.0 Thanks in advance Alberto

  • How to change delivery date (LFDAT) in  me57 item data

    hi , While  Creating purchase order  (me57)  . on the basis  of info rec   . i want to change  delivery date  by passing  info rec to table eine and get field aplfz  . then adding  aplfz to sysdate    and pass it to  Delivery date   . i have done thi

  • Insert Water mark on current document

    I have some documents that I want to insert a watermark on them behind the text. A simple diagonal faded red OVERDUE or COPY across the page behind the text. In MS Word this was quick and easy. I cant find a way to do this in Pages. I tried a Help se

  • Could not open ... could not unlink ...  /var/db/BootCache.playlist

    In 10.5.7, on my QS 2002 Dual 1GHz, I keep getting this message. Awhile ago, someone suggested I Trash this file /var/db/BootCache.playlist, thinking it would be regenerated next Startup. Is there a Terminal command that I can use to accomplish this?

  • How do i temporarily close Firefox in order to install Adobe Flash Player

    i am tryng to install Adobe Flash Player and it has said to close the Mozilla Firefox in order to complete installation. Can you tell me how to close the Firefox. Thank you.