Losing data, Oracle eWay in JCAPS 5.1.2

Hi group,
I have implementet an integration that fetches data from an Oracle db and writes it to a csv-file.
After the first test-run of the integration, one day, I checked the generated files and reconized that there is data missing in some of them. Over a periode of approx 10 houres all files had missing data for the samme single row. The strange thing is that only the last halv of the row is missing. The remaining files are all complete.
The integration uses Oracle eWay in JCAPS 5.1.2. I created the OTD using a prepared statement.
I wonder if I am doing something wrong when fetching data from the ResultSetAgent? As, when I fire the sql directly in the database, I am not possible to reproduce this error situation.
Thanks
Andreas
    private String getPatientList( LogUtil lu, psNOHplusPsyk.PsNOHplusPsykOTD oracleMPD )
        throws Exception
        if (logger.isInfoEnabled()) {
            lu.beforeService( "getPatientList" );
        int counter = 0;
        com.stc.connector.appconn.db.ResultSetAgent resultSetAgent = null;
        java.io.StringWriter writer = null;
        try {
            writer = new java.io.StringWriter( bufferSize );
            resultSetAgent = oracleMPD.getPmpd_noh_plus_psyk().executeQuery();
            resultSetAgent.setFetchSize( fetchSize );
            writer.write( headerLine );
            while (resultSetAgent.next()) {
                cprNummer = resultSetAgent.getString( "cpr" );
                fornavn = resultSetAgent.getString( "fornavn" );
                efternavn = resultSetAgent.getString( "efternavn" );
                kontaktStart = resultSetAgent.getString( "kontakt_start" );
                kontaktStartTid = resultSetAgent.getString( "kontakt_start_tid" );
                afsnitKode = resultSetAgent.getString( "afsnitskode" );
                afsnitMnemokode = resultSetAgent.getString( "afsnitmnemokode" );
                afsnitNavn = resultSetAgent.getString( "afsnitsnavn" );
                writer.write( cprNummer.trim() + ";" );
                writer.write( fornavn.trim() + " " + efternavn.trim() + ";" );
                writer.write( kontaktStart.trim() + ";" );
                writer.write( kontaktStartTid.trim() + ";" );
                writer.write( afsnitKode.trim() + ";" );
                writer.write( afsnitMnemokode.trim() + ";" );
                writer.write( afsnitNavn.trim() + endOfLine );
                counter++;
                cprNummer = null;
                fornavn = null;
                efternavn = null;
                kontaktStart = null;
                kontaktStartTid = null;
                afsnitKode = null;
                afsnitMnemokode = null;
                afsnitNavn = null;
            writer.flush();
            String patientList = writer.toString();
            return patientList;
        } catch ( java.sql.SQLException e ) {
            logger.error( lu.system( e.getMessage() ) );
            throw e;
        } finally {
            if (null != writer) {
                writer.close();
            if (logger.isInfoEnabled()) {
                String execTime = lu.afterService( "getPatientList" );
                logger.info( lu.system( execTime + " Patients found [" + counter + "]" ) );
    }

Can u try to remove fetchsize and see if your issue is resoved?
Subhash

Similar Messages

  • Using Hibernate Functionality and pass it on to the JCAPS Oracle eWay

    Hi All,
    I need to use the Existing Hibernate API's and pass it on to the JCAPS oracle eWay to persist the Data.
    As the present Application is using the Hibernate for persisting the Data as we have parent child relation with multiple tables , so we need to push the whole thing in to JCAPS.
    Thanks & regards
    Srikanth

    narayanaa wrote:
    Hi,
    You cannot use hibernate using oracle or any other database eWays. If you want to leverage the same or the existing code you have for the Data Access you use JCD.
    So what you can do is have the required jars available for the application and then use the available classes with in the JCD.
    Thanks,
    NarayanaaI don't think that is secesarily true. You can use oracle eWay to handle the database connection, pooling and XA transactions. You just retrieve the java.sql.Connection object from the eWay and use that in you hibernate code.
    -Mario

  • How to reset without losing data?

    LS,
    Is there a way to reset my iPhone (through itunes or other) that will prevent me from losing data? 
    Situation:
    I have an iPhone 3G with ios4. Saturday night my phone acted weird, it would lock the screen every few seconds without me promting it (automatic screen lock is off).
    To reset the phone I pressed the home button and the on/off button simultamiously. Instead of simply resetting it stuck on the Aplle logo.
    Trying to get it going again, it went out.
    Since than whenever I try to switch the phone on, it asks for a reset through iTunes (picture of usb + itunes in screen).
    Since I have not been able to synchronise the phone for a few weeks, I was wondering if there is a workaround to prevend loss of data (for instance the recent photo's).
    I sincerely hope there is a workaround.
    Cheers

    Well, if you have a backup, that will save your text messages, settings, camera roll etc.
    Not the music, photos, videos, contact etc.
    So there is a way to restore without losing most of the important information. Since the music, videos and others are theoetically on your Mac/PC.

  • How to use the update function using oracle eway

    Hi All,
    I have to update one column in the table i.e table1 using the oracle eway otd for which I have written the code like below.
    otdRISKBLOCKVALUES.getRISKBLOCKVALUES().setBALANCE_AMOUNT( bd );
    otdRISKBLOCKVALUES.getRISKBLOCKVALUES().update( sUpdate );
    As show above Iam setting the value to the setbalance_amount method and later calling the update method passing the where condition through the string sUpdate.
    But Iam getting an error as shown below.
    [#|2008-03-12T12:04:42.389+0530|SEVERE|IS5.1.3|STC.eWay.DB.Oracle.com.stc.connector.oracleadapter.base.ResultSetAgentImpl|_ThreadID=17; ThreadName=Worker: 5; Context=project=prjDataXform,deployment=dpDataXform,collab=svcRisk,external=eaFileIn;|updateBigDecimal() failed - No current row|#]
    [#|2008-03-12T12:04:42.389+0530|SEVERE|IS5.1.3|STC.eWay.DB.Oracle.com.stc.connector.oracleadapter.OracleSession|_ThreadID=17; ThreadName=Worker: 5; Context=project=prjDataXform,deployment=dpDataXform,collab=svcRisk,external=eaFileIn;|ErrorCode=17082, SQLState=null, Message=No current row|#]
    could any one Pl.thow some input on this.
    Thanks & regards in Advance
    Srikanth

    Hi,
    You need to specify the row you want to update first.
    The following code is taken from an example in the Oracle eway user guide:
    otdOracle_1.getDb_employee().update( "WHERECLAUSE" );
    while (otdOracle_1.getDb_employee().next()) {
       otdOracle_1.getDb_employee().setLAST_NAME( "Krishna" );
       otdOracle_1.getDb_employee().setFIRST_NAME( "Kishore" );
       otdOracle_1.getDb_employee().updateRow();
    }Replace WHERECLAUSE with the desired condition.
    Hope it helps
    Gustavo

  • HT204053 I have one icloud id on my mac and want to share with an ipad with a different icloud id.  if I create a new id for both of us will this work?  My concern is losing data on either device.

    I have one icloud id on my mac and want to share photos, calendars, etc with an ipad with a different icloud id.  if I create a new id for both of us will this work?  My concern is losing data on either device. (the mac book pro is new, but has all of the retrieved data from my previous mac book pro)

    You will lose data from whichever was the 2nd to last to sync .
    Don't do it.

  • Is it possible to resize the partitions without losing data?

    I have following issue:
    I have dual-boot Arch with Windows XP. I created 4 partitions: 40GB XP's system disk (ntfs), 80GB ntfs data disk, 1GB swap and 25GB Linux partition.
    But I am running XP so rarely, that it is frustrating, that I have most of my data on ntfs partition... I'd like to wipe out that 80GB ntfs, resize the system ntfs partition up to for example 60GB, and add the remaining 60GB to my linux ext3 partition (because I'm running out of free space recently...).
    Has anyone done something like this, and how safe it is (if possible at all)
    Yes, I have read this: http://wiki.archlinux.org/index.php/Res … _partition, and a few more.
    I just don't have time to reinstall both systems (especially I would not like to install Windows, because I'd rather install Vista from my recovery disk, than hack the XP to work again...), and if some issues are likely to appear, then I'll give it up for now .

    It's trivial using gparted, but as with any similar operation, you run the risk of losing data - so you'd better backup.

  • Bought a new macbook air because my old computer is formatted. I want to sync my iphone to my new mac, so I can save the data on my iphone without losing data. how can I do?

    bought a new macbook air because my old computer is formatted. I want to sync my iphone to my new mac, so I can save the data on my iphone without losing data. how can I do?

    You need to copy everything form your old computer, or your backup copy of your old computer to your new one.
    The iphone is not a storage/backup device.  it simply mirrors the selected content of the computer to which it is synced.

  • Generic oracle eway code generation error in Java caps 5.1.3

    Hi,
    I'm using an oracle eway for adding records to a table. I have a prepared statement in the otd. When I try to build the project I'm getting the following error. Could any one let me know how this problem can be fixed?
    com.stc.codegen.framework.model.CodeGenException: Generic Oracle eway code generation error(ERROR_CODEGEN_GENERIC_CODELET_GENERAL)
         at com.stc.oracle.codegen.OracleEWayCodeletFactory$OracleEWayCodelet.generateFiles(OracleEWayCodeletFactory.java:1860)
         at com.stc.codegen.frameworkImpl.model.CodeGenFrameworkImpl.processCodelets(CodeGenFrameworkImpl.java:640)
         at com.stc.codegen.frameworkImpl.model.CodeGenFrameworkImpl.process(CodeGenFrameworkImpl.java:1544)
         at com.stc.codegen.frameworkImpl.model.DeploymentVisitorImpl.process(DeploymentVisitorImpl.java:405)
         at com.stc.codegen.frameworkImpl.model.DeploymentVisitorImpl.process(DeploymentVisitorImpl.java:308)
         at com.stc.codegen.frameworkImpl.model.DeploymentVisitorImpl.traverseDeployment(DeploymentVisitorImpl.java:268)
         at com.stc.codegen.driver.module.DeploymentBuildAction.loadCodeGen(DeploymentBuildAction.java:923)
         at com.stc.codegen.driver.module.DeploymentBuildAction.access$1000(DeploymentBuildAction.java:174)
         at com.stc.codegen.driver.module.DeploymentBuildAction$1.run(DeploymentBuildAction.java:599)
         at org.openide.util.Task.run(Task.java:136)
         at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:599)
    Caused by: com.stc.codegen.framework.model.CodeGenException: Exception when generating OTD code ...Exception: javaClass: Oracle_std_otdOTD: Exception when invoke DB Codegen Task...Exception: Invalid parameter type: Class : [Std_insert_PreapredStat] Object: [Param1] Param Type : [DECIMAL].(ERROR_CODEGEN_DB)(ERROR_CREATE_OTD)
         at com.stc.oracle.codegen.OracleEWayCodeletFactory$OracleEWayCodelet.generateOtdJarFile(OracleEWayCodeletFactory.java:2045)
         at com.stc.oracle.codegen.OracleEWayCodeletFactory$OracleEWayCodelet.generateFiles(OracleEWayCodeletFactory.java:1756)
         ... 10 more
    Regards,
    Abdul

    hi...
    i too getting same problem..how did u reslove this...
    please help me out...
    thanks in advance
    KK

  • How can i compare:  java.util.Date oracle.jbo.domain.Date?

    I have made a ViewObject wich contains a date column.
    I want to check if this date is smaller/greater than sysdate:
    i get following error:
    Error(45,24): method <(java.util.Date, oracle.jbo.domain.Date) not found in class Class4
    code:
    SimpleTimeZone pdt = new SimpleTimeZone(-8 * 60 * 60 * 1000, ids[0]);
    // set up rules for daylight savings time
    pdt.setStartRule(Calendar.APRIL, 1, Calendar.SUNDAY, 2 * 60 * 60 * 1000);
    pdt.setEndRule(Calendar.OCTOBER, -1, Calendar.SUNDAY, 2 * 60 * 60 * 1000);
    // create a GregorianCalendar with the Pacific Daylight time zone
    // and the current date and time
    Calendar calendar = new GregorianCalendar(pdt);
    Date trialTime = new Date();
    calendar.setTime(trialTime);
    (VO_ULNRow)singleRow = null;
    while(vo.hasNext()){                                             // ViewObject vo;
    singleRow = (VO_ULNRow)vo.next();
    if(calendar.getTime() < singleRow.getEO_ULN_BORROWFROM()); //singleRow returns oracle.jbo.domain.Date
    etcetera
    how can i compare those 2?

    Hi,
    oracle.jbo.domain.Date has two methods which suit your needs
    longValue() which returns a long (though I'm not sure if returns a long comparable to the long returned by java.util.Date)
    and dateValue() which returns a java.util.Date
    I hope it helps,
    Giovanni

  • Java.util.Date oracle.jbo.domain.Date how can i compare?

    I have made a ViewObject wich contains a date column.
    I want to check if this date is smaller/greater than sysdate:
    i get following error:
    Error(45,24): method <(java.util.Date, oracle.jbo.domain.Date) not found in class Class4
    code:
    SimpleTimeZone pdt = new SimpleTimeZone(-8 * 60 * 60 * 1000, ids[0]);
    // set up rules for daylight savings time
    pdt.setStartRule(Calendar.APRIL, 1, Calendar.SUNDAY, 2 * 60 * 60 * 1000);
    pdt.setEndRule(Calendar.OCTOBER, -1, Calendar.SUNDAY, 2 * 60 * 60 * 1000);
    // create a GregorianCalendar with the Pacific Daylight time zone
    // and the current date and time
    Calendar calendar = new GregorianCalendar(pdt);
    Date trialTime = new Date();
    calendar.setTime(trialTime);
    (VO_ULNRow)singleRow = null;
    while(vo.hasNext()){ // ViewObject vo;
    singleRow = (VO_ULNRow)vo.next();
    if(calendar.getTime() < singleRow.getEO_ULN_BORROWFROM()); //singleRow returns oracle.jbo.domain.Date
    etcetera
    how can i compare those 2?

    i get following error:
    Error(45,24): method <(java.util.Date,
    oracle.jbo.domain.Date) not found in class Class4
    if(calendar.getTime() <
    singleRow.getEO_ULN_BORROWFROM()); //singleRow returns
    oracle.jbo.domain.Date
    how can i compare those 2? You cannot compare these two values directly. You must convert the oracle.jbo.domain.Date object to a GregorianCalendar object. Something like:
      oracle.jbo.domain.Date dt = singleRow.getEO_ULN_BORROWFROM();
      GregorianCalendar gc = new GregorianCalendar(dt.getYear(), dt.getMonth(), dt.getDay());
      if (calendar.getTime() < gc.getTime())
      }

  • Big bug in NW-PI-731, JDBC-adapter losing data

    Hi,
    we recognized a big bug in NW-PI-731 SPS07, processing data with JDBC_xxxx_SENDER, sometimes it occurs, that for example, from 13974 documents should be processed, but only a part of 13137 documents are processed successfully, but 837 documents are missing in the target system,
    In message-monitoring, PI displays all documents as processed successfully, but that is obviously wrong,
    so PI is sometimes losing data - this behaviour we did not have had in NW-PI-700-SPS18
    after upgrading to PI-731, we have big trouble with data processing.
    did other SAP-customers noticed the same behaviour?

    Hi
    You can count the total number message processed in PI from message monitoring in RWB.
    If you see that the number is 13137, then there is a problem while reading the data from database
    using JDBC sender adapter.
    Since the number of records are high, you can try to restrict the number of records using rownum in
    database select query.
    Check this
    PI 7.1 JDBC sender adapter huge load from DB se... | SCN
    PI JDBC Sender adapter - Some Learnings

  • How to view windows Xp formatted hard drive with Macbook pro without losing data

    How to view Windows Xp programed Hard drive with Macbook pro with out losing data on hardrive

    Go to the First Aid tab in Disk Utility, select the external drive partition and read the format from the lower left, at the bottom.

  • PLEASE READ REGARDING iPod losing data

    I have bought my 5th generation iPod and have not done anything to it that will cause to malfunction in anyway. But im getting annoyed that a lot of times i connect by black video iPod into my Windows Xp computer. Then iTunes pops out. I click on the iPod on the left and its WHITE!? Then i check how much space its used and it says 1.5 g data used? I normally have around 6.3 g.
    I just lost all my videos and photos but i still have the songs for some reason. Then i always have to keep updating it cause everytime i connect i keep losing data.
    Basically, when i connect my iPod a lot of stuff gets erased and i have to keep updating it.

    well umm of course it appears WHITE because it cant detect that your ipod is black and it sounds like you reset it or deleted your videos on your computer and lost them in the ipod last time you connected
    dell   Windows XP  

  • What is the proper way to convert a VHD from dynamic to basic without losing data?

    Hi,
    What is the proper way to convert a VHD from dynamic to basic without losing data?
    Our VM is running Windows Server 2008 R2 SP1
    Thanks in advanced

    Hi efebo,
    "After you convert a basic disk to a dynamic disk, you cannot change the dynamic volumes back to partitions. Instead, you must delete all dynamic volumes on the disk and then use the
    Convert To Basic Disk command. If you want to keep your data, you must first back it up or move it to another volume. "
    Please refer to following link:
    http://technet.microsoft.com/en-us/library/cc731274.aspx
    You can try to backup the dynamic volume via Windows Server Backup then restore it to a new basic VHD file ( the space is recommended to be   larger than or equal to the old one ) .
    Hope it helps
    Best Regards
    Elton Ji
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Downloaded songs losing data..

    I have numerous previously downloaded songs that appear to be, losing data.   I'm listening to incomplete songs and it's driving me nuts...

    Yes, they were checked and selected to sync.. all purchased with the same appleid and I never received any error messages.. funny as it is though, after rwading some threads I saw one person mention that they played a few seconds of each song then synced again and it worked.. so I tried it and now all my purchases show up in my playlist on the iphone itself. Weird... but hey whatever works. Thanks SO much for responding though, I was definitely more than a little upset lol

Maybe you are looking for