Problem in creating Oracle CLOB thorough JAVA

HI,
I am facing problem in inserting CLOB data through Oracle.
My code sends exception at below java code line:-
oracle.sql.CLOB newClob = oracle.sql.CLOB.createTemporary(nativeConnection,false, oracle.sql.CLOB.DURATION_SESSION);
Exception is:::::
===========
11/08/10 19:12:33 InsertQuery is::::::>>>>INSERT INTO MCREDIT_XML (Inmxml,outmxml,app_id_c,REQUEST_ID,request_date) values (?,?)
11/08/10 19:12:50 Error In Clob----->oracle.jdbc.internal.OracleConnection oracle.jdbc.OracleConnection.physicalConnectionWithin()
com.evermind.server.rmi.OrionRemoteException: Transaction was rolled back: java.lang.AbstractMethodError: oracle.jdbc.internal.OracleConnection oracle.jdbc.OracleConnection.physicalConnectionWithin()
at QdeMain_StatelessSessionBeanWrapper50.processRequest(QdeMain_StatelessSessionBeanWrapper50.java:158)
at com.nucleus.los.bean.trackinginterface.ejb.DedupeExtBean.onMessageMCredit(DedupeExtBean.java:153)
at com.nucleus.los.bean.trackinginterface.ejb.DedupeExtBean.onMessage(DedupeExtBean.java:82)
at com.evermind.server.ejb.MessageDrivenBeanInvocation.run(MessageDrivenBeanInvocation.java:123)
at com.evermind.server.ejb.MessageDrivenHome.onMessage(MessageDrivenHome.java:745)
at com.evermind.server.ejb.MessageDrivenHome.run(MessageDrivenHome.java:916)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
at java.lang.Thread.run(Thread.java:534)
Nested exception is:
java.rmi.RemoteException: oracle.jdbc.internal.OracleConnection oracle.jdbc.OracleConnection.physicalConnectionWithin(); nested exception is:
java.lang.AbstractMethodError: oracle.jdbc.internal.OracleConnection oracle.jdbc.OracleConnection.physicalConnectionWithin()
at com.evermind.server.ejb.EJBUtils.makeException(EJBUtils.java:941)
at QdeMain_StatelessSessionBeanWrapper50.processRequest(QdeMain_StatelessSessionBeanWrapper50.java:158)
at com.nucleus.los.bean.trackinginterface.ejb.DedupeExtBean.onMessageMCredit(DedupeExtBean.java:153)
at com.nucleus.los.bean.trackinginterface.ejb.DedupeExtBean.onMessage(DedupeExtBean.java:82)
at com.evermind.server.ejb.MessageDrivenBeanInvocation.run(MessageDrivenBeanInvocation.java:123)
at com.evermind.server.ejb.MessageDrivenHome.onMessage(MessageDrivenHome.java:745)
at com.evermind.server.ejb.MessageDrivenHome.run(MessageDrivenHome.java:916)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
at java.lang.Thread.run(Thread.java:534)
Caused by: java.lang.AbstractMethodError: oracle.jdbc.internal.OracleConnection oracle.jdbc.OracleConnection.physicalConnectionWithin()
at oracle.sql.CLOB.createTemporary(CLOB.java:684)
at oracle.sql.CLOB.createTemporary(CLOB.java:651)
at com.nucleus.los.dao.daofactory.OracleDAOFactory.executePreparedUpdateClob(OracleDAOFactory.java:2352)
at com.nucleus.los.bean.application.qde.MCreditInterfaceBean.processRequest(MCreditInterfaceBean.java:171)
at com.nucleus.los.bean.application.qde.ejb.QdeMainBean.processRequest(QdeMainBean.java:84)
at QdeMain_StatelessSessionBeanWrapper50.processRequest(QdeMain_StatelessSessionBeanWrapper50.java:101)
... 7 more

AbstractMethodErrorThat occurs when something wants to call a method which does not exist.
For example if something expects JDBC 4 but the jdbc driver that is being used is for JDBC 2.

