XMLType setNull(nnn, Types.NULL) doesn't work in a ps.executeBatch()

All,
Sorry below was originally posted in another OTN forum ( XMLType setNull(nnn, Types.NULL) doesn't work in a ps.batchUpdate() ) and I feel that it maybe more relevant here, so if you have already read it... my apologies:
A little background: Java version 1.5.0.08 on Solaris 10 with Oracle 10g R2. The XMLDB is using the Object Relational setup with a large XSD being shredded, the schema in question has three XMLType columns two of which are nullable, but all reference the same XSD. Everything i reference below will be in Java code that compiles(all of the time) and runs (most of time depending on which code is implemented). To my knowledge no patches were applied to the DB server when it suddenly stopped working.
Until recently the setNull (using java.sql.Types.NULL for the data type) was working in a batch update (ps.updateBatch()) . Now we get the following stack trace:
java.lang.NullPointerException
at oracle.jdbc.driver.T4CTTIoac.init(T4CTTIoac.java:354)
at oracle.jdbc.driver.T4C8Oall.initBindsDefinition(T4C8Oall.java:1217)
at oracle.jdbc.driver.T4C8Oall.marshal(T4C8Oall.java:372)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:202)
at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:955)
at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:10620)
Interestingly enough we can execute the same code but only changing the executeBatch to be ps.executeUpdate(). I know that executeBatch() works as we have other tables being inserted into using XMLTypes with no problem, however none of the columns are nullable. I'm not sure if this is a configuration issue that has been introduced while trying to increase/tweak insert performance (on the DB server), or if something else altogether. Does anyone have any insight into this?
Regards,
Stefan

Does something like this help
     while (resultSet.next())
        xml = (XMLType) resultSet.getObject(1);
        Reader reader = new InputStreamReader(xml.getInputStream());
        FileOutputStream fos = new FileOutputStream("c:\\temp\\output.xml");
        Writer writer = new OutputStreamWriter(fos);
        int n;
        char[] buffer = new char[CLOB.MAX_CHUNK_SIZE];
        while (-1 != (n = reader.read(buffer)))
          writer.write(buffer,0,n);
        writer.flush();
        fos.close();
        xml.close();
       resultSet.close();
       statement.close();
       getConnection().close();
      

