Problem with PreparedStatement

I'm using a statement which needs to determine if the value is in a group.
The statement will be
"select name,age,occupation from personnel where age in ?"
ps.setString(1, "(20,21,22)");
I've also tried
ps.setString(1, "('20','21','22')");
Neither brings back any values in the result set.
I can't figure out how to print what the preparedstatement looks like after setting the value.
I look in the table and there are records with age 20, 21, 22.. and age is set as a string.

Try this:
    query_B = "select tablename.blah_blah_blah"
            + "  from tablename"
            + " where tablename.etc is null"
            + "   and table.blah_term_code       in (?, ?)"
            + " order by 1, 2, 4, 7";
      String[] in_sem_dt = { "200307", "200308" };
      pstmt_B = con.prepareStatement( query_B );
      pstmt_B.setString( 1, in_sem_dt[0] );
      pstmt_B.setString( 2, in_sem_dt[1] );
      rs_B = pstmt_B.executeQuery();~Bill

Similar Messages

  • Memory problems with PreparedStatements

    Driver: 9.0.1 JDBC Thin
    I am having memory problems using "PreparedStatement" via jdbc.
    After profiling our application, we found that a large number oracle.jdbc.ttc7.TTCItem objects were being created, but not released, even though we were "closing" the ResultSets of a prepared statements.
    Tracing through the application, it appears that most of these TTCItem objects are created when the statement is executed (not when prepared), therefore I would have assumed that they would be released when the ResultSet is close, but this does not seem to be the case.
    We tend to have a large number of PreparedStatement objects in use (over 100, most with closed ResultSets) and find that our application is using huge amounts of memory when compared to using the same code, but closing the PreparedStatement at the same time as closing the ResultSet.
    Has anyone else found similar problems? If so, does anyone have a work-around or know if this is something that Oracle is looking at fixing?
    Thanks
    Bruce Crosgrove

    From your mail, it is not very clear:
    a) whether your session is an HTTPSession or an application defined
    session.
    b) What is meant by saying: JSP/Servlet is growing.
    However, some pointers:
    a) Are there any timeouts associated with session.
    b) Try to profile your code to see what is causing the memory leak.
    c) Are there references to stale data in your application code.
    Marilla Bax wrote:
    hi,
    we have some memory - problems with the WebLogic Application Server
    4.5.1 on Sun Solaris
    In our Customer Projects we are working with EJB's. for each customer
    transaction we create a session to the weblogic application server.
    now there are some urgent problems with the java process on the server.
    for each session there were allocated 200 - 500 kb memory, within a day
    the JSP process on our server is growing for each session and don't
    reallocate the reserved memory for the old session. as a work around we
    now restart the server every night.
    How can we solve this problem ?? Is it a problem with the operating
    system or the application server or the EJB's ?? Do you have problems
    like this before ?
    greetings from germany,

  • Problems with PreparedStatement when select restrict are byte params

    Hi,
    i have a problem trying to select information when the "select" has a byte restrict.
    The table in database is:
    CREATE TABLE `positions` (
    `PKID` int(10) unsigned NOT NULL auto_increment,
    `POSCODE` varbinary(30) NOT NULL,
    `ISWTURN` binary(1) NOT NULL,
    `QTT_GAMES` int(10) unsigned NOT NULL default '1',
    PRIMARY KEY (`PKID`),
    UNIQUE KEY `UNIQ_POS` (`POSCODE`,`ISWTURN`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    And the test code to get the qtt_games is :
    conn = DriverManager.getConnection (url,user,pwd);
    byte bcode[] = poscode.getByteArrayCode();
    // bcode is inserted ok in another preparedstatement...
    String query = "SELECT qtt_games FROM positions "+
    "WHERE poscode=? and iswturn=?";
    PreparedStatement pstmt = conn.prepareStatement(query);
    pstmt.setBytes (1,bcode);
    pstmt.setByte (2,poscode.getIsWhiteTurn()); //it returns a byte
    ResultSet rs = pstmt.executeQuery (query);
    When pstmt.executeQuery is reached, it's thrown the exception:
    com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '=? and iswturn=?' at line 1
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2870)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1573)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1665)
    at com.mysql.jdbc.Connection.execSQL(Connection.java:3170)
    at com.mysql.jdbc.Connection.execSQL(Connection.java:3099)
    at com.mysql.jdbc.Statement.execute(Statement.java:695)
    at app.server.bbdd.MYSQLBDManager.getGamesBasicInfo(MYSQLBDManager.java:942)
    at app.server.bbdd.MYSQLBDManager.main(MYSQLBDManager.java:1068)
    Can anybody tell me what's wrong?? I think the query is ok, but don't know what's happening with this...
    Lots of thanks.

    Hi,
    sorry, i know i've post this same message by error in "new to java" thread.... (i'm new in the forum... can i delete the wrong comment??)
    The SQLState is 42000 (syntax error), but it doesn't give me much information because i had already searched in google why can be the cause of it, but there are only a few comments about problems like this, without a solution...
    The column poscode in the table positions contains an array of bytes that codify a position in a chess board. I've to use this in the WHERE clause because i'm developing a chess game consulting project where there are millions of different positions and i've to get the games that have the same position in it's position history.
    The code to insert the positions is:
    query = "INSERT INTO positions VALUES "+
         "(null,?,?,default) "+
         "ON DUPLICATE KEY UPDATE qtt_games=qtt_games+1";
    pstmt = conn.prepareStatement(query,Statement.RETURN_GENERATED_KEYS);
    pstmt.setBytes(1,bcode);
    pstmt.setByte(2,poscode.getIsWhiteTurn());
    pstmt.executeUpdate();
    which works ok and positions can be seen from mysql browser, but i can't select them using the PreparedStatement..
    I have been searching a lot of information about this problem with no results... this is the why i posted this...
    Any help will be useful, thanks.

  • Problems with PreparedStatement and MySQL selecting bytes

    Hi,
    i have a problem trying to select information when the "select" has a byte restrict.
    The table in database is:
    CREATE TABLE `positions` (
    `PKID` int(10) unsigned NOT NULL auto_increment,
    `POSCODE` varbinary(30) NOT NULL,
    `ISWTURN` binary(1) NOT NULL,
    `QTT_GAMES` int(10) unsigned NOT NULL default '1',
    PRIMARY KEY (`PKID`),
    UNIQUE KEY `UNIQ_POS` (`POSCODE`,`ISWTURN`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    And the test code to get the qtt_games is :
    conn = DriverManager.getConnection (url,user,pwd);
    byte bcode[] = poscode.getByteArrayCode();
    // bcode is inserted ok in another preparedstatement...
    String query = "SELECT qtt_games FROM positions "+
         "WHERE poscode=? and iswturn=?";
    PreparedStatement pstmt = conn.prepareStatement(query);
    pstmt.setBytes (1,bcode);
    pstmt.setByte (2,poscode.getIsWhiteTurn()); //it returns a byte
    ResultSet rs = pstmt.executeQuery (query);
    When pstmt.executeQuery is reached, it's thrown the exception:
    com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '=? and iswturn=?' at line 1
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2870)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1573)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1665)
    at com.mysql.jdbc.Connection.execSQL(Connection.java:3170)
    at com.mysql.jdbc.Connection.execSQL(Connection.java:3099)
    at com.mysql.jdbc.Statement.execute(Statement.java:695)
    at app.server.bbdd.MYSQLBDManager.getGamesBasicInfo(MYSQLBDManager.java:942)
    at app.server.bbdd.MYSQLBDManager.main(MYSQLBDManager.java:1068)
    Can anybody tell me what's wrong?? I think the query is ok, but don't know what's happening with this...
    Lots of thanks.

    Don't cross-post, it's considered rude:
    http://forum.java.sun.com/thread.jspa?threadID=5122604&messageID=9430056#9430056
    http://forum.java.sun.com/thread.jspa?threadID=5122603&messageID=9430050#9430050
    One to a customer, please.
    %

  • Problems with PreparedStatement

    Please can somebody help, I am trying to run the following code,
    stmt = con.prepareStatement("select * from PASSWORD where upper(USERNAME) = upper('?') and upper(PASSWORD) = upper('?')");
    stmt.setString(1,inputUserid);
    stmt.setString(2,inputPwd);
    rs = stmt.executeQuery();     
    but I am getting the folowing error message
    A SQL error has occurred in method validateUser [IBM][JDBC Driver] CLI0612E Invalid parameter number. SQLSTATE=S1093
    Can anyone tell me what I have done wrong?

    No, not at all.
    Just use them without the '' around the question marks
    and outside db-functions like upper().
    inside a where condition like
    WHERE PASSWORD = ? AND USER = ?
    you can use them without problems.

  • Problems with setDate and PreparedStatement

    Hi,
    Having a bit of a problem with the code showed below. Im getting an SQLException that roughly translated says: "Non-implemented additional function". Im using an MS SQL Server Database.
              String sql = "Update the_table SET column1= ? AND SET column2= ? WHERE something='" + a_variable+"';";
              PreparedStatement updateODate = connection.prepareStatement(sql);
              updateODate.setDate(1, oDate);         //oDate and sbDate are java.sql.Date's
              updateODate.setDate(2, sbDate);
              updateODate.executeUpdate();Is there something wrong with my SQL-statement? Perhaps my SQL skills aren't the best...
    Regards
    -Karl XII

    You could get jTDS ( http://jtds.sourceforge.net ) or the trial version of a commercial driver (I would recommend the first). To use a different driver, just add the driver's jar file to your classpath and use that driver's Driver implementation and URL format instead.
    You can find the relevant information for each driver on its home page. For jTDS you would use:
            Class.forName("net.sourceforge.jtds.jdbc.Driver");
            Connection conn = DriverManager.getConnection("jdbc:jtds:sqlserver://server/db", "sa", "");Alin.

  • Problem with Unicode and Oracle NCLOB fields

    When I try to INSERT a new (N)CLOB into an Oracle database, all is fine until I use a non-ASCII character, such as an accented roman letter, like the "�" (that's '\u00E9') in "caf�" or the Euro Currency symbol "?" (that's '\u20AC' as a Java character literal, just in case the display is corrupted here too). This doesn't happen with "setString", but does happen when streaming characters to the CLOB; however, as Oracle or the driver refuse strings larger than 4000 characters, and as I need to support all the above symbols (and many more), I'm stuck.
    Here's the background to the problem (I've tried to be detailed, after a lot of looking around on the web, I've seen lots of people with similar problems, but no solutions: I've seen and been able to stream ASCII clobs, or add small NCHAR strings, but not stream NCLOBs...).
    I'm using Oracle 9.2.0.1.0 with the "thin" JDBC driver, on a Windows box (XP Pro). My database instance is set up with AL32UTF8 as the database encoding, and UTF8 as the national character set.. I've created a simple user/schema, called LOBTEST, in which I created two tables (see below).
    The basic problems are :
    - with Oracle and JDBC, you can't set the value of a CLOB or NCLOB with PreparedStatement's setString or setCharacterStream methods (as it throws an exception when you send more than 4000 characters)
    - with Oracle, you can only have one LONG VARCHAR-type field per table (according to their documentation) and you MUST read all columns in a set order (amongst other limitations).
    - with a SQL INSERT command, there's no way to set the value of a parameter that's a CLOB (implementations of the CLOB interface can only be obtained by performing a SELECT.... but obviously, when I'm inserting, the record doesn't exist yet...). Workarounds include (possibly) JDBC 4 (doesn't exist yet...) or doing the following Oracle-specific stuff :
    INSERT INTO MyTable (theID,theCLOB) VALUES (1, empty_clob());
    SELECT * FROM MyTable WHERE theId = 1;
    ...and getting the empty CLOB back (via a ResultSet), and populating it. I have a very large application, that's deployed for many of our customers using SapDB and MySQL without a hitch, with "one-step" INSERTS; I can't feasibly change the application into "three-step INSERT-SELECT-UPDATE" just for Oracle, and I shouldn't need to!!!
    The final workaround is to use Oracle-specific classes, described in:
    http://download-east.oracle.com/otn_hosted_doc/jdeveloper/904preview/jdbc-javadoc/index.html
    ...such as CLOB (see my example). This works fine until I add some non-ASCII characters, at which point, irrespective of whether the CLOB data is 2 characters or 2 million characters, it throws the same exception:
    java.io.IOException: Il n'y a plus de donn?es ? lire dans le socket
         at oracle.jdbc.dbaccess.DBError.SQLToIOException(DBError.java:716)
         at oracle.jdbc.driver.OracleClobWriter.flushBuffer(OracleClobWriter.java:270)
         at oracle.jdbc.driver.OracleClobWriter.flush(OracleClobWriter.java:204)
         at scratchpad.InsertOracleClobExample.main(InsertOracleClobExample.java:61)...where the error message in English is "No more data to read from socket". I need the Oracle-specific "setFormOfUse" method to force it to correctly use the encoding of the NCLOB field, without it, even plain ASCII data is rejected with an exception indicating that the character set is inappropriate. With a plain CLOB, I don't need it, but the plain CLOB refuses my non-ASCII data anyway.
    So, many many thanks in advance for any advice. The remainder of my post includes my code example and a simple SQL script to create the table(s). You can mess around with the source code to test various combinations.
    Thanks,
    Chris B.
    CREATE TABLE NCLOBTEST (
         ID         INTEGER NOT NULL,
         SOMESTRING NCLOB,
         PRIMARY KEY (ID)
    CREATE TABLE CLOBTEST (
         ID         INTEGER NOT NULL,
         SOMESTRING CLOB,
         PRIMARY KEY (ID)
    package scratchpad;
    import java.io.Writer;
    import java.sql.Connection;
    import java.sql.Driver;
    import java.sql.PreparedStatement;
    import java.sql.SQLException;
    import java.util.Properties;
    import oracle.jdbc.driver.OracleDriver;
    import oracle.jdbc.driver.OraclePreparedStatement;
    import oracle.sql.CLOB;
    public class InsertOracleClobExample
         public static void main(String[] args)
              Properties jdbcProperties = new Properties();
              jdbcProperties.setProperty( "user", "LOBTEST" );
              jdbcProperties.setProperty( "password", "LOBTEST" );
    //          jdbcProperties.setProperty("oracle.jdbc.defaultNChar","true");
              Driver jdbcDriver = new OracleDriver();
              PreparedStatement pstmt = null;
              Connection connection = null;
              String tableName = "NCLOBTEST";
              CLOB clob = null;
              try
                   connection = jdbcDriver.connect("jdbc:oracle:thin:@terre:1521:orcl", jdbcProperties);
                   pstmt = connection.prepareStatement("DELETE FROM NCLOBTEST");
                   pstmt.executeUpdate();
                   pstmt.close();
                   pstmt = connection.prepareStatement(
                        "INSERT INTO "+tableName+" (ID,SOMESTRING) VALUES (?,?);"
                   clob = CLOB.createTemporary(pstmt.getConnection(), true, CLOB.DURATION_SESSION);
                   clob.open(CLOB.MODE_READWRITE);
                   Writer clobWriter = clob.getCharacterOutputStream();
                   clobWriter.write("Caf? 4,90? TTC");
                   clobWriter.flush();
                   clobWriter.close();
                   clob.close();
                   OraclePreparedStatement opstmt = (OraclePreparedStatement)pstmt;
                   opstmt.setInt(1,1);
                   opstmt.setFormOfUse(2, OraclePreparedStatement.FORM_NCHAR);
                   opstmt.setCLOB(2, clob);
                   System.err.println("Rows affected: "+opstmt.executeUpdate());
              catch (Exception sqlex)
                   sqlex.printStackTrace();
                   try     {
                        clob.freeTemporary();
                   } catch (SQLException e) {
                        System.err.println("Cannot free temporary CLOB: "+e.getMessage());
              try { pstmt.close(); } catch(SQLException sqlex) {}
              try { connection.close(); } catch(SQLException sqlex) {}
    }

    The solution to this is to use a third-party driver. Oranxo works really well.
    - Chris

  • Problem with SQL Insert

    Hi
    I am using Flex to insert data through remoteobject and using
    SAVE method generated from CFC Wizard.
    My VO contains the following variables where id has a default
    value of 0 :
    public var id:Number = 0 ;
    public var date:String = "";
    public var accountno:String = "";
    public var debit:Number = 0;
    public var credit:Number = 0;
    id is set as the primary key in my database.
    I have previously used MySQL which automatically generates a
    new id if I either omitted the id value in my insert statement or
    use 0 as the default value.
    However, now I am using MS SQL Server and the insert
    generated this error:
    Unable to invoke CFC - Error Executing Database Query.
    Detail:
    [Macromedia][SQLServer JDBC Driver][SQLServer]Cannot insert
    explicit value for identity column in table 'Transactions' when
    IDENTITY_INSERT is set to OFF.
    Strange thing is that I dont see this problem with another
    sample application. I compared with that application (it has the
    same VO with default value of 0 for id) and everything looks
    similar so I can't understand why I have this error in my
    application.
    This is SQL used to create the table:
    USE [Transactions]
    SET ANSI_NULLS ON
    SET QUOTED_IDENTIFIER ON
    SET ANSI_PADDING ON
    CREATE TABLE [dbo].[Transactions](
    [id] [int] IDENTITY(1,1) NOT NULL,
    [date] [datetime] NULL,
    [accountno] [varchar](100) NULL,
    [debit] [int] NULL,
    [credit] [int] NULL,
    CONSTRAINT [PK_Transactions] PRIMARY KEY CLUSTERED
    [id] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE =
    OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON,
    ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    ) ON [PRIMARY]
    Has anyone encountered this problem before with insert
    statements dealing with a unique id (with MS SQL Server)?

    Change "addRecords =
    connection.prepareStatement("
    to "addRecords =
    connection.preparedStatement("
    -BIGD

  • Problem with Java EE 5 and derby

    have a problem with the database connectivity in the examples of Java EE 5, I have the NETBEANS 5.5 with Sun Java System Application Server Platform Edition 9, and with the derby database.
    I just try to run my application, but there is not connectivity with the database. I review all the configurations and step to follow to run the examples, and does not even work.
    The server.log, show this:
    [#|2006-11-12T17:12:20.781+0000|WARNING|sun-appserver-pe9.0|oracle.toplink.essentials.file:/C:/as9rrtutorial/jsstutorials/examples/web/bookstore2/build/web/WEB-INF/lib/bookstore.jar-book|_ThreadID=14;_ThreadName=httpWorkerThread-8080-0;_RequestID=4c2405ce-8492-4786-bff4-ef1332cfccd4;|
    Local Exception Stack:
    Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2006.8 (Build 060830)): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: org.apache.derby.client.am.SqlException: Table 'WEB_BOOKSTORE_BOOKS' does not exist.Error Code: -1
    Call:SELECT BOOKID, ONSALE, CALENDAR_YEAR, PRICE, TITLE, INVENTORY, DESCRIPTION, FIRSTNAME, SURNAME FROM WEB_BOOKSTORE_BOOKS WHERE (BOOKID = ?)
    bind => [203]
    Query:ReadObjectQuery(com.sun.bookstore.database.Book)
    at oracle.toplink.essentials.exceptions.DatabaseException.sqlException(DatabaseException.java:303)
    at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:551)
    at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:437)
    at oracle.toplink.essentials.threetier.ServerSession.executeCall(ServerSession.java:465)
    at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:213)
    at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:199)
    at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.selectOneRow(DatasourceCallQueryMechanism.java:620)
    at oracle.toplink.essentials.internal.queryframework.ExpressionQueryMechanism.selectOneRowFromTable(ExpressionQueryMechanism.java:2152)
    at oracle.toplink.essentials.internal.queryframework.ExpressionQueryMechanism.selectOneRow(ExpressionQueryMechanism.java:2127)
    at oracle.toplink.essentials.queryframework.ReadObjectQuery.executeObjectLevelReadQuery(ReadObjectQuery.java:350)
    at oracle.toplink.essentials.queryframework.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:709)
    at oracle.toplink.essentials.queryframework.DatabaseQuery.execute(DatabaseQuery.java:609)
    at oracle.toplink.essentials.queryframework.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:677)
    at oracle.toplink.essentials.queryframework.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:731)
    at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2218)
    at oracle.toplink.essentials.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:937)
    at oracle.toplink.essentials.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:894)
    at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerImpl.findInternal(EntityManagerImpl.java:298)
    at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerImpl.findInternal(EntityManagerImpl.java:274)
    at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerImpl.find(EntityManagerImpl.java:130)
    at com.sun.bookstore2.database.BookDBAO.getBook(BookDBAO.java:73)
    at com.sun.bookstore2.database.BookDB.getBook(BookDB.java:55)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at javax.el.BeanELResolver.getValue(BeanELResolver.java:273)
    at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
    at com.sun.el.parser.AstValue.getValue(AstValue.java:117)
    at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:192)
    at org.apache.jasper.runtime.PageContextImpl.evaluateExpression(PageContextImpl.java:982)
    at org.apache.jsp.books.bookstore_jsp._jspService(bookstore_jsp.java:191)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:353)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:412)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:318)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
    at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:850)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:697)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:532)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:465)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:353)
    at com.sun.bookstore2.dispatcher.Dispatcher.doGet(Dispatcher.java:106)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:278)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:239)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
    at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
    at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
    at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
    at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
    Caused by: org.apache.derby.client.am.SqlException: Table 'WEB_BOOKSTORE_BOOKS' does not exist.
    at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source)
    at org.apache.derby.client.net.NetStatementReply.parsePrepareError(Unknown Source)
    at org.apache.derby.client.net.NetStatementReply.parsePRPSQLSTTreply(Unknown Source)
    at org.apache.derby.client.net.NetStatementReply.readPrepareDescribeOutput(Unknown Source)
    at org.apache.derby.client.net.StatementReply.readPrepareDescribeOutput(Unknown Source)
    at org.apache.derby.client.net.NetStatement.readPrepareDescribeOutput_(Unknown Source)
    at org.apache.derby.client.am.Statement.readPrepareDescribeOutput(Unknown Source)
    at org.apache.derby.client.am.PreparedStatement.readPrepareDescribeInputOutput(Unknown Source)
    at org.apache.derby.client.am.PreparedStatement.flowPrepareDescribeInputOutput(Unknown Source)
    at org.apache.derby.client.am.PreparedStatement.prepare(Unknown Source)
    at org.apache.derby.client.am.Connection.prepareStatementX(Unknown Source)
    at org.apache.derby.client.am.Connection.prepareStatement(Unknown Source)
    at com.sun.gjc.spi.ConnectionHolder.prepareStatement(ConnectionHolder.java:413)
    at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.prepareStatement(DatabaseAccessor.java:1147)
    at oracle.toplink.essentials.internal.databaseaccess.DatabaseCall.prepareStatement(DatabaseCall.java:597)
    at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:470)
    ... 69 more
    |#]
    And the table exist in the database.
    Some body can help me?
    Thanks.

    You probably made the same mistake as I did and added the tables manually to the "sample" database instead of the "sun-appserv-samples" database.
    marc

  • Problem with RollBack in  Oracle Batching

    Hi all,
    This is Adhil. I am facing a problem with Oracle Batching in java.
    I am using java 1.5 and Oracle 10 g.
    I have a below standalone code to test the Oracle Batching (Assume that i have the 2 tables with zero records ).
    with the batch size set as 10, I am trying add 2 records in each table.
    Now I rise divideByZero error exception manually and trying to rollback the connection in catch statement . But couldn't rollback the connection. I see the 2 records added in both of my tables.
    The same code when i set the batchsize 2 and trying to insert 10 records ,I could rollback and no rows get inserted.
    Since I am going to get the no of insert from user in runtime , my rollback may fail in any combinations as in my first case(with batch size 10 and if the no of insert is 2).
    import java.io.*;
    import java.util.*;
    import java.sql.*;
    import oracle.jdbc.*;
    public class BatchTest{
         public static void main(String args[]) throws Exception{
              Connection conn = null;
              conn = new BatchTest().createConnection();
              new BatchTest().insertdata(conn);
         public Connection createConnection() throws Exception{
                   Properties props =new Properties();
                   props.load(ClassLoader.getSystemResourceAsStream("connection.properties"));
                   String connectionString = (String)props.get("connection");
                   String username = (String)props.get("username");
                   String password = (String)props.get("password");
                   Class.forName("oracle.jdbc.driver.OracleDriver");
                   Connection connection = DriverManager.getConnection(connectionString, username, password);
                   return connection;
         public void insertdata(Connection dbConnection){
              PreparedStatement psCnt =null;
              PreparedStatement psImp =null;
              try{
              dbConnection.setAutoCommit(false);
              psCnt = dbConnection.prepareStatement("insert into CHKCNT values (?,?)");
              psImp = dbConnection.prepareStatement("insert into CHKIMP values (?,?)");
              ((OraclePreparedStatement)psCnt).setExecuteBatch (10);
              ((OraclePreparedStatement)psImp).setExecuteBatch (10);
              int x=0;
              for(int i=1;i<=2;i++){
                        psCnt.setInt(1,i);
                        psCnt.setString(2,"Jack");
                        psImp.setInt(1,i);
                        psImp.setString(2,"John");
                        psImp.executeUpdate();
                        psCnt.executeUpdate();
              if(true) x=10/0;
              dbConnection.commit();
              }catch(Exception e){
                   try{
                   dbConnection.rollback();
                   dbConnection.close();
                   }catch(Exception ex){
                   e.printStackTrace();
              }finally{
                   try{
                        psCnt.close();
                   }catch(Exception ee){
                   ee.printStackTrace();
    Can anyone suggest me a way to make my rollback work.
    Thanks in advance.
    -adhil.J

    Hi all,
    This is Adhil. I am facing a problem with Oracle Batching in java.
    I am using java 1.5 and Oracle 10 g.
    I have a below standalone code to test the Oracle Batching (Assume that i have the 2 tables with zero records ).
    with the batch size set as 10, I am trying add 2 records in each table.
    Now I rise divideByZero error exception manually and trying to rollback the connection in catch statement . But couldn't rollback the connection. I see the 2 records added in both of my tables.
    The same code when i set the batchsize 2 and trying to insert 10 records ,I could rollback and no rows get inserted.
    Since I am going to get the no of insert from user in runtime , my rollback may fail in any combinations as in my first case(with batch size 10 and if the no of insert is 2).
    import java.io.*;
    import java.util.*;
    import java.sql.*;
    import oracle.jdbc.*;
    public class BatchTest{
         public static void main(String args[]) throws Exception{
              Connection conn = null;
              conn = new BatchTest().createConnection();
              new BatchTest().insertdata(conn);
         public Connection createConnection() throws Exception{
                   Properties props =new Properties();
                   props.load(ClassLoader.getSystemResourceAsStream("connection.properties"));
                   String connectionString = (String)props.get("connection");
                   String username = (String)props.get("username");
                   String password = (String)props.get("password");
                   Class.forName("oracle.jdbc.driver.OracleDriver");
                   Connection connection = DriverManager.getConnection(connectionString, username, password);
                   return connection;
         public void insertdata(Connection dbConnection){
              PreparedStatement psCnt =null;
              PreparedStatement psImp =null;
              try{
              dbConnection.setAutoCommit(false);
              psCnt = dbConnection.prepareStatement("insert into CHKCNT values (?,?)");
              psImp = dbConnection.prepareStatement("insert into CHKIMP values (?,?)");
              ((OraclePreparedStatement)psCnt).setExecuteBatch (10);
              ((OraclePreparedStatement)psImp).setExecuteBatch (10);
              int x=0;
              for(int i=1;i<=2;i++){
                        psCnt.setInt(1,i);
                        psCnt.setString(2,"Jack");
                        psImp.setInt(1,i);
                        psImp.setString(2,"John");
                        psImp.executeUpdate();
                        psCnt.executeUpdate();
              if(true) x=10/0;
              dbConnection.commit();
              }catch(Exception e){
                   try{
                   dbConnection.rollback();
                   dbConnection.close();
                   }catch(Exception ex){
                   e.printStackTrace();
              }finally{
                   try{
                        psCnt.close();
                   }catch(Exception ee){
                   ee.printStackTrace();
    Can anyone suggest me a way to make my rollback work.
    Thanks in advance.
    -adhil.J

  • Another problem with updating in ms access

    Hello there,
    Me too has a problem with the update statement and ms access (using 2003).
    I've read many other problems, but a way to the solution that worked for I didn't found :S
    The strange thing with my problem is that i'm able to update integer fields in the database, but not varchar/text fields.
    I'm not getting any exception back, the database is closed (i'm very sure), so HELP! :)
    I'll show you the code i'm connecting with the database:
    public void openDatabaseConnection() {
            // Eerst controleren of de DatabaseDriver wel aanwezig is.
            try {
                Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
            catch (Exception e) {
                System.out.println("Looking for Class: " + e.toString());
            // Nu kan de connectie met de database opgezet worden.       
            try {
                theDatabaseConnection = DriverManager.getConnection("jdbc:odbc:Shawa","","ShaBaMa");           
            catch (SQLException ex) {
                System.out.println("openDatabaseConnection: SQLException: " + ex.getMessage());
                System.out.println("openDatabaseConnection: SQLState: " + ex.getSQLState());
                System.out.println("openDatabaseConnection: VendorError: " + ex.getErrorCode());        
        }The code for updating an integer field (wich is working!) is like this:
        public Customer cashCustomer(Customer aCustomer){
            PreparedStatement pstmt;
            ResultSet result;
            try{
                openDatabaseConnection();
                pstmt = theDatabaseConnection.prepareStatement("UPDATE customer SET aantal_bier = aantal_bier + ?, aantal_fris = aantal_fris + ? WHERE id=?");
                pstmt.setInt(1, aCustomer.getCashBeer());
                pstmt.setInt(2, aCustomer.getCashSoda());
                pstmt.setInt(3, aCustomer.getId());
                theDatabaseConnection.setAutoCommit(false);
                pstmt.executeUpdate();
                theDatabaseConnection.commit();
                pstmt.close();
                theDatabaseConnection.close();
            catch (SQLException eSql){
                System.out.println("Cash Customer: " + eSql.toString());
                System.out.println("Cash Customer: SQLException: " + eSql.getMessage());
                System.out.println("Cash Customer: SQLState: " + eSql.getSQLState());
                System.out.println("Cash Customer: VendorError: " + eSql.getErrorCode());
            return aCustomer;
        }Now the code for updating Varchar/text fields (wich is not working):
        public Customer editCustomer(Customer aCustomer){
            PreparedStatement pstmt;
            ResultSet result;
            try{
                openDatabaseConnection();
                pstmt = theDatabaseConnection.prepareStatement("UPDATE customer SET name=? , lastname=?, onderdeel=?, aantal_bier=?, aantal_fris=?, op_kaart=? WHERE id=?");
                pstmt.setString(1, aCustomer.getName());
                pstmt.setString(2, aCustomer.getLastname());
                pstmt.setString(3, aCustomer.getSection());
                pstmt.setInt(4, aCustomer.getBeer());
                pstmt.setInt(5, aCustomer.getSoda());
                pstmt.setInt(6, aCustomer.getId());
                pstmt.setString(7, aCustomer.getAddCash());
                theDatabaseConnection.setAutoCommit(false);
                pstmt.executeUpdate();
                theDatabaseConnection.commit();
                pstmt.close();
                theDatabaseConnection.close();
            catch (SQLException eSql){
                System.out.println("Updating Customer: " + eSql.toString());
                System.out.println("Updating Customer: SQLException: " + eSql.getMessage());
                System.out.println("Updating Customer: SQLState: " + eSql.getSQLState());
                System.out.println("Updating Customer: VendorError: " + eSql.getErrorCode());
            return aCustomer;
        }I can add and delete from the database. The thing with the ' ' didn't work for me too.
    Anybody a solution for me??? plz plz plz!

    You are updating zero records. Because you are filling in the parameter ofWHERE id=?with this code:pstmt.setString(7, aCustomer.getAddCash());The executeUpdate() method returns the number of records affected, if you wish to check that.

  • Oracle 8.1.5 JDBC driver problem with LONGVARCHAR

    Hi, I'm having problem with 8.1.5 release on Solaris with the
    JDBC type 4 driver (thin). If I create the following table
    create table test1 (col1 NUMBER, col2 LONG);
    Using JDBC driver to insert into the second column any string
    longer than 4000 characters causing run time exception. The type2
    driver works fine, but type2 is slow.
    String sql = "insert into test1 (col1, col2) values (1099,?)";
    PreparedStatement stmt ;
    stmt = conn.prepareStatement(sql);
    // create a string with very long value , bigger than 4096
    stmt.setString(1,string);
    stmt.executeUpdate();
    runtime exception:
    java.sql.SQLException: Data size bigger than max size for this
    type
    at java.lang.Throwable.<init>(Compiled Code)
    at java.lang.Exception.<init>(Compiled Code)
    at java.sql.SQLException.<init>(Compiled Code)
    at oracle.jdbc.dbaccess.DBError.check_error(Compiled
    Code)
    at oracle.jdbc.ttc7.TTCItem.setArrayData(Compiled Code)
    at
    oracle.jdbc.driver.OraclePreparedStatement.setItem(Compiled Code)
    at
    oracle.jdbc.driver.OraclePreparedStatement.setString(Compiled
    Code)
    at testi.main(Compiled Code)
    Any help is appreciated.
    Thanks
    Steve
    null

    Post the full stacktrace here
    Also you might want to post jdbc related questions to weblogic.developer.
    interest.jdbc
    Kumar
    DreamNEON wrote:
    Hello,
    the NSAPI integration works, also the JSP files.
    But I have still problems with the Jdriver for my Oracle 8.1.5.
    I get the message :
    Failed to invoke startup class
    weblogic.jdbc.common.internal.JdbcStartup=weblogic.jdbc.common.internal.JdbcStartup
    when the WebLogic Server is started.
    Any ideas or hints about that?
    Thanks in advance
    Armin

  • Oracle 8.1.7 driver limit causes problems with CMP

    The information below is from Oracle's site and has been noted by a few
    people on various message groups. We had upgraded to 8.1.7 but hadn't put
    the latest classes12.zip (June 2001) in our classpath. When we do, we get
    the following error from the driver/generated code. We believe this is
    because we are hitting the limit cited below. I don't know why the Oracle
    driver has this limit, but since WL generates this code for the EB, I don't
    see an easy way for us to avoid it.
    Anyone have any comments on this? Is my interpretation of the stacktrace
    correct? If we go back to the old classes12.zip (June 2000) then we don't
    have this problem. But in addition to wanting to run the matching zip file
    with the version of the DB, we also want to use some of the functionality in
    the 8.1.7 zip. Does BEA have a workaround for CMP?
    java.rmi.UnexpectedException: Unexpected exception in
    sync.server.system.SystemSessionDataBean.setSessionData():
    java.sql.SQLException: ORA-01483: invalid length for DATE or NUMBER bind
    variable
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:169)
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1405)
    at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:822)
    at
    oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:1610
    at
    oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1535)
    at
    oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java
    :2053)
    at
    oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedState
    ment.java:398)
    at
    weblogic.jdbc20.pool.PreparedStatement.executeUpdate(PreparedStatement.java:
    47)
    at
    sync.server.system.SystemSessionDataPSWebLogic_CMP_RDBMS.update(SystemSessio
    nDataPSWebLogic_CMP_RDBMS.java:318)
    at
    sync.server.system.SystemSessionDataPSWebLogic_CMP_RDBMS.store(SystemSession
    DataPSWebLogic_CMP_RDBMS.java:284)
    at weblogic.ejb.internal.EntityEJBContext.store(EntityEJBContext.java:192)
    at
    weblogic.ejb.internal.EntityEJBContext.beforeCompletion(EntityEJBContext.jav
    a:227)
    at
    weblogic.ejb.internal.StatefulEJBObject.postInvokeNoTx(StatefulEJBObject.jav
    a:355)
    at weblogic.ejb.internal.BaseEJBObject.postInvoke(BaseEJBObject.java:865)
    Using Streams to Avoid Limits on setBytes() and setString()
    There is a limit on the maximum size of the array which can be bound using
    the PreparedStatement class setBytes() method, and on the size of the string
    which can be bound using the setString() method.
    Above the limits, which depend on the version of the server you use, you
    should use setBinaryStream() or setCharacterStream() instead.
    When connecting to an Oracle8 database, the limit for setBytes() is 2000
    bytes (the maximum size of a RAW in Oracle8) and the limit for setString()
    is 4000 bytes (the maximum size of a VARCHAR2 in Oracle8).
    When connecting to an Oracle7 database, the limit for setBytes() is 255
    bytes (the maximum size of a RAW in Oracle7) and the limit for setString()
    is 2000 bytes (the maximum size of a VARCHAR2 in Oracle7).
    The 8.1.6 Oracle JDBC drivers may not raise an error if you exceed the limit
    when using setBytes() or setString(), but you may receive the following
    error:
    ORA-17070: Data size bigger than max size for this type
    Future versions of the Oracle drivers will raise an error if the length
    exceeds these limits.

    Joe Herbers wrote:
    >
    I added some debug output to verify that this problem is definitely caused
    by the WL generated code/Oracle driver. To do this, I used
    the -keepgenerated code on ejbc. Then I modified the generated code to
    print the length of the byte array before calling setBytes. I compiled the
    class and put an updated version in my bean jar.
    When I run our test suite, I see hundreds of calls to setBytes with sizes
    such as 315, 368, 1988, 2020. And then occasionally there are sizes of
    41932 or 19409. These larger sizes are always followed by the ORA-01483
    exceptions.
    This appears to be certain confirmation that the problem is caused by the
    8.1.7 driver's enforcement of the 4k limit on the methods that the
    WL-generated code is using to map our Java byte[] to our Long Raw/BLOB field
    in Oracle. Any suggestions for workarounds?Actually, it indicates the driver's being caught by the limitation that
    Oracle itself imposes with setBytes(). This is a known issue I believe, and
    you should ask support for a patch to ejbc that generates calls to setBinaryStream()
    rather than setBytes().
    Joe Weinstein
    >
    "Joe Herbers" <[email protected]> wrote in message
    news:[email protected]...
    We use WL 5.1, SP10. I've noticed that sp11 is now out, but it doesn'tseem
    to have any fixes for this problem (it mentions Oracle 8.1.6, but not8.1.7,
    which seems to be the release in which Oracle started enforcing thislimit).
    We're kind of stuck at the moment, I'm surprised no one else hasencountered
    this problem with WebLogic (I have seen postings elsewhere about it with
    other AppServers)
    "Slava Imeshev" <[email protected]> wrote in message
    news:[email protected]...
    Hi Joe,
    From your CMP DD it's clear that you use WL 5.1. Which service pack
    do you use?
    AFAIR this problem was fixed in WL 6.1, though I'm not sure about
    5.1. Could you use ejbc with -keepgenerated option and look at
    SystemSessionDataPSWebLogic_CMP_RDBMS.java, particularly
    how bind variable related to you LONG RAW? Is setBytes used? Or
    it's something like setBinaryStream?
    Regards,
    Slava Imeshev
    "Joe Herbers" <[email protected]> wrote in message
    news:[email protected]...
    The table has only three fields: two IDs (Number(18)) and a Long Raw
    that
    we
    are storing a Hashtable in. The field seems to be filled fine most of
    the
    time. With the old driver, it always works. As soon as we switch thenew
    driver in, certain operations fail consistently. I haven't verifiedthat
    the size is indeed > 4k in these cases, but our error matches whatothers
    have seen. Here's the CMP DD but I doubt that helps...
    <weblogic-rdbms-bean>
    <pool-name>oracle</pool-name>
    <table-name>scc_sm_sys_sess_data</table-name>
    <attribute-map>
    <object-link>
    <bean-field>mlSystemSessionDataID</bean-field>
    <dbms-column>sys_sess_data_id</dbms-column>
    </object-link>
    <object-link>
    <bean-field>mlSystemSessionID</bean-field>
    <dbms-column>sys_sess_id</dbms-column>
    </object-link>
    <object-link>
    <bean-field>mBSessionData</bean-field>
    <dbms-column>sys_sess_data</dbms-column>
    </object-link>
    "Slava Imeshev" <[email protected]> wrote in message
    news:[email protected]...
    Hi Joe,
    This limit defines limit written to oracle strings, raws, blobs and
    clobs
    when setBytes is used. It has nothing to do with the exception
    you're
    getting.
    Could you show us your CMP deployment descriptor(s)?
    Regards,
    Slava Imeshev
    "Joe Herbers" <[email protected]> wrote in message
    news:[email protected]...
    The information below is from Oracle's site and has been noted by
    a
    few
    people on various message groups. We had upgraded to 8.1.7 but
    hadn't
    put
    the latest classes12.zip (June 2001) in our classpath. When we
    do,
    we
    get
    the following error from the driver/generated code. We believe th
    is
    is
    because we are hitting the limit cited below. I don't know why
    the
    Oracle
    driver has this limit, but since WL generates this code for the
    EB,
    I
    don't
    see an easy way for us to avoid it.
    Anyone have any comments on this? Is my interpretation of the
    stacktrace
    correct? If we go back to the old classes12.zip (June 2000) then
    we
    don't
    have this problem. But in addition to wanting to run the matching
    zip
    file
    with the version of the DB, we also want to use some of the
    functionality
    in
    the 8.1.7 zip. Does BEA have a workaround for CMP?
    java.rmi.UnexpectedException: Unexpected exception in
    sync.server.system.SystemSessionDataBean.setSessionData():
    java.sql.SQLException: ORA-01483: invalid length for DATE or
    NUMBER
    bind
    variable
    at
    oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:169)
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1405)
    atoracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:822)
    at
    oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:1610
    at
    oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1535)
    at
    oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java
    :2053)
    at
    oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedState
    ment.java:398)
    at
    weblogic.jdbc20.pool.PreparedStatement.executeUpdate(PreparedStatement.java:
    47)
    at
    sync.server.system.SystemSessionDataPSWebLogic_CMP_RDBMS.update(SystemSessio
    nDataPSWebLogic_CMP_RDBMS.java:318)
    at
    sync.server.system.SystemSessionDataPSWebLogic_CMP_RDBMS.store(SystemSession
    DataPSWebLogic_CMP_RDBMS.java:284)
    atweblogic.ejb.internal.EntityEJBContext.store(EntityEJBContext.java:192)
    at
    weblogic.ejb.internal.EntityEJBContext.beforeCompletion(EntityEJBContext.jav
    a:227)
    at
    weblogic.ejb.internal.StatefulEJBObject.postInvokeNoTx(StatefulEJBObject.jav
    a:355)
    atweblogic.ejb.internal.BaseEJBObject.postInvoke(BaseEJBObject.java:865)
    Using Streams to Avoid Limits on setBytes() and setString()
    There is a limit on the maximum size of the array which can be
    bound
    using
    the PreparedStatement class setBytes() method, and on the size of
    the
    string
    which can be bound using the setString() method.
    Above the limits, which depend on the version of the server you
    use,
    you
    should use setBinaryStream() or setCharacterStream() instead.
    When connecting to an Oracle8 database, the limit for setBytes()
    is
    2000
    bytes (the maximum size of a RAW in Oracle8) and the limit forsetString()
    is 4000 bytes (the maximum size of a VARCHAR2 in Oracle8).
    When connecting to an Oracle7 database, the limit for setBytes()
    is
    255
    bytes (the maximum size of a RAW in Oracle7) and the limit forsetString()
    is 2000 bytes (the maximum size of a VARCHAR2 in Oracle7).
    The 8.1.6 Oracle JDBC drivers may not raise an error if you exceed
    the
    limit
    when using setBytes() or setString(), but you may receive the
    following
    error:
    ORA-17070: Data size bigger than max size for this type
    Future versions of the Oracle drivers will raise an error if thelength
    exceeds these limits.
    B.E.A. is now hiring! (12/14/01) If interested send a resume to [email protected]
    DIRECTOR OF PRODUCT PLANS AND STRATEGY San Francisco, CA
    E-SALES BUSINESS DEVELOPMENT REPRESENTATIVE Dallas, TX
    SOFTWARE ENGINEER (DBA) Liberty Corner, NJ
    SENIOR WEB DEVELOPER San Jose, CA
    SOFTWARE ENGINEER (ALL LEVELS), CARY, NORTH CAROLINA San Jose, CA
    SR. PRODUCT MANAGER Bellevue, WA
    SR. WEB DESIGNER San Jose, CA
    Channel Marketing Manager - EMEA Region London, GBR
    DIRECTOR OF MARKETING STRATEGY, APPLICATION SERVERS San Jose, CA
    SENIOR SOFTWARE ENGINEER (PLATFORM) San Jose, CA
    E-COMMERCE INTEGRATION ARCHITECT San Jose, CA
    QUALITY ASSURANCE ENGINEER Redmond, WA
    Services Development Manager (Business Development Manager - Services) Paris, FRA; Munich, DEU
    SENIOR SOFTWARE ENGINEER (PLATFORM) Redmond, WA
    E-Marketing Programs Specialist EMEA London, GBR
    BUSINESS DEVELOPMENT DIRECTOR - E COMMERCE INTEGRATION San Jose, CA
    MANAGER, E-SALES Plano, TX

  • Problem with Watched Folder endpoint

    Hi,
    We have a problem with a watched folder endpoint. The watched folder is set in a directory in a linux server. The directory then is mapped to a windows directory where files arrive from time to time. Everything works fine until the watched folder service stops for no particular reason. After that we need to restart the service from the admin UI console.
    I found in another post something related to the MySql database losing connection with livecycle after some inactivity, but I'm not sure if this is our case or even how to solve the problem.
    Here's what we found in the log
    2010-11-11 17:10:31,890 INFO  [com.adobe.idp.dsc.provider.service.file.write.impl.FileResultHandlerImpl] FileResultHandlerImpl ----- preserved- source ----/data/livecycle/lc_wrk/edi/stage/Wx130df02e731a9c7b14738905/C0158_208.dat--- to ---/data/livecycle/lc_wrk/edi/preserve/ /C0158_208.dat
    2010-11-11 20:39:46,366 INFO  [com.adobe.idp.scheduler.jobstore.DSCJobStoreTX] Handling 1 trigger(s) that missed their scheduled fire-time.
    2010-11-11 20:40:22,056 ERROR [com.adobe.idp.scheduler.jobstore.DSCJobStoreTX] Error retrieving job, setting trigger state to ERROR.
    org.quartz.JobPersistenceException: Couldn't retrieve job: Prepared statement needs to be re-prepared [See nested exception: java.sql.SQLException: Prepared statement needs to be re-prepared]
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveJob(JobStoreSupport.java:1338)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.triggerFired(JobStoreSupport.java:2789)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport$37.execute(JobStoreSupport.java:2757)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.ja va:3662)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.triggerFired(JobStoreSupport.java:2751)
    at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:313)
    Caused by: java.sql.SQLException: Prepared statement needs to be re-prepared
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2928)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1571)
    at com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:1124)
    at com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:676)
    at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1030)
    at org.jboss.resource.adapter.jdbc.CachedPreparedStatement.executeQuery(CachedPreparedStatem ent.java:90)
    at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStat ement.java:255)
    at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.selectJobListeners(StdJDBCDelegate.java:843)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveJob(JobStoreSupport.java:1319)
    ... 5 more
    2010-11-11 20:40:22,061 ERROR [org.quartz.core.ErrorLogger] An error occured while firing trigger 'WatchedFolder.WatchedFolder:1107'
    org.quartz.JobPersistenceException: Couldn't retrieve job: Prepared statement needs to be re-prepared [See nested exception: java.sql.SQLException: Prepared statement needs to be re-prepared]
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveJob(JobStoreSupport.java:1338)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.triggerFired(JobStoreSupport.java:2789)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport$37.execute(JobStoreSupport.java:2757)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.ja va:3662)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.triggerFired(JobStoreSupport.java:2751)
    at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:313)
    Caused by: java.sql.SQLException: Prepared statement needs to be re-prepared
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2928)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1571)
    at com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:1124)
    at com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:676)
    at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1030)
    at org.jboss.resource.adapter.jdbc.CachedPreparedStatement.executeQuery(CachedPreparedStatem ent.java:90)
    at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStat ement.java:255)
    at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.selectJobListeners(StdJDBCDelegate.java:843)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveJob(JobStoreSupport.java:1319)
    ... 5 more
    2010-11-11 20:56:46,550 INFO  [com.adobe.idp.scheduler.jobstore.DSCJobStoreTX] Handling 1 trigger(s) that missed their scheduled fire-time.
    thanks

    Originally Posted by bjbradleyUSC
    Is there a problem with running the ZCM client and the Endpoint client on the same machine?? I am having problems getting both of them to install on a single machine.
    If I install the ZCM Client, it will pull down the policies and work correctly. Then I try to install Endpoint and it will not finish up it's checkin procedure and it will not get the policies set in place for it.
    Otherwise, I'll start with Endpoint on a fresh machine install it and it works great pulling down the policies. But the ZCM doesn't seem to pull down the policies correctly?
    Just wondering if this was known problem or is there something I am not doing correctly...
    Thanks
    BJ Bradley
    This is issue that you are seeing is just for the client, correct? The ZESM server and ZCM server are on separate machines, correct?

  • Performance problem with ojdbc14.jar

    Hi,
    We are having performance problem with ojdbc14.jar in selecting and updating (batch updates) entries in a table. The queries are taking minutes to execute. The same java code works fine with classes12.zip ans queries taking sub seconds to execute.
    We have Oracle 9.2.0.5 Database Server and I have downloaded the ojdbc14.jar from Oracle site for the same. Tried executing the java code from windows 2000, Sun Solaris and Opteron machines and having the same problem.
    Does any one know a solution to this problem? I also tried ojdbc14.jar meant for Oracle 10g, that did not help.
    Please help.
    Thanks
    Yuva

    My code is doing some thing which might be working well with classes12.zip and which does not work well with ojdbc14.jar? Any general suggestions to make the code better, especially for batch updates.
    But for selecting a row from the table, I am using index columns in the where cluase. In the code using PreparedStatement, setting all the reuired fields. Here is the code. We have a huge index with 14 fields!!. All the parameters are for where clause.
    if(longCallPStmt == null) {
    longCallPStmt = conn.prepareStatement(longCallQuery);
    log(Level.FINE, "CdrAggLoader: Loading tcdragg entry for "
    +GeneralUtility.formatDate(cdrAgg.time_hour, "MM/dd/yy HH"));
    longCallPStmt.clearParameters();
    longCallPStmt.setInt(1, cdrAgg.iintrunkgroupid);
    longCallPStmt.setInt(2, cdrAgg.iouttrunkgroupid);
    longCallPStmt.setInt(3, cdrAgg.iintrunkgroupnumber);
    longCallPStmt.setInt(4, cdrAgg.iouttrunkgroupnumber);
    longCallPStmt.setInt(5, cdrAgg.istateregionid);
    longCallPStmt.setTimestamp(6, cdrAgg.time_hour);
    longCallPStmt.setInt(7, cdrAgg.icalltreatmentcode);
    longCallPStmt.setInt(8, cdrAgg.icompletioncode);
    longCallPStmt.setInt(9, cdrAgg.bcallcompleted);
    longCallPStmt.setInt(10, cdrAgg.itodid);
    longCallPStmt.setInt(11, cdrAgg.iasktodid);
    longCallPStmt.setInt(12, cdrAgg.ibidtodid);
    longCallPStmt.setInt(13, cdrAgg.iaskzoneid);
    longCallPStmt.setInt(14, cdrAgg.ibidzoneid);
    rs = longCallPStmt.executeQuery();
    if(rs.next()) {
    cdr_agg = new CdrAgg(
    rs.getInt(1),
    rs.getInt(2),
    rs.getInt(3),
    rs.getInt(4),
    rs.getInt(5),
    rs.getTimestamp(6),
    rs.getInt(7),
    rs.getInt(8),
    rs.getInt(9),
    rs.getInt(10),
    rs.getInt(11),
    rs.getInt(12),
    rs.getInt(13),
    rs.getInt(14),
    rs.getInt(15),
    rs.getInt(16)
    }//if
    end_time = System.currentTimeMillis();
    log(Level.INFO, "CdrAggLoader: Loaded "+((cdr_agg==null)?0:1) + " "
    + GeneralUtility.formatDate(cdrAgg.time_hour, "MM/dd/yy HH")
    +" tcdragg entry in "+(end_time - start_time)+" msecs");
    } finally {
    GeneralUtility.closeResultSet(rs);
    GeneralUtility.closeStatement(pstmt);
    Why that code works well for classes12.zip (comes back in around 10 msec) and not for ojdbc14.jar (comes back in 6-7 minutes)?
    Please advise.

Maybe you are looking for

  • How to use the alv function module

    hi all,         can  any one help me out how to use reuse_alv_block_list_append function module, what parameters shall i pass  to it, so that i get top of page and end of page events and report data in two blocks, can any one tell how can i didvide t

  • GRE/Legal Entity not migrated in R12

    LE not migrated into R12 We are upgrading from 11.5.9.2 with OPM to R12.0.4, after upgrade, LE not migrated Question arise is At 11i, For Legal Entity, Is it necessary to attach Classification of HR Organization. Existing is GRE/Legal Entity Only.

  • Can I control Power PC iMacs running 10.4 or 10.5 from iMac running 10.8 or 10.9?

    I need to use Apple Remote Desktop to observe/control 10 Power PC iMacs running OS X 10.4.11 (or 10.5 if I upgrade them). My admin macchine is a 2013 iMac running OS X 10.8.5. Is the current ARD version compatible with the older client iMacs? Thanks

  • Balance Sheet Adj account

    We have an instance where the user trying to clear the Vendor items through transaction F-44, sometimes they are getting error u201CEx rate difference accounts are incomplete for acc XXXXXu201D We assigned balance sheet adjustment accounts (OB09) and

  • SQL Server Replication with MYSQL DB on web

    Hi Friends, I want to inquire that using sqlserver 2012 we can configure transactional replication between MYSQL DB on web to sqlserver 2012. Tables will be residing on MYSQL DB web to SQLSERVER 2012. using sqlserver replication as option (publisher