Java.sql.Wrapper Interface in Java6. Why?

Can anybody tell me why is there Wrapper interface in Java6? (I mean java.sql package)
I would be glad if you can provide me with some sample source code.

I have already declared bind variable in VO. Values all passed to i have debug the program.
Here is the my query
SELECT
SUM(NVL(R.AMOUNT, 0) - NVL(R._AMOUNT, 0))
FROM
Payments C,
RECEIPTS R
WHERE
R.ID = :pId AND R.TYPE = :pType AND R.PAYMENT_MODE = 'CHEQ' AND R.PAYMENT_MODE_TRAN_NO = C.CHQ_TRAN_NO AND C.CHEQUE_STATUS IN ('SUSPEND','KEEP')
This is the code for access view object.
ViewObjectImpl vvoAmount =
getUnRealizedChequeAmountVVO();
vvoAmount .setNamedWhereClauseParam("pId", bId);
vvoAmount .setNamedWhereClauseParam("pType",
bType);
vvoAmount .executeQuery();
vvoAmount .first();

Similar Messages

  • Problem in addBatch method in java.sql.Statement Interface

    Hi
    I am facing a problem java.lang.UnsupportedOperationException when using addbatch() method of java.sql.Statement Interface.
    Please suggest solutions.
    Thanks
    nsgindia

    Your JDBC driver doesn't support batch operation, try another driver(not all databases support batch'es eg MySQL)

  • Datasource, POJO and java.sql.Blob

    Hello,
    is "java.sql.Blob" a valid type for a POJO datasource ?
    I declared one but I just dit not succeed in rendering its jpg picture.
    My java code is quite simple :
    ReportClientDocument reportClientDocument = new ReportClientDocument ();
    reportClientDocument.setReportAppServer(ReportClientDocument.inprocConnectionString);
    reportClientDocument.open (REPORT_NAME, OpenReportOptions._openAsReadOnly);
    // lBlob is a class which implements java.sql.Blob interface
    LPOJOData [] dataP = {new LPOJOData(new lBlob("Picture.jpg"))};
    POJOResultSetFactory factory = new POJOResultSetFactory(LPOJOData.class);
    POJOResultSet resultSet = factory.createResultSet(dataP);
    reportClientDocument.getDatabaseController().setDataSource(resultSet, "", "");
    and my POJO class :
    public class LPOJOData {          
              private java.sql.Blob zimage;
              public LPOJOData(java.sql.Blob zp){
                   this.zimage = zp;
              public java.sql.Blob getzimage(){
                   return zimage;
    The field "zimage" on the report is designed through a "field definition only" database, zimage is defined as a Blob field.
    Any clues ?
    Regards,
    Serge

    I have just found a list of the data types supported by a POJO Class :
    # boolean
    # byte
    # char
    # double
    # float
    # int
    # short
    # java.lang.Boolean
    # java.lang.Byte
    # java.lang.Double
    # java.lang.Float
    # java.lang.Integer
    # java.lang.Short
    # java.lang.String
    # java.SQL.Date
    # java.SQL.Time
    Well, java.SQL.Blob is not one of them.
    Is java.SQL_Blob will be a valid POJO type in the future ?
    Is there another way than POJO to feed a report from an in-memory datasource ?

  • Sql.Blob:   java.sql.SQLException: Funzione non supportata   .....help me

    Hello,
    I hope you can help me :-) !!!!!!
    I have a EJB, in a metod of EJB i would update a object blob in a database. So i get a old blob from database by
    resultSet rs = ****query****
    ((oracle.jdbc.oracleSet) rs ).getBLOB(1);
    but throws ClassCastException on the cast oracleSet......
    i try withthis code:
    ResultSet rs = ****query****
    Blob b = rs.getBlob(1);
    OutputStream out = b.setBinaryStream(1);
    but throws java.sql.SQLException: Funzione non supportata
    Why?????
    what's can i do?
    help me!!!!!!!
    thanks

    Hello,
    I hope you can help me :-) !!!!!!
    I have a EJB, in a metod of EJB i would update a object blob in a database. So i get a old blob from database by
    resultSet rs = ****query****
    ((oracle.jdbc.oracleSet) rs ).getBLOB(1);
    but throws ClassCastException on the cast oracleSet......
    i try withthis code:
    ResultSet rs = ****query****
    Blob b = rs.getBlob(1);
    OutputStream out = b.setBinaryStream(1);
    but throws java.sql.SQLException: Funzione non supportata
    Why?????
    what's can i do?
    help me!!!!!!!
    thanks

  • Somebody knows  "java.sql.DatabaseMetaData"  ??

    Hello !!
    I'm implementing the java.sql.DatabaseMetaData interface and I need to know if somebody already used it ...
    Here's my question: there's a method called "getIndexInfo(parameters)" ...
        DriverManager.registerDriver( new com.progress.sql.jdbc.JdbcProgressDriver() );
        Connection       con     = DriverManager.getConnection (parameters);
        DatabaseMetaData dbmd    = con.getMetaData();
        ResultSet        rsIndex = dbmd.getIndexInfo( null, db_schema, table_name, false, false );This method gets a description of a table's indices and statistics ( J2SE v1.3.1 ) ... One of the statistics that I can get is the TYPE (index type). I want to know what's the difference between them :
    tableIndexStatistic <<
    tableIndexClustered <<
    tableIndexHashed <<
    tableIndexOther <<
    Somebody can help me ??

    I want to know what's the difference
    between them :
    tableIndexStatistic <<
    tableIndexClustered <<
    tableIndexHashed <<
    tableIndexOther <<
    Somebody can help me ??What do you mean "the difference"? They are different ways of indexing a table. A general book on Oracle should cover the first three, a book on SQL Server might as well (and will definitely cover some.)

  • Need Info Regarding Implementaion of Interfaces in java.sql package

    Hi All,
    I am interested in knowing details abt how the Interfaces in the java.sql package are implemented. We all work with the database using the interfaces provided ,but how do they work at the backend ? How can a Interface provide details (work ) with out an implementation class.I Is this taken care by the JVM or some of the Call level interfaces? Please do provide details abt this..

    hi Sheshadri,
    The implementation of the various interfaces in
    java.sql package are provided by your jdbc driver,
    which also manages the connection and communication of
    your java program with the appropriate database.
    cheers,
    -Jer

  • Where can I get an implementation of the interface java.sql.Savepoint

    My hibernate app fails
    BUILD FAILED: java.lang.NoClassDefFoundError: java.sql.Savepoint"
    I've no idea why it fails on one machine but passes on another, same JVM version, same hibernate version

    same JVM versionSure? java.sql.Savepoint is Java 1.4+
    Check both JRE and JDK, maybe you have a new JRE but an old JDK?

  • 'class' or 'interface' expected" on Connection class in java.sql.*

    I am currently getting an exception "Main.java:20: 'class' or 'interface' expected". I had the database connection working, but then I tried to add something else and I feel like I might have changed something. I am wondering if there is a problem importing the java.sql. library; since that is where the Connection class is located. Thanks for your feedback.
    package javaaaplication2;
    import java.sql.*;
    public class Main {
        /** Creates a new instance of Main */
        public Main() {
        public static void main(String[] args) {
            Connection con = getConnection();
            System.out.println("The connection is: " +con );
        private static Connection getConnection()
                Connection con = null;
                try
                    Class.forName("com.mysql.jdbc.Driver");
                    String url = "jdbc:mysql://localhost/patients";
                    String user = "root";
                    String pw = "qwerty";
                    con = DriverManager.getConnection(url, user, pw);
                catch (ClassNotFoundException e)
                    System.out.print(e.getMessage());
                    System.exit(0);           
                catch (SQLException e)
                    System.out.print(e.getMessage());
                    System.exit(0);
                return con;
        }

    You closed your Main class with a bracket, so your getConnection() method isn't in a class
    public class Main {
        /** Creates a new instance of Main */
        public Main() {
        public static void main(String[] args) {
            Connection con = getConnection();
            System.out.println("The connection is: " +con );
    }That is your entire Main class. Anything below it isn't in the class.

  • Java.sql.SQLException in the Buss. Comp. Proj. WIZARD...why?

    hi,
    I'm getting a java.sql.SQLException in the Bussiness Component Project Wizard. I made the connection using "Oracle JDBC Thin" and the connection works fine, then I click next to give the package name and when I click next again, I get the java.sql.SQLException runtime error and I don't see the user scott for which I created and tested the connection in the schema combo box of the next page in the "Buss Comp. Proj. WIZARD" wizard nor do I see any tables.
    I also tried it with jdk1.3 support and it didn't work. jdk1.3 was installed succefully in jdeveloper because you can see in the about dialog box.
    can someone please shed some light here. Whats weirder is that I'm following the same exampe in chapter 1 of the JDeveloper3 Handbook and thats about 40 dolloars down the drain.
    My OS is Windows2000 server, I'm using JDeveloper 3.2
    thanks.
    ayman.

    Yes, well it says something exremly scary. :)
    It give the following :
    java.lang.NullPointerException
         void oracle.jbo.dt.ui.pkg.PKTableOptionPanel.populateUserCombo()
         void oracle.jbo.dt.ui.pkg.PKTableOptionPanel.enter()
         void oracle.jbo.dt.ui.pkg.PKEntityPanel.enter(oracle.jbo.dt.objects.JboNamedObject)
         void oracle.jbo.dt.ui.main.dlg.DtuWizard.newPageSelected(oracle.jbo.dt.ui.main.dlg.DtuWizardPanel)
         void oracle.jbo.dt.ui.pkg.PKWizard.newPageSelected(oracle.jbo.dt.ui.main.dlg.DtuWizardPanel)
         void oracle.jbo.dt.ui.main.dlg.DtuWizard.stateChanged(javax.swing.event.ChangeEvent)
         void javax.swing.JTabbedPane.fireStateChanged()
         void javax.swing.JTabbedPane$ModelListener.stateChanged(javax.swing.event.ChangeEvent)
         void javax.swing.DefaultSingleSelectionModel.fireStateChanged()
         void javax.swing.DefaultSingleSelectionModel.setSelectedIndex(int)
         void javax.swing.JTabbedPane.setSelectedIndex(int)
         void javax.swing.plaf.basic.BasicTabbedPaneUI$MouseHandler.mousePressed(java.awt.event.MouseEvent)
         void java.awt.Component.processMouseEvent(java.awt.event.MouseEvent)
         void java.awt.Component.processEvent(java.awt.AWTEvent)
         void java.awt.Container.processEvent(java.awt.AWTEvent)
         void java.awt.Component.dispatchEventImpl(java.awt.AWTEvent)
         void java.awt.Container.dispatchEventImpl(java.awt.AWTEvent)
         void java.awt.Component.dispatchEvent(java.awt.AWTEvent)
         void java.awt.LightweightDispatcher.retargetMouseEvent(java.awt.Component, int, java.awt.event.MouseEvent)
         boolean java.awt.LightweightDispatcher.processMouseEvent(java.awt.event.MouseEvent)
         boolean java.awt.LightweightDispatcher.dispatchEvent(java.awt.AWTEvent)
         void java.awt.Container.dispatchEventImpl(java.awt.AWTEvent)
         void java.awt.Window.dispatchEventImpl(java.awt.AWTEvent)
         void java.awt.Component.dispatchEvent(java.awt.AWTEvent)
         void java.awt.EventQueue.dispatchEvent(java.awt.AWTEvent)
         boolean java.awt.EventDispatchThread.pumpOneEventForHierarchy(java.awt.Component)
         void java.awt.EventDispatchThread.pumpEventsForHierarchy(java.awt.Conditional, java.awt.Component)
         void java.awt.EventDispatchThread.pumpEvents(java.awt.Conditional)
         void java.awt.EventDispatchThread.run()

  • Java.sql.sqlException using remote interface

    hi guys,
    i have successfully deploying my first CMP Entity Bean on WebLogic server. while using
    my client application i have created the bean with the following code:
    Object obj = (MyHomeInterface) ctx.lookup("Invoice.MyHomeInterface");
    MyHomeInterface home = (MyHomeInterface) PortableRemoteObject.narrow(obj, MyHomeInterface.class);
    MyRemoteInterface remote = (MyRemoteInterface) PortableRemoteObject.narrow(home.create(7), MyRemoteInterface.class);
    remote.setInv();
    above code successfully creates the Entity Bean which is available on the database i am using
    Access database for this example but when i call its remote method setInv() which creates a
    record in database against a particual id it gives me following error.
    java.sql.sqlException {Mocrosoft}ODBC Microsoft Access Driver optional feature not implemented.
    <<no stack trace available>>
    plz let me know where i am doing wrong.
    thanks.
    Abid

    MS Access driver is not network supported. Instead you can try some type-4 drivers available for Access.
    Have a look at,http://industry.java.sun.com/products/jdbc/drivers and choose a driver.

  • JDBC Receiver adapter-java.sql.SQLException: ORA-00904: "BATCH_ID": invalid

    Hi
    I am trying insert rows in Oracle database using JDBC receiver adapter setup in PI 7.1. However this receiver adapter is throwing following exception.
    Delivering the message to the application using connection JDBC_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'PRADEEP_OTC_ORDERS' (structure 'statement'): java.sql.SQLException: ORA-00904: "BATCH_ID": invalid identifier .
    <?xml version="1.0" encoding="UTF-8" ?>
    <ns0:mt_sql_writer xmlns:ns0="http://rdbms_poc">
    <statement>
         <dbtablename action="INSERT">
                <table>PRADEEP_OTC_ORDERS</table>
              <access>
                     <order_id>19126</order_id>
                     <version>1</version>
                     <batch_id>132</batch_id>
                </access>
           </dbtablename>
    </statement>
    </ns0:mt_sql_writer>
    PRADEEP_OTC_ORDERS table has just 3 columns as specified the access segment. However I stil get this ORA-00904 error message.
    Any idea on what could be wrong.?
    Thanks
    -Pradeep

    Hi All,
    Thanks a lot for responding...
    I verified the table structure, table just contains those 3 coulms all varchar type.
    I modified the column name as well, But was still getting ORA-00904. Then I went directly to the the database and executed below insert statement,
    insert into PRADEEP_OTC_ORDERS (mps_order_id, mps_version,mps_batch_id) Values(1,2,3)
    I got exact SQL Error: ORA-00904: "MPS_BATCH_ID": invalid identifier.
    So ISAP JDBC adapter is not enclosing the string values in quotes.
    SAP documentation says it puts quotes for values and treats everything as string(text).
    Anybody has any idea, why JDBC receiver adapter not enclosing the values in quotes?
    Thanks
    -Pradeep

  • Java.sql.PreparedStatement.setArray( ) not found in J2SE v1.3.1?

    Why do I get the error method setArray(int, Array) not found in interface java.sql.PreparedStatement? As per on-line documentation the method is available since version 1.2.
    In JDeveloper help I have read that...
    "JDeveloper uses J2SE definitions to describe an installed J2SE environment. This environment can be either a JRE (Java Runtime Engine) or an SDK. Note that if you are using a JRE, some features may not be available. Every JDeveloper project uses a J2SE definition to determine what version of the Java API to compile and run with."
    Is my problem because my JDeveloper installation is using a JRE and not an SDK?

    Sounds like a SQL problem. Not an expert in DB2 bu you might want to try INSERT INTO SESSION (col1name, col2name) VALUES (?,?);
    Edited by: Kungen on Sep 19, 2007 6:46 AM

  • (Again) java.util.Date vs java.sql.Date

    Hi there,
    (Again) Im trying to understand the EXACT difference between
    java.util.Date vs java.sql.Date.
    Googling, I can see that this is a very "popular" subject, but I still
    cannot figure out it exactly.
    Many writers claim that java.sql.Date only stores the DATE part (yyyy-
    mm-dd) but not the TIME part (hh:MM:ss) of a Date/Time value, but that
    I can easily disprove:
                    java.util.Date ud = new java.util.Date();                 java.sql.Date sd = new java.sql.Date(ud.getTime());                 System.out.println(DateFormatUtils.                                 format(ud, "yyyy-MM-dd HH:mm:ss.SSS"));                 System.out.println(DateFormatUtils.                                 format(sd, "yyyy-MM-dd HH:mm:ss.SSS"));
    Output:
                    2009-09-18 15:17:36.635                 2009-09-18 15:17:36.635
    So, apparently, java.sql.Date and java.util.Date have THE SAME
    precision (at least down to the millisecs...).
    And the official API documentation, really looks more confusing than
    helpful to me::
    *"java.sql.Date:*
    *A thin wrapper around a millisecond value that allows JDBC to identify*
    *this as an SQL DATE value. A milliseconds value represents the*
    *number of milliseconds that have passed since January 1, 1970*
    *00:00:00.000 GMT.*
    *To conform with the definition of SQL DATE, the millisecond values*
    *wrapped by a java.sql.Date instance must be 'normalized' by setting*
    *the hours, minutes, seconds, and milliseconds to zero in the*
    *particular time zone with which the instance is associated. "*
    Exactly what means "an SQL DATE value" ? How EXACTLY does it differ
    from a java.util.Date value?
    Most importantly: WHY does JDBC need to distinguish between them?
    And, here again: *"a java.sql.Date instance must be 'normalized' by*
    *setting the hours, minutes, seconds, and milliseconds to zero in the*
    *particular time zone..."*
    What does that mean exactly? Apparently, the constructor doesnt
    enforce this restriction, per the example above. So what's the REAL
    point with this type, java.sql.Date?
    Very greatful, if you can help me clarify this, once and for all.
    TIA,

    And the official API documentation, really looks more confusing than helpful to me:The problem is that you need to understand SQL as well as Java for this to make sense. It's not the Java API's job to tell you how your SQL database works - there's a myriad of subtle differences even when the DB is compliant with the SQL spec.
    Most compliant databases support DATE, TIME, and TIMESTAMP values. DATE represents only a date. TIME represents only a time. TIMESTAMP represents both. There are further complicating factors, but that's roughly how it stands.
    In Java the normal type for representing time is (or was when the API was created) the java.util.Date but this is a close approximation only to the TIMESTAMP value. In order to bring the two together the java.sql.Date, java.sql.Time and java.sql.Timestamp classes were created. Making them derive from java.util.Date was probably not a good idea.
    java.util.Date suffers from a number of deficiencies. java.util.Calendar was supposed to address them but didn't really succeed. The JodaTime library is rather better, but it's all a lot more complicated than you might expect - partly because time management really is a much harder problem than it appears at first glance - there are timezones, leap years, leap seconds, the difference between astronomical and atomic time, and so on and so forth.

  • Java.beans.Statement & java.sql.Statement

    My old code from jdk1.3.1 throws the ambiguous class thingie-mo-bob. Why did they implement the new java.beans.Statement, and is there anyway to make it default to the old java.sql.Statement without having to go through all the old code and add import java.sql.Statement. I have like 200 jsp files 'n it will take a loooong time!
    Pete

    There r two ways to do this.
    (i) One is Implement the java.sql.Statement
    like
    package java.beans;
    public interface Statement implements
    java.sql.Statement {
    }What? Are you suggesting he edit the source code for java.beans.Statement and make it implement java.sql.Statement?? I would most certainly not suggest that solution- beside violating the licensing agreement, it has troubling consequences since you are basically redefining the structure of a class in a way that makes no functional sense- that is, there is no reason for java.beans.Statement to implement methods like getConnection() and the other signatures of java.sql.Statement.
    I'm not sure if I'm reading your response correctly or not, but I would definitely not refactor java.beans.Statement just to get this problem solved with out editing files ... ... since java.sql.Statement is used so widely, perhaps they should have considered a different name for java.beans.Statement , although you hate to base a name off of what's going to cause the least problems, rather then what makes the most sense ... ... any way, I guess it doesn't matter now: the name has been selected .... I'd be interested to hear how you solved the problem.

  • Java.sql.SQLException: Io exception: Socket read timed out

    Hello,
    I've a interface RFC - JDBC - RFC.
    When this interface is executing, i have the follow error in RuntimeWorkbench::
    'Unable to execute statement for table or stored procedure. 'TABLAERR' (Structure 'STATEMENT') due to java.sql.SQLException: Io exception: Socket read timed out'
    In SXMB_MONI do not see any message, only
    '  <SAP:Category>XIAdapterFramework</SAP:Category>
      <SAP:Code area="MESSAGE">GENERAL</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText>com.sap.aii.af.ra.ms.api.DeliveryException</SAP:AdditionalText>
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack />
      <SAP:Retry>M</SAP:Retry> '
    this error don't occurs always, when and why i don't know..
    I searched for information about this error and nothing found
    why it is happens?
    thank very much

    HI,
    This is not a problem in ur mapping or configuration.
    This is a problem with JDBC connection. This is a common error, that generally comes when the DB server is receiving and processing numerous records. Connection time out or socket read time out.
    First try this:
    In ur JDBC adapter go to Advanced Tab Page and check Transaction Isolation Level as Serializable.
    If still problem persists then take help of basis guys and increase the timeout for the connection, same thing can be asked from DB team.

Maybe you are looking for