Issue with parsing comma separated file

Hi,
We are having an issue while parsing a comma separated file with "eol" as delimiter for last field. For last line in file we get either  "eof" or "eol" as delimiter for last field. Is there any way we can handle both these scenarios using singe file adater? Example as below
File1:
a,b,c,d,e,f,g eol
a,b,c,d,e,f,g eol
a,b,c,d,e,f,g eol
a,b,c,d,e,f,g eol
a,b,c,d,e,f,g eol
File2:
a,b,c,d,e,f,g eol
a,b,c,d,e,f,g eol
a,b,c,d,e,f,g eol
a,b,c,d,e,f,g eol
a,b,c,d,e,f,g eof
Thanks

Write your own tokenizer. I think StringTokenizer ignores those values if they're empty since there's nothing to tokenize it into. It's a pretty simple class, I say just write your own.

Similar Messages

  • Comma Separated File

    Hello Experts,
    I am working on Interface, where i have the data in Internal Table. Now I am required to transfer the internal table data into Comma separated file with extension  '.csv' .
    I used the FM 'SAP_CONVERT_TO_CSV_FORMAT' and provided the de-limiter as ',' . When i downloaded the file in '.xls' format , all fields in row appeared in single cell of excel sheet.
    example : in 1 cell A1 the data was : abc,123,thr,456
    But the needed thing is 'abc' should appear in A1 cell , '123' should appear in B1 column etc...
    Please help me to attain the solution.
    Thanks in advance.
    Regards.

    You can concatenate all your field into a string, separated by ',' and then save the file.
    otherwise, you can save file into a csv where field are separated by tabulator, using the following:
    call function 'GUI_DOWNLOAD'
        exporting
          filename                = i_filename
          filetype                = 'ASC'
          write_field_separator   = 'X'
          dat_mode                = 'X'
        tables
          data_tab                = i_data
          fieldnames              = i_header
        exceptions
          file_write_error        = 1
          no_batch                = 2
          gui_refuse_filetransfer = 3
          invalid_type            = 4
          no_authority            = 5
          unknown_error           = 6
          header_not_allowed      = 7
          separator_not_allowed   = 8
          filesize_not_allowed    = 9
          header_too_long         = 10
          dp_error_create         = 11
          dp_error_send           = 12
          dp_error_write          = 13
          unknown_dp_error        = 14
          access_denied           = 15
          dp_out_of_memory        = 16
          disk_full               = 17
          dp_timeout              = 18
          file_not_found          = 19
          dataprovider_exception  = 20
          control_flush_error     = 21
          others                  = 22.
      if sy-subrc <> 0.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
    Regards
    Andrea

  • How to read a comma separated file in web dynpro for java?

    Hi,
    I am new to web dynpro for java, i am trying to develop an application where i am uploading file which is a comma separated file i need to read the content of it and then call an rfc  pass those values to it. i have created the ui for the afforesaid.
    How do i read the content and call the RFC please help
    Thanks

    Hi Anumeha,
    Perhaps your question can be answered in the Web Dynpro Java .
    Thank you.
    Regards,
       Jan

  • Parse comma separated value and map with other table to get Name and change it back to comma separate.

    Hi,
    I have one existing view(with around 15 fields), in which I have to add few more fields from table called PI.
    Now these fields have values like (55C4444F-D83B-4F96-A011-367A3755BA6C , F52388E2-485B-49DF-8534-FDF46D23F59E , 722432E1-F063-4CBD-B83D-1B97836E82953) 3 values comma separated.(Sometimes only one value and sometimes 4 or 5 or 7-8 depend on user has entered
    on web page)
    Also I have another table called PHA and this tables has 2 fields Values and Name so I have to map this two tables based on VALUES fields and get Name from this PHA table and show in view and that also Comma separated.
    So basically I have to Parse the PI table's Values field 1st, map it with PHA table to get Name and then Make it comma separated in that existing view.
    To make fields comma separate I used below query,
    (SELECT DISTINCT SUBSTRING
                SELECT ','+ PI.[Name]  AS [text()]
                FROM [DB].[dbo].[Table] PHA1
    Inner Join  [DB].[dbo].[Table] PI
    ON PHA.[Value] = PI.[VALUE]
                WHERE PHA1.PId =PHA2.PId and PHA1.CId = PHA2.CId
                ORDER BY PHA1.PId
                For XML PATH ('')
            ), 2, 1000) 
    FROM [DB].[dbo].[Table] PHA2
    Inner Join [cSharpSite_profiles].[dbo].[PetAllergies] PA
    Inner Join  [DB].[dbo].[Table] PI
    ON PHA.[Value] = PI.[VALUE]
    ) [Name]
    Vicky

    Wait, this sounds wrong. You have a view where you group values into a comma-separated list. While that surely will make some purists cringe, I can see that it makes sense from a presentation perspective.
    But if you want to use these concatenated values as atomic values again, you should go back to the base tables and them from there. Building views on views may sometimes be a good idea, but if you are too keen on reuse you can cause a performance disaster.
    So do it right from the beginning.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Issue with parsing an xml document and namespaces

    I am having an issue when parsing an xml document that includes a namespace.
    Here is my xml:
    <?xml version="1.0" encoding="utf-8"?>
    <StatusFile xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" TxCnt="247" TxTotal="5756845.31" SourceId="3" xmlns="http://www.test.com/cig/payments/optimizer/status/2004/10/">
    <Tx PmtId="350031" Amt="16739" TxSts="09" CustSts="04" ChkNum="10605770" />
    <Tx PmtId="350990" Amt="31698.66" TxSts="09" CustSts="04" ChkNum="10605821" />
    <Tx PmtId="354992" Amt="201320.08" TxSts="09" CustSts="04" />
    <Tx PmtId="349277" Amt="6675.17" TxSts="09" CustSts="04" ChkNum="10605822" />
    <Tx PmtId="354979" Amt="66949.75" TxSts="09" CustSts="04" ChkNum="10605823" />
    <Tx PmtId="349341" Amt="63258.49" TxSts="09" CustSts="04" ChkNum="10605824" />
    <Tx PmtId="350025" Amt="5866.04" TxSts="09" CustSts="04" ChkNum="10605830" />
    <Tx PmtId="350024" Amt="15671.8" TxSts="09" CustSts="04" ChkNum="10605831" />
    <Tx PmtId="346822" Amt="9880.64" TxSts="09" CustSts="04" />
    <Tx PmtId="350023" Amt="1360" TxSts="09" CustSts="04" />
    <Tx PmtId="349802" Amt="131267" TxSts="09" CustSts="04" ChkNum="10605832" />
    <Tx PmtId="343573" Amt="14532.76" TxSts="09" CustSts="04" ChkNum="10605833" />
    <Tx PmtId="352675" Amt="4436" TxSts="09" CustSts="04" />
    <Tx PmtId="350022" Amt="1260" TxSts="09" CustSts="04" ChkNum="10605834" />
    <Tx PmtId="349714" Amt="80778" TxSts="09" CustSts="04" ChkNum="10605835" />
    <Tx PmtId="352676" Amt="10136" TxSts="09" CustSts="04" ChkNum="10605836" />
    <Tx PmtId="352679" Amt="25511.69" TxSts="09" CustSts="04" ChkNum="10605837" />
    <Tx PmtId="346502" Amt="12842.69" TxSts="10" CustSts="05" />
    <Tx PmtId="346503" Amt="4232.61" TxSts="09" CustSts="04" ChkNum="10605838" />
    </StatusFile>
    Here is my current code base:
    CREATE OR REPLACE PROCEDURE ParseXML(xml VARCHAR2) IS
    myParser xmlparser.parser := xmlparser.newparser;
    myDoc xmldom.DOMNode;
    myNodes xmldom.DOMNodeList;
    myElement xmldom.DOMElement;
    trec NDE_CIG_STATUS_TRANSACTIONS%ROWTYPE;
    BEGIN
    xmlparser.parseBuffer(myParser,xml);
    myDoc := xmldom.makeNode(xmlparser.getDocument(myParser));
    myNodes := xslprocessor.selectNodes(myDoc,'//Tx');
    FOR i IN 0..xmldom.getLength(myNodes)-1 LOOP
    myElement := xmldom.makeElement(xmldom.item(buyOrders,i));
    trec.pmt_id := xmldom.getAttribute(curBuy,'PmtId');
    INSERT INTO NDE_CIG_STATUS_TRANSACTIONS(PMT_ID) VALUES (trec.pmt_id);
    END LOOP;
    COMMIT;
    END ParseXML;
    If I remove the namespace, everything works just fine. The issue is that I cannot remove the namespace.
    Anyone have any suggestions on how I can get the xslprocessor.selectNodes to recognize my namespace?
    Thanks,
    Mark Moran

    Everyone,
    Well after lots of hours spent reading web pages and blogs, etc... I was able to re-write my procedure and get it to work with different calls.
    Here is my updated code.
    PROCEDURE PARSE_STATUS_XML(P_FILE_NAME IN VARCHAR2, P_XML_FILE IN CLOB) IS
    V_PARSER XMLPARSER.PARSER := XMLPARSER.NEWPARSER;
    V_DOCUMENT XMLDOM.DOMDOCUMENT;
    V_NODES XMLDOM.DOMNODELIST;
    V_ELEMENT XMLDOM.DOMELEMENT;
    V_TBL_RECORD NDE_CIG_STATUS_TRANSACTIONS%ROWTYPE;
    BEGIN
    XMLPARSER.PARSECLOB(V_PARSER, P_XML_FILE);
    V_DOCUMENT := XMLPARSER.GETDOCUMENT(V_PARSER);
    V_ELEMENT := XMLDOM.GETDOCUMENTELEMENT(V_DOCUMENT);
    V_NODES := XMLDOM.GETELEMENTSBYTAGNAME(V_ELEMENT,'Tx','http://www.test.com/cig/payments/optimizer/status/2004/10/');
    FOR I IN 0..XMLDOM.GETLENGTH(V_NODES)-1 LOOP
    V_ELEMENT := XMLDOM.MAKEELEMENT(XMLDOM.ITEM(V_NODES,I));
    V_TBL_RECORD.PMT_ID := XMLDOM.GETATTRIBUTE(V_ELEMENT,'PmtId');
    V_TBL_RECORD.PMT_AMT := XMLDOM.GETATTRIBUTE(V_ELEMENT,'Amt');
    V_TBL_RECORD.E_STATUS_CODE := XMLDOM.GETATTRIBUTE(V_ELEMENT,'TxSts');
    V_TBL_RECORD.E_REASON_CODE := XMLDOM.GETATTRIBUTE(V_ELEMENT,'StsRsn');
    V_TBL_RECORD.E_CUSTOMER_STATUS_CODE := XMLDOM.GETATTRIBUTE(V_ELEMENT,'CustSts');
    V_TBL_RECORD.UPS_TRACKING_NBR := XMLDOM.GETATTRIBUTE(V_ELEMENT,'UpsTrcNum');
    V_TBL_RECORD.FED_REFERENCE_NBR := XMLDOM.GETATTRIBUTE(V_ELEMENT,'FedRefNum');
    V_TBL_RECORD.FIDB_TRACKING_NBR := XMLDOM.GETATTRIBUTE(V_ELEMENT,'FIDbtTrcNum');
    V_TBL_RECORD.CHECK_NBR := XMLDOM.GETATTRIBUTE(V_ELEMENT,'ChkNum');
    INSERT INTO NDE_CIG_STATUS_TRANSACTIONS(
    CREATE_DATE,
    XML_FILE_NAME,     
    PMT_ID,
    PMT_AMT,
    E_STATUS_CODE,
    E_REASON_CODE,
    E_CUSTOMER_STATUS_CODE,
    UPS_TRACKING_NBR,
    FED_REFERENCE_NBR,
    FIDB_TRACKING_NBR,
    CHECK_NBR
         VALUES (
    SYSDATE,
    P_FILE_NAME,
    V_TBL_RECORD.PMT_ID,
    V_TBL_RECORD.PMT_AMT,
    V_TBL_RECORD.E_STATUS_CODE,
    V_TBL_RECORD.E_REASON_CODE,
    V_TBL_RECORD.E_CUSTOMER_STATUS_CODE,
    V_TBL_RECORD.UPS_TRACKING_NBR,
    V_TBL_RECORD.FED_REFERENCE_NBR,
    V_TBL_RECORD.FIDB_TRACKING_NBR,
    V_TBL_RECORD.CHECK_NBR
    END LOOP;
    COMMIT;
    EXCEPTION
    WHEN OTHERS THEN
         RAISE;
    END PARSE_STATUS_XML;
    Mark

  • Issue with Opening a PDF file

    We have just completed an upgrade of one of our servers executing Reporting Services.   The upgrade was from 2005 to 2008.
    After we have rendered a report and have it saved in PDF format, we start having issues.
    If we try to open the PDF by double clicking on the file name in Windows Explorer, Adobe Reader starts, but sits unresponsive and consumes an excessive amount of CPU cycles.    It never completes the open and we have to kill the Adobe Reader process in Task Manager.
    If we start Adobe Reader, and then use the Menu to do FIle -> Open, the PDF file opens immediately.
    We have attempted both methods using several different versions of Adobe Reader.    The issue occurs on all versions prior to 9.3.
    Since we are a service organization, we are unable to force our clients to upgrade to a more current version of Adobe Reader without providing assurances that this will correct this issue.
    Has anyone else seen this type of issue with opening PDF files rendered by Reporting Services?   And if so, what is the cause and how did you correct it?
    Thanks
    Steve

    Hi there,
    Please find attached a word document which contains the error that comes up when I try to open the PDF file. This PDF was e-mailed to me from one of the Safety companies that I receive e-mails from on a regular basis. I believe I am running Windows XP and the version of Adobe is Adobe Reader X. I hope this is enough info for you.
    Janice Nadeau
    [signatue deleted by host]

  • Issues with NAS, iPhoto, RAW file format, AEBSn, Leopard

    I think I've isolated it down to a networking stack issue with Leopard, but I was hoping I could get some more thoughts/advice. I don't want to downgrade to Tiger, but I may need to! Either that or host my iPhoto library locally.
    Scenario:
    My iPhoto library was messed up. Some albums were missing and it couldn't seem to find them. Rebuilding my library was giving me errors. So, I decided to start fresh. I created a new library and began importing files. I noticed that my RAW (.CR2) files were showing glitches in them! These were major glitches, like big squares of blue or yellow and distorted pictures. I checked the original pictures, those were fine. I checked the pictures in my new iPhoto library, those files are corrupted! Not the thumbnails, but the files themselves. I opened the file in Photoshop to verify. Yup, busted.
    Attempted Solution:
    I tried downgrading to iPhoto 7.0 from 7.1.1, thinking that that might be the problem. Still having issues with the RAW files. Do I need to downgrade to iPhoto 6? I can't believe that's the answer. Even in iPhoto 7.0, the problem persists.
    Now here's the interesting thing: not all files are broken. Some files work, others don't. Some files are imported without glitches some of the time; reimporting them results in a glitch. That suggests to me that it's a networking problem.
    I'm using 802.11n to an AEBSn2 (gigabit), which has a ReadyNAS NV connected to it by gigabit ethernet. I don't think it's a hardware network thing since everything seemed to work in Tiger.. I think it's a way that Leopard handles the networking stack. Didn't they revise the underlying network stuff for Leopard?
    Help!

    Are you able to switch to 11g? I heard that helps for some people. I haven't tried it yet. Right now, I have about 7500 photos, so I want to copy everything and back it up. Once I get it backed up, I'm going to try other solutions, but it may be a few days before I get anything tested.

  • Issue with BPM-Merging 2 files.

    Hi all,
    I am facing one issue with my development object...it is a BPM scenario in which i am merging 2 files using constant correlation id...JDBC to File scenario...i am using 2 JDBC adapters at source side...the scenario is getting executed without any error and i am getting the output...but the output contain only the data in 1 file...merging is not happening and only one file data is displayed in the output...could someone help me with this issue???am i missing something here??any help will be really appreciated...
    Thanks,
    Lekshmi.

    Hi all,
    As informed in my earlier post the same scenario was working with File adapters at source side.I figured out why it was working earlier.
    Since i have generated the source files for the File adpaters i have added the name space as displayed in the mapping(highlighted in bold letters).
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
       <ns0:Message1>
          <ns1:Test1_MT xmlns:ns1="http://testing.com/Details">
             <row>
             </row>
          </ns1:Test1_MT>
       </ns0:Message1>
       <ns0:Message2>
          <ns1:Test2_MT xmlns:ns1="http://testing.com/Details">
             <row>
                <VIA_NO/>
                <VSL_NM/>
                <ATA_DTTM/>
                <PATA_DTTM/>
                <ADT_INS_DTTM/>
                <ADT_UPD_DTTM/>
             </row>
          </ns1:Test2_MT>
       </ns0:Message2>
    </ns0:Messages>
    But in the case of real time scenario data is pulled from database and the input file is created through JDBC adater i am getting the source message for mapping as :
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
       <ns0:Message1>
          <ns:Test1_MT xmlns:ns="http://testing.com/Details">
             <row>
             </row>
         </ns:Test1_MT>
       </ns0:Message1>
       <ns0:Message2>
         <ns:Test2_MT xmlns:ns="http://testing.com/Details">
             <row>
                <VIA_NO/>
                <VSL_NM/>
                <ATA_DTTM/>
                <PATA_DTTM/>
                <ADT_INS_DTTM/>
                <ADT_UPD_DTTM/>
             </row>
         </ns:Test2_MT>
       </ns0:Message2>
    </ns0:Messages>
    When i tested this message in message mapping it is giving only the first file in the output.
    Any idea how to resolve this one?
    Rgds,
    Lekshmi.

  • Issues with CS5 Illustrator .ai files

    I just recently purchased CS5 Illustrator. After creating the file as an .ai file, I am having an issue with reopening the file. I get an error. Any suggestions?

    Post in the general forum… Your question is at a very small audience here in the scripting forum… Thats all of us… not enough to throw a party…

  • Buffer Issue with streaming 10 MB file

    Hi there,
    Having a bit of a nightmare, essentially I have this code:
      private void streamBinaryData(String urlstr,String format,HttpServletResponse response)
            String ErrorStr = null;
            try{
             if(urlstr==null)           
                 urlstr = "c:\\video\\hoff.flv";
             File f = new File(urlstr);             
             response.setContentType("video/x-flv");
            response.setHeader ("Content-Disposition", "filename=\"hoff.flv\"");
            Long fileSize = Long.valueOf(f.length());
            response.setContentLength(fileSize.intValue());
            InputStream in = new FileInputStream(f);
            ServletOutputStream outs = response.getOutputStream();
            int bit = 0;
            System.out.println("VIDEO STREAMER: start streaming data");
                while ((bit) != -1) {
                    bit = in.read();
                    outs.write(bit);
                in.close();
            System.out.println("STREAMER: Finished streaming data");
            outs.flush();
            outs.close();
            catch(Exception e){
                    System.out.println("DEBUG: "+ e.toString());
      }which works just fine, but as the server that will be using this code essentially just (90%) will be the use of this servlet to stream .flv files I want to make it more productive by buffering all or some of the file in order to stream.
    so essentially I have tried many times and variations around the following sub code:
            InputStream in = new FileInputStream(f);
            ServletOutputStream outs = response.getOutputStream();
            int bit = 0;
            System.out.println("VIDEO STREAMER: start streaming data");
            byte buffer = new byte[fileSize.intValue()];
            outs.write(buffer);
                in.close();
            System.out.println("STREAMER: Finished streaming data");The above pump about 1MB of a 10MB fine, but the hangs and no exception is received, or:
            InputStream in = new FileInputStream(f);
            ServletOutputStream outs = response.getOutputStream();
            System.out.println("VIDEO STREAMER: start streaming data");
            byte buffer = new byte[fileSize.intValue()];
            for(int i=0; i<buffer.length; i++)  {
                 outs.write(buffer);
    outs.write(buffer);
    in.close();
    System.out.println("STREAMER: Finished streaming data");
    which will pump out around 2-6 MB of the file, with both of the code changes above I can see the file being pumped at a much faster rate, but obviously no good as it does not deliver the whole file.
    I know that content length is fine, I have also tried varying the response.setBuffer(int) to larger than 8192 up to fileSize.intValue to allow a buffer to handle the whole file before outputing, all to no avail.
    I have also increased the runtime RAM via '-Xmx64m'.
    I am developing on a windows tomcat (with netbeans) and the production version is unix based.
    Any help that anyone can offer will be greatly appreciated.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Thanks for the reply.
    Hi, yes sorry has missed that (typed the other 2 variations by hand), I have tried buffering part of the file & tried using a BufferedOutputStream.
    Neither worked either.
    so for example, I used (done before, but hell tried again anyway):
            InputStream in = new FileInputStream(f);
            ServletOutputStream outs = response.getOutputStream();
            System.out.println("VIDEO STREAMER: start streaming data");
            BufferedOutputStream bout = new BufferedOutputStream(outs);
            byte [] buffer = new byte[1024];
            int length=0;
            while( (length = in.read(buffer,0,buffer.length)) > 0)  {
                bout.write(buffer,0,length);
            }this actually does worse as I only receive around 500KB.
    Checked the link you provided, useful but the implemented solution is still reading 1 byte at a time, hense far too many reads going on for when the server will be (hopefully) sending out a few files per min..
    essentially it seems like the outputstream (whether raw or bufferedOutputStream) is having issues with pumping data that quickly to it !???!?!?
    or it's not liking raw bytes and only really working with the bout.write(int) method, the best solution so far has been this use when I mentioned above that I would receive between 4-6 odd MB of the file, this was nice and fast, just never complete.

  • Problem with parsing large xml files

    Hello All,
    I am parsing a large xml file of 20MB and I use DocumentBuilder.parse(File). This method works for small xml files with size less than 20MB but the application hangs and doesn't through any error message when parsing 20MB xml files. Please let me know what I have to do at this point ?
    Thanks & Regards,
    Kumar.

    Well... i can't agree.
    If you have such structure:
    <task>
      <task/>
      <task>
         <task>
            <task/>
         </task>
         <task/>
      </task>
    </task>
    ...you may always keep stack of tasks (at startElement push to top, and at endElement pop), so at every leaf of tree you will have all parents of that leaf.
    for such structure:
    <task id="1" parent="0"/>
    <task id="2" parent="1"/>
    <task id="3" parent="1"/>
    <task id="4" parent="2"/>
    <task id="5" parent="3"/>
    ...it will be much faster to go thro document by sax several times to build tree of tasks, than to load all document into memory...

  • Problem with parsing large XML files chunked over HTTP

    I'm trying to isolate a bug that was introduced when upgrading the JRE in use from Java 7u51 to 7u71 without changing any code. The problem appears to be very similar to: Bug ID: JDK-8027359 XML parser returns incorrect parsing results.
    Further investigation showed that it was also introduced in the same versions (7u71) where that fix was applied. Unlike that bug though, my XML is marked as version 1.0. It also appears to be with only large XML files, on the order of 10MB or so.
    The closest I've been able to narrow it down to is the code is using JAXB to unmarshall a stream that the debugger tells me is a org.apache.http.com.EofSensorInputStream / org.apache.http.impl.io.ChunkedInputStream. The exception I get is not consistent, but typically appears to be from chunks being overwritten or shuffled, resulting in letters appearing in attributes that are actually numbers, or like the following where an attribute "testAttribute" gets partially overwritten by the end of a timestamp that was in a different section of the XML.
    javax.xml.bind.UnmarshalException
    - with linked exception:
    [javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,98748]
    Message: Attribute name "testAttribu00Z" associated with an element type "testElement" must be followed by the ' = ' character.]
      at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(UnmarshallerImpl.java:421)
      at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:357)
      at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:334)
    Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,98748]
    Message: Attribute name "testAttribu00Z" associated with an element type "testElement" must be followed by the ' = ' character.
      at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(XMLStreamReaderImpl.java:598)
      at com.sun.xml.internal.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:181)
      at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:355)
      ... 6 more
    Here's some code that seems to reproduce it if you can connect to an XML server that returns a large chunked XML file:
      SchemeRegistry registry = new SchemeRegistry();
      registry.register(
                    new Scheme("http", 80, PlainSocketFactory.getSocketFactory()));
      HttpClient client = new DefaultHttpClient(new BasicClientConnectionManager(registry));
      String url = "http://someUrlReturningAlargeChunkedXML";
      HttpGet method = new HttpGet(url);
      HttpResponse response = client.execute(method);
      InputStream inputStream = response.getEntity().getContent();
      XMLStreamReader responseReader = factory.createXMLStreamReader(inputStream);
      JAXBElement<JaxBObjectOfResponse> wot = unmarshaller.unmarshal(responseReader, JaxBObjectOfResponse.class);
    If you connect using URL.openStream() to the same service there is no error. If I read bytes directly and write to a file, there is no error. The error only happens when I try to unmarshal it, and it's large, and I'm using Java 7u71 (or later). It can be consistently repeated with the jsp webapp that I'm using, but didn't show the error when I used the same code with a Wikipedia dump XML file.
    How can I unmarshal in a different way to avoid this problem? Or, how can I better isolate the bug so it can be posted to the appropriate bug system?

    Apparently, adding the Woodstox XML libraries avoids the bug. Is there anyone who can reproduce this on another system? Was there any changes to the Stax implementation between u67 and u71 that may have introduced a bug like this?
    Edit: When setting the logging level to DEBUG, I once saw the overwritten buffer being logged as if that was what was received (as in the testAttribu00Z example above). I can't repeat that anymore though, and very rarely it does parses with no exception (though it may have still been corrupted). Now the error seems to be consistently on one of the buffer boundaries, as in:
    17:08:09,705 DEBUG wire:63 - << "2000[\r][\n]"
    17:08:09,705 DEBUG wire:77 - << "trend>....OTHER XML...<trend hours=""
    17:08:09,705 DEBUG wire:77 - << "634.0972777777778" datetime="2013-05-21T00:43:48.350Z" t"
    17:08:09,705 DEBUG wire:63 - << "[\r][\n]"
    17:08:09,705 DEBUG wire:63 - << "2000[\r][\n]"
    17:08:09,705 DEBUG wire:77 - << "rend-mode="0">
    Exception in thread "main" java.lang.NumberFormatException: t34.0972777777778
      at com.sun.xml.internal.bind.DatatypeConverterImpl._parseDouble(DatatypeConverterImpl.java:213)
      at mypackage.Trend_JaxbXducedAccessor_hours.parse(TransducedAccessor_field_Double.java:48)
      at com.sun.xml.internal.bind.v2.runtime.unmarshaller.StructureLoader.startElement(StructureLoader.java:194)
      at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(UnmarshallingContext.java:486)
      at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(UnmarshallingContext.java:465)
      at com.sun.xml.internal.bind.v2.runtime.unmarshaller.InterningXmlVisitor.startElement(InterningXmlVisitor.java:60)
      at com.sun.xml.internal.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleStartElement(StAXStreamConnector.java:231)
      at com.sun.xml.internal.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:165)
      at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:355)
      at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:334)
    Or:
    17:19:12,563 DEBUG wire:63 - << "2000[\r][\n]"
    17:19:12,563 DEBUG wire:77 - << ...OTHER XML...<trend index="5"
    17:19:12,563 DEBUG wire:77 - << "" label="N"
    17:19:12,563 DEBUG wire:63 - << "[\r][\n]"
    Exception in thread "main" java.lang.NumberFormatException: Not a number: N
      at com.sun.xml.internal.bind.DatatypeConverterImpl._parseInt(DatatypeConverterImpl.java:106)
      at com.sun.xml.internal.bind.DatatypeConverterImpl._parseShort(DatatypeConverterImpl.java:118)

  • Wss3 Issues with user check in files from within excel or word 2010

    I have got a user reporting that he is experiencing (and it is getting more and more often) that when a file is checked out in excel or word, he then edit it, followed by clicking check in on the File tab within either excel or word. He then gets error see
    image below.
    Just wonder if anyone has seen this before? and where do I start...?
    i have checked the site collection is about 12 GB in size, there are quite a few subsites in the area where this user is working, there are about 150 subsites, 3 levels... our wss3 version is 12.0.0.4621

    Yesterday I just had another user report the similar issue with with office complaining that the file was not checked out therefor upload (check-in) was failed.
    Please see the version and build number of MS Office
    Forgot to say, we are all on the same release and updates for MS Office as well as IE.

  • F110 - Issue with creation of wire file

    Hi Sap gurus,
    May be someone could guide me through this issue.  Iam using the payment program (F110) to pay the vendors. I have Bank 1  and Bank 2 which are used  for wire Payments. The ranking order is 1  for Bank 1 and Bank 2 has ranking order 2.  Business wants to use Bank 2 to pay for International vemdors.The variant in the RFFOM100 uses the house Bank of Bank 2 and its Account ID. When i run the payment program it pays the vendor from Bank 1 and also does not create the wire file as it should. How ever when i chnage the ranking of this Bank 2 to a 1 , it creates the right posting to right account and creates the wire file. What should I do if i had to pay with Bank2 and have the wire file generated? Do I have chnage the rankings all the time, or  is it something iam missing.
    Thanks
    sapsri

    Hi,
    Ranking order is created for the combination of payment method and house bank.
    In your case, create 2 payment methods for wire transfer and assing the different  payment methods to the banks, with ranking order 1 for both.
    Example: PAyment method "W" Ranking order "1" house bank 1000
                   Payment method "T"  Ranking order "1" house bank 1100
    This should resolve your issue

  • Is there an issue with modifying a prototype file with a preinstall script?

    Solaris Packaging content
    I have a prototype file in which I need to move a specific directory to somewhere else other than the BASEDIR.
    I am attempting to do this with a preinstall script by running my prototype file through sed and creating a new prototype file where specific entries that match the various regexp entries in the sed command now have a alternate path assigned to it.
    For example:
    Original prototype file entry:
    d none <directory 1>/lib 0755 root other
    Output prototype from preinstall execution:
    d none <directory 1>/lib=<directory 2>/lib 0755 root other
    However, even though I can go into /var/sadm/pkg/<PKG NAME>/install and execute the preinstall by hand properly, I get the following:
    pkgadd: ERROR: preinstall script did not complete successfully
    Any ideas here? Manually editing the prototype file before pkgmk and pkgtrans is not possible with how my package is being created due to an automated process, however I would really like to leverage the functionality of the prototype file for pkgrm's instead of moving them in a postinstall script and then removing each in a postremove script.

    I don't see any issue in downloading the static copy.  Even if you were allowed to connect to the wsdl directly or add it as a service reference in Visual Studio then you would have to manually update that reference.  In closing, you aren't losing
    any functionality by downloading the static copy.
    Thanks,
    Follow my FIM blog at: http://forefrontidm.wordpress.com/

