CLIENT_OLE2 date formatting problem while reading from Excel

I have installed webutil package and tested that everything works by running webutil_demo as well as WU_TEST_106 form. Then I had implemented reading from Excel sp. sheet using Oracle note 813535.1 (This note has OLE2 code sample on how to read an Excel file). Everything fine till now. The problem started when I have a date fiield to read from Excel. The field where the value is going to has format mask of 'DD-MM-RRRR'. When the date is displayed in the form, it shows '01-AUG-0009' instead of '01-AUG-2009'. I tried changing the date format to different formats in Excel but no go. I found one blog which stated that treat the date as number and use e.g. "cell_date_value:=to_date('01/01/1900','DD/MM/YYYY')+client_OLE2.get_num_property(cel,,'Value')+2" but it too did not change the display. Then I tried debugging and stepping through the code..the only thing I noticed that OLE2 function displayed the date with 2 digit year as 09 and when the code completed execution, the date went back to '01-AUG-0009'. Casting with 4 digit year at every step in the code is not helping to change final date display correctly. Any idea?!!!

Hi,
While reading the date column from excel, try using
     m_col_val := OLE2.get_char_property(Workcell,'Text');
Instead of
     m_col_val := OLE2.get_char_property(Workcell,'Value');
I think you problem will be solved...
hello...i meant client_OLE2
Regards
Dora
Edited by: Dora on Sep 16, 2009 11:05 AM

