Big overhead calling stored procedure vs query in oci program

My previous question hasn;t got a reply. I guess I did not state it well so I rephrased it a little and repost here. Hopefully somebody can help me with this problem.
I'm a newbie on OCI. I hope to use OCI for array DML to improve performance. It takes only 1 seconds to insert 20,000 records using the simple insert query, which is almost a miracle to me.
Then I tested using a stored procedure. This SP does exactly the same thing as the query: Inserting into the table with the 10 parameter provided.
However, it takes 23 seconds for 20,000 records.
Is calling a stored procedure fundamentally slower than a query in Oci, or I just did it wrong?
Following is the codes:
sword Tform_1::update_all_rows(OCIEnv envhp, OCISvcCtx svchp, OCIError errhp, OCIStmt update_p, OCIStmt *select_p)
int *intArry = new int[20000];
for (int i = 0; i < 20000; i++)
intArry = 50000 + i;
// text mySql = (text ) "Insert into testPro (a, b, c, d, e, f, g, h, i, j) VALUES (:a, :b, :c, :d, :e, :f, :g, :h, :i, :j)";
text mySql = (text ) "BEGIN\
CDSDEVELOPER_UTILPKG.INSERTTESTPRO(:a, :b, :c, :d, :e, :f, :g, :h, :i, :j);\END;";
ub4 prefetch = 10;
sword errr;
ub4 c1;
text c2[30];
OCIBind *bndhp;
OCIDefine *defnp1,
*defnp2;
for (int i = 0; i < MAXROWS; i++)
if (OCIDescriptorAlloc((dvoid *) envhp, (dvoid **) &(intArry),
(ub4) OCI_DTYPE_ROWID, (size_t) 0, (dvoid **) 0))
ShowMessage("FAILED: OCIDescriptorAlloc()\n");
return (OCI_ERROR);
if (OCIStmtPrepare (update_p, errhp,
mySql, strlen(mySql), OCI_NTV_SYNTAX, OCI_DEFAULT))
ShowMessage ("Prepare failed \n");
return (OCI_ERROR);
for (int k = 1; k <= 10; k++)
if (OCIBindByPos ( update_p,
&bndhp,
errhp,
k,
intArry,
sizeof(int),
SQLT_INT,
(ub2 *) 0,
(ub2 *) 0,
(ub4) 0,
(ub4) 0,
(ub4 *) 0,
(ub4) OCI_DEFAULT))
ShowMessage ("Bind failed \n");
return (OCI_ERROR);
if (errr = OCIStmtExecute(svchp,
update_p,
errhp,
(ub4) MAXROWS,
(ub4) 0,
(OCISnapshot *) NULL,
(OCISnapshot *) NULL,
(ub4) OCI_DEFAULT))
report_error(errhp);
ShowMessage ("Update failed \n");
return (OCI_ERROR);
delete[] intArry;
Can anybody tell me what is wrong? Thanks very much.
Changsong

Karl: Thanks a lot for your reply. I think you are right about context switch when calling a stored procedure.
I found even wrapping a 'begin' and 'end' around the query text in the call slows down a great deal (from 1 second to 5 seconds for 20000 inserts).
so a lot of the array binding benefits come from bulk-insert feature in oci, which is not allowed when calling a stored procedure. I've compared the performace using oci array binding to call a sp vs. traditional borland C++ builder BDE stored procedure component, and it is 23seconds vs 45 seconds. Still a lot of gain here, but compared with the bulk insert feature, I'm quite disappointed. My problem is most of the database transaction is done within some stored procedures and thus cann't take much advantage of bulk insert.
Changsong

