PROBLEM while using URL in order to open a file from a servlet

Hi,
I am having a problem while trying to open a file from my servlet by using URL connection. Following is my code sample. what happens is when I first run my project it opens the file but after that when I rerun it again and again it sometimes opens it and sometimes not. if it can't open it it gives an error saying "the file is damaged and couldn't be repaired". I don't get any exceptions. if you guys can help me I will appreciate it so much... thanks.
here is my code :
URL url = new URL("http://demobcs.ibm.com:81/test.pdf");
resp.setContentType(getContentType("http://demobcs.ibm.com:81/test.pdf"));
          ServletOutputStream sos = null;
          BufferedInputStream bis = null;
          try {
               sos = resp.getOutputStream();
          } catch (Exception e) {
               System.out.println("exception !!!!");
               e.printStackTrace();
          System.out.println("burada2");
          try {
               byte[] bytes = new byte[4096];
               //bis = new BufferedInputStream(conn.getInputStream());
               DataInputStream in = new DataInputStream(url.openStream());
               //DataInputStream in = new DataInputStream(conn.getInputStream());
               bis = new BufferedInputStream(in);
               int j;
               while ((j = bis.read(bytes, 0, 4096)) != -1) {
                    try {
                         sos.write(bytes, 0, 4096);
                         System.out.println("file is being read ...:");
                    } catch (Exception e) {
                         e.printStackTrace();
               in.close();
               bis.close();          
               //sos.close();
          } catch (Exception e) {
               System.out.println("exception :"+e.toString());
               e.printStackTrace();
          }

You are writing (<filesize> mod 4096) bytes of crap at the end of the file. Use your variable j instead for the number of bytes to write in your loop.

Similar Messages

  • The problem is encountered when we try to open the file from external vendor.

    We are using Adobe illustrator CS3 with Patch 13.0.2. in MAC PC with OS 10.4.11. We tried to open the file generated from external vendor. This file is made by CS4/CS5 & downgraded to CS3 because we are using different version of CS package.
    When we try to open such as file. It takes some time to open it. But after a while, the application illustrator has unexpectedly quit & crash report is generated. Any expert can help to look at the problem.

    Just a bad file.
    No telling what specifically may be the issue without seeing the original file as compaired to the CS3 file.

  • Problem while using BCP utility for witing data in file

    hi all,
    I have a batch file in which I am using bcp command for reading data from MS SQL and writing it in delimiter file. Now there are some exceptions in MS SQL that while writing into file whenever it encounters new line character it switches to next line while writing and starts writing the rest of the data on next.
    Could you help me in getting rid of this problem. I wanted to replace the new line character with space.
    Thanks and regards
    Nitin

    Hi Dilip,
    Before going for any other table,
    As Kalnr is only one of the primary keys of table KEKO, You can try creating secondary index on KEKO, which might help in improving your report performance.
    Also, you can add more conditions in where clause if possible, which will also help in improving performance.
    Thansk,
    Archana

  • Iphoto won't open raw files from leica dlux-6 camera.

    I just purchased a leica d-lux 6 camera and use a macbook. seems that iphoto which I've been using for years  can not open raw files from this camera. Will it ever?  I downlaoded the free lightroom Leica gave and it can open raw but it seems to require more of a learning curve than iphoto. If I continue to use both lightroom and iphoto on same mac computer cause problems?  Any suggestions?  I guess i could shoot in jpeg and raw and use only iphoto for jpegs and use LR for the occasional raw shots?

    Correct, the D-Lux 6 is not currently supported for Raw in iPhoto or Aperture. Apple may add support in a future update. Let them know you want it:
    iPhoto menu -> Provide iPhoto Feedback
    LR is a very powerful, professional grade application and yes, requires a lot more learning than iPhoto. If that doesn't interest you, then respectfully, I would suggest that you just shoot Jpeg.
    Regards
    TD

  • Open pdf files from button

    Hello, please i need help with my problem. Is there any way to open pdf files from button? How can i set this in DVD Studio? Thanks for your answer.

    Just to pick up from Shawn - even if you do use DVD@ccess you cannot use a button to launch the link, you have to use a full menu. In practice, you use two identical menus and set the button for the PDF to go to the second menu, which is set to time out very quickly and jump back to the original menu. It gives the visual effect of a button launching the asset, but in fact it was the opening of the second menu which did the trick.
    And just to emphasise what Shawn rightly said - don't use DVD@ccess. It is at best unreliable and for many PC users won't work at all. It is far better to add the PDF as ROM material and put a message on a menu screen that tells the user there is additional content on the disc, and how to access it. This has the added advantage of letting those using a set top player know the material is there without frustrating them that something doesn't 'automatically' work (you can't open a PDF on a set top player, only on a computer player).

  • Any ideas why Photoshop CC 2014 is now not opening RAW files from Canon 70D?

    I used to be able to open RAW files from my Canon 70D camera, and since I did an update, it will no longer open RAW files from my Canon 70D camera.
    I've uninstalled, and re-installed Photoshop CC 2014, and still no luck.
    Any help would be appreciated!

    I should check to see if I have the latest version.
    You don’t, because 8.0.x is not the latest.
    You need to update ACR.
    Camera Raw plug-in installer

  • Opening a file from Servlet

    Hi,
    I`m trying to open a file from Tomcat Servlet init method but it fails with java.io.FileNotFoundException: test.properties (The system cannot find the file specified).
    The code is:
                                  File f = new File("test.properties");
                                  DataInputStream is = new DataInputStream((new FileInputStream(f)));
                                  System.out.println(is.readLine());
                                  is.close();
    test.properties is in /WEB-INF/classes directory.
    What is the classpath for a web app and is it possible to adjust it?
    Thanks,
    vs

    What is the error saying???
    Are you sure the file location is right?
    MeTitus

  • Problem while creating URL iview (in EP7.0)

    Hi,
    I encountered a problem while creating URL iview (in EP7.0) as when I selected the iview template for creating the URL iview, the content area got displayed as
    "No templates to display. You are not assigned to any existing templates."
    please assist me in this regard.
    Thanks,
    Suri

    Hi Manoj,
    Thank you for your reply.
    I am still getting the same messages even after creating the iview template in EP7.0
    Created through:
    content Admin --> portal content --> <folder>new --> iview  --> seleting "Portal component - create an iView from a portal component contained in a deployed portal archive (PAR file)" <next> --> seleting "com.sap.portal.appintegrator.sap" <next> --> webdynpro <next> --> finish.
    Open object for editing...--> Object is a Template to Yes.
    Result :
    content Admin --> portal content --> <folder>new --> iview --> seleting "iview template- create an iView from an existing iView template" <next> which displays the same message.
    "No templates to display. You are not assigned to any existing templates."
    Rgrds,
    Suri.

  • Problem while using trigger from line of 6534

    I have faced some problems while using triggering with 6534. They are listed below. Please provide solution me.
    1. ) i was using pattern input with triggering(buffered) in which i am using the example given in library buffered pattern input-triggered.vi
    Now i am using port 0 to take input. From line 0 of port 2 i want to generate a pulse which can trigger the operation & start acquisition. For that i am using write to single line.vi . My DPULL is open so bydefault the line will be at low level & by vi i will make it high which will trigger the operation.
    In normal condition if we use write to a single line.vi it will write the given status on that line within a fraction of second and abort execution. But when i am usin
    g it for trigger in following manner, it did not work.
    First i started the VI buffered pattern input-triggered.vi.I have configured the start trigger with leading edge trigger. I have set the time limit properly.Synchronous operation is set at the front panel of vi.
    Now if start the write to a single line.vi to give start trigger, nether it triggered the operation,nor it abort execution of single line write vi.When time out occured in triggered vi, then both vis stopped simultaneously. Why this happened?
    2.) Similar problem i faced when i wanted to perform the change detection.vi Port 0 is configured for input.Line 1 to 7 are fixed with some status by connecting them to Vcc or GND. I have connected port 0 line 0 with port 2 line 0. So when i change status of line 0 of port 2 change detection should be occured o port 0. i am changing the status of line 0 of port 2 by write to a single line.vi But here i faced same problem as first that it was not writing to port 0 line 0. And bo
    th process stopped when time limit occured in change detection vi.
    So what can be the problem? Please help me.

    Hi Vishal,
    1) You should check to see that when you are writting a static 1 to line 0 you see a pulse high. You should also make sure that you wire this line to the STARTTRIG for group 0.
    2) If you solve question 1 you will also have question 2 solved.
    It might be helpful to create a program that configures both programs (pattern I/O on port 0 and static I/O on port 2) in the same program and then starts both groups. I would do a little testing to see exactly what signals you do or do not see.
    Ron

  • Problem while using receive after invoke activity

    Hi,i have got a problem while using a receive activity,after a invoke activity.The invoke acivity seems that does not work and also the debugger runs forever....But if i remove the receive activity,the invoke activity works fine.
    <h2>The output of GlassfishV2 is:<h2>
    This is from the exception block.
    com.sun.bpel.model.meta.impl.RInvokeImpl@f590c6={<?xml version="1.0" encoding="utf-8" ?>
    *<invoke name="Invoke1"*
    partnerLink="PartnerLink2"
    portType="tns:test_service3"
    operation="luizao"
    inputVariable="LuizaoIn"
    outputVariable="LuizaoOut"
    xmlns:tns="http://dim.test.org/"></invoke>}
    *[Fatal Error] :1:1: Content is not allowed in prolog.*
    System exception occured while executing a business process instance.
    java.lang.NullPointerException: WSDL message model is null
    at com.sun.jbi.engine.bpel.core.bpel.debug.WSDLMessageImpl.<init>(WSDLMessageImpl.java:56)
    at com.sun.jbi.engine.bpel.core.bpel.engine.impl.CallFrame.onFault(CallFrame.java:380)
    at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.SyntheticThrowUnitImpl.doAction(SyntheticThrowUnitImpl.java:91)
    at com.sun.jbi.engine.bpel.core.bpel.engine.impl.BPELInterpreter.execute(BPELInterpreter.java:145)
    at com.sun.jbi.engine.bpel.core.bpel.engine.BusinessProcessInstanceThread.execute(BusinessProcessInstanceThread.java:76)
    at com.sun.jbi.engine.bpel.core.bpel.engine.impl.BPELProcessManagerImpl.process(BPELProcessManagerImpl.java:818)
    at com.sun.jbi.engine.bpel.core.bpel.engine.impl.EngineImpl.process(EngineImpl.java:261)
    at com.sun.jbi.engine.bpel.core.bpel.engine.impl.EngineImpl.process(EngineImpl.java:742)
    at com.sun.jbi.engine.bpel.BPELSEInOutThread.processRequest(BPELSEInOutThread.java:401)
    at com.sun.jbi.engine.bpel.BPELSEInOutThread.processMsgEx(BPELSEInOutThread.java:240)
    at com.sun.jbi.engine.bpel.BPELSEInOutThread.run(BPELSEInOutThread.java:158)
    This is from the exception block.
    I think correlation sets are ok(i have two receive activities).
    I use Netbeans6.0 IDE.
    Can anyone help me?
    Sorry,but i don't speak English fluently

    I can't debug it more,because the bpel variables window disappears when the proccess comes to invoke activity.
    The bpel code is simple:I have got a sequence with follow activities:
    receive
    assign
    invoke
    receive
    assign
    reply
    The code is:
    <?xml version="1.0" encoding="UTF-8"?>
    <process
        name="Testfile2"
        targetNamespace="http://enterprise.netbeans.org/bpel/Test2/Testfile2"
        xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        xmlns:tns="http://enterprise.netbeans.org/bpel/Test2/Testfile2" xmlns:ns0="http://xml.netbeans.org/schema/Testfile2" xmlns:ns1="http://j2ee.netbeans.org/wsdl/Testfile2">
       <import namespace="http://j2ee.netbeans.org/wsdl/Testfile2" location="Testfile2.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
       <import namespace="http://enterprise.netbeans.org/bpel/test_service3Wrapper" location="Partners/test_service3/test_service3Wrapper.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
       <import namespace="http://dim.test.org/" location="Partners/test_service3/test_service3.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
       <import namespace="http://enterprise.netbeans.org/bpel/test_service2Wrapper" location="Partners/test_service2/test_service2Wrapper.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
       <import namespace="http://dim.test.org/" location="Partners/test_service2/test_service2.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
       <partnerLinks>
          <partnerLink name="PartnerLink3" xmlns:tns="http://enterprise.netbeans.org/bpel/test_service2Wrapper" partnerLinkType="tns:test_service2LinkType" myRole="test_service2Role"/>
          <partnerLink name="PartnerLink2" xmlns:tns="http://enterprise.netbeans.org/bpel/test_service3Wrapper" partnerLinkType="tns:test_service3LinkType" partnerRole="test_service3Role"/>
          <partnerLink name="PartnerLink1" xmlns:tns="http://j2ee.netbeans.org/wsdl/Testfile2" partnerLinkType="tns:Testfile21" myRole="Testfile2PortTypeRole"/>
       </partnerLinks>
       <variables>
          <variable name="Testfile2OperationOut" xmlns:tns="http://j2ee.netbeans.org/wsdl/Testfile2" messageType="tns:Testfile2OperationReply"/>
          <variable name="Operation1In" xmlns:tns="http://dim.test.org/" messageType="tns:operation1"/>
          <variable name="LuizaoOut" xmlns:tns="http://dim.test.org/" messageType="tns:luizaoResponse"/>
          <variable name="LuizaoIn" xmlns:tns="http://dim.test.org/" messageType="tns:luizao"/>
          <variable name="Testfile2OperationIn" xmlns:tns="http://j2ee.netbeans.org/wsdl/Testfile2" messageType="tns:Testfile2OperationRequest"/>
       </variables>
       <correlationSets>
          <correlationSet name="CorrelationSet1" properties="ns1:My_Property"/>
       </correlationSets>
       <sequence>
          <receive name="Receive1" createInstance="yes" partnerLink="PartnerLink1" operation="Testfile2Operation" xmlns:tns="http://j2ee.netbeans.org/wsdl/Testfile2" portType="tns:Testfile2PortType" variable="Testfile2OperationIn">
             <correlations>
                <correlation set="CorrelationSet1" initiate="yes"/>
             </correlations>
          </receive>
          <assign name="Assign1">
             <copy>
                <from>$Testfile2OperationIn.part1/ns0:ena</from>
                <to>$LuizaoIn.parameters/ena</to>
             </copy>
             <copy>
                <from>$Testfile2OperationIn.part1/ns0:id</from>
                <to>$LuizaoIn.parameters/id</to>
             </copy>
          </assign>
          <invoke name="Invoke1" partnerLink="PartnerLink2" operation="luizao" xmlns:tns="http://dim.test.org/" portType="tns:test_service3" inputVariable="LuizaoIn" outputVariable="LuizaoOut"/>
          <receive name="Receive2" createInstance="no" partnerLink="PartnerLink3" operation="operation1" xmlns:tns="http://dim.test.org/" portType="tns:test_service2" variable="Operation1In">
             <correlations>
                <correlation set="CorrelationSet1" initiate="no"/>
             </correlations>
          </receive>
          <assign name="Assign2">
             <copy>
                <from>$Operation1In.parameters/hik</from>
                <to>$Testfile2OperationOut.part1/ns0:hik</to>
             </copy>
          </assign>
          <reply name="Reply1" partnerLink="PartnerLink1" operation="Testfile2Operation" xmlns:tns="http://j2ee.netbeans.org/wsdl/Testfile2" portType="tns:Testfile2PortType" variable="Testfile2OperationOut"/>
       </sequence>
    </process>If it's a bug,that means that i can't use second receive after invoke any more?

  • Volume problem while using headphone

    when I use my headphone I have no problem while talking on phone but when I try to listen to music or watch you tube I cannot hear the left side. I restored iphone and got replacement but same problem. I changed headphones but that wasent the problem as well. please help!

    s. laxnars wrote:
    I am facing some problem while using preparedStatement.setNull while using Bea's Orale XA Driver, the same code works fine with oracle XA driver,
    Can any one plz help on this.
    Here the code
    String insertIntoTestRequestQuery = "Insert into A values(?,?,?)";
    PreparedStatement dbInsertStatement = connection.prepareStatement(insertIntoTestRequestQuery);
    dbInsertStatement.setLong(1, 3L);
    dbInsertStatement.setString(2,"test");
    dbInsertStatement.setNull(3,java.sql.Types.NULL);
    I am using Weblogic 9.2 with Oracle 9i
    here the Spy Log
    spy>> PreparedStatement[163].setNull(int parameterIndex, int sqlType)
    spy>> parameterIndex = 1
    spy>> sqlType = 0
    spy>> java.sql.SQLException: [BEA][Oracle JDBC Driver]The specified SQL type is not supported by this driver. ErrorCode=0 SQLState=HY004
    java.sql.SQLException: [BEA][Oracle JDBC Driver]The specified SQL type is not supported by this driver.
         at weblogic.jdbc.base.BaseExceptions.createException(Unknown Source)
         at weblogic.jdbc.base.BaseExceptions.getException(Unknown Source)
         at weblogic.jdbc.base.BasePreparedStatement.validateSqlType(Unknown Source)
         at weblogic.jdbc.base.BasePreparedStatement.setObjectInternal(Unknown Source)
         at weblogic.jdbc.base.BasePreparedStatement.setNull(Unknown Source)
         at weblogic.jdbcx.base.BasePreparedStatementWrapper.setNull(Unknown Source)
         at weblogic.jdbcspy.SpyPreparedStatement.setNull(Unknown Source)
         at weblogic.jdbc.wrapper.PreparedStatement.setNull(PreparedStatement.java:491)Hi. This is a known issue. Call official BEA support and open a case
    so you will be notified when a new driver will have the fix. In the
    meantime, if you set the Type to correspond to the DBMS's column type,
    it will work. In fact, I'll bet that if you just set the Type to VARCHAR
    it will work, regardless of the actual column type...
    Joe

  • Problem while using BEA's Oracle Driver

    I am facing some problem while using preparedStatement.setNull while using Bea's Orale XA Driver, the same code works fine with oracle XA driver,
    Can any one plz help on this.
    Here the code
    String insertIntoTestRequestQuery = "Insert into A values(?,?,?)";
    PreparedStatement dbInsertStatement = connection.prepareStatement(insertIntoTestRequestQuery);
    dbInsertStatement.setLong(1, 3L);
    dbInsertStatement.setString(2,"test");
    dbInsertStatement.setNull(3,java.sql.Types.NULL);
    I am using Weblogic 9.2 with Oracle 9i
    here the Spy Log
    spy>> PreparedStatement[163].setNull(int parameterIndex, int sqlType)
    spy>> parameterIndex = 1
    spy>> sqlType = 0
    spy>> java.sql.SQLException: [BEA][Oracle JDBC Driver]The specified SQL type is not supported by this driver. ErrorCode=0 SQLState=HY004
    java.sql.SQLException: [BEA][Oracle JDBC Driver]The specified SQL type is not supported by this driver.
         at weblogic.jdbc.base.BaseExceptions.createException(Unknown Source)
         at weblogic.jdbc.base.BaseExceptions.getException(Unknown Source)
         at weblogic.jdbc.base.BasePreparedStatement.validateSqlType(Unknown Source)
         at weblogic.jdbc.base.BasePreparedStatement.setObjectInternal(Unknown Source)
         at weblogic.jdbc.base.BasePreparedStatement.setNull(Unknown Source)
         at weblogic.jdbcx.base.BasePreparedStatementWrapper.setNull(Unknown Source)
         at weblogic.jdbcspy.SpyPreparedStatement.setNull(Unknown Source)
         at weblogic.jdbc.wrapper.PreparedStatement.setNull(PreparedStatement.java:491)

    s. laxnars wrote:
    I am facing some problem while using preparedStatement.setNull while using Bea's Orale XA Driver, the same code works fine with oracle XA driver,
    Can any one plz help on this.
    Here the code
    String insertIntoTestRequestQuery = "Insert into A values(?,?,?)";
    PreparedStatement dbInsertStatement = connection.prepareStatement(insertIntoTestRequestQuery);
    dbInsertStatement.setLong(1, 3L);
    dbInsertStatement.setString(2,"test");
    dbInsertStatement.setNull(3,java.sql.Types.NULL);
    I am using Weblogic 9.2 with Oracle 9i
    here the Spy Log
    spy>> PreparedStatement[163].setNull(int parameterIndex, int sqlType)
    spy>> parameterIndex = 1
    spy>> sqlType = 0
    spy>> java.sql.SQLException: [BEA][Oracle JDBC Driver]The specified SQL type is not supported by this driver. ErrorCode=0 SQLState=HY004
    java.sql.SQLException: [BEA][Oracle JDBC Driver]The specified SQL type is not supported by this driver.
         at weblogic.jdbc.base.BaseExceptions.createException(Unknown Source)
         at weblogic.jdbc.base.BaseExceptions.getException(Unknown Source)
         at weblogic.jdbc.base.BasePreparedStatement.validateSqlType(Unknown Source)
         at weblogic.jdbc.base.BasePreparedStatement.setObjectInternal(Unknown Source)
         at weblogic.jdbc.base.BasePreparedStatement.setNull(Unknown Source)
         at weblogic.jdbcx.base.BasePreparedStatementWrapper.setNull(Unknown Source)
         at weblogic.jdbcspy.SpyPreparedStatement.setNull(Unknown Source)
         at weblogic.jdbc.wrapper.PreparedStatement.setNull(PreparedStatement.java:491)Hi. This is a known issue. Call official BEA support and open a case
    so you will be notified when a new driver will have the fix. In the
    meantime, if you set the Type to correspond to the DBMS's column type,
    it will work. In fact, I'll bet that if you just set the Type to VARCHAR
    it will work, regardless of the actual column type...
    Joe

  • Problem while using ADFLogger to separate serverlogs and application logs.

    I am facing one problem with ADFLogger, when I create my own custom logger as I want my log file should be separate and
    it should not contain server logs with it.
    and also I don't know how to change the format of logs while using ADFLogger?

    I have opened logging.xml and In structure window, I expanded log-handlers and I checked for log_handler with name ‘odl-handler’
    and then I created a copy of existing odl-handler and changed the name from odl-handler to some custom name xyz-handler.
    in the property called path, and then I changed the default name ${domain.home}/servers/${weblogic.Name}/logs/${weblogic.Name}-diagnostic.log
    to ${domain.home}/servers/${weblogic.Name}/logs/xyz-diagnostic.log file.
    and then I created a Backing Bean and used info and error message of ADFLogger class
    and finally i added mine package in logging.xml and then I added console-handler and mine xyz-handler for it. Then custom log file was created but it was empty and i was able to see console logs?
    Can u please tell me i was not able to see logs in my custom file.

  • Problem while using af:selectOrderShuttle

    Hi
    As per requirements i need to load both leading and Trailing list for SelectOrderShuttle. I can able to populate Leading List but cant able to populate Trailing List.Plz can any one help me.....
    <af:selectOrderShuttle size="10" inlineStyle="labelfont" valuePassThru="true" binding="{ScreenWiseRadioBean.shuttle}" value="#{ScreenWiseRadioBean.shuttleValueList}">
    <f:selectItems value="#{ScreenWiseRadioBean.screenWiseList}" />
    </af:selectOrderShuttle>

    s. laxnars wrote:
    I am facing some problem while using preparedStatement.setNull while using Bea's Orale XA Driver, the same code works fine with oracle XA driver,
    Can any one plz help on this.
    Here the code
    String insertIntoTestRequestQuery = "Insert into A values(?,?,?)";
    PreparedStatement dbInsertStatement = connection.prepareStatement(insertIntoTestRequestQuery);
    dbInsertStatement.setLong(1, 3L);
    dbInsertStatement.setString(2,"test");
    dbInsertStatement.setNull(3,java.sql.Types.NULL);
    I am using Weblogic 9.2 with Oracle 9i
    here the Spy Log
    spy>> PreparedStatement[163].setNull(int parameterIndex, int sqlType)
    spy>> parameterIndex = 1
    spy>> sqlType = 0
    spy>> java.sql.SQLException: [BEA][Oracle JDBC Driver]The specified SQL type is not supported by this driver. ErrorCode=0 SQLState=HY004
    java.sql.SQLException: [BEA][Oracle JDBC Driver]The specified SQL type is not supported by this driver.
         at weblogic.jdbc.base.BaseExceptions.createException(Unknown Source)
         at weblogic.jdbc.base.BaseExceptions.getException(Unknown Source)
         at weblogic.jdbc.base.BasePreparedStatement.validateSqlType(Unknown Source)
         at weblogic.jdbc.base.BasePreparedStatement.setObjectInternal(Unknown Source)
         at weblogic.jdbc.base.BasePreparedStatement.setNull(Unknown Source)
         at weblogic.jdbcx.base.BasePreparedStatementWrapper.setNull(Unknown Source)
         at weblogic.jdbcspy.SpyPreparedStatement.setNull(Unknown Source)
         at weblogic.jdbc.wrapper.PreparedStatement.setNull(PreparedStatement.java:491)Hi. This is a known issue. Call official BEA support and open a case
    so you will be notified when a new driver will have the fix. In the
    meantime, if you set the Type to correspond to the DBMS's column type,
    it will work. In fact, I'll bet that if you just set the Type to VARCHAR
    it will work, regardless of the actual column type...
    Joe

  • Proxy problem while using pkgbuild..

    Hi all,
    I was trying to makepkg a certain theme. When I was in my college I used a certain proxy...but at home I have dhcp. I have edited rc.conf accordingly and I can browse the web. I can also use pacman to install stuff. However makepkg(or rather wget) still thinks I am using my college proxy..
    [spai@spai xfce4-axe-theme]$ makepkg -s
    ==> Making package: xfce4-axe-theme 1-1 i686 (Thu May 14 10:57:19 IST 2009)
    ==> Checking Runtime Dependencies...
    ==> Checking Buildtime Dependencies...
    ==> Retrieving Sources...
    -> Downloading 73291-axe.tar.gz...
    --2009-05-14 10:57:19-- http://xfce-look.org/CONTENT/content-files/73291-axe.tar.gz
    Resolving iiscproxy.serc.iisc.ernet.in... failed: Name or service not known.
    wget: unable to resolve host address `iiscproxy.serc.iisc.ernet.in'
    ==> ERROR: Failure while downloading 73291-axe.tar.gz
    Aborting...
    So is there a way to solve this resolve problem?
    Thanks all,
    Spai
    Last edited by Isomorphism (2009-05-14 05:33:32)

    s. laxnars wrote:
    I am facing some problem while using preparedStatement.setNull while using Bea's Orale XA Driver, the same code works fine with oracle XA driver,
    Can any one plz help on this.
    Here the code
    String insertIntoTestRequestQuery = "Insert into A values(?,?,?)";
    PreparedStatement dbInsertStatement = connection.prepareStatement(insertIntoTestRequestQuery);
    dbInsertStatement.setLong(1, 3L);
    dbInsertStatement.setString(2,"test");
    dbInsertStatement.setNull(3,java.sql.Types.NULL);
    I am using Weblogic 9.2 with Oracle 9i
    here the Spy Log
    spy>> PreparedStatement[163].setNull(int parameterIndex, int sqlType)
    spy>> parameterIndex = 1
    spy>> sqlType = 0
    spy>> java.sql.SQLException: [BEA][Oracle JDBC Driver]The specified SQL type is not supported by this driver. ErrorCode=0 SQLState=HY004
    java.sql.SQLException: [BEA][Oracle JDBC Driver]The specified SQL type is not supported by this driver.
         at weblogic.jdbc.base.BaseExceptions.createException(Unknown Source)
         at weblogic.jdbc.base.BaseExceptions.getException(Unknown Source)
         at weblogic.jdbc.base.BasePreparedStatement.validateSqlType(Unknown Source)
         at weblogic.jdbc.base.BasePreparedStatement.setObjectInternal(Unknown Source)
         at weblogic.jdbc.base.BasePreparedStatement.setNull(Unknown Source)
         at weblogic.jdbcx.base.BasePreparedStatementWrapper.setNull(Unknown Source)
         at weblogic.jdbcspy.SpyPreparedStatement.setNull(Unknown Source)
         at weblogic.jdbc.wrapper.PreparedStatement.setNull(PreparedStatement.java:491)Hi. This is a known issue. Call official BEA support and open a case
    so you will be notified when a new driver will have the fix. In the
    meantime, if you set the Type to correspond to the DBMS's column type,
    it will work. In fact, I'll bet that if you just set the Type to VARCHAR
    it will work, regardless of the actual column type...
    Joe

Maybe you are looking for

  • Thinkpad Serial ATA Hard Drive Bay Adapter

    I would like to install a second hard drive in my T61. I saw a thread that advised I can do this by purchasing a "Thinkpad Serial ATA Hard Drive Bay Adapter". The thread also had a link where one can be purchased. However, the page displayed by the l

  • Apache FOP not displaying Cyrillic properly

    Hi, I am using apache FOP to generate pdfs' in Russian. I have embedded the fonts into the application but the output is being displayed as html numerical codes. The html numerical codes are stored in the database but I am unable to render them prope

  • How to display fixed width column in Advanced Table?

    Hi, This is probably a newbie question for OAF. My requirement is quite simple but I couldn't find the answer in either the OAF developer's guide or anywhere else so I turn to the experts here. I have a region of type Table or Advanced table with thr

  • Exporting resulting Applets as jpg,gif or png

    Hello, i am currently working on an applet, included in a webapplication. The insurance agent make a drawing of an accident within this applet and i need to export the result as a file. Does anyone know how ? is this even possible with applets ? hope

  • Cannot login after awaking from sleep (login screensaver sleep problem)

    After awaking from sleep or returning from the screensaver, the "loginwindow" of system.login.screensaver (visible after checking "details") does not recoginze the correct password. It is not possible to login this way anymore. Very annoying! Fortuna