Empty CLOB field value from Oracle database using JDBC Sender

Hi All,
I am selecting a CLOB field from Oracle database table using JDBC Sender adapter and getting error "NullPointerException"
Seen SAP note 1283089 but its not applicable for my support pack PI 7.0 SP 12 and client dont want to upgrdate SP 17 right now.
I tried rpad(1,0)Column_Name funciton in JDBC select query but it selcting blank value for every record even those having some value for this CLOB field so not useful
Could anybody suggest possible way? client dont want to change anything at database side.
Thanks,
Dharamveer

What is the Oracle driver version installed? You might need to install 10.x driver if not already using it.

Similar Messages

  • Generate .dbf file from oracle database using JDBC

    Dear all,
    I need to generate a .dbf file from oracle table. Anyone know how to do this using Java Programming or JDBC? please help!
    thank you

    Hi,
    I assume you already have a JDBC driver for either FoxPro or DBase. If not, use the JDBC-ODBC bridge and the ODBC driver that comes with Window$.
    When you issue a "Create TABLE" command the driver will automatically create a .dbf file and then you can export data to it.
    Imran

  • ASP & Clob fields in the Oracle Database 8i

    Hi All,
    This is the first time I am posting a question. We are having a problem interfacing ASP pages with Clob fields int he Oracle Database.
    We are trying to display clob fields in an oracle database from ASP PAge. The ASP Page does a select to a clob field from a table. But we lose the formatting od the data inside the clob field when we display it out using ASP. We display it as a
    single stream of data. But when we display the clob using SQLPLUS we do see the formatted data.
    How can we solve this issue or circumvent it ?
    We are not looking to parse through the clob field in ASP, rather we already have a stored procedure that parses the data for us. The parsed data is then stored in a clob field already formatted the way we need it. The problem occurs when the ASP
    page reads the clob field. The ASP page reads it as one continuos string instead of the formatted data that exists in the clob field.
    I imported the data from Oracle to Access in order to view the raw data. The data is shown formatted properly in Access, so we know our stored procedure is doing what it supposed to do. As far as getting the data to display. The only way to retrieve (as far as I know) a clob field using ASP is by a built in function called GetChunk(). Is there a better method of displaying the formatted data aside from parsing on the client side, using ASP?
    Let me know if anyone has a solution to this problem.
    Thanks for your help and time. Sanjiv.

    Sanjiv, you might want to try some of the Windows development forums:
    ODBC: http://forums.oracle.com/forums/forum.jsp?id=763957
    New .NET provider forum: http://forums.oracle.com/forums/forum.jsp?id=1015160
    Oracle Objects for OLE: http://forums.oracle.com/forums/forum.jsp?id=763961
    Oracle Provider for OLE DB: http://forums.oracle.com/forums/forum.jsp?id=763961
    Oracle Services for MTS: http://forums.oracle.com/forums/forum.jsp?id=763960
    You'll reach a more appropriate audience than just the Web services audience.
    Mike.

  • How to store and retrieve blob data type in/from oracle database using JSP

    how to store and retrieve blob data type in/from oracle database using JSP and not using servlet
    thanks

    JSP? Why?
    start here: [http://java.sun.com/developer/onlineTraining/JSPIntro/contents.html]

  • FETCH DATA FROM ORACLE DATABASE USING Web Dynpro

    I want to fetch data from ORACLE database using Web Dynpro.How can I do this?

    1) Are you sure that you get no results? It sounds like you are having name resolution issues, which would imply that you should be getting an ORA-00942 error indicating that the table doesn't exist (or that you don't have access to the table). If you are not seeing this error, I would tend to suspect an overzealous exception handler.
    2) What database account owns the table? What database account is your ASP.Net application using to connect? Assuming these two accounts are different, your application would either have to
    - Explicitly prefix the table name with the schema name
    - Have a public or private synonym that maps the table name to the fully qualified identifier schema_name.table_name
    - Issue the command ALTER SESSION SET CURRENT_SCHEMA = <<schema name>> in each session, in which case all queries in the session would use the specified schema name as the default if no schema name is prefixed.
    Justin

  • NCHAR issue with oracle database using JDBC adapter

    Hi,
    We have a requirement to develop an XI interface from FTP server(File adapter) to oracle database using JDBC adapter. In the oracle database table few fields are of type NCHAR/NVARCHAR. when we try to insert the character(A,B,c..) values into oracle table fields of type NCHAR/NVARCHAR, we are getting the following error message in the JDBC adapter audit log. IF we pass the numeric value to the same field, then we are able to insert the records successfully.
    Unable to execute statement for table or stored procedure. 'IPCSDD_DOWNLOAD_PROCESS' (Structure 'StatementName1') due to java.sql.SQLException: ORA-00904: "P": invalid identifier
    2010-10-19 22:29:59 Error JDBC message processing failed; reason Error processing request in sax parser: Error when executing statement for table/stored proc. 'IPCSDD_DOWNLOAD_PROCESS' (structure 'StatementName1'): java.sql.SQLException: ORA-00904: "P": invalid identifier
    2010-10-19 22:29:59 Error MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'IPCSDD_DOWNLOAD_PROCESS' (structure 'StatementName1'): java.sql.SQLException: ORA-00904: "P": invalid identifier
    Please find the system information below.
    Oracle version- 10.2.4
    XI version - 3.0/ service pack 19
    JDBC driver- oracle.jdbc.driver.OracleDriver
    Please suggest.
    Thanks,
    Venkata
    Edited by: Venkata Narayana  Eepuri on Oct 21, 2010 12:10 AM

    Dear Venkata Narayana,
    Concerning the error, kindly go through the following note :
    731 - Collective note: ORA-00904
    follow the recommendations mentioned in that and please check if that helps.
    Best Regards
    Nishwanth

  • Default value from Oracle database not working

    Hi Everyone:
    We use JHeadstart 10.1.3.1.
    I have an Oracle table that has 2 fields that are both mandatory and have default values. We have been spending a lot of time putting this type of business logic in the database so that these checks do not have to happen in the JHeadstart Application.
    The mandatory field is being brought into our Entity Object (as the mandatory checkbox is checked), but the default values do not seem to be getting pulled from the database. Even though the default value is defined at the database level, when trying to insert a new row into the table, a value must be filled in by the User running the application, otherwise an Oracle error is received that it is a mandatory field and must have a value. This happens when I am running the ApplicationModule by right-clicking it and clicking on "Test" as well as when running the Application
    Does JDeveloper not pull default values from the database? Is there something I am missing?
    Just for clarity, we have developed a re-usable library of entity objects that imports all of our Business Components similar to the following link
    http://download-uk.oracle.com/docs/cd/B32110_01/web.1013/b25947/bcadvgen007.htm#CHEFECGD This is working well, but want to mention it here in case it is a consideration.
    Thanks in advance.
    Mary
    U of W

    Steven:
    Thanks so much for taking the time to reply. Good to hear from you. Hope you are keeping warm in the Netherlands!
    During synchronization or initial creation of the Business Components from the Oracle tables, JDeveloper brings over the mandatory attribute as defined in the database.
    Would it be possible, in a future release, to also bring over the default values found in the database and assign them to the "Default" property in the Entity Objects Editor?
    I always like to follow the best practice of defining something in one spot to make maintenance as easy as possible and avoid manual steps.
    Thanks very much for your time.
    Mary B
    U of Windsor

  • Want to see on screen data from oracle database using php

    I am struggling on the problem of echoing data from Oracle database (9i) to the screen for viewing. For ex. the data has records from various cities. when a particular city is inputted as prompt, all the records for the that city from the table should appear through PHP. Can someone help me?

    Thank you very much for giving the link. I tried and it is working. Only, I am still struggling with trying to get many fields from the database on the screen for viewing. Ex. a prompt to ask which country and which month. If I give India and December it must give all the data pertaining to India for December. This AJAX was very useful, as it gave lot of tips, but my basic query to see the data thru PHP from my database is still unsolved. Any help??
    Jacob
    Thanks once again for the help.

  • Inserting Multiple Images into oracle database using JDBC

    I wanted to insert multiple images into database using JDBC by reading it from the file... and i am passing photos.txt(my text file) as an input parameter... I have inserted all the values into the database except for the image part... this is my content of photos.txt file and i have copied all the images into the folder
    *" C:\\photos "*
    *1,in1.jpg,108,19,in-n-out*
    *2,in2.jpg,187,21,in-n-out*
    *3,in3.jpg,308,41,in-n-out*
    *4,in4.jpg,477,52,in-n-out*
    *5,in5.jpg,530,50,in-n-out*
    and i want to store in1.jpg,in2.jpg,in3.jpg,in4.jpg,in5.jpg into the oracle databse using JDBC.... i have tried a lot using BLOB column.... and i have created my table as
    CREATE TABLE PHOTO(
    ID NUMBER NOT NULL PRIMARY KEY ,
    Name BLOB,
    X DOUBLE PRECISION,
    Y DOUBLE PRECISION,
    Tags VARCHAR2(40)
      try {                 // for restaurant System.out.println();System.out.println();System.out.println(); System.out.print("  Creating Statement for Photo...\n");             stmt2 = con.createStatement ();                       stmt2.executeUpdate("delete from PHOTO"); stmt2.executeUpdate("commit"); PreparedStatement stmt3 = con.prepareStatement ("INSERT INTO PHOTO VALUES (?, ?, ?, ?, ?)");             System.out.print("  Create FileReader Object for file: " + inputFileName1 + "...\n");             FileReader inputFileReader2 = new FileReader(inputFileName1);             System.out.print("  Create BufferedReader Object for FileReader Object...\n");             BufferedReader inputStream2  = new BufferedReader(inputFileReader2);             String inLine2 = null;                         String[] tokens; //            String[] imageFilenames = {"c:\\photos\\in1.jpg","c:\\photos\\in2.jpg","c:\\photos\\in3.jpg","c:\\photos\\in4.jpg","c:\\photos\\in5.jpg", //  "c:\\photos\\in6.jpg","c:\\photos\\in7.jpg","c:\\photos\\in8.jpg","c:\\photos\\in9.jpg","c:\\photos\\in10.jpg","c:\\photos\\arb1.jpg","c:\\photos\\arb2.jpg", //  "c:\\photos\\arb3.jpg","c:\\photos\\arb4.jpg","c:\\photos\\arb5.jpg","c:\\photos\\den1.jpg","c:\\photos\\den2.jpg","c:\\photos\\den3.jpg", //  "c:\\photos\\den4.jpg","c:\\photos\\den5.jpg","c:\\photos\\hop1.jpg","c:\\photos\\hop2.jpg","c:\\photos\\hop3.jpg","c:\\photos\\hop4.jpg","c:\\photos\\hop5.jpg"};               File file = new File("C:\\photos\\in1.jpg");            \\ ( Just for example  )           FileInputStream fs = new FileInputStream(file);                         while ((inLine2 = inputStream2.readLine()) != null) {               tokens= inLine2.split(",");             st2 = new StringTokenizer(inLine2, DELIM);                                                             stmt3.setString(1, tokens[0]);               stmt3.setBinaryStream(2, fs, (int)(file.length()));               stmt3.setString(3, tokens[2]);               stmt3.setString(4, tokens[3]);               stmt3.setString(5, tokens[4]);               stmt3.execute(); //execute the prepared statement               stmt3.clearParameters(); 
    As i am able to enter one image file by above code in1.jpg in to the oracle database.... but i am not able to insert all the image file in to the database.....do tell me what should i do.... and can you give me the example on the basis of the above code of mine...
    do reply as soon as possible..

    jwenting wrote:
    that depends. Putting the images in BLOBs prevents the file locations stored in the database from getting out of synch with the filesystem when sysadmins decide to reorganise directory structures or "archive" "old" files that noone uses anyway.True, but it really comes down to a business decision (cost-benefit analysis). If you have the bucks, the expertise, and the time, go with the Blobs, otherwise go with the flat files.

  • How to get Operating System Space Info from Oracle database using SQL

    Our oracle databases are installed on Unix operating system. Currently our DBA wrote a view to get space info of table spaces and He is requesting me to add Operating system level(file system) drive space info to the same report.
    Can you please let me know the easiest way to get this information to sql table so that it can be used for reporting purposes?

    You should be able to create a shell script with the OS commands to generate the information for the mount points that you want to access in Oracle, then read it in as an external table using the preprocessor feature of external tables:
    http://download.oracle.com/otndocs/products/database/enterprise_edition/utilities/pdf/xtables_preproc11g_1009.pdf

  • Connection to oracle database using jdbc

    i am using eclipse as editor.
    How to connect to the database?
    How to create a new table in oracle database through a servlet invoked
    program.
    My servlet receives input from an html page and then it can either do the above mentioned activities by itself or can invoke any other java class if necessary.

    This doesn't seem to have anything to do with JavaMail.
    You need to post this question to a more appropriate forum.

  • Retrieving Schema details from any database using JDBC.

    Hi,
    We are in a process of developing a tool to extract the schema level details from any database. Following are the areas where we are facing difficulties. Please give us your valuable comments.
    1.How can I get all the depending views of a particular table or vice- versa ?
    2.If there is a join view in my database.How can i get the information
    for all the join columns?
    3. suppose the view in the database is built using some select and omit
    Clause. how can I get those conditions using JDBC ?
    4.for a viewcolumn , how can I find out, it refers to which column of
    a table ?
    5.For a table how can I get the information about its unique
    constraints and check constraints
    6.How can I check , a constraint is enabled or disabled on any table?
    I will appreciate your response.

    Hi,
    We are in a process of developing a tool to extract
    ct the schema level details from any database.
    Following are the areas where we are facing
    difficulties. Please give us your valuable comments.
    1.How can I get all the depending views of a
    particular table or vice- versa ?No way with JDBC. You need to create something DBMS specific
    2.If there is a join view in my database.How can i get
    the information for all the join columns?see 1)
    3. suppose the view in the database is built using
    some select and omit
    Clause. how can I get those conditions using JDBC
    BC ?see 1)
    4.for a viewcolumn , how can I find out, it refers to
    which column of a table ?see 1)
    5.For a table how can I get the information about its
    unique constraints and check constraintsThe DatabaseMetadata object can return that information
    6.How can I check , a constraint is enabled or
    disabled on any table?I don't think that this is possible with JDBC (not sure
    if that information is returned from the DatabaseMetadata
    object). You will need to code something DBMS specific
    I think there is something with deferred constraints which
    can be checked by JDBC but I'm not sure about that either
    Thomas

  • Calling Stored Procedure from Oracle DataBase using Sender JDBC (JDBC-JMS)

    Hi All,
    We have requirement to move the data from Database to Queue (Interface Flow: JDBC -> JMS).
    Database is Oracle.
    *Based on Event, data will be triggered into two tables: XX & YY. This event occurs twice daily.
    Take one field: 'aa' in XX and compare it with the field: 'pp' in YY.
    If both are equal, then
         if the field: 'qq' in YY table equals to "Add" then take the data from the view table: 'Add_View'.
         else  if the field: 'qq' in YY table equals to "Modify"  then take the data from the view table: 'Modify_View'.
    Finally, We need to archive the selected data from the respective view table.*
    From each table, data will come differently, means with different field names.
    I thought of call Stored Procedure from Sender JDBC Adapter for the above requirement.
    But I heard that, we cannot call stored procedure in Oracle through Sender JDBC as it returns Cursor instead of ResultSet.
    Is there any way other than Stored Procedure?
    How to handle Data Types as data is coming from two different tables?
    Can we create one data type for two tables?
    Is BPM required for this to collect data from two different tables?
    Can somebody guide me on how to handle this?
    Waiting eagerly for help which will be rewarded.
    Thanks and Regards,
    Jyothirmayi.

    Hi Gopal,
    Thank you for your reply.
    >Is there any way other than Stored Procedure?
    Can you try configuring sender adapter to poll the data in intervals. You can configure Automatic TIme planning (ATP) in the sender jdbc channel.
    I need to select the data from different tables based on some conditions. Let me simplify that.
    Suppose Table1 contains 'n' no of rows. For each row, I need to test two conditions where only one condition will be satisfied. If 1st condition is satisfied, then data needs to be taken from Table2 else data needs to be taken from Table3.
    How can we meet this by configuring sender adapter with ATP?
    ================================================================================================
    >How to handle Data Types as data is coming from two different tables?
    If you use join query in the select statement field of the channel then whatever you need select fields will be returned. This might be fields of two tables. your datatype fields are combination of two diff table.
    we need to take data only from one table at a time. It is not join of two tables.
    ================================================================================================
    Thanks,
    Jyothirmayi.

  • Generating hourly report from oracle database using sql developer .Help

    I am working on SQL Developer 1.5.1, i need to prepare hourly record of the activity on the database, for that i have a sql query that gives me the report as per selected columns on hourly basis.I need to prepare 24 reports a day.
    Each time i have to go to the query , change the date as per hours like form 22:06:2011 10:00:00 to 22:06:2011 11:00:00 and get the report and export it in excel.
    I want to automate the script so that whenever i run the script , it just asks me the date and runs the script 24 times and fetch me the hourly report of whole day.
    the query syntax is something like this
    Select
    from
    where
    And.......................
    And...................
    And......................
    And req date between to-date( 22:06:2011 10:00:00) And to-date(22:06:2011 11:00:00)
    Order by 7,1,2,3,4,5
    Is there any possibility that i can automate the script to automatically change the hour itself and generate a report in excel 24 times?please share if you have any idea on this.
    Looking forward for a response.

    This gives you data for the whole day and the first column tells you which hour data it is,
    SELECT 'HOUR' || TO_CHAR ( req_date, 'HH24') AS hour_num,
           col1,
           col2,
           col3
      FROM table_name
    WHERE TRUNC (req_date) = TO_DATE ( '22/06/2011', 'DD/MM/YYYY')G.

  • Error calling BLS from oracle database

    Hi Experts,
    We have a scenario in which we are calling BLS from oracle database using trigger. The call is made using the following URL:
    http://<Host name>:50000/XMII/Runner?Transaction=<TRX_Path>&Material=MATNR&Pallet_id=PALLET&Plant=PLANT&Proc_order=PROC&Prodline=PROD&Quantity=QTY&Start_Date=DAT&Start_Time=TIM&Status=STAT&UOM=UOM1&User_name=USER&OutputParameter=*
    This used to work fine in 11.5 but when we upgraded to 14.0 it is not working. We have maintained server details in \etc\host file.
    We were getting error in file 'Error 1 Text.txt'. "A possible Cross-Frame Scripting attack has been prevented. Please contact your system administrator or refer to" this was the last error message. We checked this on SCN and based on the search results we have implemented SAP note 1651004 wherein setting in netweaver is required to be changed. After note was implemented we are getting another error text ('Error 2 Text.txt') "This will happen if the browser running the page tha". We tried a few ways but could not capture the full message coming.
    Has anybody of faced similar problem? I would highly appreciate any hint which could help in solving this problem.
    System Information:
    NW 7.31 SP 10
    Oracle 11.2.0.4
    MII 14.0 SP5 patch 7
    Regards,
    Darshan

    Hi Christian/Anushree,
    I have now modified the URL by adding Illum login name and password:
    http://<Host name>:50000/XMII/Runner?Transaction=<TRX_Path>&Material=MATNR&Pallet_id=PALLET&Plant=PLANT&Proc_order=PROC&…
    When i run the url in browser it gives me the expected results but when i try to trigger it from Oracle i am still getting the error as below:
    "<script>
      var inPortalScript = false
      var webpath = "/logon_ui_resources/"
    </script>
    <html>
    <head>
    <BASE target="_self">
    <link rel=stylesheet href="/logon_ui_resources/css/ur/ur_ie5.css">
    <title>User Management, SAP AG</title>
    <script language="javascript">
    var originWindowName=window.name;
    window.name="logonAppPage";
    function restoreWindow() {
    try{
    window.name=originWindowName;
    } catch(ex){}
    </script>
    <script language="JavaScript">
    function putFocus(formInst, elementInst) {
      if (document.forms.length > 0) {
        document.forms[formInst].elements[elementInst].focus();
    function setValuesAutoCreation() {
    var form = document.getElementById('logonForm');
    form.j_username.value="";
    form.j_password.value="";
    form.automaticAccountCreation.value="true";
    function submitForm() {
    var form = document.getElementById('logonForm');
    form.submit();
    function clearEntries() {
      document.logonForm.longUid.value="";
      document.logonForm.password.value="";
    function setFocusToFirstField() {
    myform = document.logonForm;
    try{
       for (i=0; i<myform.length; i++) {
        elem = myform.elements[i];
        if (!elem.disabled) {
          elemType = elem.type;
          if (elemType=="text" || elemType=="password") {
           if (!elem.readOnly) {
              elem.focus();
              break;
          if (elemType=="select-one" || elemType=="select-multiple" || elemType=="checkbox" || elemType=="radio") {
            elem.focus();
            break;
    } catch(ex){
    function addTenantPrefix() {
      return true;
    </script>
    </head>
    <body class="urBdyStd" bgcolor="#F7F9FB" onLoad="setFocusToFirstField()" onUnload="restoreWindow()">
    Thanks,
    Darshan
    <script language="JavaScript">
    var blockPage = false;
    </script>
    <script language="JavaScript">
    try {
      if (top.document.domain != self.document.domain) {
      blockPage = true;
    } catch (error) {
      // This will happen if the browser running the page tha"

Maybe you are looking for

  • How to create a OTR Text in Web Dynpro ?

    Hi All, Please help, How to create a OTR Text in Web Dynpro ? Urgent. Thanks in advance. Kaleem.

  • Sony's new Webbie HD camera MP4

    Hey folks, Thanks for the camera help. It seems Sony has launched a compelling new HD 1080p camera and I am wondering what the experts think about it as far as whether it will easily work with FCP. The often-repeated press release says you can dump t

  • More storage on iCloud

    The only things I have backing up on iCloud are pictures, calendar, and contacts. I deleted all of my pictures from photostream on my iPhone and I moved all of my pictures from iCloud into another folder on my PC but it's still saying my iCloud does

  • How do I find out about iPhoto sales and promotions?

    I randomly happened to print a book in iPhoto about a month ago, and it told me that there was free shipping due to the Mother's Day holiday.  How can I find out when these sales or promotions are happening so that I could do this on purpose?  (You'd

  • Can't open the "port to VLAN menu" in SG200 -08

    I get a empty blue window when I try to open "port to VLAN" We have upgraded the software but it dosn't help.