Similar Messages

  • Send SQL query or call stored procedure, which is best???

    hello experts!!
    i would like to ask what will be the best implementation on querying a database using Java, send a SQL query(insert into table values...) or call stored procedure(just pass parameters)?? and also in stored procedure does "autoCommit/rollback" applies/make sense??

    I searched google for this:
    Stored Procedures vs. SQL
    and found this useful link:
    http://www.karlkatzke.com/stored-procedures-vs-sql-calls/
    I thiink you should also read up on other articles based on such google searches
    to get other opinions. Also, read the links provided by that article.
    Personnally, I think stored procedures should be avoided unless there is a definite
    advantage as specified in the above article. Especially not used for CRUD operations.
    Also, no matter where you put the SQL, it should be documented. I've seen too many stored procedures that aren't documented.

  • Need sample source code for calling stored procedure in Oracle

    Hi.
    I try to call stored procedure in oracle using JCA JDBC.
    Anybody have sample source code for that ?
    Regards, Arnold.

    Thank you very much for a very quick reply. It worked, but I have an extended problem for which I would like to have a solution. Thank you very much in advance for your help. The problem is described below.
    I have the Procedure defined as below in the SFCS1 package body
    Procedure Company_Selection(O_Cursor IN OUT T_Cursor)
    BEGIN
    Open O_Cursor FOR
    SELECT CompanyId, CompanyName
    FROM Company
    WHERE CompanyProvince IN ('AL','AK');
    END Company_Selection;
    In the Oracle Forms, I have a datablock based on the above stored procedure. When I execute the form and from the menu if I click on Execute Query the data block gets filled up with data (The datablock is configured to display 10 items as a tabular form).
    At this point in time, I want to automate the process of displaying the data, hence I created a button and from there I want to call this stored procedure. So, in the button trigger I have the following statements
    DECLARE
    A SFCS1.T_Cursor;
    BEGIN
    SFCS1.Company_Selection(A);
    go_Block ('Block36');
    The cursor goes to the corresponding block, but does not display any data. Can you tell me how to get the data displayed. In the future versions, I'm planning to put variables in the WHERE clause.

  • Call stored procedure with OUT parameter

    Hello,
    I have created a short-lived process. Within this process I am using the "FOUNDATION > JDBC > Call Stored Procedure" operation to call an Oracle procedure. This procedure has 3 parameters, 2 IN and 1 OUT parameter.
    The procedure is being executed correctly. Both IN parameters receive the correct values but I am unable to get the OUT parameter's value in my process.
    Rewriting the procedure as a function gives me an ORA-01460 since one of the parameters contains XML (>32K) so this is not option...
    Has someone been able to call a stored procedure with an OUT parameter?
    Regards,
    Nico

    Object is Foundation, Execute Script
    This is for a query, you can change to a stored procedure call. Pull the value back in the Java code then put into the process variable.
    import javax.naming.InitialContext;
    import javax.sql.DataSource;
    import java.sql.*;
    PreparedStatement stmt = null;
    Connection conn = null;
    ResultSet rs = null;
    try {
    InitialContext ctx = new InitialContext();
    DataSource ds = (DataSource) ctx.lookup("java:IDP_DS");
    conn = ds.getConnection();
    stmt = conn.prepareStatement("select FUBAR from TB_PT_FUBAR where PROCESS_INSTANCE_ID=?");
    stmt.setLong(1, patExecContext.getProcessDataLongValue("/process_data/@inputID"));
    rs = stmt.executeQuery();
    rs.next();
    patExecContext.setProcessDataStringValue("/process_data/outData", rs.getString(1));
    } finally {
    try {
    rs.close();
    } catch (Exception rse) {}
    try {
    stmt.close();
    } catch (Exception sse) {}
    try {
    conn.close();
    } catch (Exception cse) {}

  • 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.

  • JDBC Control - Calling Stored Procedure

    Hi people,
    I have a big problem calling my procedure by jdbcControl, It might by easy to solve, but I don´t know what is wrong.
    My stored procedure return a Doube value, a key to be used in my system.
    Follow my Oracle procedure definition:
    --one cursor
    TYPE TCursor_Ret IS REF CURSOR;
    -- My procedure
    PROCEDURE PRSMS_RET_INVOKE_ID(pCURSOR OUT MY_PACKEGE.TCURSOR_RET) IS
    vNrChamadoServico sn_mensagem_portabilidade.nr_chamado_servico%TYPE; -- Number
    BEGIN
    -- THE IDENTIFICADOR HAS 15 digits
    vNrChamadoServico := FNSMS_BUSCA_VLR_PARAMETRO('0','IND_BASE_PORTAB') * power(10, 13);
    OPEN pCURSOR FOR
    SELECT (vNrChamadoServico + sq_nr_chamado_servico.NEXTVAL) AS invokeID
    FROM dual; -- retur '10000000000015'
    END PRSMS_RET_INVOKE_ID;
    In my JPD process I did something like this:
    public JdbcControl.SQLParameter[] parms = new JdbcControl.SQLParameter[1];
    --A cursor to be returned by oracle
    parms[0] = new JdbcControl.SQLParameter(new Double(0),Types.DOUBLE, JdbcControl.SQLParameter.OUT);
    myJdbcControl.getInvokeID(parms);
    In my jdbcControl I have:
    @JdbcControl.SQL(statement ="call MY_PACKAGE.PRSMS_RET_INVOKE_ID(?)")
    Double getInvokeID(JdbcControl.SQLParameter[] params)throws SQLException;
    And I got the following error:
    [BEA][Oracle JDBC Driver][Oracle]ORA-06553: PLS-306: wrong number or types of arguments in call to 'PRSMS_RET_INVOKE_ID'
    I am using the follow example:
    http://mail-archives.apache.org/mod_mbox/beehive-commits/200702.mbox/%[email protected]%3E
    I have Tried use as parameter LONG, NUMER, BIGDECIMAL and so one, but I haven't sucessfull. :(
    Could someone give me some hint?
    Edited by denimar at 06/10/2008 4:10 PM

    Hi guys,
    I Talked to my Oracle´s DBA and he give the the following advice:
    We changed the return TYPE.
    The old procedure returned TYPE TCursor_Ret IS REF CURSOR
    And now It return NUMBER
    FUNCTION FNSMS_RET_INVOKE_ID RETURN NUMBER IS
    vRESULT NUMBER;
    vCursor TCURSOR_RET;
    BEGIN
    PRSMS_RET_INVOKE_ID(vCursor);
    FETCH vCursor
    INTO vRESULT;
    RETURN(vRESULT);
    END FNSMS_RET_INVOKE_ID;
    Now I can catch the return value like this:
    select MY_PACKAGE.FNSMS_RET_INVOKE_ID from dual
    Bye bye!!

  • Calling Stored Procedure with in Stored Procedure

    I have one stored procedure A, I want to call Stored procedure A from Stored Procedure B and want to give input parameter to Stored Procedure A within Stored Procedure B using while loop.
    i.e I have one stored procedure A which uses Telephone number as input parameter and pull out data
    I want to create one more stored procedure B which will call stored procedure A internally and give telephone number one by one using while loop and push the result in Table C.

    >
    I have one stored procedure A, I want to call Stored procedure A from Stored Procedure B and want to give input parameter to Stored Procedure A within Stored Procedure B using while loop.
    i.e I have one stored procedure A which uses Telephone number as input parameter and pull out data
    I want to create one more stored procedure B which will call stored procedure A internally and give telephone number one by one using while loop and push the result in Table C.
    >
    Doesn't sound a good idea in terms of performance or design. OK, what's your query?
    The concept is:
    create or replace procedure Proc_A (p_phone varchar2)
    is
    Begin
       Insert into Tablec (col1, col2, col3, phone) values (val1, val2, val3, p_phone);
    Exception
      When no_data_found then
       do what...
    End;
    Create or Replace Procedure Proc_B as
    Begin
    For i in (select phone_no from customer)
    Loop
      Proc_A(i.phone_no);
    End Loop;
    End;
    /Once again, I have to say, it's a bad idea. You may well do it within a single procedure or even a single SQL. Tell us your exact requirements and we'll be able to help you
    Edited by: user12035575 on Sep 5, 2011 8:26 PM

  • Calling stored procedure in OCCI

    Hi, Guys.
    I triy to call stored procedure in Oracle database server.But i have problems with taking of the OUT parameters.
    How to call the procedure corectly?
    Depend on Oracle manual everything is fine but as we see that is not.
    Here is the 2 lines that make the problem.
    statement->registerOutParam(2, Type::OCCIINT, sizeof ( if_false ) );
    statement->registerOutParam(3, Type::OCCIString, sizeof ( __result ) );
    I can't access Type::OCCIINT and Type::OCCIString.
    I tried and Type::OCCISTRING but without any result.
    Can you help me?
    This is the all code i use:
    Environment *env = Environment::createEnvironment ( Environment::DEFAULT );
    Connection *conn = env->createConnection ( user, pass, osid );
    Statement * statement = conn->createStatement ( query );
    ResultSet * result = statement->executeQuery ( query );
    result->setCharacterStreamMode ( 2, 10000 );
    statement->setSQL ( "BEGIN tracetst.get_tst_moduls ( :1, :2, :3 ); END:" );
    int if_false;
    string __result;
    statement->setString ( 1, "116714020010" );
    statement->registerOutParam(2, Type::OCCIINT, sizeof ( if_false ) );
    statement->registerOutParam(3, Type::OCCIString, sizeof ( __result ) );
    statement->executeUpdate();
    if_false = statement->getInt (2);
    /* Set the 1,2 args into err_result and modules. The action is only with these */
    err_result = if_false;
    __result = statement->getString (3);
    cout << if_false;
    cout << __result;
    //printf ( result );
    //statement->executeUpdate ( query );
    env->terminateConnection ( conn );
    Environment :: terminateEnvironment ( env );
    While compiling I have an error message.Here it is :
    trace.cpp: In member function `const char* oracle_io::get_data()':
    trace.cpp:668: error: `oracle::occi::Type' is not an aggregate type
    Tha is the line adn the next line is same :
    statement->registerOutParam(2, Type::OCCIINT, sizeof ( if_false ) );
    statement->registerOutParam(3, Type::OCCIString, sizeof ( __result ) );
    How to call the procedure corectly?
    Depend on Oracle manual everything is fine but as we see that is not.
    Thanks in advance.
    P.S. I would like to thanks to Amogh for helping me before.

    Did you remove the colon after END ?
            Environment *env = Environment::createEnvironment(Environment::OBJECT);
            Connection *conn = env->createConnection("scott","tiger","inst1");
            Statement *stmt;
            int num; string name;
            try
                    stmt=conn->createStatement();
                    stmt->setSQL ( "BEGIN scott.test ( :1, :2, :3 ); END;" );
                    stmt->setString ( 1, "11" );
                    stmt->registerOutParam(2, OCCIINT,sizeof(num));
                    stmt->registerOutParam(3, OCCISTRING,sizeof(name));
                    stmt->execute();
                    num=stmt->getInt(2); name=stmt->getString(3);
                    cout<<num<<"   "<<name<<endl;
            catch (SQLException &ex)
                    env->terminateConnection(conn);
                    Environment::terminateEnvironment(env);
                    cout<<ex.getMessage();
            env->terminateConnection(conn);
            Environment::terminateEnvironment(env);
    ...Rgds.
    Amogh

  • How to call stored procedure in hibernate

    hi ,
    can any one help me how to call stored procedure in hibernate.Given code in hbm.xml
    and also plz tell me what is the use of <return-property/>in given hbm.xml file.
    <sql-query name="selectEmployees_SP" callable="true">
         <return alias="emp" class="com.centris.Employee">
    <return-property name="eno" column="eno"/>
    <return-property name="ename" column="ename"/>
    <return-property name="address" column="address"/>
    <return-property name="salary" column="salary"/>
    { ? = call p_retrieve_employees() }
    </return>
    </sql-query>

    Hi,
    Your question isn't related to Java Programming and should be asked in a [Hibernate forum|http://forum.hibernate.org/]
    Kaj

  • Calling Stored Procedure with TestStand to SQL 2000

    When I run the Stored Procedure in the query analyzer it returns the recordset fine. I am not specifying any parameters. I am Using TestStand 2.01 and SQL Server 2000. I am using the OPEN SQL STATEMENT step to call the SP. When I run the SP in TestStand I get no data returned. If I run the SQL statment in TestStand I get the data that I am requesting. Does TestStand not support stored procedures.

    Hi,
    The instructions that I posted were for TestStand 3.0. In version 3.0 you can call stored procedures with input/output paramateres and to support this functionality the data operation step support several new modes.
    TestStand 2.0.1 does not support parameters on stored procedures, but it does support calling stored procedures that do not take parameters. To be able to access the data back from the database you need to set the cursor location (in the Advanced tab of the Open SQL Statement step) to Client (http://digital.ni.com/public.nsf/websearch/0EF68BF97AB1A61F86256B8E007D70C0?OpenDocument).
    By changing the cursor to Client I was able to succesfully call a stored procedure from TestStand 2.0.1 and to read back the recordse
    t return by the database. Please let me know if you are still experiencing dificulties.
    Best regards,
    Alejandro del Castillo
    National Instruments

  • How to call store procedure in query generator

    Hi All,
    How to call store procedure in query generator.
    Regards
    Rajkumar Gupta
    Edited by: Rajkumar Gupta on Dec 7, 2010 2:11 AM

    Hi,
    Please check the following threads.
    How to use Stored Procedure in sap business one
    How to add parameters to a stored procedure in B1 Query generator
    How to execute the procedure in sap b1
    Hope it helps,
    Vasu Natari.

  • Call Stored Procedure inside a db trigger

    Is that possible to call stored procedure inside a db trigger ?
    I User this code:
    Create Or Replace Trigger Sale.Send_Auto_Email_Trg
    After Insert
    On Sale.Sale_Technical_Support
    --Referencing New As New Old As Old
    For Each Row
    Declare
    Pragma Autonomous_Transaction;
    vn_count         Number := 0;
    vn_msg           Number;
    vv_exec          Varchar2(5000);
    Begin
      If Inserting And :New.Ticket_Status = 2 Then
       Begin
        Begin
         Select Count(*)
           Into vn_count
           From Sale_Technical_Support
          Where Sending_Flag = 1
            And Support_Type = 2;
        Exception When No_Data_Found Then
         vn_count := 0;
        End;
        If vn_count >= 1 And :New.Problem_Desc Is Not Null Then
         Technical_Support_Mailing('[email protected]',  -- To
                                   '[email protected]',
                                   '[email protected]',  -- Bcc
                                   '[email protected]',  -- From
                                   'رموز وصلاحيات',
                                   2);                                                                                          
        End If;
       End;
      End If;
    End;
    /No errors but the procedure doesn't executed !!!!!

    1) If you are using autonomous transactions for anything other that writing log data that you want to preserve even if the triggering transaction fails, you're probably doing something wrong. There is no reason to use an autonomous transaction here.
    2) You don't want to send email from a trigger. You don't want to do anything non-transactional in a trigger. Oracle will, for example, rollback and re-execute parts of a statement for write consistency. If you send email in a trigger, you may get multiple emails for a single update. You may also get emails for updates that were never committed. And if the email server happens to be down, your transactions will fail.
    3) If you use an autonomous transaction, the trigger will have a completely different transaction context from the parent. So when you query the table within the trigger, you won't be able to see any of the uncommitted changes including the changes that caused the trigger to fire. My guess is that you are assuming that the row that you inserted is visible to the trigger.
    Justin

  • Calling Stored Procedures from Discoverer

    Does anyone know if I can call stored procedures from Discoverer? I know it supports Registered PL/SQL functions. If yes, can I find any documentation. Any information will be very helpful.
    Thanks in advance!
    Ning

    One way I can think of to do that would be to use function with pragma restrict references. You can then use the function as a column in a SQL query to make a folder in Discoverer.

  • Creation of DB Adaptert for calling stored procedure in MS SQL server

    Hi,
    I need to create a DB adapter to call a stored procedure in MS SQL Server.
    I have gone thru the thread MS SQL Server database connection
    It mentions that we need to use a command line utility for generating the wsdl and xsd for calling stored procedures in MS SQL server. Please provide information where to find this utility and how to use it.
    Any links to tutorials are welcome.
    Thanks !!.
    Silas.

    Command line is required for stored procedures, if you are using the basic options you don't need to worry.
    (1) Download MS SQL Server 2005 JDBC Driver from Microsoft Site. http://msdn.microsoft.com/en-us/data/aa937724.aspx
    (2) The download is self extracting exe file. Extract this into Program Files on your machine. It should create folder as "Microsoft SQL Server 2005 JDBC Driver"
    (3) In above mentioned folder search for sqljdbc.jar copy this file into JDeveloper\JDBC\lib folder.
    (4) Open JDeveloper/jdev/bin/jdev.conf file add following entry.
    AddJavaLibPath C:/Program files/Microsoft SQL Server 2000 Driver for JDBC/lib
    While executing this step make sure that your JDeveloper is closed.
    (5) On command prompt go to J Developer folder and execute following command
    jdev -verbose
    This will open JDeveloper.
    (6) Now go to JDeveloper > Connections > Database Connections > New Database Connection
    (7) Select Third Party JDBC
    (8) Specify MS Sql Server User Name, password and Role.
    (9) In connection page specify following
    - Driver Class: com.microsoft.sqlserver.jdbc.SQLServerDriver
    - For class path browse to C:/Program files/Microsoft SQL Server 2000 Driver for JDBC/lib folder, select sqljdbc.jar add it as library.
    - Specify URL as following.
    jdbc:sqlserver://SERVERNAME:1433;databaseName=MSSQLDBNAME;
    (10) Go to Test page and test it.
    cheers
    James

  • Calling Stored Procedure with OraClob as parameter IN

    I am using Visual C++ and using oo4o the ole way
    I am try to call stored procedure that have Clob as parameter in
    it seems the the OraParameters Add method don't have the ability since it can only receive variantt.
    How do I do it
    Thanks
    Yoav

    fyi
    Related to the solution/workaround posted by Luc.
    see "Do Oracle's JDBC drivers support PL/SQL tables/result sets/records/booleans? "
    at http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-faq-090281.html#34_05
    regards
    Jan Vervecken