Similar Messages

  • Problem with updating oracle DB with java date thru resultset.updateDate()

    URGENT Please
    I am facing problem in updating oracle database with java date through resultset.updateDate() method. Can anybody help me please
    following code is saving wrong date value (dec 4, 2006 instead of java date jul 4, 2007) in database:
    ResultSet rs = stmt.executeQuery("SELECT myDate FROM myTable");
    rs.first();
    SimpleDateFormat sqlFormat = new SimpleDateFormat("yyyy-mm-dd");
    java.util.Date myDate = new Date();
    rs.updateDate("myDate", java.sql.Date.valueOf(sqlFormat.format(myDate)));
    rs.updateRow();

    I believe you should use yyyy-MM-dd instead of yyyy-mm-dd. I think MM stands for month while mm stands for minute as per
    http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html
    (If this works, after spending so much of your time trying to solve it, don't hit yourself in the head too hard. I find running out of the room laughing hysterically feels better).
    Here is a more standard(?) way of updating:
    String sqlStatement=
    "update myTable set myDate=? where personID=?"
    PreparedStatement p1= connection.prepareStatement(sqlStatement);
    p1.setDate(1,new java.sqlDate());
    p1.setInt(2, personID);
    p1.executeUpdate();

  • Problem while creating Oracle Content Server Identity plug-in  in SES

    Hi,
    I am Integrating Oracle SES with UCM.Both UCM and Oracle SES are installed on the same machine.
    I have installed SESCrawlerExport compoent on UCM and also taken Snapshot of Repository.
    But when i am trying to create Oracle Content server Identity plug-in in SES it gives following exception.
    Inputs:-
    1) HTTP endpoint for authentication- http://localhost:100/idc_new/idc
    2) Admin User - sysadmin
    3) Password - idc
    09/10/15 15:06:33 INFO     HTTPThreadGroup-7               URIHandler initialized for the URI http://localhost:100/idcnew/idcplg
    09/10/15 15:06:33 INFO     HTTPThreadGroup-7               StellentIdentityPlugin.autheticate: username=sysadmin
    09/10/15 15:06:33 FATAL     HTTPThreadGroup-7               EQP-80309: Exception while opening a stream to the URI: http://localhost:100/idcnew/idcplg
    09/10/15 15:06:33 FATAL     HTTPThreadGroup-7     EQP-80317: HTTP connect attempt failed after 3 attempts. Aborting connection attempt oracle.search.sdk.common.PluginException oracle.search.plugin.rss.HTTPHandler:getInputStream:302 java.lang.Thread:run:534
    09/10/15 15:06:33 ERROR     HTTPThreadGroup-7               EQP-80354: Exception while authenticating user sysadmin: EQP-80317: HTTP connect attempt failed after 3 attempts. Aborting connection attempt
    09/10/15 15:06:33 ERROR     HTTPThreadGroup-7     EQP-80317: HTTP connect attempt failed after 3 attempts. Aborting connection attempt oracle.search.sdk.common.PluginException oracle.search.plugin.rss.HTTPHandler:getInputStream:302 java.lang.Thread:run:534
    09/10/15 15:06:33 EQP-80353: Exception while validating parameters: EQP-80317: HTTP connect attempt failed after 3 attempts. Aborting connection attempt
    Please help me on the same.
    Regards,
    Nitin

    If the error message is correct, it means that no listener is running on port 100.
    Where did you get the URL http://localhost:100/idc_new/idc ?
    Is UCM using port 100 as it's standard port?
    What happens if you try to open this in a browser (running on the localhost machine)?

  • Problem while creating Oracle Content Server source  in SES

    Hi,
    I am Integrating Oracle SES with UCM.Both UCM and Oracle SES are installed on the same machine.
    I have installed SESCrawlerExport compoent on UCM and also taken Snapshot of Repository.
    But when i am trying to create Oracle Content server Source in SES, it gives following exception.
    13:05:46:562 INFO     main          Crawling started at 10/15/09 1:05 PM
    13:05:47:578 INFO     main          URL manager connecting to Oracle...
    13:05:47:843 INFO     main          connected
    13:05:47:984 ERROR     main          EQG-31209: No security attribute defined for source (id=70)
         at oracle.search.crawler.WebCrawler.init(WebCrawler.java:631)
         at ImtCrawler.run(ImtCrawler.java:1954)
         at ImtCrawler.main(ImtCrawler.java:534)
    13:05:47:984 ERROR     main          EQG-30249: Crawler process aborted
    Please help me on the same.

    Thanks very much, Roger. That's very kind of you. The answer was very helpful. I've changed the host and realm accordingly, and altered the Authentication Type to BASIC (previously NATIVE).
    When I now try a crawl of UCM, it fails and the log file provides the debugging info listed at the bottom of this message. I've tried to research the exception type and have experimented by altering a few configuration values, but have so far failed to resolve the issue. Are you able to hazard a guess as to what could be causing it?
    The parameters I am using are listed below (I have only entered/changed values under the three tabs listed; any fields under those tabs which are omitted below have been left blank):
    Source Configuration
    Configuration URL: http://<hostname>/ucm/idcplg?IdcService=SES_CRAWLER_DOWNLOAD_CONFIG&source=feeds
    Authetication Type: BASIC
    Realm: ucm
    User ID: sysadmin
    Password: <password for sysadmin>
    Max connections: 3
    Authentication
    Host: <hostname>
    Realm: ucm
    Username: sysadmin
    Password: <password for sysadmin>
    Authorization
    ACLs controlled by Source
    HTTP endpoint: http://<hostname>/ucm/idcplg
    Display URL prefix: http://<hostname>/ucm
    Administrator user: sysadmin
    Administrator pw: <password for sysadmin>
    Display crawled version: true
    Authorization user ID format: username
    Use cached user and role info to authorize results: false
    Authentication Type: BASIC
    Realm: ucm
    Debugging info:
    09/10/23 11:29:05 oracle.search.admin.exception.DBSetException
    09/10/23 11:29:05      at oracle.search.admin.util.AdminObject.handleBackEndException(AdminObject.java:297)
    09/10/23 11:29:05      at oracle.search.admin.users.InstanceManager.isOwnerOfInstance(InstanceManager.java:497)
    09/10/23 11:29:05      at schedules.schedules._jspService(_schedules.java:551)
    09/10/23 11:29:05      at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
    09/10/23 11:29:05      at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
    09/10/23 11:29:05      at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
    09/10/23 11:29:05      at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
    09/10/23 11:29:05      at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    09/10/23 11:29:05      at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
    09/10/23 11:29:05      at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
    09/10/23 11:29:05      at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
    09/10/23 11:29:05      at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
    09/10/23 11:29:05      at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
    09/10/23 11:29:05      at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
    09/10/23 11:29:05      at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
    09/10/23 11:29:05      at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
    09/10/23 11:29:05      at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:234)
    09/10/23 11:29:05      at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:29)
    09/10/23 11:29:05      at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:879)
    09/10/23 11:29:05      at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
    09/10/23 11:29:05      at java.lang.Thread.run(Thread.java:534)
    09/10/23 11:29:05 oracle.search.admin.exception.DBSetException
    09/10/23 11:29:05      at oracle.search.admin.util.AdminObject.handleBackEndException(AdminObject.java:297)
    09/10/23 11:29:05      at oracle.search.admin.users.InstanceManager.isOwnerOfInstance(InstanceManager.java:497)
    09/10/23 11:29:05      at control.error._jspService(_error.java:543)
    09/10/23 11:29:05      at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
    09/10/23 11:29:05      at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
    09/10/23 11:29:05      at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
    09/10/23 11:29:05      at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
    09/10/23 11:29:05      at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    09/10/23 11:29:05      at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
    09/10/23 11:29:05      at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
    09/10/23 11:29:05      at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
    09/10/23 11:29:05      at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
    09/10/23 11:29:05      at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
    09/10/23 11:29:05      at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
    09/10/23 11:29:05      at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
    09/10/23 11:29:05      at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
    09/10/23 11:29:05      at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
    09/10/23 11:29:05      at java.lang.Thread.run(Thread.java:534)
    Thanks again.

  • Can I create Oracle Database using Java ???

    HI ...
    Can I create a Database using Java... ? If yes can any one tell me how ? I mean provide some codeing help... ???

    If you mean a table yes, since the create table statement is exactly that, an SQL statement, if you mean an SID then I would have to say (AFAIK) no.

  • Problem in calling oracle procedure from java

    Oracle procedure with the following parameters.
    CREATE OR REPLACE PROCEDURE CREDITED_TO_STORE_INSERT (P_CUST# IN NUMBER,
    P_INV_DATE IN DATE,
    P_MEMO# IN NUMBER,
    P_SESS_ID IN VARCHAR2 ) IS
    BEGIN
    /*.........Procedure Body with select and insert statements there no OUT or return variable/value......*/
    END;
    Now i am calling this procedure with the java code in java.
    public boolean execProcedure(String storeNo, String invoiceDate, String claimNo, String sessionID) throws SQLException {
         CallableStatement cstmt = null;
         java.sql.Date invicDate = this.StringToDate(invoiceDate);
         try
         cstmt = conn.prepareCall("{call WEBUSER.CREDITED_TO_STORE_INSERT(?,?,?,?,?,?)}");
         cstmt.setInt(1, Integer.parseInt(storeNo));
         cstmt.setDate(2, invicDate);
         cstmt.setInt(3, Integer.parseInt(claimNo));
         cstmt.setString(4, sessionID);
         cstmt.execute();
         catch (Exception e)
         System.out.println (e);
         } // catch (Exception e)
         finally
         try
         cstmt.close();
         catch (Exception ex)
         } // catch (Exception ex)
         } // finally
         return true;
    But it will return the following exception.
    [STDOUT] java.sql.SQLException: Missing IN or OUT parameter at index:: 5
    i don't know why :( please help me ...

    your procedure has 4 parameters but in the prepared statement you define 6 placeholders

  • Problem on Creating Unix Termial in java like windows command prompt

    hi all,
    i created an unix terminal using java swing(to connect unix server and executing commands). here i redirect the console output to textarea. The problem is i can't read the input from the textarea. and another problem is how to disable the editable option in the textarea before to the command read line. The terminal is like a putty. Any One Please give a suggestion for this problem.

    sabre150 wrote:
    georgemc wrote:
    LinaGsp wrote:
    5)then I run this command "jar cvfm MyJar.jar manifest.mf .class"If this is exactly what you did, and not a typo, that's probably your problem. Do you have a file called .class?It is more likely that the forum markup is getting in the way.Of course it is! D'oh! I seem to have a blind spot to that, I never take it into consideration...
    OP, listen to these guys, ignore this blind old fool :-(

  • I got problems in creating a table using java

    ok here's what i want to happen, i have a table named tblField that has 3 columns.
    These 3 columns are:
    1. field_ID
    2. field_Desc
    3. field_Fruit
    The table tblField returns 7 rows in which the values of field_Fruit are:
    1. apple
    2. banana
    3. orange
    4. watermelon
    5. pineapple
    6. mango
    7. lemon
    what i want to do is I want to create a new table named tblNewTable that will get the 7 values of field_Fruit and be the columns of the new table tblNewTable.
    So the result would be: I have this new table named tblNewTable and the column names are:
    1. apple
    2. banana
    3. orange
    4. watermelon
    5. pineapple
    6. mango
    7. lemon
    btw i already know how to create a table with hardcoded values.
    An example of create statement is shown below:
    CREATE TABLE [dbo].[tblNewTable] ({[Column Name] [char] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL)For the problem posted above, the first thing i should do is to get all the values of field_Fruit first and put them all in a vector. After that, i should use the create statement using the vector to return all the values of field_Fruit. I tried to do the code below but it doesnt wrk:
    int x = 0;
    CREATE TABLE [dbo].[tblNewTable] (while(x < vFieldFruitVector.size()){ {[Column Name] [char] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL x = x + 1;})vFieldFruitVector is the vector/values of field_Fruit.
    anyone who can help me solve my problem? thanks in advance! :)

    Unless you are using some special tag library or something, SQL is not, as far as I've ever seen, going to handle while loops within the statements. You want to create the table, then you have to create the CREATE statement string
    String c = "CREATE TABLE [dbo].[tblNewTable] (";
    for(int x = 0; x < vFieldFruitVector.size(); x++) {
       c += vFieldFruitVector.get(x) + " char 50 COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL";
    c += ")";
    int res = stmt.executeUpdate(c);

  • Problem with creating oracle database

    I am trying to create a new database in one of customers computers, using Database Administration Assistant. The wizard goes until "Adding Oracle Text" then I get an error message without any description. Then jump out of wizard quickly with no other option.
    I am getting mad of it because the deadline is coming and I don't know what to do.
    PLEASE HELP ME SOON.
    Mehran

    Hello,
    If DBCA doesnt work you can try to create manually Here are the steps to create manual db on Windows.
    ## Manual DB creation on Windows
    C:\>set ORACLE_SID=JUNK
    C:\>oradim -NEW -SID JUNK -STARTMODE auto -SYSPWD testing123 -PFILE d:\oracle\admin\JUNK\pfile\init.ora
    Instance created.
    C:\>sqlplus sys/testing123 as sysdba
    SQL*Plus: Release 10.2.0.1.0 - Production on Fri Feb 24 14:25:29 2006
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Connected to an idle instance.
    SQL> startup nomount pfile=d:\oracle\admin\JUNK\pfile\init.ora
    ORACLE instance started.
    Total System Global Area 293601280 bytes
    Fixed Size 1248624 bytes
    Variable Size 92275344 bytes
    Database Buffers 197132288 bytes
    Redo Buffers 2945024 bytes
    SQL> create database JUNK
    2 maxlogfiles 32
    3 maxlogmembers 3
    4 maxloghistory 1
    5 maxdatafiles 254
    6 maxinstances 1
    7 character set WE8ISO8859P1
    8 datafile 'e:\oradata\JUNK\system01.dbf' size 200m reuse autoextend on next 10240k
    9 sysaux datafile 'e:\oradata\JUNK\sysaux01.dbf' size 100m reuse
    10 undo tablespace undotbs1 datafile 'e:\oradata\JUNK\undotbs01.dbf' size 100m
    11 logfile
    12 group 1 (
    13 'e:\oradata\JUNK\redo01a.log',
    14 'e:\oradata\JUNK\redo01b.log'
    15 ) size 100m reuse,
    16 group 2 (
    17 'e:\oradata\JUNK\redo02a.log',
    18 'e:\oradata\JUNK\redo02b.log'
    19 ) size 100m reuse,
    20 group 3 (
    21 'e:\oradata\JUNK\redo03a.log',
    22 'e:\oradata\JUNK\redo03b.log'
    23 ) size 100m reuse
    24 controlfile reuse;
    Database created.
    # Run Catalog/Catproc as sysdba
    @D:\oracle\oracle10g\RDBMS\ADMIN\catalog.sql
    @D:\oracle\oracle10g\RDBMS\ADMIN\catproc.sql
    # Run Pupbld.sql as system
    conn system/manager
    @D:\oracle\oracle10g\sqlplus\admin\pupbld.sql
    -Sri

  • Problems in creating xml tags using java

    i had analysed the xmlnode builder class but i am unable to learn what is the functions of that class.
    so please send me a sample coding to create the following output.
    i need this kind of output.
    <?xml version="1.0"?>
    <tree>
    <node id="acc" text="Accounts" cImage="tree/images/book.gif" oImage="tree/images/bookopen.gif" contextid="con1">
    <contents>
    <node id="1" text="Liabilites" cImage="tree/images/book.gif" oImage="tree/images/bookopen.gif" contextid="con1">
    <contents>
    <node id="5" text="Capital" cImage="tree/images/book.gif" oImage="tree/images/bookopen.gif" contextid="con1">
    <contents>
    <node id="L5" text="Gods A/c" cImage="tree/images/book.gif" oImage="tree/images/bookopen.gif" contextid="con1"/>
    </contents>
    </node>
    <node id="10" text="Current Liablities" cImage="tree/images/book.gif" oImage="tree/images/bookopen.gif" contextid="con1"/>
    <node id="11" text="Cash On Hand" cImage="tree/images/book.gif" oImage="tree/images/bookopen.gif" contextid="con1">
    <contents>
    <node id="L11" text="Cash" cImage="tree/images/book.gif" oImage="tree/images/bookopen.gif" contextid="con1"/>
    </contents>
    </node>
    <node id="12" text="Bank Balance" cImage="tree/images/book.gif" oImage="tree/images/bookopen.gif" contextid="con1">
    <contents>
    <node id="L12" text="ICICI" cImage="tree/images/book.gif" oImage="tree/images/bookopen.gif" contextid="con1"/>
    </contents>
    </node>
    </contents>
    </node>
    <node id="2" text="Asset" cImage="tree/images/book.gif" oImage="tree/images/bookopen.gif" contextid="con1">
    <contents>
    <node id="6" text="Fixed Asset" cImage="tree/images/book.gif" oImage="tree/images/bookopen.gif" contextid="con2"/>
    </contents>
    </node>
    <node id="3" text="Expenses" cImage="tree/images/book.gif" oImage="tree/images/bookopen.gif" contextid="con1">
    <contents>
    <node id="15" text="Direct Expenses" cImage="tree/images/book.gif" oImage="tree/images/bookopen.gif" contextid="con2">
    <contents>
    <node id="8" text="Purchase" cImage="tree/images/book.gif" oImage="tree/images/bookopen.gif" contextid="con2"/>
    </contents>
    </node>
    <node id="16" text="InDirect Expenses" cImage="tree/images/book.gif" oImage="tree/images/bookopen.gif" contextid="con2">
    <contaents>
    <node id="L16" text="Staff Welfare" cImage="tree/images/book.gif" oImage="tree/images/bookopen.gif" contextid="con2"/>
    </contaents>
    </node>
    </contents>
    </node>
    <node id="4" text="Income" cImage="tree/images/book.gif" oImage="tree/images/bookopen.gif" contextid="con1">
    <contents>
    <node id="13" text="Direct Income" cImage="tree/images/book.gif" oImage="tree/images/bookopen.gif" contextid="con2">
    <contents>
    <node id="7" text="Sales" cImage="tree/images/book.gif" oImage="tree/images/bookopen.gif" contextid="con2"/>
    </contents>
    </node>
    <node id="14" text="InDirect Income" cImage="tree/images/book.gif" oImage="tree/images/bookopen.gif" contextid="con2"/>
    </contents>
    </node>
    </contents>
    </node>
    <node id="inv" text="Inventory" cImage="tree/images/book.gif" oImage="tree/images/bookopen.gif" contextid="con1">
    <contents>
    <node id="1" text="Raw Material" cImage="tree/images/book.gif" oImage="tree/images/bookopen.gif" contextid="con1">
    <contents>
    <node id="I1" text="Pigments" cImage="tree/images/book.gif" oImage="tree/images/bookopen.gif" contextid="con1"/>
    </contents>
    </node>
    <node id="2" text="Intermediate" cImage="tree/images/book.gif" oImage="tree/images/bookopen.gif" contextid="con1"/>
    <node id="3" text="Work In Process" cImage="tree/images/book.gif" oImage="tree/images/bookopen.gif" contextid="con1"/>
    <node id="4" text="Finised Goods" cImage="tree/images/book.gif" oImage="tree/images/bookopen.gif" contextid="con1"/>
    <node id="5" text="Packing Materials" cImage="tree/images/book.gif" oImage="tree/images/bookopen.gif" contextid="con1"/>
    </contents>
    </node>
    </tree>

    Unless you are using some special tag library or something, SQL is not, as far as I've ever seen, going to handle while loops within the statements. You want to create the table, then you have to create the CREATE statement string
    String c = "CREATE TABLE [dbo].[tblNewTable] (";
    for(int x = 0; x < vFieldFruitVector.size(); x++) {
       c += vFieldFruitVector.get(x) + " char 50 COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL";
    c += ")";
    int res = stmt.executeUpdate(c);

  • Problem in Creating Certificate in java

    Dear all
    I have problem in creating certificate using the java lang
    I created the keystore as shown in my code:
    but i still hasing problem with the code as u can see in the pics...
    Please help me to create my digitale certificate because i have to verifying it later... and i am still having no idea how i am going to verify the certificate.....
    Thanks in advance..
    Mariah
    Message was edited by:
    screen83

    i am sorry the picture can't be displayed
    anywhy, this the the code:
    1KeyStore ks = KeyStore.getInstance("JKS");
    2               char[] password = getPassword();
    3               java.io.FileInputStream fis =
    4               new java.io.FileInputStream("keyStoreName");
    5               ks.load(fis, password);
    6               fis.close();
    7               // get my private key
    8               KeyStore.PrivateKeyEntry pkEntry = (KeyStore.PrivateKeyEntry)
    9               ks.getEntry("privateKeyAlias", password);
    10               PrivateKey myPrivateKey = pkEntry.getPrivateKey();
    11
    12               // save my secret key
    13               javax.crypto.SecretKey mySecretKey;
    14               KeyStore.SecretKeyEntry skEntry =
    15               new KeyStore.SecretKeyEntry(mySecretKey);
    16               ks.setEntry("secretKeyAlias", skEntry, password);
    17
    18               // store away the keystore
    19               java.io.FileOutputStream fos =
    20               new java.io.FileOutputStream("newKeyStoreName");
    21               ks.store(fos, password);
    22               fos.close();
    and I have error at line 2 when I am calling rhe method getPassword();
    and at line 9 when calling the method getEntry()
    and at line 16 when calling the mthod setEntry
    Thanks
    Mariah
    Message was edited by:
    screen83

  • CLOB / Charset / Java / Unix Issue

    Hi,
    I'm encountering the following problem.
    I'm working on a 3-tiers architecture with an Oracle Database (8.1.7)
    a Weblogic application server 6.1 SP4 and a Web server under Aix 4.3
    (all 3 are under AIX 4.3 on the same platform).
    My application has a web interface that allows users to upload files
    to the server from their PC clients and a webbrowser, that insert each
    file into a oracle Clob (via Java Code) and that call a stored
    procedure (with java code again) to extract this clob to a file
    (UTL_file package), then, the extracted file is processed line by line
    and information inserted in others tables.
    The issue is that some characters (acute, grave accent ....etc)
    appears as question marks in the database or that some date from the
    file can't be processed because they are structured as DD/MM/YYYY
    (french notation, but that normal I'm from france).
    I first thougt of an NLS_LANG problem but on the weblogic server it is
    set to french_france.WE88859P15 that seems to be right and the same
    the database configuration.
    I then tried to performs some conversion when the clob data were
    extracted to file (from WE88859P15 TO CP152 or vice-versa) with the
    oracle convert function but it seems that it doesn't work.
    An other but coherent symptoms is that the extracted files (from the
    clob columns) seems not to be fine (accent are not recognized).
    This is the java code used to load file to clob (on the weblogic
    server side)
    con = dbHandle.getAdminConnection();
    con.setAutoCommit(false);
    /// NEW IMPORT
    // int taskId = DBTools.getOraSeqValue("vtr.VTR_SEQ_LOG_IMPORT",
    DBTools.NEXTVAL,con);
    int taskId = DBTools.getOraSeqValue(SqlQueryDefinition.seqLogImport.toString(),
    DBTools.NEXTVAL,con);
    Debug.out.println("taskId " + taskId);
    // String cmd = "insert into vtr.vtr_log_import
    (cod_task,DTE_DEBUT,lob_imp,lob_rej,lob_log, txt_nom_fic_orig,
    txt_utilisateur) " +
    // "values ("+ taskId
    +",sysdate,empty_clob(),empty_clob(),empty_clob(), '"+file+"','"+
    ((UserBean)request.getSession().getAttribute("userbean")).getIdentifier()+"')";
    // stmt = con.createStatement();
    // stmt.executeQuery(cmd);
    // stmt.close();
    pstmt = con.prepareStatement(SqlQueryDefinition.initLigneImport.toString());
    pstmt.setInt(1,taskId);
    pstmt.setString(2,file);
    pstmt.setString(3,((UserBean)request.getSession().getAttribute("userbean")).getIdentifier());
    pstmt.executeQuery();
    pstmt.close();
    con.commit();
    // Writing CLOB
    // cmd = "SELECT cod_task,lob_imp,lob_rej,lob_log FROM
    vtr.vtr_log_import WHERE cod_task="+ taskId +" for update";
    // stmt = con.createStatement();
    // rset = stmt.executeQuery(cmd);
    pstmt = con.prepareStatement(SqlQueryDefinition.setBlobImport.toString());
    pstmt.setInt(1,taskId);
    rset = pstmt.executeQuery();
    rset.next();
    File csvFile = new File(localFile);
    System.out.println("csvFile length = " + csvFile.length());
    File unixFile = new File(localFile+".ux");
    Tools.dos2Unix(csvFile, unixFile);
    FileInputStream instream = new FileInputStream(unixFile);
    // support Weblogic
    clob = ClobComponent.factory(DBUtil.getInstance().isWebLogicPlatform());
    clob.setClob(rset,2);
    outstream = clob.getAsciiOutputStream();
    size = clob.getBufferSize();
    byte[] buffer = new byte[size];
    int length = -1;
    while ((length = instream.read(buffer)) != -1)
    outstream.write(buffer, 0, length);
    instream.close();
    outstream.close();
    rset.close();
    // stmt.close();
    pstmt.close();
    rset=null;
    // stmt = null;
    pstmt=null;
    con.commit();
    // IMPORT
    cs = con.prepareCall(SqlQueryDefinition.importStoredProc.toString());
    index = 1;
    cs.setString(index++, fullPath); // 1
    cs.setString(index++,
    ((UserBean)request.getSession().getAttribute("userbean")).getIdentifier());
    // 2
    cs.registerOutParameter(index++,java.sql.Types.VARCHAR); // 3
    cs.registerOutParameter(index++,java.sql.Types.VARCHAR); // 4
    cs.registerOutParameter(index++,java.sql.Types.NUMERIC); // 5
    cs.setInt(index++, taskId); // 6
    cs.executeQuery();
    String fichier1 = cs.getString(3);
    String fichier2 = cs.getString(4);
    int returnCode = cs.getInt(5);
    System.out.println("returnCode/fichier1/2 : " + returnCode + " & "
    + fichier1 + " & " + fichier2);
    cs.close();
    con.commit();
    This is the PL/SQL code used to unload clob to dile (on the oracle
    side)
    PROCEDURE writeToFile (id NUMBER, a_fichier VARCHAR2)
    IS
    result CLOB;
    cvl_tmp VARCHAR2 (32000);
    nvl_amount NUMBER := 250;
    nvl_pos NUMBER := 1;
    nvl_clob_length NUMBER;
    instr_pos NUMBER;
    file_handle UTL_FILE.file_type;
    BEGIN
    file_handle := UTL_FILE.FOPEN(
    substr(a_fichier, 1, instr(a_fichier, file_separator, -1,
    1)-1), -- dir
    substr(a_fichier, instr(a_fichier, file_separator, -1, 1)+1),
    -- file
    'W');
    select lob_imp
    INTO result
    from vtr_log_import
    where cod_task = id;
    --write clob to file
    nvl_clob_length := DBMS_LOB.getlength (result);
    cvl_tmp := NULL;
    nvl_amount := 250;
    nvl_pos := 1;
    LOOP
    instr_pos :=
    DBMS_LOB.INSTR (result, CHR (10), nvl_pos, 1) -
    nvl_pos;
    --DBMS_OUTPUT.PUT_LINE(nvl_pos||': Of length : '||instr_pos);
    IF nvl_pos + instr_pos > nvl_clob_length
    THEN
    instr_pos := nvl_clob_length - nvl_pos;
    DBMS_LOB.READ (
    lob_loc=> result,
    amount=> instr_pos,
    offset=> nvl_pos,
    buffer=> cvl_tmp
    EXIT;
    END IF;
    DBMS_LOB.READ (
    lob_loc=> result,
    amount=> instr_pos,
    offset=> nvl_pos,
    buffer=> cvl_tmp
    -- DBMS_OUTPUT.PUT_LINE(cvL_tmp);
    cvl_tmp := CONVERT(cvl_tmp, 'WE8MSWIN1252', 'WE8ISO8859P15');
    UTL_FILE.put_line (file_handle, cvl_tmp);
    nvl_pos := nvl_pos
    + instr_pos
    + 1;
    IF nvl_pos > nvl_clob_length
    THEN
    EXIT;
    END IF;
    END LOOP;
    UTL_FILE.fclose (file_handle);
    END writeToFile;
    I'm using the oracle thin driver but it's not set in classpath maybe a
    problem with that ?
    <JDBCConnectionPool DriverName="oracle.jdbc.driver.OracleDriver"
    InitialCapacity="1" MaxCapacity="100" Name="oracleUserPool"
    Password="XXXXXXX
    Properties="user=vtr_usr;dll=ocijdbc8;protocol=thin"
    Targets="myserver" TestConnectionsOnRelease="true"
    TestConnectionsOnReserve="true" TestTableName="dual"
    URL="jdbc:oracle:thin:@localhost:1521:ssr"/>
    Maybe a problem with the properties of weblogic.codeset (I don"t set
    it) ?
    Many thanks in advance, I have no idea even if I suspect the java
    store to file or the UTL_file extration to file steps to be in cause !
    Run-O

    Run-O wrote:
    Hi,
    I'm encountering the following problem.Hi. The first thing I'd do to narrow the search is to see if my Java code
    worked in a standalone program, without weblogic in the picture. Once
    you get Oracle's JDBC driver to work with Oracle's DBMS, it shouldn't
    be hard to get the same stuff to work inside weblogic, or find out why it
    doesn't.
    Joe
    >
    >
    I'm working on a 3-tiers architecture with an Oracle Database (8.1.7)
    a Weblogic application server 6.1 SP4 and a Web server under Aix 4.3
    (all 3 are under AIX 4.3 on the same platform).
    My application has a web interface that allows users to upload files
    to the server from their PC clients and a webbrowser, that insert each
    file into a oracle Clob (via Java Code) and that call a stored
    procedure (with java code again) to extract this clob to a file
    (UTL_file package), then, the extracted file is processed line by line
    and information inserted in others tables.
    The issue is that some characters (acute, grave accent ....etc)
    appears as question marks in the database or that some date from the
    file can't be processed because they are structured as DD/MM/YYYY
    (french notation, but that normal I'm from france).
    I first thougt of an NLS_LANG problem but on the weblogic server it is
    set to french_france.WE88859P15 that seems to be right and the same
    the database configuration.
    I then tried to performs some conversion when the clob data were
    extracted to file (from WE88859P15 TO CP152 or vice-versa) with the
    oracle convert function but it seems that it doesn't work.
    An other but coherent symptoms is that the extracted files (from the
    clob columns) seems not to be fine (accent are not recognized).
    This is the java code used to load file to clob (on the weblogic
    server side)
    con = dbHandle.getAdminConnection();
    con.setAutoCommit(false);
    /// NEW IMPORT
    // int taskId = DBTools.getOraSeqValue("vtr.VTR_SEQ_LOG_IMPORT",
    DBTools.NEXTVAL,con);
    int taskId = DBTools.getOraSeqValue(SqlQueryDefinition.seqLogImport.toString(),
    DBTools.NEXTVAL,con);
    Debug.out.println("taskId " + taskId);
    // String cmd = "insert into vtr.vtr_log_import
    (cod_task,DTE_DEBUT,lob_imp,lob_rej,lob_log, txt_nom_fic_orig,
    txt_utilisateur) " +
    // "values ("+ taskId
    +",sysdate,empty_clob(),empty_clob(),empty_clob(), '"+file+"','"+
    ((UserBean)request.getSession().getAttribute("userbean")).getIdentifier()+"')";
    // stmt = con.createStatement();
    // stmt.executeQuery(cmd);
    // stmt.close();
    pstmt = con.prepareStatement(SqlQueryDefinition.initLigneImport.toString());
    pstmt.setInt(1,taskId);
    pstmt.setString(2,file);
    pstmt.setString(3,((UserBean)request.getSession().getAttribute("userbean")).getIdentifier());
    pstmt.executeQuery();
    pstmt.close();
    con.commit();
    // Writing CLOB
    // cmd = "SELECT cod_task,lob_imp,lob_rej,lob_log FROM
    vtr.vtr_log_import WHERE cod_task="+ taskId +" for update";
    // stmt = con.createStatement();
    // rset = stmt.executeQuery(cmd);
    pstmt = con.prepareStatement(SqlQueryDefinition.setBlobImport.toString());
    pstmt.setInt(1,taskId);
    rset = pstmt.executeQuery();
    rset.next();
    File csvFile = new File(localFile);
    System.out.println("csvFile length = " + csvFile.length());
    File unixFile = new File(localFile+".ux");
    Tools.dos2Unix(csvFile, unixFile);
    FileInputStream instream = new FileInputStream(unixFile);
    // support Weblogic
    clob = ClobComponent.factory(DBUtil.getInstance().isWebLogicPlatform());
    clob.setClob(rset,2);
    outstream = clob.getAsciiOutputStream();
    size = clob.getBufferSize();
    byte[] buffer = new byte[size];
    int length = -1;
    while ((length = instream.read(buffer)) != -1)
    outstream.write(buffer, 0, length);
    instream.close();
    outstream.close();
    rset.close();
    // stmt.close();
    pstmt.close();
    rset=null;
    // stmt = null;
    pstmt=null;
    con.commit();
    // IMPORT
    cs = con.prepareCall(SqlQueryDefinition.importStoredProc.toString());
    index = 1;
    cs.setString(index++, fullPath); // 1
    cs.setString(index++,
    ((UserBean)request.getSession().getAttribute("userbean")).getIdentifier());
    // 2
    cs.registerOutParameter(index++,java.sql.Types.VARCHAR); // 3
    cs.registerOutParameter(index++,java.sql.Types.VARCHAR); // 4
    cs.registerOutParameter(index++,java.sql.Types.NUMERIC); // 5
    cs.setInt(index++, taskId); // 6
    cs.executeQuery();
    String fichier1 = cs.getString(3);
    String fichier2 = cs.getString(4);
    int returnCode = cs.getInt(5);
    System.out.println("returnCode/fichier1/2 : " + returnCode + " & "
    + fichier1 + " & " + fichier2);
    cs.close();
    con.commit();
    This is the PL/SQL code used to unload clob to dile (on the oracle
    side)
    PROCEDURE writeToFile (id NUMBER, a_fichier VARCHAR2)
    IS
    result CLOB;
    cvl_tmp VARCHAR2 (32000);
    nvl_amount NUMBER := 250;
    nvl_pos NUMBER := 1;
    nvl_clob_length NUMBER;
    instr_pos NUMBER;
    file_handle UTL_FILE.file_type;
    BEGIN
    file_handle := UTL_FILE.FOPEN(
    substr(a_fichier, 1, instr(a_fichier, file_separator, -1,
    1)-1), -- dir
    substr(a_fichier, instr(a_fichier, file_separator, -1, 1)+1),
    -- file
    'W');
    select lob_imp
    INTO result
    from vtr_log_import
    where cod_task = id;
    --write clob to file
    nvl_clob_length := DBMS_LOB.getlength (result);
    cvl_tmp := NULL;
    nvl_amount := 250;
    nvl_pos := 1;
    LOOP
    instr_pos :=
    DBMS_LOB.INSTR (result, CHR (10), nvl_pos, 1) -
    nvl_pos;
    --DBMS_OUTPUT.PUT_LINE(nvl_pos||': Of length : '||instr_pos);
    IF nvl_pos + instr_pos > nvl_clob_length
    THEN
    instr_pos := nvl_clob_length - nvl_pos;
    DBMS_LOB.READ (
    lob_loc=> result,
    amount=> instr_pos,
    offset=> nvl_pos,
    buffer=> cvl_tmp
    EXIT;
    END IF;
    DBMS_LOB.READ (
    lob_loc=> result,
    amount=> instr_pos,
    offset=> nvl_pos,
    buffer=> cvl_tmp
    -- DBMS_OUTPUT.PUT_LINE(cvL_tmp);
    cvl_tmp := CONVERT(cvl_tmp, 'WE8MSWIN1252', 'WE8ISO8859P15');
    UTL_FILE.put_line (file_handle, cvl_tmp);
    nvl_pos := nvl_pos
    + instr_pos
    + 1;
    IF nvl_pos > nvl_clob_length
    THEN
    EXIT;
    END IF;
    END LOOP;
    UTL_FILE.fclose (file_handle);
    END writeToFile;
    I'm using the oracle thin driver but it's not set in classpath maybe a
    problem with that ?
    <JDBCConnectionPool DriverName="oracle.jdbc.driver.OracleDriver"
    InitialCapacity="1" MaxCapacity="100" Name="oracleUserPool"
    Password="XXXXXXX
    Properties="user=vtr_usr;dll=ocijdbc8;protocol=thin"
    Targets="myserver" TestConnectionsOnRelease="true"
    TestConnectionsOnReserve="true" TestTableName="dual"
    URL="jdbc:oracle:thin:@localhost:1521:ssr"/>
    Maybe a problem with the properties of weblogic.codeset (I don"t set
    it) ?
    Many thanks in advance, I have no idea even if I suspect the java
    store to file or the UTL_file extration to file steps to be in cause !
    Run-O

  • Problem calling oracle SP from Java

    Hi I am trying to call an oracle SP from Java program and getting the error code 17060. Below is my code:
    Oracle SP:
    create or replace type item as object (itemnumber varchar2(9),itemdesc varchar2(35));
    create or replace type uom as object (prodUOM varchar2(18), ratioDen NUMBER(1));
    CREATE OR REPLACE TYPE uom_Arr aS VARRAY(100) OF uom;
    create or replace package test_pkg_xml is
    procedure test_sp_xml (item_rec item,
    uom_tbl uom_arr);
    end test_pkg_xml;
    create or replace package body test_pkg_xml is
    procedure test_sp_xml (item_rec item,
    uom_tbl uom_arr)
    is
    begin
    null;
    end;
    end test_pkg_xml;
    Java Code
    public class item implements SQLData {
    private String sql_type;
    public String itemnumber ;
    public String itemdesc ;
    public String getSQLTypeName() throws SQLException { return sql_type; }
    public void readSQL(SQLInput stream, String typeName)throws SQLException
    sql_type = typeName;
    itemnumber = stream.readString();
    itemdesc = stream.readString();
    public void writeSQL(SQLOutput stream) throws SQLException
    System.out.println("in write sql");
    stream.writeString (itemnumber);
    stream.writeString (itemdesc);
    package com.tgt.dstb.dwm.dstbtowm.dao;
    import javax.xml.parsers.*;
    import org.w3c.dom.*;
    import java.sql.Connection;
    import java.sql.CallableStatement;
    import java.sql.Connection;
    import java.sql.ResultSet;
    import java.sql.Types;
    import java.sql.SQLException;
    import java.util.Map;
    import java.util.Hashtable;
    public class TestDOM
    public static void test(Connection conn) throws Exception
    item obj1 = new item();
    Obj2 obj2 = new Obj2();
    Obj2[] obj3 = {new Obj2(), new Obj2()};
    String sql = "call " + "test_pkg_xml.test_sp_xml(?,?)";
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    DocumentBuilder parser = factory.newDocumentBuilder();
    Document document = parser.parse( "item.xml" );
    Element itemMaster = document.getDocumentElement();
    NodeList itemNumber = itemMaster.getElementsByTagName("itemNumber");
    NodeList itemDesc = itemMaster.getElementsByTagName("itemDesc");
    System.out.println("Item = ");
    String itmname = DOMUtil.getSimpleElementText( itemMaster, "itemNumber" );
    String itmdesc = DOMUtil.getSimpleElementText( itemMaster, "itemDesc" );
    obj1.itemnumber = itmname;
    obj1.itemdesc = itmdesc;
    System.out.println("itmname = " + obj1.itemnumber );
    System.out.println("itmdesc = " + obj1.itemdesc );
    NodeList uoms = itemMaster.getElementsByTagName("uoms");
    NodeList uom = itemMaster.getElementsByTagName("uom");
    System.out.println("uom = ");
    for( int i=0; i<uom.getLength(); i++ ) {
    String itmprodUOM = DOMUtil.getSimpleElementText(
    (Element)uom.item(i),"prodUOM" );
    obj3.prodUOM = itmprodUOM;
    String itmratioDen = DOMUtil.getSimpleElementText(
    (Element)uom.item(i), "ratioDen" );
    obj3[i].ratioDen = itmratioDen;
    System.out.println( " "+ itmprodUOM +" ("+itmratioDen+")" );
    try
    Hashtable map = new Hashtable();
    map.put ("item", Class.forName ("com.tgt.dstb.dwm.dstbtowm.dao.item"));
    conn.setTypeMap(map);
    System.out.println("here 11111 ");
    CallableStatement stmt = conn.prepareCall("call test_pkg_xml.test_sp_xml(?,?)");
    System.out.println("here 2 ");
    stmt.setObject(1,obj1);
    System.out.println("here 3 ");
    stmt.setObject(2,obj3);
    System.out.println("here 4 ");
    stmt.execute();
    System.out.println("here 5 ");
    }catch (SQLException e)
    System.out.println("exception :"+e.getErrorCode());
    Can you please point out where I might be going wrong with the code? Any help would be greatly appreciated.
    PS : I am getting the error 17060 after the stmt : System.out.println("here 2 ");
    Thanks,
    Nitin

    Avi, I changed my code to:
    package com.tgt.dstb.dwm.dstbtowm.dao;
    import javax.xml.parsers.*;
    import org.w3c.dom.*;
    import java.sql.Connection;
    //import java.sql.CallableStatement;
    import java.sql.*;
    //import java.util.Map;
    //import java.util.Hashtable;
    import oracle.sql.ArrayDescriptor;
    import oracle.sql.*;
    import oracle.jdbc.*;
    public class TestDOM
    public static void test(Connection conn) throws Exception
         item obj1 = new item();
         Obj2 obj2 = new Obj2();
         Obj2[] obj3 = {new Obj2(), new Obj2()};
         String sql = " call test_pkg_xml.test_sp_xml(?,?)";
         DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    DocumentBuilder parser = factory.newDocumentBuilder();
    Document document = parser.parse( "item.xml" );
    Element itemMaster = document.getDocumentElement();
    NodeList itemNumber = itemMaster.getElementsByTagName("itemNumber");
    NodeList itemDesc = itemMaster.getElementsByTagName("itemDesc");
    System.out.println("Item = ");
    String itmname = DOMUtil.getSimpleElementText( itemMaster, "itemNumber" );
    String itmdesc = DOMUtil.getSimpleElementText( itemMaster, "itemDesc" );
    obj1.itemnumber = itmname;
    obj1.itemdesc = itmdesc;
    System.out.println("itmname = " + obj1.itemnumber );
    System.out.println("itmdesc = " + obj1.itemdesc );
    NodeList uoms = itemMaster.getElementsByTagName("uoms");
    NodeList uom = itemMaster.getElementsByTagName("uom");
    System.out.println("uom = ");
    for( int i=0; i<uom.getLength(); i++ ) {
    String itmprodUOM = DOMUtil.getSimpleElementText(
    (Element)uom.item(i),"prodUOM" );
    obj3.prodUOM = itmprodUOM;
    String itmratioDen = DOMUtil.getSimpleElementText(
    (Element)uom.item(i), "ratioDen" );
    obj3[i].ratioDen = Integer.parseInt(itmratioDen);
    System.out.println( " "+ itmprodUOM +" ("+itmratioDen+")" );
    try
    System.out.println("here 1 ");
    OracleCallableStatement stmt = (OracleCallableStatement)
    conn.prepareCall("BEGIN test_pkg_xml.test_sp_xml(?,?); END;");
    System.out.println("here 1.1 ");
    System.out.println("here 1.2 ");
    ArrayDescriptor desc1 = ArrayDescriptor.createDescriptor("UOM_ARR", conn);
         ARRAY array_to_pass1 = new ARRAY(desc1, conn, obj3);
    System.out.println("here 2 ");
    stmt.setObject(1,obj1,OracleTypes.STRUCT);
    System.out.println("here 3 ");
    stmt.setArray(2,array_to_pass1);
    System.out.println("here 4 ");
    stmt.execute();
    System.out.println("here 5 ");
         }catch (Exception e)
              e.printStackTrace();
    However, now I the code is printing
    "here 1 "
    and then giving
    "[1/4/07 11:37:28:133 CST] 00000036 SystemErr R java.lang.ClassCastException: com.ibm.ws.rsadapter.jdbc.WSJdbcCallableStatement"
    at "OracleCallableStatement stmt = (OracleCallableStatement)
    conn.prepareCall("BEGIN test_pkg_xml.test_sp_xml(?,?); END;");"
    statement.
    I am using Rational App Developer Version 6.0.1 and getting a connection using
    the below code:
              DataSource     dataSource=null ;
              Context jndiContext = new InitialContext();
              dataSource =
    (DataSource)jndiContext.lookup("java:comp/env/jdbc/DWM3DDS");
              Connection wsConn = dataSource.getConnection();
    Looks like this exception occurs when I am casting java.sql.Connection object to OracleCallableStatement. Do you have any idea why this might be occuring? Have you encountered this kind of a problem?
    Thanks,
    Nitin

  • Create Oracle Text Index from Java via JDBC

    Hi, I have a question relevant to creation of the Text Index in Oracle Text via Java JDBC.
    In Java I create client application and I connect to remote Oracle server. (there is Oracle
    10g Enterprise Edition 10.2.0.3.0 on Debian Linux OS). In Java I create query:
    CREATE INDEX index_name ON source_tab(text) indextype is ctxsys.context
    parameters('datastore ctxsys.file_datastore filter ctxsys.null_filter');
    and I start it by:
    PreparedStatement stmt = db.prepareStatement(query);
    ResultSet rs = stmt.executeQuery();
    There is problem that Text Index is created empty and when I write out error log then:
    DRG-11513: unable to open or write to file "path"
    I have on my computer Oracle XE 10g (Windows XP OS) here this application in Java functions
    without problems. Without problems it´s with that same query in SQLPlus when I connect at
    this remote Oracle server via PuTTY.
    Do you know anybody where could be error? Or at worst case where find I more detailed
    manual about JDBC Oracle mainly possible errors and problems with compatibility?

    Does it work if you don't use "file_datastore"?
    Eg. try the following in sqlplus:
    create table t (text varchar2(2000));
    insert into t values ('hello world');
    create index ti on t(text) indextype is ctxsys.context;
    select * from t where contains (text, 'hello') > 0;
    Then drop the index ti and try the same "create index" through JDBC. Does that work?
    If so, then we have some kind of issue with the file_datastore. I assume you are aware that the file will be read by the SERVER, not from the client?
    So if your database resides on a Linux box, but you are calling from a Java program on a windows PC, the file names in source_tab(text) must be in Linux format, and must refer to files which are available on the Linux server (and readable by the owner of the Oracle database process).
    So /home/me/file.txt might work, but C:\Documents\file.txt will not.

  • Create Oracle Text stoplist in Java with PL/SQL

    Hi, I need help with this
    I do connection Oracle database with Java by using JDBC. I need create stoplist in my
    Oracle Text application that I create with PL/SQL procedure. I want to add stopwords to
    this stoplist directly in Java therefore I must create this procedure in Java.
    This procedure is:
    begin
    ctx_ddl.create_stoplist('mystop', 'BASIC_STOPLIST');
    ctx_ddl.add_stopclass('mystop', 'NUMBER');
    ctx_ddl.add_stopword('mystop', 'word1');
    end;
    CTX_DDL is package in Oracle Text. This procedure runs functions directly on Oracle no
    problems. I don´t know - how create this procedure in Java and run this in Oracle by
    using JDBC. Can you anybody help, please?

    > The problem is that we have a compatibility problem with LDAP. When I try to retrieve information
    in LDAP, I have strange characters that appears instead of accents like é,è,ë or whatever... someone
    in my developement team has the same problem and he solved it using java.naming.ldap.version and put
    it in version 2. The problem is that he developed in Java and I am in PL/SQL. That's the problem...
    No. That is not the problem.
    The problem is that you have no clue what the problem is, and now jump at the first available thing that seems to be a solution for this unknown problem. And who knows just how many other problems this so-called solution will now introduce... never mind whether or not the root cause of the original problem will be solved by this solution.
    Software engineering does not work like this.
    Software engineering says:  Identify the Problem.
      Analyse the Problem.
      Solve the ProblemAll you have identified is a symptom of some problem. A character set issue. How about identifying the actual problem and then solving that problem comprehensively?

Maybe you are looking for

  • Bluetooth sync with clarion stereo

     I recently purchased a Bluetooth device for my Clarion car stereo. It synced fine,but  they can hear me, I can't hear the other end of the conversation. Everything is hooked up right as far as connecctions go,I was just wondering if there is a certa

  • Representation of images in old and version of Labview

    I'm trying to update an old software (working on Labview 5.0 and Windows 95) to Labview 7.0 and Windows XP. I'm using the NI-IMAQ 3.1 and Vision 7.0. I've noticed that the new representation of images is a typedef that is a reference to the image obj

  • Data selection and report generation

    Hi, I want to create a report with information about friends. I have a class like this: public class friend(){ Date born; Vector phones; String name; I have a collection of friends and I want generate a report with some of them. I want to select thos

  • Custom SDV03V02 taking too long

    Well, we've been having trouble with V_V2 t-code taking too long to process orders. So in order to fix that, we customized it into a Z-program to look at VAPMA-AUDAT and VAPMA-AUART to kinda narrow things down. I'm testing it right now as I write thi

  • Actionscript in LiveCycle

    I'm in need of using some actionscript commands, is it possible to include that same commands into the livecycle??