How to update java.sql.Clob using javax.persistence.EntityManager?

Hello.
Can anyone tell me (or show me some example) how to update java.sql.Clob using javax.persistence.EntityManager.
When I’m trying to update column (with type Clob) value is not inserting, after update column is empty. I haven’t any error during update, I’m using database Oracle 10g.
Edited by: ernest211 on Jul 16, 2009 1:24 AM

Post some code so we can see how you are doing it. If you are using JPA entities take a look at the @Lob annotation.
m

Similar Messages

  • Problem with java.sql.Clob and oracle.sql.CLOB

    Hi,
    I am using oracle9i and SAP web application server. I am getClob method and storing that in java.sql.Clob and using the getClass().getName() I am getting the class name as oracle.sql.CLOB. But when I am trying to cast this to oracle.sql.CLOB i am getting ClassCastException. The code is given below
    java.sql.Clob lOracleClob = lResultSet.getClob(lColIndex + 1);
    lPrintWriter = new PrintWriter(new BufferedWriter (((oracle.sql.CLOB) lOracleClob).getCharacterOutputStream()));
    lResourceStatus = true;
    can anybody please tell me the what is the problem with this and solution.
    thanks,
    Ashok.

    Hi Ashok
    You can get a "ClassCastException" when the JVM doesn't have access to the specific class (in your case, "oracle.sql.CLOB").
    Just check your classpath and see if you are referring to the correct jar files.
    cheers
    Sameer
    PS: Please award points if you find the answer useful

  • Differ java.sql.* and javax.sql.*

    Dear Friends,
    What is differenece between java.sql.* and javax.sql.*?.
    Advance in thanks

    java.sql is the package you can use for all basic kinds of database access. If you are not developing a full scale enterprise application, java.sql package is all that you need.
    javax.sql is extension to the basic java.sql package. It includes classes that allow connection pooling and rowsets, among others.
    If you are just getting started with JDBC, you just need to get familiar with java.sql and leave the wonders of javax.sql until later.

  • How to update the FB01L transaction using the FM  bapi_acc_document_post

    Hi All,
            How to update the FB01L transaction using the bapi_acc_document_post but there is no ledger group field in the bapi function module.
    Please help me how to do it.

    hi,
    use batch input method for the same.
    check this.
    [https://forums.sdn.sap.com/click.jspa?searchID=19107237&messageID=884744]

  • How to update batch (LIPS-CHARG) using FM WS_DELIVERY_UPDATE

    Hi guys,
    I posted a question regarding a function module here:
    How to update batch (LIPS-CHARG) using FM WS_DELIVERY_UPDATE
    If you have experience about this FM, kindly visit the link and share your wisdom. Thanks.
    Regards,
    Carl

    Hi guys,
    I posted a question regarding a function module here:
    How to update batch (LIPS-CHARG) using FM WS_DELIVERY_UPDATE
    If you have experience about this FM, kindly visit the link and share your wisdom. Thanks.
    Regards,
    Carl

  • ¿como actualizar java en macbook pro?; How to update java on macbook pro?

    ¿como actualizar java en macbook pro?; How to update java on macbook pro?

    ¿Has probado la actualización de software? De Apple por lo general los tiene allí.
    Usted no dice que OSX que está utilizando.
    Usted puede averiguar qué versión de Java está ejecutando, vaya a utilidades / terminal y escribiendo
    java -version
    y pulsando retorno
    Aquí está la página Oráculos.
    http://www.java.com/en/download/help/mac_java_update.xml

  • How to update Sales Order status using  BAPI_SALESORDER_CHANGE

    Hi,
    I want to update Sales Order status using BAPI_SALESORDER_CHANGE, this BAPI is called from middle ware, but there is no parameter to pass the status value to this function, please help me how to update sales order status using BAPI only.
    Thanks
    RK

    Hi,
    Can u give me details of what status u would like to update in sales order.
    If we are able to update the status from VA02, Then BAPI will assist for the same.
    Regards.

  • How to update the ztable by using table handling function

    how to update the ztable by using table handling function
    It is very urgent ...............................
    thanks in advance

    see the  below code for the direct   ztable update
    Report  ZUPDATE_PRPS.
    tables: zprps.
    parameter: p_wbs like zprps-pspnr,
               p_value like zprps-fakkz default 'X'.
    data: wa_fakkz type zprps-fakkz.
    *START-OF_SELECTION
    start-of-selection.
    call function 'CONVERSION_EXIT_ABPSP_INPUT'
         exporting
             input     = p_wbs
        importing
             output    = p_wbs
        exceptions
             not_found = 1
             others    = 2.
    select single fakkz
      into wa_fakkz
      from zprps
    where pspnr eq p_wbs.
    if sy-subrc eq 0.
       update zprps set fakkz = p_value where PSPNR eq p_wbs.
       if p_value is initial.
         message i999(za) with 'Billing element field has been unchecked'.
       else.
         message i999(za) with 'Billing element field has been checked'.
       endif.
    else.
      message i999(za) with 'WBS element not found'.
    endif.
    reward  points if it is usefull .....
    Girish

  • How do I convert ClobDomain to java.sql.Clob?

    I have an instance of oracle.jbo.domain.ClobDomain and i need
    to convert it to oracle.sql.CLOB. How do I do this?

    Sascha, I tried your solution:
    clobData = (CLOB) content.getData();
    Alas, it does not work. Although content has a value, clobData becomes null
    Also, if I take a look in the source ClobDomain.data, the method getData has the following
    comment:
    * Internal:Applications should not use this method.
    Does anybody know a way out?
    lebbol

  • How to update PL/SQL block/Specs in Repository without cut/paste ?

    (cross-posted in METALINK form also)
    Hello,
    Question: How to quickly update PL/SQL block/specs in a package
    Repository Object Browser? (without cut/paste)
    Tools: Designer 9i, ROB 9.0.2.6
    Detailed description of a problem:
    -- there is no good pl/sql IDE working with ROB
    (JDeveloper can not work with NOT PRIVATE repository workspace)
    -- I use Toad and develop/generate pl/sql object
    directly in database.
    -- I have to synchronize my work with repository as often
    as possible the following way (we do not use read-server model
    because afraid of getting 1000s of atomik func and proc):
    ---- navigate to the pl/sql package
    ---- select properties
    ---- click on pl/sql block - get old code in editor
    ---- copy all new code from Toad into editor
    ---- remove CREATE OR REPLACE and last line
    ---- save
    ---- do the same with specifications
    I am looking for some way to do this with some script or
    one-button click...
    For example, for text files it is possible to use command line
    Repository Tool. But I did not found the possibility to make
    a script like this:
    checkout
    update workarea/container/plsql_definition/package_name/body....
    .....with new_package_body.txt
    checkin
    Thanks in advance for any help/advice,
    Alex V.

    Hi Alex,
    I just had an "Ah! I see!" moment. I now understand why you're having trouble and I can explain things so you can move on... I hope!
    First it's important to understand that Oracle SCM is designed to support versioning of both files and Oracle Designer objects. Designer objects are stored as rows in specially structured tables that support that specific product. When you look at PL/SQL definitions in the RON you're looking at Designer definitions - not files. As I mentioned before, these are not the definitions of 'real' PL/SQL objects in the data dictionary, but definitions used by Designer (from which the real things can be generated - but that's another story).
    If you're using TOAD you should probably avoid accessing the Designer objects. You need to work with files.
    Here's a suggestion for a sequence of operations:
    - In the RON check out & download the file (e.g. mypkg.plb)
    - In TOAD load the package (from DB, or downloaded file), edit, update package in DB
    - In TOAD save as mypkg.plb (overwriting the downloaded copy)
    - IN RON upload mypkg.plb and check in
    If you've not stored the file in Oracle SCM yet, jsut omit the first step.
    You could even automate this to an extent using SQL to query the data dictionary views (e.g. USER_SOURCE) after making changes to get the code and edit/overwrite the file contents that way.
    Does this help at all?
    Keith.

  • How to update java

    Dear all,
    I was using some site which requires Java. It was working fine till yesterday. Now it requires me to update Java. I have updated Java on my computer it the site works fine.
    How do I get my iphone4 to update java?
    Can anyone in the cloud help.
    Jagesh

    thanks for your reply. Maybe it is Javascript. I am not very conversant the terminology.
    I was able to open a particular website. Now it directs to Java page which says "Update to Java ver6 update 26". After this update the site works fine on pc. But I can't move any further on iphone.
    Pls help.

  • How to create Java client to use WCC web services

    I'm trying to create a Java client to use web services available with Web Center Content.
    I generated stubs using "cxf-codegen-plugin" and I wrote following code (very trivial):
    DocInfo docInfo = null;
    *try {*
    docInfo = new DocInfo(new URL("http://vmxp43:16200/cs/idcplg?IdcService=GET_SOAP_WSDL_FILE&wsdlName=DocInfo&idcToken=1344065729220:B443F7C3DED844B594F32E0B3914E576&IsSoap=1"));
    *} catch (MalformedURLException e) {*
    e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
    DocInfoSoap docInfoSoap = docInfo.getDocInfoSoap();
    DocInfoByIDResult docInfoByIDResult =  docInfoSoap.docInfoByID(new Integer(2), null);
    At the moment I'm obtaining following error:
    Exception in thread "main" javax.xml.ws.WebServiceException: Failed to access the WSDL at: http://vmxp43:16200/cs/idcplg?IdcService=GET_SOAP_WSDL_FILE&wsdlName=DocInfo&idcToken=1344065729220:B443F7C3DED844B594F32E0B3914E576&IsSoap=1. It failed with:
    *     Invalid WSDL http://vmxp43:16200/cs/idcplg?IdcService=GET_SOAP_WSDL_FILE&wsdlName=DocInfo&idcToken=1344065729220:B443F7C3DED844B594F32E0B3914E576&IsSoap=1, expected {http://schemas.xmlsoap.org/wsdl/}definitions found html at (lineLine number = 3*
    Column number = 30
    System Id = http://vmxp43:16200/cs/idcplg?IdcService=GET_SOAP_WSDL_FILE&wsdlName=DocInfo&idcToken=1344065729220:B443F7C3DED844B594F32E0B3914E576&IsSoap=1
    Public Id = null
    Location Uri= http://vmxp43:16200/cs/idcplg?IdcService=GET_SOAP_WSDL_FILE&wsdlName=DocInfo&idcToken=1344065729220:B443F7C3DED844B594F32E0B3914E576&IsSoap=1
    CharacterOffset = 133
    *     at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.tryWithMex(RuntimeWSDLParser.java:151)*
    *     at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:127)*
    *     at com.sun.xml.internal.ws.client.WSServiceDelegate.parseWSDL(WSServiceDelegate.java:254)*
    *     at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:217)*
    *     at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:165)*
    *     at com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:93)*
    *     at javax.xml.ws.Service.<init>(Service.java:56)*
    *     at com.stellent.docinfo.DocInfo.<init>(DocInfo.java:39)*
    *     at eu.europa.efsa.virtual.library.services.client.TestDocInfo.main(TestDocInfo.java:23)*
    *Caused by: javax.xml.stream.XMLStreamException: Invalid WSDL http://vmxp43:16200/cs/idcplg?IdcService=GET_SOAP_WSDL_FILE&wsdlName=DocInfo&idcToken=1344065729220:B443F7C3DED844B594F32E0B3914E576&IsSoap=1, expected {http://schemas.xmlsoap.org/wsdl/}definitions found html at (lineLine number = 3*
    Column number = 30
    System Id = http://vmxp43:16200/cs/idcplg?IdcService=GET_SOAP_WSDL_FILE&wsdlName=DocInfo&idcToken=1344065729220:B443F7C3DED844B594F32E0B3914E576&IsSoap=1
    Public Id = null
    Location Uri= http://vmxp43:16200/cs/idcplg?IdcService=GET_SOAP_WSDL_FILE&wsdlName=DocInfo&idcToken=1344065729220:B443F7C3DED844B594F32E0B3914E576&IsSoap=1
    CharacterOffset = 133
    *     at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:120)*
    *     ... 7 more*
    Please, any comment will be appreciated.

    Now I'm trying following code.
    DocInfo docInfo = new DocInfo();
    DocInfoSoap docInfoSoap = docInfo.getDocInfoSoap();
    DocInfoByIDResult docInfoByIDResult =  docInfoSoap.docInfoByID(new Integer(2), null);
    The error I obtain is:
    Exception in thread "main" com.sun.xml.internal.ws.client.ClientTransportException: The server sent HTTP status code 401: Unauthorized
         at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.checkStatusCode(HttpTransportPipe.java:196)
         at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:168)
         at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:83)
         at com.sun.xml.internal.ws.transport.DeferredTransportPipe.processRequest(DeferredTransportPipe.java:105)
         at com.sun.xml.internal.ws.api.pipe.Fiber.__doRun(Fiber.java:587)
         at com.sun.xml.internal.ws.api.pipe.Fiber._doRun(Fiber.java:546)
         at com.sun.xml.internal.ws.api.pipe.Fiber.doRun(Fiber.java:531)
         at com.sun.xml.internal.ws.api.pipe.Fiber.runSync(Fiber.java:428)
         at com.sun.xml.internal.ws.client.Stub.process(Stub.java:211)
         at com.sun.xml.internal.ws.client.sei.SEIStub.doProcess(SEIStub.java:124)
         at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:98)
         at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:78)
         at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:107)
         at $Proxy28.docInfoByID(Unknown Source)
         at eu.europa.efsa.virtual.library.services.client.TestDocInfo.main(TestDocInfo.java:20)
    Is there a way to pass right username and password?
    How can I understand which the user actually used?

  • How can I print a html Using javax.print

    Hi friends,
    I am in big trouble . I use following code to print a html file using javax.print api.
    import java.io.*;
    import javax.print.*;
    import javax.print.attribute.*;
    import javax.print.attribute.standard.*;
    import javax.print.event.*;
    public class PrintPS
         public static void main(String args[]) {
              PrintPS html = new PrintPS();
         public PrintPS() {
         DocFlavor flavor = DocFlavor.INPUT_STREAM.TEXT_HTML_HOST;
         PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
         aset.add(MediaSizeName.ISO_A4);
         aset.add(new Copies(1));
         aset.add(MediaTray.MAIN);
         PrintService pservices = PrintServiceLookup.lookupDefaultPrintService();
         if(pservices==null)
              System.out.println(" printer not found");
         if (pservices!= null) {
         System.out.println("selected printer " + pservices.getName());
         DocPrintJob pj = pservices.createPrintJob();
         try {
         InputStream fis = new FileInputStream("abc.html");
         Doc doc = new SimpleDoc(fis, flavor, null);
    System.out.println("printing started ");
         pj.print(doc, aset);
    System.out.println("printing completed");
         } catch (IOException ie) {
         System.err.println(ie);
         } catch (PrintException e) {
         System.err.println(e);
    This code gives me "sun.print.PrintJobFlavorException: invalid flavor"
    So i use all four TEXT_HTML flavor but i do not find the solution.
    I am able to print pdf, jpg, gif files but i can not able to print txt and html file.
    My printer supports txt and html printing becaue i do printing directolly by browser's or notpad's print command .

    Hi friends,
    I am in big trouble . I use following code to print a
    html file using javax.print api.Use Code Tags
    http://forum.java.sun.com/help.jspa?sec=formatting
    My printer supports txt and html printing becaue i do
    printing directolly by browser's or notpad's print
    command .Notepad & your browser prob. convert to the HTML/text(1) into the printers native format.
    1) I am suprised that it does not print text.

  • IS-RETAIL: How to update custom enhancement field using BAPI?

    Hi gurus,
    Like ECC BAPI: BAPI_MATERIAL_SAVEDATA,
    This BAPI(BAPI_MATERIAL_MAINTAINDATA_RT) is specific for IS-RETAIL to create and update material master data.
    But now If I append one custom field "ZFIELD" to end of table MARA, my question is how to update this custom enhancement field(ZFIELD) using BAPI(BAPI_MATERIAL_MAINTAINDATA_RT)
    Thanks in advance!

    Hi DongHai,
    I suggest you create your own BAPI. Just copy the codes in BAPI_MATERIAL_MAINTAINDATA_RT and add your custom fields. If you want to append the data of the custom field in table MARA, first, you have to create a structure table then goto SE11, type MARA and display. Click the APPEND STRUCTURE then choose the structure that you've created. Hope this will help.
    Rewards if useful
    Regards,
    Mark

  • How to convert JAVA.SQL.DATE date in YYYY/MM/DD format into DD/MM/YYYY

    i am using informix database which accepts date value in the form of DATE format......
    the other part of my application takes date from the field in DD/MM/YYYY format...so i have to convert my java.sql.date in YYYY/MM/DD fromat into DD/MM/YYYY fromat of same type before inserting into db......
    but using parse method in SimpleDateFormat class can get the result only in java.util.date format...
    and also using format method can result only in string conversion........

    816399 wrote:
    i am using informix database which accepts date value in the form of DATE format......Huh?
    Maybe you mean Informix (fronted by JDBC) expects date values as java.sql.Date objects?
    the other part of my application takes date from the field in DD/MM/YYYY format...
    so i have to convert my java.sql.date in YYYY/MM/DD format into DD/MM/YYYY format of same type before inserting into db......I am not sure why you are talking about formats here.
    There is no formatting inherent in a java.util.Date object
    nor in a java.sql.Date object.
    but using parse method in SimpleDateFormat class can get the result only in java.util.date format...
    and also using format method can result only in string conversion........You can easily create a java.sql.Date object from a java.util.Date object.
    String s = "31/12/2010";
    java.util.Date ud = new java.text.SimpleDateFormat("dd/MM/yyyy").parse(s);
    java.sql.Date sd = new java.sql.Date(ud.getTime());
    ud = sd; // java.sql.Date extends java.util.Date so no conversion is needed

Maybe you are looking for