Error in data conversion

Hi all
I am trying to take values from a VO using
public static Object evaluateEL(String el) {
FacesContext facesContext = FacesContext.getCurrentInstance();
ELContext elContext = facesContext.getELContext();
ExpressionFactory expressionFactory =
facesContext.getApplication().getExpressionFactory();
ValueExpression exp =
expressionFactory.createValueExpression(elContext, el,
Object.class);
return exp.getValue(elContext);
evaluateEL("#{bindings.PasswordNeverExpires}")
I was able to retrieve the value from the VO (in VO the datatype is string and has default value "N").
But when I compare it iin my program code
if(ADFUtil.evaluateEL("#{bindings.PasswordNeverExpires}").toString()== "N")
it always go to the else condition( though the value it return is "N")
Another problem I am facing is when I try to cast a value(a VO attribute with datatype date)
returned in similar method to date datatype I am getting the following error
Caused By: java.lang.ClassCastException: oracle.adfinternal.view.faces.model.binding.FacesCtrlAttrsBinding cannot be cast to java.util.Date
Please help
Thanks

Susan,
You dont use "==" to compare strings.
try
if ("N".equals(ADFUtil.evaluateEL("#{bindings.PasswordNeverExpires}").toString()))john

Similar Messages

  • Error in Date conversion

    Hi All,
    I am getting an error while creating a datasource.
    In the source the date,
    for ex "Project Start Date" is 2006-02-13 00:00:00.000.
    The info object i use for this field is 0calday.
    When i activate the datasource,the data source is activated but when i preview the data i get the error as
    S:RSSDK:300 Column: Project Start Date(MM/DD/ not found.
    I also tried to doing the User settings but there is no option of the format YYYY-MM-DD.
    Please let me know how to handle this issue.
    Thanks In Advance.
    Kind Regards,
    Veena A

    Hi Veena,
    Please follow this steps, which are for BI 7.0 system:
    1) Goto RSA1,then click on the source system option.
    2) under all the source system right click on your source system, and select the last option Additional 3.x datasource tables option in the list.
    3) then you get the screen whereyou can slecte the tables or view presnt on that source system. here you select the desired view.
    4) then you get the table structure of that view, here you can chck the table content of the biew using the display data option on this screen.
    5) when you get the data output just verify the data with in the 2 fields Date_d and Date_t and then map the field which hold the value from this 2 to the 0calday field in the datasource.
    Hope it helps..
    Regards,
    umesh.

  • Error with date conversion

    Hi,
    I receive a date from an IDOC in the format 20061005160300. This date must be converted to insert it in an Oracle database. I wrote a little UDF which cuts the string to 8 characters and puts a TO_DATE(' before and a ','YYYY-MM-DDD') after it.
    Now I get an Oracle error because somehow there is a blank (after the TO_DATE') in the final string:
    <DATUM_VB hasQuot="No">TO_DATE(' 2006092','YYYY-MM-DD')</DATUM_VB>
    Here is my UDF:
    int length = date.length();
    String sub = new String();
    String before = new String("TO_DATE('");
    String after = new String("','YYYY-MM-DD')");
    if(length >= 8 && !date.equals("00000000"))
    sub = before+date.substring(0, 8)+after;
    else{
    sub = "";
    return sub;
    Do you have any idea why there is a blank in it? If I test the mapping there's no error and no blank...
    Regards
    Dominic

    Hi Dominic,
    Alternatively use Transform fn under Date Function..
    Double click on the built in fn and in the property area u have to key key source and target date Format
    give as follows..
    Source Date Format: yyyyMMddHHmmss
    Target Date Format: yyyy-MM-dd
    Use built in Concat fun further to construct ur To_date function.
    Regards,
    Sudharshan

  • Crystal Data Conversion Issue (Error converting data type varchar to datetime)

    Hi,
    I can run stored procedure without error in SQL Server using my personal credentials as well as database credentials.
    I can also run Crystal Report after connecting to Stored procedure without error on my desktop using my personal credentials as well as database credentials.
    But when I upload the crystal report in BOBJDEV and when I run using database credentials report fails saying that "Error in File ~tmp1d1480b8e70fd90.rpt: Unable to connect: incorrect log on parameters. Details: [Database Vendor Code: 18456 ]" but I can run the crystal report successfully on BOBJDEV using my personal credentials.
    I googled (Data Conversion Error Message) about this issue & lot of people asked to do "Verify Database" in Crystal Report. So I did that, but when I do it I am getting a error message like this:
    Error converting data type varchar to datetime.
    Where do you think the error might be occurring? Did anyone faced this kind of issue before? If so, how to resolve it?
    (FYI, I am using Crystal Reports 2008, & for stored procedure I have used SSMS 2012 )
    Please help me with this issue.
    Thanks & Regards.
    Naveen.

    hello Naveen,
    since the report works fine in the cr designer / desktop, we need to figure out where you should post this question.
    by bobjdev do you mean businessobjects enterprise or crystal reports server? if so please post this question to the bi platform space.
    -jamie

  • Data Conversion Errors for the last week

    We've been running a simple Stream Analytics job for little over a month now with a very light workload. Input is Event hub and output SQL Server. We noticed today that we haven't received anything into SQL Server since 2014-12-08 (we don't receive events
    every day so we only know that everything still worked on the 8th of December), so we checked the job's logs. It seems that job is failing to process all the messages: The value of "Data Conversion Errors" is high.
    I wonder what could have happened? We haven't touched the client since we started the job so it's still sending the messages in same format. And we haven't touched the job's query either.
    Has there been an update to either to Stream Analytics or to Events Hub which could cause the issue we're seeing?

    I've followed word for word the TollApp Instructions (except the thing with NamespaceType "Messaging" that has been added to New-AzureSBNamespace).
    I have 0 line in output, and this is the service log:
    Correlation ID:
    e94f5b9e-d755-4160-b49e-c8225ceced0c
    Error:
    Message:
    After deserialization, 0 rows have been found. Possible reasons could be a missing header or malformed CSV input.
    Message Time:
    2015-01-21 10:35:15Z
    Microsoft.Resources/EventNameV2:
    sharedNode92F920DE-290E-4B4C-861A-F85A4EC01D82.entrystream_0_c76f7247_25b7_4ca6_a3b6_c7bf192ba44a#0.output
    Microsoft.Resources/Operation:
    Information
    Microsoft.Resources/ResourceUri:
    /subscriptions/eb880f80-0028-49db-b956-464f8439270f/resourceGroups/StreamAnalytics-Default-West-Europe/providers/Microsoft.StreamAnalytics/streamingjobs/TollData
    Type:
    CsvParserError
    Then I stopped the job, and connected to the event hub with a console app and received that:
    Message received. Partition: '11', Data: 'TollId,EntryTime,LicensePlate,State,Make,Model,VehicleType,VehicleWeight,Toll,Tag
    85,21/01/2015 10:24:56,QBQ 1188,OR,Toyota,4x4,1,0,4,361203677
    Message received. Partition: '11', Data: 'TollId,EntryTime,LicensePlate,State,Make,Model,VehicleType,VehicleWeight,Toll,Tag
    33,21/01/2015 10:25:42,BSE 3166,PA,Toyota,Rav4,1,0,6,603558073
    Message received. Partition: '11', Data: 'TollId,EntryTime,LiMessage received. Partition: '10', Data: 'TollId,EntryTime,LicensePlate,State,Make,Model,VehicleType,VehicleWeight,Toll,Tag
    59,21/01/2015 10:23:59,AXD 1469,CA,Toyota,Camry,1,0,6,150568526
    Message received. Partition: '10', Data: 'TollId,EntryTime,LicensePlate,State,Make,Model,VehicleType,VehicleWeight,Toll,Tag
    25,21/01/2015 10:24:17,OLW 6671,NJ,Honda,Civic,1,0,5,729503344
    Message received. Partition: '10', Data: 'TollId,EntryTime,LicensePlate,State,Make,Model,VehicleType,VehicleWeight,Toll,Tag
    51,21/01/2015 10:24:23,LTV 6699,CA,Honda,CRV,1,0,5,169341662
    Note the bug on the 3rd message. In my opinion it's unrelated, it could be the writeline that can't keep up with the stream in the console application. And at worst it's in the stream, but then I should see at least some lines in output for the correctly
    formatted messages.

  • Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 1, column 3 (NumberOfMultipleMatches).

    Hi,
    I have a file where fields are wrapped with ".
    =========== file sample
    "asdsa","asdsadasdas","1123"
    "asdsa","asdsadasdas","1123"
    "asdsa","asdsadasdas","1123"
    "asdsa","asdsadasdas","1123"
    ==========
    I am having a .net method to remove the wrap characters and write out a file without wrap characters.
    ======================
    asdsa,asdsadasdas,1123
    asdsa,asdsadasdas,1123
    asdsa,asdsadasdas,1123
    asdsa,asdsadasdas,1123
    ======================
    the .net code is here.
    ========================================
    public static string RemoveCharacter(string sFileName, char cRemoveChar)
                object objLock = new object();
                //VirtualStream objInputStream = null;
                //VirtualStream objOutStream = null;
                FileStream objInputFile = null, objOutFile = null;
                lock(objLock)
                    try
                        objInputFile = new FileStream(sFileName, FileMode.Open);
                        //objInputStream = new VirtualStream(objInputFile);
                        objOutFile = new FileStream(sFileName.Substring(0, sFileName.LastIndexOf('\\')) + "\\" + Guid.NewGuid().ToString(), FileMode.Create);
                        //objOutStream = new VirtualStream(objOutFile);
                        int nByteRead;
                        while ((nByteRead = objInputFile.ReadByte()) != -1)
                            if (nByteRead != (int)cRemoveChar)
                                objOutFile.WriteByte((byte)nByteRead);
                    finally
                        objInputFile.Close();
                        objOutFile.Close();
                    return sFileName.Substring(0, sFileName.LastIndexOf('\\')) + "\\" + Guid.NewGuid().ToString();
    ==================================
    however when I run the bulk load utility I get the error 
    =======================================
    Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 1, column 3 (NumberOfMultipleMatches).
    ==========================================
    the bulk insert statement is as follows
    =========================================
     BULK INSERT Temp  
     FROM '<file name>' WITH  
      FIELDTERMINATOR = ','  
      , KEEPNULLS  
    ==========================================
    Does anybody know what is happening and what needs to be done ?
    PLEASE HELP
    Thanks in advance 
    Vikram

    To load that file with BULK INSERT, use this format file:
    9.0
    4
    1 SQLCHAR 0 0 "\""      0 ""    ""
    2 SQLCHAR 0 0 "\",\""   1 col1  Latin1_General_CI_AS
    3 SQLCHAR 0 0 "\",\""   2 col2  Latin1_General_CI_AS
    4 SQLCHAR 0 0 "\"\r\n"  3 col3  Latin1_General_CI_AS
    Note that the format file defines four fields while the fileonly seems to have three. The format file defines an empty field before the first quote.
    Or, since you already have a .NET program, use a stored procedure with table-valued parameter instead. I have an example of how to do this here:
    http://www.sommarskog.se/arrays-in-sql-2008.html
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Error in Unit conversion while data loading

    Hi,
    I have maintained DSO in Material (0MATERIAL) info object > Bex tab > Base unit of measure > ZDSO; Then loaded this ZDSO from std data source  0MAT_UNIT_ATTR so that all conversion factors into different units which are maintained in material master data in ECC would get loaded to this DSO.
    Then I have created one Conversion type (ZCON) to read source unit from record and convert it to fixed unit "ST" with reference info object as 0MATERIAL. ST is customized UOM here.
    I am using ZCON conversion type to convert Qty in base UOM to Qty in ST in Bex reports under conversion tab of key figure. Now as this is std functionally, conversion would automatically takes place using ZDSO (mentioned above) as source and target UOM are not from same dimension (Base UOM is EA and target UOM is ST).
    If conversion factor to ST is not found in ZDSO then conversion to base UOM would happen automatically. Now this functionality is happening perfectly in Bex but its giving error if I use the same conversion type ZCON while data loads. Its giving error for those material for which ST conversion is not maintained. But when its not maintained by default it should convert it to base UOM, but its not converting and giving error in data loads.
    Hope I am able to explain the issue.
    Please help me on on this issue or any way around.
    Thanks in advance.
    Prafulla

    Ganesh,
    Can you please check out the Alpha Conversion Routine and also nodeid for that infoobject..
    There might be some inconsistencies in the code..
    Hope it helps
    Gattu

  • Data conversion error

    Hi All,
    I am getting below error in my SQL server agent job.
     Source: Data Flow Task Data Conversion [31]     Description: Data conversion failed while converting column "Partner" (935) to column "Copy of Partner" (940).  The conversion returned status value 4 and status text "Text
    was truncated or one or more characters had no match in the target code page.".  End Error  Error: 2013-09-25 15:16:31.32     Code: 0xC020902A     Source: Data Flow Task Data Conversion [31]     Description: The
    "output column "Copy of Partner" (940)" failed because truncation occurred, and the truncation row disposition on "output column "Copy of Partner" (940)" specifies failure on truncation. A truncation error occurred on
    the specified object of the specified component.  End Error  Error: 2013-09-25 15:16:31.33     Code: 0xC0047022     Source: Data Flow Task SSIS.Pipeline     Description: SSIS Error Code DTS_E_PROCESSINPUTFAILED.  The
    ProcessInput method on component "Data Conversion" (31) failed with error code 0xC020902A while processing input "Data Conversion Input" (32). 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.  End Error  Error: 2013-09-25 15:16:31.35     Code:
    0xC02020C4     Source: Data Flow Task Excel Source [1]     Description: The attempt to add a row to the Data Flow task buffer failed with error code 0xC0047020.  End Error  Error: 2013-09-25 15:16:31.36     Code: 0xC0047038
        Source: Data Flow Task SSIS.Pipeline     Description: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on component "Excel Source" (1) returned error code 0xC02020C4.  The component returned a failure
    code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing.  There may be error messages posted before this with more information about the
    failure.  End Error  DTExec: The package execution returned DTSER_FAILURE (1).  Started:  3:10:23 PM  Finished: 3:16:38 PM  Elapsed:  374.184 seconds.  The package execution failed.  The step failed.
    Kindly help me to debug this

    Possible cause of error: Source has more characters than what is allowed by the conversion.
    i.e. Conversion allows DT_STR(50) (50 characters) but a source record has more than 50 characters for that column.
    Possible solution: increase the conversion character limit if possible. Or, under Error Outputs > Truncation > switch from Fail Component to Redirect Row or Ignore failure (you will then have to decide what you wish to do for such issue). Or, make
    sure the source can not violate this character limit.

  • Data conversion error. Overflowed the specific type.

    Hi guys, as usual I am struggling with the data conversion. I have got a column BS as Float in SQL, the usual values is 10.5656445, 899.66552366 etc. I'll try to move in Excel the data but I wish to have only one decimal. I try decimal in the data conversion
    with precision 1 but it returns me the same value now I am trying
    numeric, precision 1 but it returns the error "Conversion failed because the data value overflowed the specified type". Any suggestion? Thanks

    Could you tell me what should be the result for 10.5656445, 899.66552366?  Is that 10.5, 899.6 ?
    If yes then, set Precision: 4, Scale: 1
    (This is a total of 4 digits, 3 digits for the whole number and 1 for the fractional)
    Cheers,
    Vaibhav Chaudhari

  • Most simple query on Event Hub stream (json) constantly gives Data Conversion Errors

    Hello all,
    Been playing with ASA in December and didn't have any issues, my queries kept working and outputted the data as needed.  However, since January, I created a new demo, where I now constantly get Data Conversion errors.  The scenario is described
    below, but I have the following questions:
    Where can I get detailed information on the data conversion errors?  I don't get any point now (not in the operation logs and not in the table storage of my diagnostic storage account)
    What could be wrong in my scenario and could be causing these issues
    The scenario I have implemented is the following:
    My local devices send EventData objects, serialized through Json.Net to an Event Hub with 32 partitions.
    I define my query input as Event Hub Stream and define the data as json/utf8.  I give it the name TelemetryReadings
    Then I write my query as SELECT * FROM TelemetryReadings
    In the output, I create an output on blob with CSV/UTF8 encoding
    After that, I start the job
    The result is an empty blob container (no output written) and tons of data conversion errors in the monitoring graph.  What should I do to get this solved?
    Thanks
    Sam Vanhoutte - CTO Codit - VTS-P BizTalk - Windows Azure Integration: www.integrationcloud.eu

    So, apparently the issue was related to the incoming objects, I had.  I was sending unsupported data types (boolean and Dictionary).  I changed my code to remove these from the json and that worked out well.  There was a change that got deployed
    that (instead of marking the unsupported fields as null, they were throwing an exception).  That's why things worked earlier.
    So, it had to do with the limitation that I mentioned in my earlier comment:
    https://github.com/Azure/azure-content/blob/master/articles/stream-analytics-limitations.md
    Unsupported type conversions result in NULL values
    Any event vales with type conversions not supported in the Data Types section of Azure Stream Analytics Query Language
    Reference will result in a NULL value. In this preview release no error logging is in place for these conversion exceptions.
    I am creating a blog post on this one
    Sam Vanhoutte - CTO Codit - VTS-P BizTalk - Windows Azure Integration: www.integrationcloud.eu

  • Data Conversion Error Message

    I am getting the following error when running a report in Crystal Reports 2008:
    'Database Connection Error: '42000:[Microsoft][ODBC SQL Server Driver][SQL Server]Error converting data type varchar to datetime. [Database Vendor Code: 8114 ]'
    I can run my stored procedure without error in SQL Server.  When I add the stored procedure to a new, simple Crystal Report, it runs without error and data is returned.  The Crystal Report that is getting the error has been converted from Crystal Reports 8 to Crystal Reports 2008.  There has to be something in the way the report is passing data to the stored procedure that is causing the issue.  Any ideas?

    Hi, 
    After you open the report in CR2008, go to Database | Verify Database.  You should get prompted again for the parameters.  Enter them and try running the report. 
    There is a big difference in how CR8 and 2008 work with SQL.  Verifying the database usually clears these issues up.  If it doesn't fix, try browsing each field datetime to see which field Crystal is seeing as character. 
    Good luck,
    Brian

  • Mapping conversion error in Dates

    Hello Experts,
    I am doing date conversion in Message Mapping from ECC date will come in YYYYMMDD for target i need to convert to YYYY_MM_DD for this i am using date transfer function.Issue is when date is coming like 20110908 it is converting properly like 2011-09-08
    But when from ECC date is coming like 00000000 then by default it converting to 0002-11-30 how this date is coming i am not understanding actually it should convert like 0000-00-00 .
    Please help me

    Hi,
    I am not quite sure why the conversion works like that. That said, the date 0000-00-00 is not a valid date, as that date has never existed. That may be the reason for the strange behaviour by PI.
    I suggest you add fixed-values conversion before your dateConvert step in the mapping. Here you check for date 00000000 and map it to e.g. 00010101.
    This should solve the issue, if you can live with a result date of 0001-01-01 in these cases. 
    Br,
    Kenneth

  • Error during currency conversion and consistency check in a sales order

    Hi Experts,
    I am facing the below error in the sales order. The sales order is having so many items. The below error is coming for few items only. I have checked the currency exchange rates also. All are maintained properly.
    Please advice me how to fix this error or which class,methods are responsible for checking the above details while saving the order.
    Thanks,
    Sri

    Hi Christophe,
    FYI
    Error during currency conversion frm &1 to &2 (date &3, ref. curr. &4)
    Message Class - CRM_CUMULATED_I
    Message No     - 013
    Error during currency conversion for &1 and &2
    Message Class - CRM_CUMULATED_I
    Message No     - 008
    Consistency check: Logical key does not match
    Message Class - CRM_CUMULATED_I
    Message No     - 011
    Thanks,
    Sri

  • Error with Date Variable

    I am trying to create a process to import to import data using a date variable but when I use the date to get the data from SQL server I am getting a error.
    I have tried setting the variable as both a string and date - Select
    CONVERT(varchar(10), DATEADD(day, -1, GETDATE()), 101) and map it to the Variable. The date variable is working. It’s correct in the Watch and I am able to use the variable to get data from an Open Link database (row_date = ?)
    in the OLE DB Source query. I get a "Invalid character value for cast specification"
    error when doing the same thing to get data from an SQL Server OLE DB Source
    where the date field is DateTime (row_date = ?). I have tried making the variable as a date and string but get the same error regardless. To make it work, I have to duplicate the date
    calculation in the query - HAVING (row_date = CONVERT(varchar(10), DATEADD(day, -1, GETDATE()), 101) ) which works fine.
    HAVING (row_date = ?) gives the error with the Parameter mapped to the variable.
    Any suggestions as to how to make this work correctly?

    May I suggest to use style 111 instead of 101?
    From experience, yyyy/mm/dd date format will work most of the time for date conversion and
    It's due to different date format from mm/dd/yyyy to the system date format that SQL Server is using.
    Hope this helps.
    ~ J.

  • Error in global conversion rule for InfoObject 0INCOTERMS2

    When I activate BI content 2LIS_12_VCITM with transfer rule, The transfer rule was error with the message " Error in global conversion rule for InfoObject 0INCOTERMS2" and Mgs No. 263.
    The transfer rule cannot be activated.
    I checked the 0INCOTERMS2 infoObject . The global conversion rule is no error.
    The global conversion is in below.
    ============================================================
    PROGRAM CONVERSION_ROUTINE.
    Type pools used by conversion program
    TYPE-POOLS: RSD, RSARC, RSARR.
    TYPES: DE_0INCOTERMS2(000028) TYPE C.
    Conversion rule for InfoObject 0INCOTERMS2
        Data type       = CHAR
        ABAP type       = C
        ABAP length     = 000028
    FORM CONVERT_0INCOTERMS2
      USING    RECORD_NO LIKE SY-TABIX
               SOURCE_SYSTEM TYPE RSA_LOGSYS
               IOBJ_NAME TYPE RSIOBJNM
      CHANGING RESULT TYPE DE_0INCOTERMS2 " InfoObject value
               RETURNCODE LIKE SY-SUBRC.
    $$ begin of routine - insert your code only below this line        -
      TRANSLATE RESULT TO UPPER CASE.
    $$ end of routine - insert your code only before this line         -
    ENDFORM.
    =================================================================
    If you have any idea or face the similar problem, please suggest solution.
    Thank you.

    Good afternoon,
    If you have not done so already can you apply the SAP note  1387854 in your system and it should prevent the problem from happening again. If you also reactivate the infoobject  0INCOTERMS2 in RSD1 then it should be possible to manually activate the  transfer rule.
    Best Regards,
    Des

Maybe you are looking for

  • You cannot reconcile a/p invoice transaction with A/P Down Payment request manually

    Dear Experts, One of my client has facing this problem while doing Reconciliation then he is getting the following error. "you cannot reconcile a/p invoice transaction with A/P Down Payment request manually" then we found a solution in SAP Forums and

  • How to create a roadmap ui element dynamically in webdynpro abap?

    Dear  team iam new for webdynpro my question is how to create the road map programme dynamically using webdynpro could you tell me what are the steps i have to take, what are the elements i have to bind? and what code & where i have to write the code

  • Problem with multiple tiles-defs.xmls  in struts

    Hi, I am using struts1.3.I have two struts-config.xml files in my application.I am adding those files in web.xml. <servlet>           <servlet-name>action</servlet-name>           <servlet-class>                org.apache.struts.action.ActionServlet

  • How to delete a rented movie

    I have a rented HD movie that is taking up space and will not play I got from iTunes. iTunes store agreed to credit me "as a one time exception" for the movie they sent me that will not play. I suppose that means the default is that we pay for movies

  • Run Crystal Report from URL includes username and password

    Hello, I've downloaded CR 2008, and CR Server 2008 demo's. I'm trying to use a feature I've used with CR10 enterprise, and XI report server, where I can run a report direct from the URL. Something like: HTTP://scada-ho/crystal/enterprise/admin/en/vie