Truncated data

Hi all,
I am facing a problem with my xml SAX parser.
eg:
<tag1>hello there1</tag1>
<tag2>who am i</tag2>
<tag3>whats yr name</tag3>
my parser seem to trucate the characters read so instead of reading "who am i" in the second element, I got instead "am i". For the rest, the data is correct.
overall my xml file size is 21k, this problem occurs in the middle of the file. Data above and below the problematic element is ok. any idea what's the problem? Thanks.

here's how I implemented the SAX parser. Hope that this will provide a clearer picture.
import javax.xml.parsers.*;
import org.xml.sax.helpers.DefaultHandler;
import org.xml.sax.*;
import java.util.*;
public class MyHandler extends DefaultHandler {
private String currentValue;
private ArrayList list;
public TransactionHandler() {
list = new ArrayList();
public void startElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName,
Attributes atts) throws SAXException {
list.add(new Properties());
public void characters(char buf[], int offset, int len) throws SAXException {
currentValue = new String(buf, offset, len);
public void endElement(java.lang.String namespaceURI,
java.lang.String sName,
java.lang.String qName ) throws SAXException {
Properties p = (Properties) list.get(list.size() - 1);
p.put(qName, currentValue.trim());
public ArrayList getlist() {
return this.list;

Similar Messages

  • Print a report on doc format truncate data

    hi
    I have a report launching with a form in an oracle applications, when I print a report on pdf format looks ok
    but when I print the same report on doc format truncate data on left and right side.
    Can you help me
    thanks

    Hi Herbe
    Reports does not support .doc format. Are you referring .rtf format?
    In any case, you must contact Oracle Support to get the issue resolved.
    Regards
    Sripathy

  • Truncated data value displayed in Answer

    Hi All ,
    When i make a query using a column in BI Answer, i am getting the truncated data.
    It does not display complete text data.
    I am using a XLS as data source. Size of this text data is 500 -600 char. By default it's data type is Varchar and size 255 at physical layer. Even If i increase it's size to 1000 , it shows only 255 characters.
    I also tried to change it's datatype to Longvarchar , but still same problem persists.
    Any idea in this regard? How can i resolve this problem?

    Hi Cosimo,
    Thanks for the reply.
    But i think ,in my case data format option is not required.
    Using Data Format option we can format only the displayed content of that column in
    the report. My problem is little bit different. Each time when i do ad hoc query using the
    column, i get the truncated result. I am not going to create any report using that
    column.
    The issue is due to some data type and it's size. But i am not able to find out any solution of this problem.

  • Ensure truncated date in database column

    Other than using a BEFORE trigger, is there any way to ensure that only the YEAR, MONTH and DAY components ( i.e. truncated date) is stored in a database column? Is there a special datatype which will auto trunc the date? If not what would be the best way to do this other than using a BEFORE trigger?
    Thanks in anticipation

    user4900730 wrote:
    The reason for wanting to always storea truncated date is if a PL/SQL developer does NOT truncate a date IN parameter and in the midst of the code compares it with a date that was truncated the comparison will return FALSE. In an application that deals with dates without the HRS/MINS/SECONDS components and compares these datatypes expecting only the yyyy,mm,dd to be compared it would be prudent to ensure that the database only stores the yyyy,mm,dd components and NOT rely on the PL/SQL developer to remember to truncate the input parameter.
    I wish there was a datatype variation of DATE that guaranteed that it only stored the yyyy,mm,dd.
    I suppose I could create a view that exposes the truncated date column OR use a trigger.
    What are your opinions VIEW or TRIGGER?And once again, this does not require Oracle to do something unusual with the storage of the data - only that you treat it accordingly in your SQL. See http://edstevensdba.wordpress.com/2011/04/07/nls_date_format/

  • Recovery of truncated data

    Hi experts,
    I have truncated one table named "user_activity_detail" by mistake, but now i need of truncated data......
    Plz help me for the same.
    Regards,
    VIKA

    Agreed. I was actually logged in as user 902328 when I posted the question. I would have lost that bet. But to be honest, I still probably would make the bet.
    SQL> create table t1 (n number) ;
    Table created.
    SQL> insert into t1 select object_id from user_objects;
    35 rows created.
    SQL> commit;
    Commit complete.
    SQL> select systimestamp from dual;
    SYSTIMESTAMP
    15-DEC-11 01.47.03.633000 PM -05:00
    SQL> select timestamp_to_scn(systimestamp) from dual;
    TIMESTAMP_TO_SCN(SYSTIMESTAMP)
                          11170807
    SQL> delete from t1;
    35 rows deleted.
    SQL> commit;
    Commit complete.
    SQL>
    SQL> select count(*) from t1 as of scn 11170807;
      COUNT(*)
            35
    SQL> truncate table t1;
    Table truncated.
    SQL> select count(*) from t1 as of scn 11170807;
    select count(*) from t1 as of scn 11170807
    ERROR at line 1:
    ORA-01466: unable to read data - table definition has changed
    SQL>

  • Truncated Data and CLOBs

    When I fetch data I'm trying to access some CLOBs as strings (i.e. when I define them I used SQLT_STR instead of SQLT_CLOB). The problem is that some of CLOBs are over 4000 bytes and 4000 is the size I get from OCI_ATTR_DATA_SIZE. Needless to say some columns get truncated (code 1406).
    Now I can detect the truncated data but I can't seem to find a way to get it. Is there a way?
    I don't want to but I suppose I could write routines to handle CLOB data using OCILobLocator but I haven't yet found a good example. The one example I have shows this:
    OCIDefine* define;
    OCILobLocator* lob;
    OCIDescriptorAlloc(envhp, &lob, OCI_DTYPE_LOB, 0, 0);
    OCIDefineByPos(stmthp, &define, errhp, index, &lob, -1, SQLT_CLOB, ind, len, code, OCI_DEFAULT);
    /* later */
    OCIStmtFetch2(stmthp, errhp, 100, OCI_FETCH_NEXT, OCI_DEFAULT);Now I'm used to passing arrays to OCIDefineByPos() but in this case I only see one OCILobLocator being allocated but 100 rows being fetched. From everything I know this should cause a major problem.
    Am I right? Must you iterate through an array of OCILobLocator and initialize each one before passing it to OCIDefineByPos()?
    For example:
    int i;
    OCILobLocator* lob[100];
    for (i = 0; i < 100; i++)
      OCIDescriptorAlloc(envhp, &lob, OCI_DTYPE_LOB, 0, 0);

    http://www.wireless.att.com/cell-phone-service/specials/iPhoneApps.jsp

  • Truncated date format

    Hi,
    for creating a unique index with a date-column A_DATE I'm using a
    calculated column X_DATE as (trunc(A_DATE)):
    CREATE UNIQUE INDEX UX_A_TABLE
    ON A_TABLE (
    X_DATE
    Using A_DATE in UX_A_TABLE would fail if someone would use sysdate two
    times a day.
    Is there a column-data-type restricted to truncated date format?
    Regards
    Sandeep

    user13100082 wrote:
    Hi,
    for creating a unique index with a date-column A_DATE I'm using a
    calculated column X_DATE as (trunc(A_DATE)):
    CREATE UNIQUE INDEX UX_A_TABLE
    ON A_TABLE (
    X_DATE
    Using A_DATE in UX_A_TABLE would fail if someone would use sysdate two
    times a day.
    Is there a column-data-type restricted to truncated date format?
    Regards
    SandeepAll the data types are documented in the fine SQL Reference manual.
    Of course if you have a DATE datatype, and you limit it to just the date (eliminate time component) and also make it a unique constraint, you could only have one row per day. It sounds like you are looking for some magic data type that gets around this fundamental logic.

  • How to truncate data in a subpartition

    Hi All,
    I am using oracle 11gr2 database.
    I have a table as given below
    CREATE TABLE SCMSA_ESP.PP_DROP
    ESP_MESSAGE_ID VARCHAR2(50 BYTE) NOT NULL ,
    CREATE_DT DATE DEFAULT SYSDATE,
    JOB_LOG_ID NUMBER NOT NULL ,
    MON NUMBER GENERATED ALWAYS AS (TO_CHAR("CREATE_DT",'MM'))
    TABLESPACE SCMSA_ESP_DATA
    PARTITION BY RANGE (JOB_LOG_ID)
    SUBPARTITION BY LIST (MON)
    PARTITION PMINVALUE VALUES LESS THAN (1)
    ( SUBPARTITION PMINVALUE_M1 VALUES ('01') TABLESPACE SCMSA_ESP_DATA,
    SUBPARTITION PMINVALUE_M2 VALUES ('02') TABLESPACE SCMSA_ESP_DATA,
    SUBPARTITION PMINVALUE_M3 VALUES ('03') TABLESPACE SCMSA_ESP_DATA,
    SUBPARTITION PMINVALUE_M4 VALUES ('04') TABLESPACE SCMSA_ESP_DATA,
    SUBPARTITION PMINVALUE_M5 VALUES ('05') TABLESPACE SCMSA_ESP_DATA,
    SUBPARTITION PMINVALUE_M6 VALUES ('06') TABLESPACE SCMSA_ESP_DATA,
    SUBPARTITION PMINVALUE_M7 VALUES ('07') TABLESPACE SCMSA_ESP_DATA,
    SUBPARTITION PMINVALUE_M8 VALUES ('08') TABLESPACE SCMSA_ESP_DATA,
    SUBPARTITION PMINVALUE_M9 VALUES ('09') TABLESPACE SCMSA_ESP_DATA,
    SUBPARTITION PMINVALUE_M10 VALUES ('10') TABLESPACE SCMSA_ESP_DATA,
    SUBPARTITION PMINVALUE_M11 VALUES ('11') TABLESPACE SCMSA_ESP_DATA,
    SUBPARTITION PMINVALUE_M12 VALUES ('12') TABLESPACE SCMSA_ESP_DATA
    PARTITION PMAXVALUE VALUES LESS THAN (MAXVALUE)
    ( SUBPARTITION PMAXVALUE_M1 VALUES ('01') TABLESPACE SCMSA_ESP_DATA,
    SUBPARTITION PMAXVALUE_M2 VALUES ('02') TABLESPACE SCMSA_ESP_DATA,
    SUBPARTITION PMAXVALUE_M3 VALUES ('03') TABLESPACE SCMSA_ESP_DATA,
    SUBPARTITION PMAXVALUE_M4 VALUES ('04') TABLESPACE SCMSA_ESP_DATA,
    SUBPARTITION PMAXVALUE_M5 VALUES ('05') TABLESPACE SCMSA_ESP_DATA,
    SUBPARTITION PMAXVALUE_M6 VALUES ('06') TABLESPACE SCMSA_ESP_DATA,
    SUBPARTITION PMAXVALUE_M7 VALUES ('07') TABLESPACE SCMSA_ESP_DATA,
    SUBPARTITION PMAXVALUE_M8 VALUES ('08') TABLESPACE SCMSA_ESP_DATA,
    SUBPARTITION PMAXVALUE_M9 VALUES ('09') TABLESPACE SCMSA_ESP_DATA,
    SUBPARTITION PMAXVALUE_M10 VALUES ('10') TABLESPACE SCMSA_ESP_DATA,
    SUBPARTITION PMAXVALUE_M11 VALUES ('11') TABLESPACE SCMSA_ESP_DATA,
    SUBPARTITION PMAXVALUE_M12 VALUES ('12') TABLESPACE SCMSA_ESP_DATA
    ENABLE ROW MOVEMENT;
    I have populate two sets of data.
    One with Positive job_log_id and another with Negative job logid as given below.
    Step 1:
    Data going to PMAXVALUE Partition
    INSERT INTO PP_DROP ( ESP_MESSAGE_ID, CREATE_DT,JOB_LOG_ID)
    SELECT LEVEL, SYSDATE+TRUNC(DBMS_RANDOM.VALUE(1,300)), 1 FROM DUAL CONNECT BY LEVEL <=300;
    Step 2:
    Data going to PMINVALUE partition
    INSERT INTO PP_DROP ( ESP_MESSAGE_ID, CREATE_DT,JOB_LOG_ID)
    SELECT LEVEL, SYSDATE+TRUNC(DBMS_RANDOM.VALUE(1,300)), -1 FROM DUAL CONNECT BY LEVEL <=300;
    Now the question is how to truncate the data that is present only in the Positive partitions subpartition
    Like in the PMAXVALUE partition I have 10 subpartitions and I need to truncate the data in the JAN MONTH Partition only of the PMAXVALUE partition.
    Appreciate your valuable response.
    Thanks,
    MK.

    For future reference:
    http://www.morganslibrary.org/reference/truncate.html
    The library index is located at
    http://www.morganslibrary.org/library.html

  • Truncating data in prepared statement

    I'm using a prepared statement to pull data out of one SQL database into a recordSet, and another prepared statement to take the data from the recordSet and insert the data into another SQL database. In the source database, the lastname and firstname fields are both defined as char(25) and the phone field is defined as char(24). In the receiving database, the lastname and firstname fields are each defined as nvarchar(100) and the phone field is defined as nvarchar(50).
    The program will only run successfully if I trim the data in each field to the first 16 characters. Any time it hits a field with more than 16 characters, it throws a SQL Error: String data, right truncation.
    The setObject statements are:
    update.setObject(1,lastname,java.sql.Types.VARCHAR);
    update.setObject(2,firstname,java.sql.Types.VARCHAR);
    update.setObject(3,phone1,java.sql.Types.VARCHAR);
    int rowCount = update.executeUpdate();
    Why can't I push the entire 25-character name fields into the 100-character name fields? And the 24-character phone field into the 50-character phone field?

    mrw127 wrote:
    sun.jdbc.odbc.JdbcOdbcDriver
    I don't know how to tell which version it is.
    It would revert to the ODBC driver version then rather than anything in java.
    I spent a couple hours trying to use com.microsoft.sqlserver.jdbc.SQLServerDriver that I downloaded on Monday but could not get it to work. I even put both .jars in the c:\temp dir, updated my classpath, even rebooted after making the changes, but it could not find the driver. Reverted back to the JdbcOdbcDriver.The current MS driver seems to work adequately and so does the jTDS driver from soucreforge. I would suspect both would support nvarchar correctly.

  • SQL Developer Database Copy truncates DATE columns

    Hope someone can help me. I want to copy all object from one schema to another schema in my Database. I have used the "tools - Database Copy" utility and it copies all of the objects and data however when I query the DATE columns in the destination schema the time element has been truncated? Why has this happened?
    tab_h contains a column h_date of type DATE
    Query
    SELECT TO_CHAR(H_DATE, 'MM-DD-YYYY HH24:MI:SS') from tab_h;
    returns
    02-07-2012 09:54:14
    from the source table
    yet returns
    02-07-2012 00:00:00
    from destination schema? This is the case for all DATE columns in the tables.
    I noticed this was happening in 3.0.04.34 and I upgraded to 3.1.07.42 and it still happens.
    Thank you

    Maybe there's a problem getting the OS settings right; try to add this to \sqldeveloper\bin\sqldeveloper.conf:
    AddVMOption -Duser.region=USIf that works, you can try others closer to you.
    Hope that helps,
    K.

  • Truncate data in replication

    Hi,
    I have a problem with functions removeDatabase and truncateClass, now I want to clear all data in a database with a small cost and I found these two APIs can meet my needs, but it awalys give me com.sleepycat.je.rep.DatabasePreemptedException when a request comes to replicated node, the master node works fine. Below is my code:
    trans = env.beginTransaction(null, null);
                   closeDatabase(); //Close database and entity store
                   env.removeDatabase(trans,
                             "persist#EntityStore#xxx.BdbMember#mobile");
                   env.removeDatabase(trans,
                             "persist#EntityStore#xxx.BdbMember");
                   env.removeDatabase(trans,
                             "persist#EntityStore#xxx.Card#businessNo");
                   env.removeDatabase(trans,
                             "persist#EntityStore#xxx.Card");
                   env.removeDatabase(trans,
                             "persist#EntityStore#xxx.PointFreeze");
                   env.removeDatabase(trans,
                             "persist#EntityStore#xxx.RedMemberBlockPeriod");
    reOpenDatabase("persist#EntityStore#xxx.BdbMember");
                   reOpenDatabase("persist#EntityStore#xxx.Card");
                   reOpenDatabase("persist#EntityStore#xxx.PointFreeze");
                   reOpenDatabase("persist#EntityStore#xxx.RedMemberBlockPeriod");               
                   trans.commit();
    private Database reOpenDatabase(String dbName) throws Exception {
              Transaction trans = null;
              Database db = null;
              try {
                   trans = env.beginTransaction(null, null);
                   DatabaseConfig dc = new DatabaseConfig();
                   dc.setTransactional(true);
                   dc.setAllowCreate(true);
                   db = env.openDatabase(trans, dbName, dc);
                   trans.commit();
              } catch (Exception e) {
                   if (trans != null) {
                        trans.abort();
                   throw e;
              return db;
    Please do help me!
    Thanks

    You are using Berkeley DB, Java Edition, High Availability, which is a different product from Berkeley DB, (C version). That's why we suggested that you move your question to the Berkeley DB, Java Edition forum. I know that the product names are confusing.
    Please read the javadoc for DatabasePreemptedException at http://download.oracle.com/docs/cd/E17277_02/html/java/com/sleepycat/je/rep/DatabasePreemptedException.html. There you will find out that this happens when a database has been truncated, renamed, or deleted on the master. You will get this exception on the replica node. It tells you that the database has had a major change, and you must close and reopen your cursors, database and environment handles. Please read the javadoc for more details.

  • Truncating Data Output in SMARTFORM main window

    Hi,
    I have a requirement that i will only show 5 lines from a certain table in my smartforms, currently its required to be in the main table because of spacing issue and the possibility that there will be no data from the table.
    My problem is that even though my my table only contains 5 lines..it can/will display 6 or more lines because if the data does not fit the form in 1 page the smartform default will put it in the next line...
    for example in my table:
    1 ABCDE
    2 WWWWWWWWWWWWWWWWWWWWWWWW
    3 QWERTYUP
    4 ASDFG
    5 AQSWDEFR
    display:
    ABCDE
    WWWWWWWWWWWW
    WWWWWWWWWWWW
    QWERTYUP
    ASDFG
    AQSWDEFR -
    > this should have been truncated
    How will I know that i'm using 6 lines already.... or how can i use the width of my main window to know when to truncate the data

    Thanks Karthik D,
    Ive used that approach, i count the maximum number of char in my line using largest letter 'W' (its 85), so i create an internal table with 85 char each row, the problem that exist is that they said that i didnt maximize the whole space the window can handle.
    because when i display all W:
    WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
    WWWWWWWWWWWWWWWWWWWWWWW
    - it will use all spaces in 1st line before creating next
    but when i use letters like I:
    IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
    IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
    - it will have another line without maximizing the space in the 1st line...
    *could there be a possible FM that will determine the width i will cover using font style/ number of char....
    Thanks..
    Edited by: Alvin Rosales on Jun 1, 2009 10:22 AM

  • SS truncates data from DB

    I'm using Appleworks 6 to figure taxes. Have inputted the info on my DB, and now I'm trying to convert it to a SS, as I've always done. My tax DB has 47 fields and 1014 records. When I try to paste the figures into a SS, it truncates the data and does not create as many fields and records as I need. Can I expand the amount of fields and records beyond the template of the SS? Thanks...
    Tom Fuller in Texas
    <Edited by Moderator>

    Can I expand the amount of fields and records beyond the template of the SS?
    Sure. Open a new spreadsheet window. From the Format menu, choose "Document". In the resulting dialog, enter the number of rows that equal or exceed the number of records in your database. Adjust the number of columns to equal or exceed the number of fields in your database.
    Close the dialog and drag the icon of your database file into the open spreadsheet window to populate it with your data.

  • Adding '...' to list truncated data

    hi,
    i was hoping that someone could help me find a way to add a '...' to data displayed in a list when the data is truncated due to size width restrictions in the list.
    thanks

    It is already the case with spark List. Are you using a mx.List or a spark.List?

  • Truncated Data Error when loading saved waveforms

    After  I save a waveform using the "Write Waveforms to File" VI (e.g. I save it as wave.lvm), I have tried to load it using the "Read Waveform from File" VI. I always get an error about truncated or unflattened data (error 116). Any suggestions?
    Solved!
    Go to Solution.

    Hello boomchild06,
    After having a detailed look around the various databases that we use,
    I've found out that this is a known issue with LabVIEW 8.0.
    A workaround has been proposed as the following:
    1. Place the Read Waveform from File.vi on the block diagram and double-click it to open it.
    2. Go to the block diagram and double-click on the Open Create Replace WDT DLog File.vi and view the block diagram.
    3.
    Navigate through the case structures until you see the Deny Access
    function. I would suggest saving this VI as something different from
    this point on, so that you do not change the VIs in the vi.lib folder.
    4.
    Once you have resaved it with a different name, and I would suggest in
    a different location, follow the output of the error cluster to the
    case structure that it is wired to. I would navigate to the False case,
    and then right-click on the border to remove this case.
    5. Once
    that is done, you can remove the entire case structure. I might
    recommend doing it this way to avoid a lot of painful rewiring.
    6.
    Once you have this removed you can remove any additional broken wires,
    the unbundle function and the Equals Zero function. You can either
    chose to remove the Deny Access function, to prevent error pop-ups.
    Alternatively,
    the fix has been implemented in the LabVIEW 8.0.1 update which is a
    free patch that can be installed. If you want to go ahead and install
    this, it can be downloaded from:
    http://digital.ni.com/Softlib.nsf/webPreview/4C1209D42320BCFD8625711C005FB25B?OpenDocument
    I hope this helps. 
    Vivek Nath
    National Instruments
    Applications Engineer
    Machine Vision

  • Query Return Truncated Data Please Help

    when i insert data into a Table having fields dbnote_no(number),
    narration(varchar2 1000),etc.. the data get inserted properly but when i view it after few days the data in the narration field get truncated to 100 characters if have changed the linsize in login script to 1000 in server and also in globin script.

    You might want to set the buffer width.
    In sqlplus, go to the options/environment menu and specify 1000 for buffer width

Maybe you are looking for

  • Sample source code for fields mapping in expert routine

    Hi All Iam writing the expert routine from dso to cube for example I have two fields in dso FLD1,FLD2 same fields in infocube also ,can any body provide me sample abap code to map source fields to target fields in expert routine,your help will be hei

  • Why is IChat so hard to get to work?

    I am again having the infamous #8 error and cannot get IChat to work while traveling. Based on the posts here and throughout the net, I am not alone. It is unreliable and problematic and very un-Mac like. I downloaded Skype and can use it every time

  • Quicksilver doesn't wake up after sleep

    Recently (over the past month or so) my Quicksilver G4/733 has developed a problem where it sometimes (about 20% of the time) will not wake up after going to sleep. Tapping on the keyboard to wake up, for example, results in no reaction from the comp

  • Non-ASCII chars in applets?

    hi, Spent 4 hours to find a way to use non-ASCII chars in applets (buttons, textareas), but didn't make it. Simply saying TextFieldObj.setText("\uxxxx"); //or any equivalent obj. Ex. of \uxxxx: \u015F doesn't work. I even went into Graphics.paint() e

  • Suite 3.4.49 and music library

    Hi, moved to v. 3.4.49. After that Suite doesn't find any music added in my 5230 before this update; if I add something after update no probs.