Maybe you are looking for

  • How do I edit a DVD video in Final Cup Pro

    Hey all, I'm working on a project and I need to take the video on a DVD, bring it in to Final Cut Pro, add titles to it (text) and then output it to be burned back to a DVD. I can't loose any quality either, so it has to look the same as it does on t

  • ¿Is there an app for iPhone similar to Kaspersky (call filter, white/black list and private list?

    I need an app that does for my iphone's privacy something similar to what Kaspersky does for other smartphones: 1) it offers a call filter service, so you can create a white list and a black list of numbers and contacts. You can manage your settings

  • Mac Book Pro as field monitor?

    Would it be possible to use the Mac Book Pro (the new 15" or 17") as a field monitor when shooting with a Sony PMW-EX3? That would be neat to use the screen as a field monitor, then edit on the same machine... Wouldn't that save in not having to have

  • What is the Role of ABAPer in SAPCRM Implementation

    Hi ABAPers, I am working in SAPCRM Implementation Project.What is the Role of the ABAPers in SAPCRM Implementation. Thanks & Regards, Ashok.

  • How to not make a report NOT print hidden fields

    I have a report were i have alot of hidden fields under my real report. My report uses calculations from the hidden fields. My problem is that when i run the report and export it to for example PDF. It generates 4 pages. 3 of them are empty and the f