Conversion of string to object

hello...
i am doing a project in java , and m stuck , i would like to find out how to convert a double value into an object to put teh double value into the textfield which i would like to show to teh user who is using my program

sir , i i have created an user interface using java swing , my problem is that i am unable to put a calculated doiuble value into a Jtextfield ....if my value is is "mynumber", which i sa double value ....i would like this value to be posted into teh textfield i have alredy created in my user interface .......could plz help me solve this p[roblem
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • Conversion of string into XML object

    Hi
    I am having some problems with conversion of string (containing XML data) into Flex XML object and binding it later to UI elements to output/maintain this data.
    Binding of XML structure to UI elements works perfectly fine if I will do following:
    1)      Hardcode XML object within Flex file
    2)      Read xml file from repository (xml file inside the Flex project)
    3)      Use HTTP request to retrieve XML data
    Unfortunately none of the above scenarios suits my solution.
    I am developing a prototype application for processing Flex forms inside SAP system. I have decided to make data bindings using XML structure stored in Data Base. When rendering form inside web browser based application I am retrieving corresponding XML schema (empty for new forms and populated for saved forms) and pass it to Flex form as a string type import parameter. Data is being passed correctly (I can display it on TextArea control for instance) but after conversion to XML and binding to DataGrid I am not getting any results.
    I am converting string (containing XML) to XML object in following way:
    Private var xml_obj:XML = new XML(string_xml );
    I am catching any potential errors but conversion is going well. After conversion I am not getting any results after binding it to DataGrid control and I am not able to access any of the nodes using AS code either. At the same time variable xml_obj is not empty (not null).
    Any help would be much appreciated.
    Regards
    Michael

    David
    First of all sorry for not stating it clearly but I am using Flex 3 for this development (at the moment it is the only choice when embedding Flex objects inside SAP applications).
    You must have missed the bit where I am describing how this XML data finds its way inside Flex. I am passing it to Flex as String type parameter during rendering (directly from DB where it is stored).
    Now, following code works perfect (XML is embedded inside Flex project):
                    <mx:XML id="form_data" source="../assets/example_xml_data.xml"/>
                    <mx:Script>
                                    <![CDATA[
                                                    import mx.collections.XMLListCollection;
                                                    import mx.controls.Alert;
                                                    [Bindable]
                                                    public var XML_list:XMLListCollection;
                                                    private function setParameters():void
                                                                   XML_list = new XMLListCollection(form_data.*);             
                                    ]]>
                    </mx:Script>
                    <mx:DataGrid id="myDataGrid" dataProvider="{XML_list}">
                                    <mx:columns>
                                                    <mx:DataGridColumn dataField="COMMON" headerText="Popular name"/>
                                                    <mx:DataGridColumn dataField="BOTANICAL" headerText="Botanical name"/>
                                                    <mx:DataGridColumn dataField="ZONE" headerText="Zone"/>
                                                    <mx:DataGridColumn dataField="LIGHT" headerText="Light"/>                                                                                                                                               
                                                    <mx:DataGridColumn dataField="PRICE" headerText="Price"/>                                               
                                                    <mx:DataGridColumn dataField="AVAILABILITY" headerText="Availability"/>                                    
                                    </mx:columns>               
                    </mx:DataGrid>
    But following code does not work (XML passed to Flex form as String input parameter):
    import sap.FlashIsland;
    import mx.controls.Alert;
    import mx.collections.XMLListCollection;
    [Bindable]
    public var xml_data:String;
    private var form_data:XML;
    [Bindable]
    private var XML_list:XMLListCollection;
    private function initApp():void
                    FlashIsland.register(this);
    private function setParameters():void
                    try
                                    form_data=new XML(xml_data);
                    catch (error:Error)
                                    Alert.show(error.toString());
                      XML_list = new XMLListCollection(form_data.*);           
    XML string does find its way inside Flex form. I can display content of variable xml_data in TextArea and all looks fine. Conversion to XML (variable form_data) goes well (no error)
    Please helpJ
    Regards
    Michael

  • Making Strings an object of a class

    Okay hello. Now i have LinkedList<Customer> customers = new LinkedList<Customer>();now i am trying to add a string into this list. i know this is not possible as the list that i made is of type object.
    My question is how do i make a string into an object so that it can be added into the list.
    String l = (Customer) x;i know this is wrong that is why i am asking how do i make the string so that it can be added into the list of customers. Customer is a class. Does the conversion of String to Customer object meant to be done in that class?? please help

    That String is an input. Thats the problem im having. As it is a string that im inputing the customers.add(l) doesnt work. for example, foreget the String l = (Customer) x. We have concluded this doesnt work. But when i do String l, the cusomters.add(l) comes up with an error. The error is it cannot find add(). This way the add() is just some ordinary one and not of the Liked List type. Therefore simple putting String l; is inefficient for the list to work, thus i need to make a parser so that the String becomes of type Customer. But i do not know how to make the parser, or even where to start. I have seen one that made double into string, but not object to string. are the ways these 2 are done similar?
    import java.io.*;
    import java.util.*;
    public class Customers implements Serializable
    {   private LinkedList<Customer> customers = new LinkedList<Customer>();
        Customer x;
        String z;
        double y;
        String l;
        public void add()
        {   System.out.println("Add a customer");
            l = Store.nextLine();
            customers.add(l); }

  • XSU error oracle.xml.sql.OracleXMLSQLException: Conversion to String failed

    Appication Server: 10g, Database: Oracle 9i and Oracle 10g
    I have a table 'sw_icd2' in the database that has one column of XMLType.
    The code below, attempts to query this table as 'select * from sw_icd2' and display the result. I was able to execute this query in sqlplus.
    But when I run a program using XSU in JDeveloper:
    OracleXMLQuery qry = new OracleXMLQuery(conn, "select * from sw_icd2");
    XMLDocument domDoc = (XMLDocument)qry.getXMLDOM();
    domDoc.print(System.out);
    StringWriter s = new StringWriter(10000);
    domDoc.print(new PrintWriter(s));
    System.out.println(s.toString());
    qry.close();
    I get the following Error:
    "oracle.xml.sql.OracleXMLSQLException: Conversion to String failed"
    Any ideas on how I can resolve this issue? Your help would be appreciated.
    Thanks!

    Okay, it looks like the problem has something to do with the TIMESTAMP data type in tables.
    oracle.xml.sql.query.OracleXMLQuery can't seem to handle tables with the TIMESTAMP data type.
    this code ran fine on my machine :
    import oracle.jdbc.driver.*;
    import oracle.xml.sql.query.OracleXMLQuery;
    import java.lang.*;
    import java.sql.*;
    public class testXMLSQL {
         public static void main(String[] args) {
    try {
    // Create the connection
    System.out.println("before getConnection ");
    Connection conn = getConnection("scott","tiger");
    System.out.println("after getConnection ");
    // Create the query class
    OracleXMLQuery qry = new OracleXMLQuery(conn, "SELECT * FROM EMP");
    System.out.println("after OracleXMLQuery object created ");
    // Get the XML string
    String str = qry.getXMLString();
    // Print the XML output
    System.out.println("The XML output is:\n"+str);
    // Always close the query to get rid of any resources..
    qry.close();
    } catch(SQLException e) {
    System.out.println(e.toString());
    // Get the connection given the user name and password.!
    private static Connection getConnection(String username,
    String password)
    throws SQLException
    // register the JDBC driver..
    DriverManager.registerDriver(new
    oracle.jdbc.driver.OracleDriver());
    // Create the connection using the OCI8 driver
    Connection conn =
    DriverManager.getConnection(
    "jdbc:oracle:thin:@<server_name>:1521:<sid>",
    username,password);
    return conn;
    Then I created another table :
    create table emp_test as select * from emp;
    added a timestamp to it :
    alter table emp_test add (time timestamp(6));
    and filled it with timestamp information :
    update emp_test set time = timestamp'2005-09-22 09:26:50.124';
    ran the same code but changed the SQL to :
    "SELECT * FROM EMP_TEST"
    and got the error message :
    The XML output is:
    <?xml version = '1.0'?>
    <ERROR>oracle.xml.sql.OracleXMLSQLException: Conversion to String failed</ERROR>
    looks like bug in OracleXMLQuery object??

  • Conversion from string "20041023 " to type 'Date' is not valid.

    Hi ,
       I have a table with one of the column(EmpHiredate) datatype is char(10). It has value like "20141023". I need to display this value as date format(dd/mm/yyyy) in report. 
    Following methods i tried in textbox expression but no luck.
    =Format(Fields!EmpHireDate.Value,"dd/MM/yyyy")
    =Cdate(Fields!EmpHireDate.Value)
    Error:
    [rsRuntimeErrorInExpression] The Value expression for the textrun ‘EmpHireDate.Paragraphs[0].TextRuns[0]’ contains an error: Conversion from string "20041023  " to type 'Date' is not valid.
    Is it possible to convert string to date using SSRS textbox expression ? Can anyone help me with the solution.
    Thanks,
    Kittu

    Hi Jmcmullen,
         Found one more issue on the same. I have one value like "00000000" for the column(EmpHiredate)
    , when i use above expression values(ex:"20141023")
    are displaying in dd/MM/yyyy format in report except value like "00000000" and giving following error:
    [rsRuntimeErrorInExpression] The Value expression for the textrun ‘EmpHireDate.Paragraphs[0].TextRuns[0]’ contains an error: Conversion from string "0000/00/00" to type 'Date' is not valid.
    Even i tried to pass its original value("00000000") as below but no luck.
    =IIF(Fields!EmpHireDate.Value = "00000000","00000000",Format(CDATE(MID(Fields!EmpHireDate.Value,1,4) + "/" + MID(Fields!EmpHireDate.Value,5,2) + "/" + MID(Fields!EmpHireDate.Value,7,2)),"dd/MM/yyyy"))
    Also tried this:
    =IIF(Fields!EmpHireDate.Value = "00000000","2000/10/21",Format(CDATE(MID(Fields!EmpHireDate.Value,1,4) + "/" + MID(Fields!EmpHireDate.Value,5,2) + "/" + MID(Fields!EmpHireDate.Value,7,2)),"dd/MM/yyyy"))
    Please Suggest. 
    Thanks ,
    Kittu

  • Problem with conversion of strings like THISStr - this_str capitalization

    Problem with conversion of strings like. THISStr -> this_str
    Can anybody pass on the reverse code. I have one, but its faulty.
    public static String convertFromPolycaps(String str) {
              Pattern pattern = Pattern.compile("\\p{Upper}+");
              Matcher matcher = pattern.matcher(str);
              StringBuffer result = new StringBuffer();
              // We do manual replacement so we can change case
              boolean notFirst = false;
              int grpP = 0, grpA = 0;
              String last = "";
              String now = "";
              while (matcher.find()) {
                   grpA = matcher.end();
                   if (notFirst) {
                        now = matcher.group().substring(0).toLowerCase();
                        if (grpA - grpP > 1) {
                             matcher.appendReplacement(result, now);
                             result =
                                  new StringBuffer(
                                       result.substring(0, (result.length() - 1))
                                            + "_"
                                            + result.substring(result.length() - 1));
                        } else {
                             matcher.appendReplacement(result, "_" + now);
                   } else {
                        matcher.appendReplacement(result, matcher.group().substring(0).toLowerCase());
                        notFirst = true;
                   grpP = matcher.end();
                   ////index++;
                   last = now;
              matcher.appendTail(result);
              System.err.println(str + " : " + result.toString());
              return result.toString();
         }succesfully converts :
    AccountNmnc : account_nmnc
    CustNameJ : cust_name_j
    Resume : resume
    BeneBrCode : bene_br_code
    ApprovedPerson : approved_person
    but fails for:
    GLCode : glcode
    VISHALErrCode : vishalerr_code
    GHASUNNAcNo : ghasunnac_no

    Can anybody pass on the reverse code. I have one, but
    its faulty.Post it, I'm sure we can fix it...

  • Conversion of a data object of type "C" to type "l" is not supported

    Experts:
    i have below code in my FM; defined as remote-enabled module.
    when i execute i get the error analysis as:
      You attempted to move one data object to another.
    This is not possible here because the conversion of a data object
      of type "C" to type "l" is not supported.
    This at the line    move <FS2> TO <wwa_mdm_name_value_pair>-VALUE .
    what are the steps to debug this?  Thanks!
      DATA: tt_mdm_name_value_pair_table TYPE mdm_name_value_pair_table.
      FIELD-SYMBOLS : <wwa_mdm_name_value_pair> LIKE LINE OF tt_mdm_name_value_pair_table.
      FIELD-SYMBOLS <FS1> TYPE ANY.
      FIELD-SYMBOLS <FS2> TYPE any.
      data:st_mdm_name_value_pair type mdm_name_value_pair.
      assign  st_mdm_name_value_pair to <wwa_mdm_name_value_pair>.
    assign st_mdm_name_value_pair-code to <FS1>.
    assign st_mdm_name_value_pair-value to <FS2>.
      clear wa_ZSTRESULT.
      loop at T_UPDATE into wa_ZSTRESULT.
        assign wa_ZSTRESULT-field to <FS1>.
        <wwa_mdm_name_value_pair>-CODE = <FS1>.
        assign wa_ZSTRESULT-VALUE to <FS2>.
        move <FS2> TO <wwa_mdm_name_value_pair>-VALUE .
        append <wwa_mdm_name_value_pair> to tt_mdm_name_value_pair_table.
      endloop.

    resolved using GET REFERENCE.. code looks as below:  Thanks!
      DATA: tt_mdm_name_value_pair_table TYPE mdm_name_value_pair_table.
      FIELD-SYMBOLS : <wwa_mdm_name_value_pair> TYPE LINE OF mdm_name_value_pair_table.
      FIELD-SYMBOLS <FS1> TYPE ANY.
      FIELD-SYMBOLS <FS2> TYPE DATA.
      TYPES t_dref TYPE REF TO DATA.
      DATA dref TYPE REF TO DATA.
      DATA: TT_UPDATE TYPE ZTYRESULT.
      FIELD-SYMBOLS : <WA_UPDATE> LIKE LINE OF TT_UPDATE.
      data:   st_mdm_name_value_pair type mdm_name_value_pair.
      assign  st_mdm_name_value_pair to <wwa_mdm_name_value_pair>.
    assign st_mdm_name_value_pair-code to <FS1>.
    assign st_mdm_name_value_pair-value to <FS2>.
      clear wa_ZSTRESULT.
      TT_UPDATE = T_UPDATE.
      loop at TT_UPDATE assigning <WA_UPDATE>.
        assign <WA_UPDATE>-FIELD to <FS1>.
        <wwa_mdm_name_value_pair>-CODE = <FS1>.
        assign <WA_UPDATE>-VALUE  to  <FS2>.
        GET REFERENCE OF <WA_UPDATE>-VALUE INTO dref.
    *    MOVE dref TO <wwa_mdm_name_value_pair>-VALUE.
        <wwa_mdm_name_value_pair>-VALUE = dref.
        append <wwa_mdm_name_value_pair> to tt_mdm_name_value_pair_table.
      endloop.

  • "Conversion to String failed"  When attempting to call rs.getString()

    Hello All,
    I'm getting a "Conversion to String failed" exception being thrown from oracle jdbc when I attempting to call the rs.getString(1) method on a column type of DATE.
    During investigations we've found the following:
    1. The query is fine, and is performing a "select * from table".
    2. I see this problem when using 9i database (v 9.2.0.7) with 9i jdbc drivers (v9.2.0.7).
    3. Strangely enough, if I use 10g jdbc drivers with the 9i database this problem goes away, and naturally I don't see this problem at all using a 10g driver working against a 10g database.
    4. Grabbing the DATE value using the getDate() instead of getString() API works just fine in 9i.
    5. The 9i rs.getString() API call will work with some date values in the database and not with others.
    6. The data placed into the DATE column in question could have been placed there using different driver type from the 9i.
    So, the 9i getString() API seems to be a problem.
    At this point, based upon points 5 and 6 above, I'm thinking there is a bug in the oracle 9i jdbc drivers that is unable to convert DATE type data using the getString() API if the data was initially placed into the database using a different driver type. But, this would mean that the format of the data in the database would be different depending upon the means of getting the data there in the first place (which doesn't make much sense).
    Here is the pertinent Stack Trace:
    java.sql.SQLException: Conversion to String failed
    at oracle.sql.Datum.stringValue(Datum.java:173)
    at oracle.jdbc.driver.ScrollableResultSet.getString(ScrollableResultSet.java:684)
    at oracle.jdbc.driver.OracleResultSet.getString(OracleResultSet.java:1549)
    at com.revenuesolutionsinc.dali.sql.DALResultSet.getString(DALResultSet.java:325)
    Any help on this matter would be greatly appreciated.
    Thanks,
    Doug Newcomb

    Doug,
    Pardon me for stating the obvious, but is there a
    reason why you cannot use method "getDate()" instead
    of method "getString()"?
    For your information, you can report bugs via the
    MetaLink
    Web site.
    Good Luck,
    Avi.Thanks for the reply Avi,
    The main reason is that we've got mountains of code that would need to be refactored. Also, the getString() method worked fine for over a year.
    So we are looking towards finding out why this is happening before making the decision to refactor.
    I will be placing a TAR with Oracle on Monday, but I thought I'd try to find out if anyone else has run into a similar problem.

  • Regional settings impact JavaScript Number conversion to String in applet

    Environment:
    XP, IE6 and IE7, JDK 1.6.0_13,1.6.0_10,1.6.0_7, Apache
    Hi,
    We recently converted our application from the MS JVM to Sun JVM 1.6 and have since had numerous problems with a user's regional setting impacting the application's behaviour.
    The application is using an applet, passing JavaScript Number values to an Applet where the input argument in the Java function is declared as a String.
    We have users with various regional settings, most don't impact the application, but we have found problems when the regional settings are set to "French (France)" or "German (Germany)".
    With "French (France)" JavaScript Number values >=10000000 get truncated to a Java String value of just the first character.e.g. 10000000 is converted to "1", 200000000 is converted to "2".
    With "German (Germany)" a trailing "0" is added to the converted String, and for values >=10000000 we get the String value with an additional 6 "0"s and then 2 additional "0"s as the input Number value is increments by each power of 10.
    A simple example follows.
    Any help understanding why this is happening and any coding solution would be appreciated.
    The default number format for the various regional settings seems to be impacting the implicit conversion to String in LiveConnect.
    We can re-code to convert the Number value to a String in the JavaScript before calling the applet, but this involves significant re-coding of the application.
    We also have a workaround to verify that navigator.userLanguage returns one of the list of supported languages and exit the application if the language is unsupported.
    Thanks
    Rob
    Example output for test:
    OK
    English (United States)
    Regional Settings Number format sample: 123,456,789.00
    lang=en-us,javascript Number=1,Applet Java String value =(1)
    lang=en-us,javascript Number=11,Applet Java String value =(11)
    lang=en-us,javascript Number=111,Applet Java String value =(111)
    lang=en-us,javascript Number=1111,Applet Java String value =(1111)
    lang=en-us,javascript Number=11111,Applet Java String value =(11111)
    lang=en-us,javascript Number=111111,Applet Java String value =(111111)
    lang=en-us,javascript Number=1111111,Applet Java String value =(1111111)
    lang=en-us,javascript Number=11111111,Applet Java String value =(11111111)
    lang=en-us,javascript Number=111111111,Applet Java String value =(111111111)
    lang=en-us,javascript Number=1111111111,Applet Java String value =(1111111111)
    lang=en-us,javascript Number=11111111111,Applet Java String value =(11111111111)
    NOT OK >=10000000
    French (France)
    Regional Settings Number format sample: 123 456 789,00
    lang=fr,javascript Number=1,Applet Java String value =(1)
    lang=fr,javascript Number=11,Applet Java String value =(11)
    lang=fr,javascript Number=111,Applet Java String value =(111)
    lang=fr,javascript Number=1111,Applet Java String value =(1111)
    lang=fr,javascript Number=11111,Applet Java String value =(11111)
    lang=fr,javascript Number=111111,Applet Java String value =(111111)
    lang=fr,javascript Number=1111111,Applet Java String value =(1111111)
    lang=fr,javascript Number=11111111,Applet Java String value =(1)
    lang=fr,javascript Number=111111111,Applet Java String value =(1)
    lang=fr,javascript Number=1111111111,Applet Java String value =(1)
    lang=fr,javascript Number=11111111111,Applet Java String value =(1)
    NOT OK
    German (Germany)
    Regional Settings Number format sample: 123.456.789,00
    lang=de,javascript Number=1,Applet Java String value =(10)
    lang=de,javascript Number=11,Applet Java String value =(110)
    lang=de,javascript Number=111,Applet Java String value =(1110)
    lang=de,javascript Number=1111,Applet Java String value =(11110)
    lang=de,javascript Number=11111,Applet Java String value =(111110)
    lang=de,javascript Number=111111,Applet Java String value =(1111110)
    lang=de,javascript Number=1111111,Applet Java String value =(11111110)
    lang=de,javascript Number=11111111,Applet Java String value =(111111110000000)
    lang=de,javascript Number=111111111,Applet Java String value =(11111111100000000)
    lang=de,javascript Number=1111111111,Applet Java String value =(1111111111000000000)
    lang=de,javascript Number=11111111111,Applet Java String value =(1.1111111111E20)
    Example code:
    Test1.java
    import java.applet.Applet;
    public class Test1 extends Applet {
    public void init() {
    public String stringTest(String str) {
    String out = "Applet Java String value =(" + str + ")";
    return(out);
    index.html
    <html>
    <body>
    <APPLET CODE="Test1.class" NAME="test1" WIDTH="0" HEIGHT="0">
    <PARAM NAME="scriptable" Number="true">
    </APPLET>
    <script type="text/javascript">
    var x;
    document.write("<BR>")
    x = Number("1");
    document.write("lang="+navigator.userLanguage +",javascript Number=" x "," + document.test1.stringTest(x)+"<BR>");
    document.write("<BR>copy/paste the above 2 lines of code, adding an additional '1'<BR>");
    </script>
    </body>
    </html>
    </html>

    I have found a workaround by setting the locale in the applet to a locale that does perform implicit Number to String conversion correctly.
    e.g.
    public void init() {
    try {
    Locale.setDefault(Locale.US);
    } catch (Exception e) {
    System.err.println("Failed to set Locale, Caught Exception: " + e.getMessage());
    and adding this line to the java.policy to prevent "access denied (java.util.PropertyPermission user.language write)" errors.
    permission java.util.PropertyPermission "user.language", "read, write";

  • Purpose of request.setAttribute(String parm1, Object parm2)

    HttpServletRequest request.setAttribute(String parm1, Object parm2) vs. HttpSession session.setAttribute(String parm1, Object parm2)
    hi
    can anybody please explain to me what does HttpServletRequest request.setAttribute() do? and for what purpose is it used for?
    i already know that HttpSession session.setAttribute(String parm1, Object parm2) is used to bind a session to a variable, so that it can be accessed throughout the servlet application.
    thanx
    shankha
    ps: please correct me if i'm wrong

    shankha,
    What does the API doco say?
    I think it just sets a request scoped attribute... ie a request parameter.
    This looks pertinant: http://www.rgagnon.com/javadetails/java-0401.html

  • Conver a string to object?

    hi, I am having problem converting string to object, then store the object into a object linklist node. I debugged it to make sure that everything the user types got stored in the string, but when the debug reaches "obj = temp;". obj doesn't have any value. why is that??
    String temp;
    Object obj;
    //have the user input something to the string. then...
    obj = temp;
    temp = (String) obj;
    ObjNode.insert(obj);
    Thank you...

    well, it's one of my assignment. have to write a class of object circular linked queue with a main funtion to test it. in the main function, I have to somehow store the object into the object node, but I havn't learned how to read object, only string. so I am tring to read string then change to object and store it. but if you could tell me how to just read object, it would be much easier for me.
    thank you.

  • String to object?

    Hi,
    I have a problem in converting string to object.
    The way I intended to do is like this:
    String a1 = "John";
    String a2 = "Smilth";
    String a3 = "Eric";
    String a10 = "Howard";
    and I wanna assgin the value of a1 ~ a10 into a temp string.
    like this;
    for (int i = 1; i<= 10; i++)
    String tempString = "a" + i; //assign the value of original string into tempString.
    // bla bla bla
    I know I have to use class.forName() to get what I want, but I have no clue on how to
    implement this in detail. Any help will be great appreciated.
    Thanks
    TC Wang

    May I ask why you do it so complicatec? Why don't you use an array?
    String[] a = new String[10]
    a[0] = "John";
    a[1] = "Smilth";
    a[2] = "Eric";
    a[9] = "Howard";
    // arrays start with zero, but 0 to 9 are also ten entries just
    // like 1 to 10.
    for (int j = 0; j <= a.length; j++)
        String tempString = a[j];
        // Here goes your other code
    // I replaced i with j, because i surrounded by round brackets
    // means printing text cursive on this BBS board

  • Conversion from string "" to type 'Double' is not valid

    We're using BPC 7.5 MS and on patch level 111.02
    There's two front-end servers and one back-end.  we have about 100 users but concurrency is likely in the 50 range.
    We've been running extremely well for about 4 years but are now starting to run into problems.
    There are about 5-6 applications but none greater than 10 million records.  We optimize regularly.
    However over the past two months admin processes seem to take a lot longer.  Optimization now times out after about 1.25 hours and none used to take greater than 15 minutes.
    Today after processing dimensions we checked the application status and we were not able to check if it was available or not.  We got a pop up box saying
    conversion from string "" to type 'Double' is not valid
    I've processed dimensions and applications since and still this error persists.
    We're attempting a reboot to see if that helps but I've never seen this before and in combination with the slower admin processing I'm wondering if there's something drastic going to happen.
    Michael

    Hi Michael,
    for the poor performances you have to check the guides about performance on bpc if you have scheduled regurarly optimize during day and night (just verify that never factwb reach 50.000 and fac2 500.000 records) maybe you need to change some parameter on the server as MaxThreads.
    For the conversion string error on admin console see please this note 1803092 - Set application set status error
    Regards
         Roberto

  • Deprecated conversion from string constant to 'char*'

    Hi all
    I am working with strings and i cant figure out why the following
    warning appears at time of build.
    warning: deprecated conversion from string constant to 'char*'
    It appears for the line
    char *myName = "Apple.txt";
    Is there anyone who can help me?
    Help is welcome.
    Thanks in advance.

    Any reason why you aren't using NSString in place of char?
    char *myName = "Apple.txt";
    NSString *myName = @"Apple.txt";

  • Problems with String[] Class Object

    Hi guys,
    I'm writing a web server who should invoke a method of a class when asked by a client.
    My problem is that if the method that should be invoked has a String[] parameter the web server is unable to invoke it and throws a java.lang.IllegalArgumentException: argument type mismatch.
    Useful pieces of code to understand are the following:
    //create the Class[] to pass as parameter to the getMethod method
    Class[] paramType = {String[].class};
    //find the class "className" and create a new instance
    Class c = Class.forName(className);
    Object obj = c.newInstance();
    //the getMethod should find in the class c the method called nameMeth
    // having paramType (i.e. String[]) as parameter type...
    Method theMethod = c.getMethod(nameMeth, paramType);
    //here's the problematic call!!
    theMethod.invoke(obj, params);I've noted that System.out.println(theMethod); prints the signature of the method with the parameter type java.lang.String[].
    System.out.println(paramType[0]); instead prints [Ljava.lang.String;
    I know that [L means that it is an array, so why do you think that I'm having an argument type mismatch?
    Thank you                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    I had no problems making that work.import java.lang.reflect.Method;
    public final class StringArray {
        public static final String CLASSNAME = "StringArray";
        public static final String METHODNAME = "myMethod";
        public static final String[] sa = { "a", "b"};
        // automatic no-args constructor
        public final void myMethod(String[] sa) {
            for(int i=0;i<sa.length;++i) {
                System.out.println(sa);
    public static final void main(String[] arg) throws Exception {
    //create the Class[] to pass as parameter to the getMethod method
    Object[] params = { sa };
    Class[] paramType = {sa.getClass()};
    //find the class "className" and create a new instance
    Class c = Class.forName(CLASSNAME);
    Object obj = c.newInstance();
    //the getMethod should find in the class c the method called nameMeth
    // having paramType (i.e. String[]) as parameter type...
    Method theMethod = c.getMethod(METHODNAME, paramType);
    //here's the problematic call!!
    theMethod.invoke(obj, params);

Maybe you are looking for