Similar Messages

  • Java Heap Space error while reading from Excel

    Hello,
    I have a data flow which reads from excel and updates records in an oracle table.
    When the data flow tries to read the excel I get a java Heap space Error.
    Error preparing to read <SUPP_STG3_FILE1>: <Java heap space>.
    Data flow <DF_SUPP_STG3_UPD> is terminated due to error <58105>.
    I have configured Excel Adapter since the server is on UNIX. BOExcelAdapter shows status as red once the execution fails. Before that BOExcel adapter status is green.
    BOExcelAdapter Trace:
    1/13/12 10:57:38 PM Thread[Thread-6,5,main]      Received an error message from the message broker. [Communication failure. Read timed out]. Will exit adapter immediately.
    1/13/12 10:57:47 PM Thread[main,5,main]      Create broker client for life-cycle management. Host:port = hikalxboes01:4001
    1/13/12 10:57:47 PM Thread[main,5,main]      Create broker client for data exchange with ASP. Host:port = hikalxboes01:4001. Client ID = com.acta.adapter.msexceladapter.MSExcelAdapter.data_18
    1/13/12 10:57:47 PM Thread[Thread-11,5,main]      Create broker client for real-time services with ASP. Host:port = 'hikalxboes01:4000''.
    1/13/12 10:57:47 PM Thread[Thread-11,5,main]      Start instance [BOExcelAdapter] of adapter [com.acta.adapter.msexceladapter.MSExcelAdapter].
    1/13/12 10:57:47 PM Thread[Thread-11,5,main]      Register the client ID [com.acta.adapter.msexceladapter.MSExcelAdapter.data_18] and adapter destination [hikalxboes01:4001] with the adapter manager.
    1/13/12 10:57:47 PM Thread[Thread-11,5,main]      Registration complete.
    1/13/12 10:58:10 PM Thread[Thread-10,5,main]      java.lang.OutOfMemoryError: Java heap space
         at org.apache.poi.hssf.usermodel.HSSFRow.addCell(HSSFRow.java:273)
         at org.apache.poi.hssf.usermodel.HSSFRow.createCellFromRecord(HSSFRow.java:196)
         at org.apache.poi.hssf.usermodel.HSSFSheet.setPropertiesFromSheet(HSSFSheet.java:183)
         at org.apache.poi.hssf.usermodel.HSSFSheet.<init>(HSSFSheet.java:128)
         at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:283)
         at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:196)
         at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:178)
         at com.acta.adapter.msexceladapter.MSExcelAdapterReadTable.begin(MSExcelAdapterReadTable.java:537)
         at com.acta.adapter.sdk.StreamOperationWrapper.beginStream(StreamOperationWrapper.java:88)
         at com.acta.adapter.sdk.AdapterRunnerImpl.processBeginOperation(AdapterRunnerImpl.java:1762)
         at com.acta.adapter.sdk.AdapterServiceDataListener.handleBrokerMessage(AdapterServiceDataListener.java:90)
         at com.acta.brokerclient.BrokerClient.handleMessage(BrokerClient.java:439)
         at com.acta.brokerclient.BrokerClient.access$100(BrokerClient.java:53)
         at com.acta.brokerclient.BrokerClient$MessageHandler.run(BrokerClient.java:1621)
         at com.acta.brokerclient.ThreadPool$PoolThread.run(ThreadPool.java:100)
    BOExcelAdapter Error Log:
    1/13/12 10:58:10 PM      java.lang.OutOfMemoryError: Java heap space
         at org.apache.poi.hssf.usermodel.HSSFRow.addCell(HSSFRow.java:273)
         at org.apache.poi.hssf.usermodel.HSSFRow.createCellFromRecord(HSSFRow.java:196)
         at org.apache.poi.hssf.usermodel.HSSFSheet.setPropertiesFromSheet(HSSFSheet.java:183)
         at org.apache.poi.hssf.usermodel.HSSFSheet.<init>(HSSFSheet.java:128)
         at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:283)
         at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:196)
         at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:178)
         at com.acta.adapter.msexceladapter.MSExcelAdapterReadTable.begin(MSExcelAdapterReadTable.java:537)
         at com.acta.adapter.sdk.StreamOperationWrapper.beginStream(StreamOperationWrapper.java:88)
         at com.acta.adapter.sdk.AdapterRunnerImpl.processBeginOperation(AdapterRunnerImpl.java:1762)
         at com.acta.adapter.sdk.AdapterServiceDataListener.handleBrokerMessage(AdapterServiceDataListener.java:90)
         at com.acta.brokerclient.BrokerClient.handleMessage(BrokerClient.java:439)
         at com.acta.brokerclient.BrokerClient.access$100(BrokerClient.java:53)
         at com.acta.brokerclient.BrokerClient$MessageHandler.run(BrokerClient.java:1621)
         at com.acta.brokerclient.ThreadPool$PoolThread.run(ThreadPool.java:100)

    As Jay mentioned above it might be due to the size of the Excel spreadsheet as you might be hitting the limitation in Apache POI library used for adapter.
    What is the size of the Excel file?
    What is the value of -Xmx parameter - see DS Management Console > Adapter configuration page.
    Thank you,
    Viacheslav.

  • Problem while reading from AQ

    I am trying to read one payload from oracle AQ.the payload is consisting of 3 varchar fields and two date fields.But while reading the object using AQ adapter I can see only varchar fields.Dtae fields are not visible,so adapter is not picking up the data from AQ.Can anybody suggest what to do?

    check these answers
    HELP!   ORA-25215: user_data type and queue type do not match
    and
    http://docstore.mik.ua/orelly/oracle/bipack/ch05_03.htm
    hth,
    Peter Paul

  • Store data in mysql after reading from excel files

    i am trying to make o program where i will read the data from excel files and i will store them in a database. I am using eclipse as editor and mySQL. I am using APACHE POI to read the excel files and JDBC for the connection. The excel files have the structure as shown below:
    ID NAME SALARY STREET
    321 TIM 1254 14 avenue
    121 PAUL 1265 28h oktovriou
    432 NICK 4521 papaflessa
    I have of course plenty of such files which contains many more rows and columns. The purpose of my program is to read the data, create table named as the name of the excel file and the fields of each table to be the first rows of the excel file. Afterwards the values will be the rest data of the excel file. In the code below i have managed to read them, show the data in the console. Afterwrds i am trying to call a database with JDBC but there i have problem when i create the table.
    try
    String[] allFields;
    String createTableStr = "CREATE TABLE" + createTableStr
    + "(" + org.apache.commons.lang3.StringUtils.join(allFields,
    ",") + ")";
    Could anyone help me?
    Thank you in advance!:)
    import java.io.FileInputStream;
    import java.io.IOException;
    import java.util.ArrayList;
    import java.util.HashMap;
    import java.util.Iterator;
    import java.util.List;
    import org.apache.poi.hssf.usermodel.HSSFCell;
    import org.apache.poi.hssf.usermodel.HSSFRow;
    import org.apache.poi.hssf.usermodel.HSSFSheet;
    import org.apache.poi.hssf.usermodel.HSSFWorkbook;
    import org.apache.commons.lang3.StringUtils;
    import org.apache.poi.ss.usermodel.Cell;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    import java.sql.Statement;
    public class exam1 {
    @SuppressWarnings({ "unchecked", "unchecked" })
    static void main (String[] args) throws Exception {
    String filename = "C:\\Users\\Efi\\Documents\\test5.xls";
    List sheetData = new ArrayList();
    FileInputStream fis = null;
    try {
    fis = new FileInputStream(filename);
    HSSFWorkbook workbook = new HSSFWorkbook(fis);
    HSSFSheet sheet = workbook.getSheetAt(0);
    Iterator rows = sheet.rowIterator();
    while (rows.hasNext()) {
    HSSFRow row = (HSSFRow) rows.next();
    Iterator cells = row.cellIterator();
    List data = new ArrayList();
    while (cells.hasNext()) {
    HSSFCell cell = (HSSFCell) cells.next();
    data.add(cell);
    sheetData.add(data);
    } catch (IOException e) {
    e.printStackTrace();
    } finally {
    if (fis != null) {
    fis.close();
    showExcelData(sheetData);
    @SuppressWarnings("unused")
    HashMap<String, String> tableFields = new HashMap();
    for (int i=0; i<sheetData.size();i++){
    List list = (List) sheetData.get(i);
    for (int j=0; j<list.size(); j++){
    Cell cell = (Cell) list.get(j);
    if (cell.getCellType() == Cell.CELL_TYPE_NUMERIC) {
    System.out.print(cell.getNumericCellValue());
    }else if(cell.getCellType()==Cell.CELL_TYPE_STRING) {
    System.out.print(cell.getRichStringCellValue());
    } else if(cell.getCellType()==Cell.CELL_TYPE_BOOLEAN) {
    System.out.print(cell.getBooleanCellValue());
    if (j < list.size() - 1) {
    System.out.print(", ");
    private static void showExcelData(List sheetData) {
    @SuppressWarnings("unchecked")
    private HashMap parseExcelData (List sheetData){
    HashMap<String,Integer> tableFields = new HashMap();
    List list = (List) sheetData.get(0);
    for (int j=0; j<list.size(); j++){
    Cell cell=(Cell) list.get(j);
    tableFields.put(cell.getStringCellValue(),cell.getCellType());
    return tableFields;
    @SuppressWarnings({ "unchecked", "unchecked", "unchecked", "unchecked", "unused" })
    private String getCreateTable(String tablename, HashMap<String, Integer> tableFields){
    Iterator iter = tableFields.keySet().iterator();
    String str="";
    String[] allFields = new String[tableFields.size()];
    int i = 0;
    while (iter.hasNext()){
    String fieldName = (String) iter.next();
    Integer fieldType=(Integer)tableFields.get(fieldName);
    switch (fieldType){
    case Cell.CELL_TYPE_NUMERIC:
    str=fieldName + "INTEGER";
    break;
    case Cell.CELL_TYPE_STRING:
    str= fieldName + "VARCHAR(255)";
    break;
    case Cell.CELL_TYPE_BOOLEAN:
    str=fieldName + "INTEGER";
    break;
    allFields[i++]= str;
    return str;
    public Connection getConnection() throws SQLException {
    try {
    Class.forName("com.mysql.jdbc.Driver");
    Connection con = (Connection) DriverManager.getConnection("jdbc:mysql://localhost:3306/kainourgia","root", "root");
    Statement stmt = con.createStatement();
    try
    System.out.println( "Use the database..." );
    stmt.executeUpdate( "USE kainourgia;" );
    catch( SQLException e )
    System.out.println( "SQLException: " + e.getMessage() );
    System.out.println( "SQLState: " + e.getSQLState() );
    System.out.println( "VendorError: " + e.getErrorCode() );
    try
    String[] allFields;
    String createTableStr = "CREATE TABLE" + createTableStr
    + "(" + org.apache.commons.lang3.StringUtils.join(allFields,
    *",") + ")";*
    System.out.println( "Create a new table in the database" );
    stmt.executeUpdate( createTableStr );
    catch( SQLException e )
    System.out.println( "SQLException: " + e.getMessage() );
    System.out.println( "SQLState: " + e.getSQLState() );
    System.out.println( "VendorError: " + e.getErrorCode() );
    catch( Exception e )
    System.out.println( ((SQLException) e).getSQLState() );
    System.out.println( e.getMessage() );
    e.printStackTrace();
    return null;
    }

    Please don't multipost! Also crossposted: http://www.java-forums.org/jdbc/71612-store-data-mysql-after-reading-excel-files.html
    Mod: I'm locking this thread.

  • Problem while reading from text file using JDeveloper 10.1.2

    Hi,
    I am using JDeveloper 10.1.2 for my application. In this, I have one requirement to read some data from a text file. For that, I created a test file and saved along with the java file folder. From there, I am trying to read this file but it says the file not found exception.
    Application is looking the file from another location. "F:\DevSuiteHome_1\jdev\system10.1.2.1.0.1913\oc4j-config"
    But, I want to read it from my home folder. How is it possible to read from that location?
    Regards,
    Joby Joseph

    HI,
    Check followings will useful
    How to read .txt file from adfLib jar at model layer using relative path
    Accessing physical/relative path from Bean

  • Problem while Reading from process.getInputStream

    I hav created asimple java IDE . To compile the file i have created a thread which further calls Process.start(). for compilation and Afr that for running.
    After it, i read from outputstream of process and whatever i get, i paste on a box for user to see.
    For normal(I mean in some hello world type program) my ide compiles and shows the correct output .
    But in othercase it doesnt shows the output. Though neither it generates any error.
    I m really confused.
    Plz if u getting my problem , try o solve.
    Thanx a lot

    it doesnt help .
    I m still stuck. i need helpYour problem is in line 42. You need to change it to -

  • UNABLE TO READ DATE FORMAT(DD/MM/YY) FROM EXCEL

    HI...
     i have written a code to read excel sheet.my problem is my program is working fine but in the first column i am having dates in dd/mm/yy format....This column is not getting value when the vi is running.Rest all the columns show the correct data except the date column...i have also changed the seperator and used '-' ,'.' but no use....
    sometimes it gives some random number there in 1st colum of array where i am storing the data after reading...i am not understanding why this is happening...
    pls can any1help me out.........

    I'm going to take a guess and say the day/month thing is a typo.
    In Excel when a cell is formatted to date in windows (By Default) it starts from Jan 1 1900 as day 1. Mac uses Jan 1 1904 as Does LabVIEW.
    Formatting to date in Excel calculates number of days since 1900, 12/08/2009 is equal 40155 days. LabVIEW calculates seconds since 1904.
    If the formatting in the spreadsheet cannot be changed because the data is already there then you will need to convert the number in LabVIEW by pulling out the value, subtract 4 years of days, then multiply by seconds in a day. This will give you a time LabVIEW can use. get the date and then insert the data back into the array.
    See .png
    Robert Fogg
    Certified LabVIEW Architect
    Attachments:
    Convert Excel Date.PNG ‏7 KB

  • Currency format problem while exporting as excel

    Hi
    I have to create a report for which the currency format should be $#,##0.00 and -$#,##0.00 for negative numbers.
    In the text form field of rtf template, I have selected number format and removed the portion ;($#,##0.00) from $#,##0.00;($#,##0.00).When I view the report as HTML the numbers are showing in proper format.($#,##0.00 or -$#,##0.00).But when the report is exported as excel ,the negative number format changes to ($#,##0.00) in red color.
    Can anyone tell me how avoid this problem?
    Thanks in advance
    Naveen

    I think this is an Excel issue - you can right mouse click in Excel the column header and "Format Cells&gt;Text"
    You could also append a ' character to your numbers in BI Answers ie: '6035784010491980 which should give you the correct format in Excel.
    eg. CONCAT( '''', CAST ( '6035784010491980 AS CHAR) )
    There is also an MS Office plug in available for OBIEE this may give you further options.

  • ORA-00904 while reading from Excel with ODI

    Hi all
    I'm trying to read data from some simple Excel files and to write the data into a 10g DB, but I get errors that don't make sense to me.
    Hope someone can give me an idea how I could get around them.
    For some files the transfer works as expected. For another one I get a ORA-00904 (invalid identifier) Message
    My Excel file that makes problems looks like that:
    __A___ __B___
    String1 String3
    String2 String4
    Through "ODI Reverse" I get a Datastore with one table containing the 2 columns F1 and F2 (both of type VARCHAR).
    Then I export this table and import it into my target datastore and set the adequate datatype (VARCHAR2).
    The next step is to create an interface and to use the two tables there (not to forget to define one column as key).
    As LKM I'm using SQL-to-SQL and as IKM I use Oracle-Incremental-Update.
    This process works fine for most of my Excel files but for the simple one described above ODI fails with ORA-00904.
    I tried to run the generated SQL directly on the DB with JDeveloper and the error occurs this way as well. The generated SQL is:
    /* DETECTION_STRATEGY = NOT_EXISTS */
    insert /*+ APPEND */ into TEST_TARGET.I$_FEASIBILITY
         F1,
         F2,
         IND_UPDATE
    select      
         C1_F1     F1,
         C2_F2     F2,
         'I' IND_UPDATE
    from     TEST_TARGET.C$_0FEASIBILITY
    where     (1=1)
    and not exists (
         select     'X'
         from     TEST_TARGET.FEASIBILITY T
         where     T.F1     = F1
              and     ((C2_F2 = T.F2) or (C2_F2 IS NULL and T.F2 IS NULL))
    Error Message:
    Error at Command Line:26 Column:44
    Error report:
    SQL Error: ORA-00904: "T"."F2": invalid identifier
    00904. 00000 - "%s: invalid identifier"
    *Cause:   
    *Action:
    Line 26 is the last but one and Column 44 is after the "or".
    In the beginning I used column headings, but I deleted them all after I had run into issues ORA-00904.
    Meanwhile I think that the root cause must be s.th. different as I'm only using the generic names and I can't believe that T.F2 is a reserved word.
    Any ideas? It would help me a lot to get this issue fixed.
    Thanks
    Rob

    Hi ,
    Try to use Double Quote (") in the mapping field of target datastore.
    Hope this help
    Thanks.

  • Communication Channel Problem while reading from database

    Hi,
    I have a JDBC to IDoc scenario.
    The database here is AS400 and i need to read data from AS400 tables and send it to SAP IDocs.
    The communication channel picks up the data from AS400 based on the query and builds the IDocs.
    Suddenly the channel stops working and it doesnt pick up the data from AS400. When we change the name of the Communication Channel, it again starts picking up the data but again for some period.
    It sounds really strange as this is happening only with AS400 database and not it works perfectly when connecting to an SQL Server database.
    Please help me out in resolving this issue.
    Regards
    Kiran.

    Hi Kiran
    Can you check the Notes 717376 ,990892 and try to implement.
    Some tips:
    This error is caused by some optimization in the IBM VM for AS400 which can be disabled through the JIT compiler settings. The following VM setting -Dos400.run.mode=jitc must be set, according to note 717376. Any other value for this setting, as e.g. jitc_de can cause the described problem
    Also, please share the trace, so that, it would help to identify the problem.
    Also try to change the property in Vis Admin
    "cluster-data" -> "Global server configuration" -> "managers" -> "ApplicationThreadManager" -> "MaxThreadCount" ( like 400)
    Regards
    Chilla

  • Problem in reading from excel file with my requirement

    Hi,
    Below is my input excel file format
    A    XXX
    B    XXX
    C    XXX
    D    E   F   G  H  I    J  K  L  M  N
    XX   XX  XX  XX.........................XX
    All the A...N are headings and XX's are values.
    How should I define an internal table for this requirement. I am using FM TEXT_CONVERT_XLS_TO_SAP to read input file.
    Please let me know the correct way to define internal table for the above file format.
    Regards,
    Cheritha

    Hello Cheritha,
    Your final internal table(t_final) should have all the fields viz. A, B, C, D etc.
    You need to read the file to an internal table say t_data. In the internal table t_data, the field values will be each row in this internal table.
    So you need to loop on t_data and based on the field name assign it to the corresponding field in the internal table t_final.
    Hope this is clear if any clarification please do reply
    Regards
    Farzan

  • Encoding problem while reading binary data from MQ-series

    Dear all,
    we are running on 7.0 and we have an encoding problem while reading binary data from MQ-series. Because we are getting flat strings from queue we use module "Plain2ML" (MessageTransformBean) for wrapping xml-elements around the incoming data.
    The MQ-Series-Server is using CCSID 850, which we configured in connection parameters in communication channel (both parameters for Queuemanager CCSID and also CCSID of target).If there are special characters in the message (which HEX-values differ from codepage to codepage) we get errors in our adapter while executing, please see stack-trace for further analysis below.
    It seems to us that
    1. method ByteToCharUTF8.convert() expects UTF-8 in binary data
    2. Both CCSID parameters are not used anyway in JMS-adapter
    How can we solve this problem without changing anything on MQ-site?
    Here is the stack-trace:
    Catching com.sap.aii.af.mp.module.ModuleException: Transform: failed to execute the transformation: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'sun.io.MalformedInputException'; nested exception caused by: sun.io.MalformedInputException caused by: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'sun.io.MalformedInputException'; nested exception caused by: sun.io.MalformedInputException
        at com.sap.aii.af.modules.trans.MessageTransformBean.throwModuleException(MessageTransformBean.java:453)
        at com.sap.aii.af.modules.trans.MessageTransformBean.process(MessageTransformBean.java:387)
        at com.sap.aii.af.mp.module.ModuleLocalLocalObjectImpl0_0.process(ModuleLocalLocalObjectImpl0_0.java:103)
        at com.sap.aii.af.mp.ejb.ModuleProcessorBean.process(ModuleProcessorBean.java:292)
        at com.sap.aii.af.mp.processor.ModuleProcessorLocalLocalObjectImpl0_0.process(ModuleProcessorLocalLocalObjectImpl0_0.java:103)
        at com.sap.aii.adapter.jms.core.channel.filter.SendToModuleProcessorFilter.filter(SendToModuleProcessorFilter.java:84)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.ConvertBinaryToXiMessageFilter.filter(ConvertBinaryToXiMessageFilter.java:304)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.ConvertJmsMessageToBinaryFilter.filter(ConvertJmsMessageToBinaryFilter.java:112)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.InboundDuplicateCheckFilter.filter(InboundDuplicateCheckFilter.java:87)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.TxManagerFilter.filterSend(TxManagerFilter.java:123)
        at com.sap.aii.adapter.jms.core.channel.filter.TxManagerFilter.filter(TxManagerFilter.java:59)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.DynamicConfigurationFilter.filter(DynamicConfigurationFilter.java:72)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.PmiAgentFilter.filter(PmiAgentFilter.java:66)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.InboundCorrelationFilter.filter(InboundCorrelationFilter.java:60)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.JmsHeadersProfileFilter.filter(JmsHeadersProfileFilter.java:59)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageInvocationsFilter.filter(MessageInvocationsFilter.java:89)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.JarmMonitorFilter.filter(JarmMonitorFilter.java:57)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.ThreadNamingFilter.filter(ThreadNamingFilter.java:62)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.SenderChannelImpl.doReceive(SenderChannelImpl.java:263)
        at com.sap.aii.adapter.jms.core.channel.ChannelImpl.receive(ChannelImpl.java:437)
        at com.sap.aii.adapter.jms.core.connector.MessageListenerImpl.onMessage(MessageListenerImpl.java:36)
        at com.ibm.mq.jms.MQMessageConsumer$FacadeMessageListener.onMessage(MQMessageConsumer.java:399)
        at com.ibm.msg.client.jms.internal.JmsMessageConsumerImpl$JmsProviderMessageListener.onMessage(JmsMessageConsumerImpl.java:904)
        at com.ibm.msg.client.wmq.v6.jms.internal.MQMessageConsumer.receiveAsync(MQMessageConsumer.java:4249)
        at com.ibm.msg.client.wmq.v6.jms.internal.SessionAsyncHelper.run(SessionAsyncHelper.java:537)
        at java.lang.Thread.run(Thread.java:770)
    Caused by: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'sun.io.MalformedInputException'; nested exception caused by: sun.io.MalformedInputException
        at com.sap.aii.messaging.adapter.Conversion.service(Conversion.java:714)
        at com.sap.aii.af.modules.trans.MessageTransformBean.processTransform(MessageTransformBean.java:538)
        at com.sap.aii.af.modules.trans.MessageTransformBean.processTransform(MessageTransformBean.java:528)
        at com.sap.aii.af.modules.trans.MessageTransformBean.processTransform(MessageTransformBean.java:471)
        at com.sap.aii.af.modules.trans.MessageTransformBean.process(MessageTransformBean.java:364)
        ... 36 more
    Caused by: sun.io.MalformedInputException
        at sun.io.ByteToCharUTF8.convert(ByteToCharUTF8.java:270)
        at sun.nio.cs.StreamDecoder$ConverterSD.convertInto(StreamDecoder.java:287)
        at sun.nio.cs.StreamDecoder$ConverterSD.implRead(StreamDecoder.java:337)
        at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:223)
        at java.io.InputStreamReader.read(InputStreamReader.java:208)
        at java.io.BufferedReader.fill(BufferedReader.java:153)
        at java.io.BufferedReader.readLine(BufferedReader.java:316)
        at java.io.LineNumberReader.readLine(LineNumberReader.java:176)
        at com.sap.aii.messaging.adapter.Conversion.convertPlain2XML(Conversion.java:310)
        at com.sap.aii.messaging.adapter.Conversion.service(Conversion.java:709)
        ... 40 more
    Any ideas?
    Kind regards, Stefan

    Hi Stefan,
    for the first MTB now we are using only one parameter: Transform.ContentType = text/plain;charset="ISO-8859-1"
    The second MTB, which does the XML-Wrapping, is configured like this:
    Transform.Class = com.sap.aii.messaging.adapter.Conversion
    Transform.ContentType = application/xml
    xml.conversionType = SimplePlain2XML
    xml.fieldNames = value
    xml.fieldSeparator = §%zulu§%
    xml.processFieldNames = fromConfiguration
    xml.structureTitle = payload
    Both CCSID configuration parameters from the "Source"-Tab we've set to 850.
    Now, we don't get an error anymore - sun.io.malformedInputException - , but, unfortunately, now special character conversion succeeded (we need an "ß" and we get an ISO-HEX-E1 -> á).  E1 is (different from ISO) an "ß" in 850.
    Any ideas?

  • Problem while reading data from Serial Port

    Hi All,
    I am facing some problem while reading data from Serial Port.
    As per the requirement I am writing the data on Serial Port and waiting for response of that data.
    Notification for data availabilty is checked with method public void serialEvent(SerialPortEvent event) of javax.comm.SerialPortEventListener.
    When we are writing data on the port one thread i.e. "main" thread is generated and when data availability event occures another thread "Win32SerialPort Notification thread" is generated. This creates problem for me as we can't control thread processing.
    So can anybody pls explain me how to overcome this problem?
    Regards,
    Neha

    My Problem is:-
    I am simoultaneouly wrting data on port & reading data from port.
    First I write data on port using outputStream.write() method. Now when target side sends me response back for the request on serial port DATA_AVAILABLE of SerialPortEventListner event occured,we are reading data from serial port.Now till the time we didn't get the response from target next command can't be written on the serial port. When we are writing data on port main thread is executed.Now my problem starts when DATA_AVAILABLE event occured.At this point another thread is created.Due to this my program writes data of next command without reading response of previous command.To solve this prob. I have used wait() & notify() methods as follows.But again due to this my pc hangs after execution of 2 commands. (PC hang in while loop in a code provided below.)
    From SOPs I could figure it out that after 2 commands we are not able to write data on serial port so DATA_AVAILABLE event doesn't occure n pro. goes in wait state.
    Can anybody help me to solve this issue.
    Neha.
    Code:
    public void serialEvent(SerialPortEvent event)
              switch (event.getEventType())
                   case SerialPortEvent.BI:
                   case SerialPortEvent.OE:
                   case SerialPortEvent.FE:
                   case SerialPortEvent.PE:
                   case SerialPortEvent.CD:
                   case SerialPortEvent.CTS:
                   case SerialPortEvent.DSR:
                   case SerialPortEvent.RI:
                   case SerialPortEvent.OUTPUT_BUFFER_EMPTY:
                                 break;
                   case SerialPortEvent.DATA_AVAILABLE:
                        try
                             dataThread = Thread.currentThread();
                             dataThread.setPriority(10);
                             dataAvailable = true;
                                                                                    byte[] tempArray=new byte[availableBytes];
                                        inputStream.read(tempArray);
                                                                       catch (IOException io)
                             SOP(io, "Error in serialEvent callback call for event DATA_AVAILABLE");
    public void  writetoPort(byte[] data) throws IOException
                             outputStream.write(data);
                              while(finalTimeOut >= actualTime)
                            if( ! dataAvailable)
                                    actualTime = System.currentTimeMillis();
                           else
              synchronized (mainThread)
                   mainThread = Thread.currentThread();
                   mainThread.wait();
    public  void sendDatatoUser(byte[] b) throws Exception, HWCCSystemFailure
              obj.returnData(b);
              synchronized(mainThread)
                   mainThread.notify();
                                                           

  • Problem  while reading XML file from Aplication server(Al11)

    Hi Experts
    I am facing a problem while  reading XML file from Aplication server  using open data set.
    OPEN DATASET v_dsn IN BINARY MODE FOR INPUT.
    IF sy-subrc <> 0.
        EXIT.
      ENDIF.
      READ DATASET v_dsn INTO v_rec.
    WHILE sy-subrc <> 0.
      ENDWHILE.
      CLOSE DATASET v_dsn.
    The XML file contains the details from an IDOC number  ,  the expected output  is XML file giving  all the segments details in a single page and send the user in lotus note as an attachment, But in the  present  output  after opening the attachment  i am getting a single XML file  which contains most of the segments ,but in the bottom part it is giving  the below error .
    - <E1EDT13 SEGMENT="1">
      <QUALF>001</QUALF>
      <NTANF>20110803</NTANF>
      <NTANZ>080000</NTANZ>
      <NTEND>20110803<The XML page cannot be displayed
    Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
    Invalid at the top level of the document. Error processing resource 'file:///C:/TEMP/notesD52F4D/SHPORD_0080005842.xml'.
    /SPAN></NTEND>
      <NTENZ>000000</NTENZ>
    for all the xml  its giving the error in bottom part ,  but once we open the source code and  if we saved  in system without changing anything the file giving the xml file without any error in that .
    could any one can help to solve this issue .

    Hi Oliver
    Thanx for your reply.
    see the latest output
    - <E1EDT13 SEGMENT="1">
      <QUALF>003</QUALF>
      <NTANF>20110803</NTANF>
      <NTANZ>080000</NTANZ>
      <NTEND>20110803</NTEND>
      <NTENZ>000000</NTENZ>
      <ISDD>00000000</ISDD>
      <ISDZ>000000</ISDZ>
      <IEDD>00000000</IEDD>
      <IEDZ>000000</IEDZ>
      </E1EDT13>
    - <E1EDT13 SEGMENT="1">
      <QUALF>001</QUALF>
      <NTANF>20110803</NTANF>
      <NTANZ>080000</NTANZ>
      <NTEND>20110803<The XML page cannot be displayed
    Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
    Invalid at the top level of the document. Error processing resource 'file:///C:/TEMP/notesD52F4D/~1922011.xml'.
    /SPAN></NTEND>
      <NTENZ>000000</NTENZ>
    E1EDT13 with QUALF>003 and  <E1EDT13 SEGMENT="1">
    with   <QUALF>001 having almost same segment data . but  E1EDT13 with QUALF>003  is populating all segment data
    properly ,but E1EDT13 with QUALF>001  is giving in between.

  • The data type DEC while downloading from ALV to EXCEL

    The data type DEC while downloading from ALV to EXCEL is giving some invalid data .
    Ex : In ALV field is the time difference in  hours:minutes
      if the value is  :23 in Excel it will be 22:59 .
    Please Suggest immediately

    Hi ....
    I have the similar problem. My coumns are not in any sequence when I download it to excel sheet.
    How do I fix it.
    Neha

Maybe you are looking for