Similar Messages

  • XMLType setNull(nnn, Types.NULL) doesn't work in a ps.batchUpdate()

    All,
    A little background: Java version 1.5.0.08 on Solaris 10 with Oracle 10g R2. The XMLDB is using the Object Relational setup with a large XSD being shredded, the schema in question has three XMLType columns two of which are nullable, but all reference the same XSD. Everything i reference below will be in Java code that compiles(all of the time) and runs (most of time depending on which code is implemented). To my knowledge no patches were applied to the DB server when it suddenly stopped working.
    Until recently the setNull (using java.sql.Types.NULL for the data type) was working in a batch update (ps.updateBatch()) . Now we get the following stack trace:
    java.lang.NullPointerException
    at oracle.jdbc.driver.T4CTTIoac.init(T4CTTIoac.java:354)
    at oracle.jdbc.driver.T4C8Oall.initBindsDefinition(T4C8Oall.java:1217)
    at oracle.jdbc.driver.T4C8Oall.marshal(T4C8Oall.java:372)
    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:202)
    at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:955)
    at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:10620)
    Interestingly enough we can execute the same code but only changing the executeBatch to be ps.executeUpdate(). I know that executeBatch() works as we have other tables being inserted into using XMLTypes with no problem, however none of the columns are nullable. I'm not sure if this is a configuration issue that has been introduced while trying to increase/tweak insert performance (on the DB server), or if something else altogether. Does anyone have any insight into this?
    Regards,
    Stefan

    Does something like this help
         while (resultSet.next())
            xml = (XMLType) resultSet.getObject(1);
            Reader reader = new InputStreamReader(xml.getInputStream());
            FileOutputStream fos = new FileOutputStream("c:\\temp\\output.xml");
            Writer writer = new OutputStreamWriter(fos);
            int n;
            char[] buffer = new char[CLOB.MAX_CHUNK_SIZE];
            while (-1 != (n = reader.read(buffer)))
              writer.write(buffer,0,n);
            writer.flush();
            fos.close();
            xml.close();
           resultSet.close();
           statement.close();
           getConnection().close();
          

  • Odd scenario where type inference doesn't work

    I've come across an odd scenario where type inference doesn't work and instead I'm greeted with a message:
    incompatible types
    found : java.lang.Object
    required: java.util.Set
    Here's the scenario (built with JDK6, javac):
    public class GenericTest {
         public static void test() {
              Set testList = GenericTest.method1(new Class[] { ArrayList.class });
         public static <I> I method1(Class<List>[] params) {
              return null;
    }Yet when I remove the type information from the method1 params, the class builds.
    public class GenericTest {
         public static void test() {
              Set testList = GenericTest.method1(new Class[] { ArrayList.class });
         public static <I> I method1(Class[] params) {
              return null;
    }Why would removing the type information from the parameter have any effect whatsoever on the return type?

    ilmaestro wrote:
    Though casting the parameter as you mentioned resolves the error (because it eliminates the generic), it still doesn't explain why changes to the parameter effect an error message having to do with the return type.It is due the call to the method with the "erased" type Class[] (not a Class<?>[], for example) and a return type resolution. Unchecked conversion (from the raw type to the parametrized type) is applied to the method argument and the return type of the method is determined as an erasure of the declared return type (JLS 3rd edition, [Method Result and Throws Types|http://java.sun.com/docs/books/jls/third_edition/html/expressions.html#15.12.2.6], first bullet, second sub-bullet). Erasure of the return type is a java.lang.Object, which is incompatible with the java.util.Set.
    In the second example, method parameter is already a raw type, and unchecked conversion is not required. The return type of the method is I and is correctly inferred to the java.util.Set.
    If the method is called with a non-raw type, then return types are inferred correclty. For example, following code compiles fine.
    public class GenericTest {
      public static void test() {
        Set testList = GenericTest.method1((Class<List>[]) (new Class[] { ArrayList.class }));
      public static <I> I method1(Class<List>[] params) {
        return null;
    }This example is not "correct" due to the cast to Class<List>[], because such array can't contain Class<ArrayList> as an element (Class<ArrayList> is not a child of Class<List>). And this makes definition Class<List>[] almost useless, because such array should contain only List.class values.

  • HTMLDataSet: changing URL in "null" doesn't works

    Hi,
    I have this page, but it doesn't works.
    I need to have the possibility that by clicking the "change" button, the "ds1" dataset would become able to load as source the internal table called "sourceTable", but it doesn't works.
    Any suggestion??
    Thanks
    Simone

    This:
    ds1.setURL('prova.php');
    ds1.loadData();
    instead of null.
    could be works, but I need to change the data in the "sourceTable" dinamically: in this new example if I click the button "change source data", it change the content of "sourceTable"; then if I click the "change" button, it load in the "ds1" dataSet the old data from "sourceTable", because the quoted code call "another copy" of prova.php from the server and the new copy of the file contains obviously the original data in "sourceTable".
    Using null instead 'prova.php' it doesn't works too...
    Please, help me!!
    Simone

  • AQ Adapter dequeue of xmltype payload with opaque schema doesn't work

    I am using 10.1.3.4 of SOA suite. I have a AQ with xmltype payload. In the dequeue operation I don't want to specify the xsd, so using opaque schema option.
    then the variable created will have opaque as part name and opaqueElement for the body of the payload. But during runtime I only see the variable with part.
    Design Time(JDEV):
    Has the following structure-
    'Receive_Dequeue_InputVariable','opaque','/ns2:opaqueElement'
    RunTime:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <Receive_Dequeue_InputVariable>
    - <part>
    - <programUpdate xmlns="http://apollo/soa/internal/student">
    <ns1:finAidCertified xmlns:ns1="http://apollo/soa/internal/student">Y</ns1:finAidCertified>
    <ns1:programVersion xmlns:ns1="http://apollo/soa/internal/student">v1</ns1:programVersion>
    <ns1:program xmlns:ns1="http://apollo/soa/internal/student">m10</ns1:program>
    </programUpdate>
    </part>
    </Receive_Dequeue_InputVariable>
    Looks to me as bug.
    The question is whether there is any workaround. Or a better way to handle this ?
    Thanks

    I don't think so, I think you are getting mixed up between what is defined in the DB, and what is defined in the BPEL process.
    On the DB it is defined as xmltype, not Opaque therefore when it is read into BPEL it shows this. The question here is are the types compatible, was any error generated here.
    cheers
    James

  • Window Type Character doesn't work

    When I open Illustrator CS6 and go to Window > Type > Character the Character box doesn't pop up.
    When I try the Ctrl + T shortcut nothing happens and the Checkmark that is normally next to "Character is not there"
    I called support and they said there was a solution but they wouldn't tell me what it was without paying them $39.
    Does anyone have an idea how to fix this?

    Hi Alan,
    Give it a try by clearing the Illustrator preferences at:
    PC :  <startupdrive>\Users\<username>\AppData\Roaming\Adobe\Adobe Illustrator CS6 Settings\en_US
    Mac: <startupdrive>/Users/<username>/Library/Preferences/Adobe Illustrator CS6 Settings/en_US
    Let me know if it gets solved!
    Thanks,
    Nikita

  • CSS 11150 - "Keepalive type http" doesn't work.

    I've two webservers, A and B, sharing the same webdata on a NetApp filer. A CSS 11150 (5.033) have a content rule, C, with a VIP registred in internet DNS.
    I've added A and B to C. When using default "Keep alive type (ICMP)" on services the site is fully functional. When I disable the site on webserver A, clients attached to this server get errors and are not redirected to the B webserver. This is because the CSS doesn't check the for "Keepalive type http".
    The CSS thinks that A is online because it is answering for ping. This solution is not good so I tried to change the "Keepalive type" to http. This is better when something is wrong with one of the load-balanced webservers, but when activating "Keepalive type http" the CSS marks A and B down and site is offline.
    Is something wrong with my configuration???
    service lbws1.kov
    ip address xx.xx.193.25
    protocol tcp
    port 80
    active
    service lbws2.kov
    ip address xx.xx.193.27
    port 80
    protocol tcp
    active
    owner KOV
    content D
    protocol tcp
    add service lbws1.kov
    add service lbws2.kov
    balance aca
    port 80
    advanced-balance sticky-srcip-dstport
    vip address xx.xx.193.245
    active
    content C
    add service lbws1.kov
    add service lbws2.kov
    protocol tcp
    port 80
    balance aca
    advanced-balance sticky-srcip-dstport
    vip address xx.xx.193.28
    active

    By default the CSS will attempt to read http:///index.html
    It looks like that may not exist. Try to access the index page yourself from each of the services.

  • LIBRARY LINK IN THE JSP TYPE PAGE DOESN'T WORK

    Hi Gurus
    I have loaded my jsp file as jsp type page. The jsp uses oracle's sqltaglib in
    it. When I try to
    open that page, it looks for the sqltaglib.tld
    I have tried to add the .tld as an item and used the url of that item in the
    code. it didn't work.
    I am not sure how to tackle this. Can I get some help on this.
    Thanks in Advance.

    See here:  If sharing options and Markup are missing after you install OS X Yosemite
    This resolved the issue for me.
    Rick

  • SetNull() doesn't work?

    The code
    cs.setNull(i, Types.NULL);
    doesn't work with the latest 9.2.0.5 JDBC driver. It throws a
    java.sql.SQLException: Ungültiger Spaltentyp
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
         at oracle.jdbc.driver.OracleStatement.get_internal_type(OracleStatement.java:6411)
         at oracle.jdbc.driver.OraclePreparedStatement.setNull(OraclePreparedStatement.java:1358)
         at weblogic.jdbc.wrapper.PreparedStatement.setNull(PreparedStatement.java:294)
    rughly translated: "Invalid column type". As my methodis generic and just checks if an object is null, I don't know the type of the object if it's null. So, the type Types.NULL should work:
    cs.setNull(i, Types.NULL);
    but it doesn't. Is this still a bug in the 9.x driver?

    Hi Hilpert,
    Using "Types.NULL" never worked for me. I always supply the (data) type of the relevant column. So if the column has a NUMBER data type (for example), you need to do this:
    cs.setNull(i, Types.NUMERIC);My (generic) "executeQuery()" method takes three parameters:
    1. the SQL statement
    2. the parameter values
    3. the parameter data types
    So if one of the parameter values is null, I can safely invoke the "setNull()" method, since I have the correct data type.
    Good Luck,
    Avi.

  • How to hide a field based on the value of a field in a different subform - null check doesn't work!

    I'm using Javascript to set the actions. I need to hide a text field if the value of a field in another sub-form is null.
    - tried checking the value of the other field for null - doesn't work
    - tried setting a variable str2 where I know the value of the other field is available then checking that variable when I initialize the text field - doesn't work
    What am I missing?

    Hi.
    Try this in the originating sub form referring to the text field (X). 
    if (this.rawValue = 1)
              X.presence = "visible";
    else if (this.rawValue = null)
              X.presence = "hidden";

  • The screen of my iphone is broken and doesn't work anymore. Is there a way to type in my passcode on the computer/itunes?

    The screen of my iphone is broken and doesn't work anymore. Is there a way to type in my passcode on the computer/itunes?

    No, get the screen fixed.

  • Object dependency doesn't work for class type 001.

    Dear All,
    I would like to use classification for picking up material.
    I set up a class with class type 001 and assign to material.
    When I use mm03 to search the material with class, the object dependency in the characterist doesn't work.
    Does the object dependency work for the class type 001?
    The example is as below.
    If the characteristic CH_CAR = '01', then the characteristic CH_COLOR can show Red and Write.
    If the characteristic CH_CAR = '02', then the characteristic CH_COLOR can show Black and Blue.
    I wrote a depency precondition for this scenior, but it does't work.
    If I change the class to type 300 and attached to a configurable material, then when I create a sales order and configure the material, and the dependency did work.
    Does the object depency only support the class type 300?

    you can have object dependency in characterisitcs attached to material class. In this thread underneath the class is 001
    Length & Width is not converted in classivication view
    you may not be able to find objects using dependencies used in classification
    Object Dependencies in Classification - Classification System (CA-CL) - SAP Library

  • Bridge Offset Nulling Doesn't Seem to Work With SCC-SG24

    Does anyone know if the DAQmx "Perform Bridge Offset Nulling Calibration" vi works with the SCC-SG24 modules?  We have used our NI-9237 module in the past to acquire dual-channel load cell (thrust & torque) measurements, and calling that vi does a fine job of zeroing out the values before applying the load.  However, it doesn't seem to work when we try to take the same measurements using an SCC-SG24 module.
    We are able to zero the values manually, by using the nulling resistors and potentiometers in the SCC-SG24.  But, whether the nulling resistors are installed or not, we are not able to zero the values using the "Perform Bridge Offset Nulling Calibration" vi.  Running that vi does induce a significant offset in the values, but it is not the correct offset needed to bring the values to zero.  For example, with no load applied, a torque reading before running the vi may be +1090 in-lbs, and be "zeroed" to -465 in-lbs after running the vi.  Running the vi multiple times (to check repeatability) always brings us back to approximately -465 in-lbs.
    An additional issue (not sure if it's related or not) is that if we try to run this vi to offset just one of the channels in the task (such as just thrust, but not torque) it will still induce a small offset in the other channel, which doesn't seem right.
    I guess I'm not clear on whether the subject vi is performing an operation on the hardware, the software, or both, so I'm not sure whether the SCC-SG24 modules may not be compatible with this vi?
    Thanks for any help you can provide.

    Hello Dhruser1,
    I think that the DAQmx Perform Bridge Offset Nulling Calibration should work for the SCC-SG24 module.  Take a look at this article:  Removing Large Initial Offset for Load Cell or Strain Measurements with SCXI-1520 or PXI-4220 in particular it mentions that using this VI in addition to the auto zero can introduce an offset.  If you're doing both these is likely the cause.
    Also, when you specify specific channels using the channels input are you also setting the "skip unsupported channels to false?  If not this may be why it affects other channels.
    I hope this helps, and if not please feel free to post back with an update after trying these things.
    Cheers,
    Brooks

  • 3D Axis System (bar type) doesn't work when there is only one z-channel

    Hello,
    I have a problem with a 3D Axis System, bar type.
    Everything works fine as long as the y-channel contains more than one value (meaning there is more than one z-channel too).
    But when my y-channel has only one value, and there is only one z-channel, the axis system goes blank (there is just an empty white field with a thin outline).
    I don't understand why it doesn't work that way. The length of my one z-channel is the same length as my x-channel, as it should be.

    HI, 
    could you describe your hardware and software setup?
    If this is possible please attache your project.
    Roman Rolnik
    Application Engineer
    NI Germany

  • Personal Domain doesn't work properly: Forced to type "www".

    Hey,
    Recently upgraded to iLife '08 specifically for the Personal Domain feature.
    I followed the steps and got it to use my domain name from Register.com.
    The problem is, it only works if I type 'www' as part of the URL. Otherwise I get this error:
    +"This domain is not configured for this service. Please contact the webmaster to have it enabled."+
    As we all know, almost nobody actually types 'www' anymore (example 'apple.com' and not 'www.apple.com'). So the Personal Domain is actually rather useless since 90% of the people typing in my URL will get an error.
    I already contacted Register.com and they suggested a paid forwarding service, which defeats the whole point of iWeb's Personal Domain. The other suggestion was to get, I think, my .Mac home page's IP address. This could be forwarded for free. However I don't know how to get that.
    Should I track down tech support at Apple?
    Has anyone ran into the same limitation?
    Thanks in advance.

    Well I did precisely that over a month ago.
    BTW My domain name is aristomenis.com, and I do not use .mac for email.
    As the CNAME, I already have "*" and "www" pointing to web.mac.com. Below is a representation of how I filled out the form a Register.com, where "{ }" represents the text fields I have access to:
    {*}.aristomenis.com points to {web.mac.com}
    {www}.aristomenis.com points to {web.mac.com}
    {ftp}.aristomenis.com points to {aristomenis.com}
    Register.com will not allow me to put "@" (or alternately nothing) in the field preceding aristomenis.com. Every time I try that an error page comes up saying "there is an error updating Zone records".
    As you can see above, Register.com forces ".aristomenis.com" right after the alias field, which leads me to believe that a "." (a.k.a a period) must precede aristomenis.com to make a typed-in URL work.
    For example, in my browser's address bar I can type in almost anything plus '.aristomenis.com' and it'll point to my .Mac site. However aristomenis.com without a period before doesn't work.
    What am I missing? I spent an hour with Register.com's tech support and I'm pretty sure I filled out everything exactly as needed on their side. Utimately they said I need to contact Apple to get an IP address for my .Mac page and maybe we can Register.com can help me link it with a free version of their forwarding service.
    Please help. I really don't see how iWeb's Personal Domain feature doesn't actually work properly. Especially with such a large registrar as Register.com.
    Again thanks in advance.

Maybe you are looking for

  • Can I move my iCloud email address to a new Apple ID?

    Hi, My wife and I have just recently bought iPhones. I've had an iMac for years and an iPad for a couple of years now, so we now have the multiple users/devices issue, or conundrum if you like. I had an iTunes account since I've had my iMac so all pu

  • I want to get my iPod touch fixed

    I want to get my iPod touch 4th gen. 32GB fixed. It's cracked and the screen has gone white. Will apple fix it and how much will it cost? Also, if I could have a link to their support page regarding this.

  • Inkscape SVG Doesn't Open In Dynamic Graphics

    Ok, I'm testing the "do it yourself" waters on SVGs. I created a couple of SVGs and even modified one of the "out of box SVGs" from xMII.  The clean slate SVGs do not open or show within the Dynamic Grapohics editor --- it just sits there. The one I

  • Png file not transparent anymore!!!

    I had purchased a logo almost a year ago, I have been using it over and over again to place onto of my product photos. The file is a png file and it use to sho up transparent but now it doesnt and I dont know why?????????? Can anyone help me????

  • Latest Photoshop CC 2014 no option to Save As .png?

    Just updated Photoshop but new version doesn't offer Save As .png.  Am I missing something in Preferences, Set up etc?