Maybe you are looking for

  • Print of PO Before release

    Dear All, Please help me in one scenario. My client want PO print before release. He want to take print of po before release so that he can bargain with vendor & make changes accordinglly before release. Actually he doesn't want to release the po aga

  • Third party process as inventory value

    Dear Experts, Kindly need help for third party process. We have third party process which triggered from Sales Order. This Sales Order will automatically created PR. PR will be convert into PO. The issue is we would like to have goods in Sales Order

  • Manifest file settings!

    Hey all, This is what my current manifest file looks like: Manifest-Version: 1.0 Ant-Version: Apache Ant 1.6.2 Created-By: 1.4.2_08-b03 (Sun Microsystems Inc.) Main-Class: raphaelsebayhelper.login Class-Path: ./mysql-connector-java-3.1.11-bin.jar ./i

  • How to deploy wsdl+xsd to database based MDS in SOA 11g

    I am going to migrate our soa solution based on oracle soa suite version 10. We are using a file based repository in that solution and it is copied to the server and exposed to the application server as a virtual path. I wan't to use the MDS instead,

  • Compiling a programme with third party package help

    Hello all, I am writing a programme with a third party package (freetts.jar). The jar is is the classpath of my 2003 server and it compiles ok. import com.sun.speech.freetts.Voice; import com.sun.speech.freetts.VoiceManager; import com.sun.speech.fre