New Look of Oracle JDBC & UCP Forum

Hi All,
We have enhanced existing Oracle JDBC & UCP forum with a new look.
You will now find all Oracle JDBC resources such as latest white papers, FAQ, Blogs, Tweets etc., in this forum.
Please post your JDBC & UCP questions specific to Oracle Database here at Oracle JDBC & UCP.
Note that this forum is only for Java related JDBC questions.
Thanks,
Nirmala

Kmensah-Oracle wrote:
The generic Java Connectivity is inherited from SUN and destined for questions related to JDBC spec and every vendor while the Oracle JDBC forum is dedicated to our drivers. These two were joined for a moment, by mistake.
However, if the community strongly feels we should re-join, we can look into that.
Kuassi @kmensah)
Re-joining would be MY preference. I first posted a 'why two forum' question in the community feedback forum last year when I first discovered that 'other' forum:
Why are there two DIFFERENT JDBC forums?
That second forum only has three recent threads and, so far as I know, just became visible when some recent changes were made to the Jive software.
It is located at
  All Places > Database > Database Developer Tools > JDBC
Can someone research and determine if that second forum should just be consolidated with the main JDBC forum? I contribute ALL of the time to the other forum as does one of the JDBC developers. I never knew this other one existed so I doubt if people will get much help there.
If you read the thread you will see that I never got a reply from anyone.
But the comments above that I made then still apply. Joe Weinstein (one of Oracle's JDBC experts) and I have been the top contributors on this current forum for some time. I don't believe either of us posted in that 'other' forum and I didn't even know it existed. The link in my thread above to the original 'other' forum still works but gives an 'unauthorized' message so I assume it is now an internal Oracle site.
My opinion is that people with a JDBC question and just going to post in the first one they find which is usually this forum I am in now. I don't think the general public will understand the 'fine' distinction you provided above for Oracle related versus non-Oracle related JDBC questions.
So the main issue for me is that there is no good way to respond to someone that posts their question in the WRONG jdbc forum. For other forums we just do NOT reply to the question but ask them to post in the correct forum and provide a link to it: I run across this most frequently in the Sql Developer forum and usually respond with:
Wrong forum!
This forum is ONLY for Sql Developer quesstions and your question is NOT related to Sql Developer. Please mark this thread ANSWERED and repost it in the Sql Developer forum
SQL Developer
The result is that by providing the link to the correct forum the Jive software creates a SECOND thread in that other forum.
The bulk of the JDBC questions posted in this current forum are, in fact, for the Oracle database. The few that aren't are easily answered by providing what help we can, suggesting additional info that needs to be provided and then suggesting that they post in an IBM, Sql Server or other vendor forum for the JDBC product for their database.
Havng just ONE forum for JDBC would make it easier to provide a higher level of support to users in my opinion.

Similar Messages

  • Looking for oracle JDBC driver that support Rowset

    I am using oracle driver "oracle.jdbc.OracleDriver" downloaded from oracle.com and i am using cached rowset in my program but my program gave me runtime error :
    Exception in thread "main" java.lang.AbstractMethodError: oracle.jdbc.driver.OracleDatabaseMetaData.locatorsUpdateCopy()Z
    at com.sun.rowset.CachedRowSetImpl.execute(CachedRowSetImpl.java:757)
    at com.sun.rowset.CachedRowSetImpl.execute(CachedRowSetImpl.java:1385)
    at WebRowSetSample.main(WebRowSetSample.java:73)
    but if i used data driver provided by Data Direct "com.ddtek.jdbc.oracle.OracleDriver" then it is working fine but the problem is data direct driver is not free and cant be used in production server, so if anyone know any free driver that support oracle and rowset implementation or able to correct problem then plz help me out.
    thanks...

    Hi I am using latest driver from oracle site, but the problem is when i fire execute method of cahed rowset i throws error that i mentioned above, if you have any other driver than mail me on [email protected]

  • New Look for the HP Support Forum - FAQ

    Welcome to the HP Community!
    You may notice that we have changed our look. 
    We designed the new layout to make it easier for people to find what they are looking for.
    While the look of the community has changed, the foundation of the community has not. All of the features you liked are still here.
    Here are some of the highlights:
    The community pages are less complex and easier to navigate
    Buttons are now easier to find because they are brightly colored. 
    A new modular approach gives us greater freedom to launch improvements more quickly.
    Below is a guide that walks you through the new design. We would love to have your feedback.
    Where is information for new users located? 
    Information for new users can be found by expanding the “Quick Links” menu on the right-hand side of any community page.  Once this menu is expanded, links such as Community FAQ, 1st Time Here, Rules of Participation, and more are listed. 
    You may also navigate directly to the “Welcome!” area by following this link: http://h30434.www3.hp.com/t5/First-Time-Here-Learn-How-to/bd-p/Hello
    How do I search the community for an answer to my issue?
    To search the community, navigate to the search box on the top-right of any community page.  Here you may type in some keywords or a question and click the Go button to see your search results.
    On the search results page, you will also be able to select from more advanced options such as narrowing results by location, by author, by accepted solution, and more.
    What happened to my settings? 
    Click the More Resources drop down menu on the right-hand side of any community page.  Once this menu is expanded, click User Settings to access your personal settings. 
    In this area you can set a signature to use in the community which will be automatically applied to all of your posts, change your avatar, and more.
    How do I see my profile?
    To access your profile, please click the Quick Links drop down menu on the right-hand side of any community page.  Once this menu is expanded, click the Profile link.  Alternately, you may also click your username in the top-right My Community area of any community page to access your profile.
    What is the Community Alert?
    Occasionally we have some important information about the community to share with all of our community members.
    Whenever we have important information to convey, the orange Community Alert link will become visible to all users at the top of every community page.  Please click this link when it’s available to read our update.
    How do I upload a picture to the HP Consumer Support Community?
    To upload a picture to the community, navigate to the Upload menu on the right-hand side of any community page and select Image Gallery:
    On the Image Upload page, you can click the Browse button to choose a file to upload.
    Where can I find my Private Messages?
    Your private messages can be accessed by clicking the envelope icon in the My Community area to the right of any community page.
    Alternately, you can select the “Messages” options in the Quick Links menu on the right side of any community page.
    What happened to the “Send this user a private message” link?  I can’t find it.
    To send a user a private message, navigate to the right-hand side of the user’s profile.  The “Send this user a private message” link is located in the Contact area below the My Community section.
    You will also find options to add a community member to your list of friends, or ignore a community member in the Contact area of their profile.
    What happened to the Best of the Community blog?
    The Best of the Community blog can be accessed by clicking the Blogs dropdown at the top of any community page:
    Where to I find the Top Contributors and Top Kudos posts now?
    You can find the community’s Top Contributors, Top Kudos posts, and more in the Discussion Boards in the area at the bottom of the community homepage. 
    To see the Top Contributors or Top Kudos Posts for a specific category, navigate the bottom of any category page after selecting a category link on the community homepage. 
    How do I find my Subscriptions & Bookmarks?
    You can navigate to your subscriptions and bookmarks by clicking the More Resources dropdown box on the right side of any community page and selecting My Subscriptions.
    Doing so will take you to the Subscriptions & Bookmarks area of your User Settings.
    What is the Me Too button?
    The “Me Too” button is a way for you to let us know that you’re experiencing the same issue as another community member.  If you are experiencing an issue identical to the one you see described in a post by another user, click the Me Too button to let us know!
    I work for HP, supporting the HP Experts who volunteer their time and technical knowledge to help others.
    --Say "Thanks" by clicking the Kudos Star in the post that helped you.
    --Please mark the post that solves your problem as "Accepted Solution"

    Hi,
    Try the following
    First of all, see if you can uninstall your current version of HP Support Assistant by using the Microsoft 'Fixit' on the following link - this is particularly useful in correcting issues that may prevent reinstallation on machines running a 64bit OS.
    http://support.microsoft.com/mats/Program_Install_and_Uninstall
    If this completes, restart the PC.
    Next download and install the latest version of HP Support Assistant from the page on the link below - the download links are towards the bottom of the page.
    http://h18021.www1.hp.com/helpandsupport/hp-support-assistant.html
    After the installation, restart the PC again.
    Regards,
    DP-K
    ****Click the White thumb to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    ****I don't work for HP****
    Microsoft MVP - Windows Experience

  • New Look For the HP Support Forum!

    On December 1st, we will launch a new layout for the community. The new layout will not change the underlying functionality of the community. All of the boards and features that you use will remain unchanged. The new layout was specifically created to incorporate community feedback about the navigation and display.
    Here are some of the highlights:
    The community pages are less complex and easier to navigate
    Buttons are now easier to find because they are brightly colored. 
    A new modular approach gives us greater freedom to launch improvements more quickly.
    Here’s a sneak peek at some of the updated community pages.
    New, expandable category menus reduce home page clutter and give us more room to add information to assist and showcase the members of the HP Consumer Support community:
    The Best of the Community blog is now located in an expandable menu the top of every community page:
    Here is an FAQ thread that will guide you through many actions that have been slightly tweaked; processes like editing your user information and uploading images has been simplified.
    There will also be a Temporary Feedback board created for you to post feedback about the layout. The layout change is the first step in an ongoing process to improve the community. We hope you enjoy the new layout and encourage your feedback.
    I work for HP, supporting the HP Experts who volunteer their time and technical knowledge to help others.
    --Say "Thanks" by clicking the Kudos Star in the post that helped you.
    --Please mark the post that solves your problem as "Accepted Solution"

    Hi m5brokenlaptop,
    No one can see your profile information except for you.  Any information like your name and personal email are hidden from regular users.
    Thanks,
    SunshineF
    Clicking the "Kudos star" to the left is a great way to say thanks!
    When your problem has been solved, accept the solution by clicking the "Accept as Solution" button to help other members in the future!
    Rules of Participation

  • Admin_client jar - add "remove-inherited" for oracle.jdbc shared library

    Guys,
    I am using admin_client.jar utility which comes oracle 10.1.3 to deploy our web-application on the oc4j server, everythings is working fine, except for this small issue, where i want to avoid having the shared library "oracle.jdbc" inherited by web-module (which is by default inherited by all apps apparently), since i want to use the oracle-jdbc driver bundled with the war. Now i do that the solution is to introduce a "remove-inherited" tag (for the oracle.jdbc library) under the "inherited-shared-libraries" element in the orion-application.xml file (generated on deployment by oc4j), but what i want to know is how to automate this process of adding this entry, since we dont want to have any manual intervention on deployment.
    Though admin_client.jar so far has provided all the functionality required for deployment but it apprarently doesnt any way where we can specify the shared-libraries not to be inherited by the deployed war..
    Any comments/suggestions ?
    Thanks and Regards,
    Message was edited by:
    user632496
    Message was edited by:
    user632496

    Alright that makes sense.
    Yes, spot on. The suggestion I made was contingent on having an EAR file -- even though we accept a WAR file from you, we ultimately produce an EAR file from it during the deployment phase. If you don't want to produce an EAR file then its not viable for you.
    Another possible solution is one that you are sort of suggesting here -- each application can be specified as a child of a parent application -- from which it will inherit various libraries and configuration settings.
    What you could do is to deploy a single, dedicated application on which you configure the shared-library import to the JDBC driver you want -- and then you simply choose that application as the parent, whereupon the child application will pick up the shared-library setting.
    There current, visible parent of all deployed applications is the "default" application. What you could do is to tweak the configuration of the default applicaiton so it uses a different JDBC library to the one it inherits from its actual parent (the system application). The configuration for the default application is contained within the j2ee/home/config/application.xml file -- which if you look at it, is actually an "orion-application.xml" file. So if you make the change there, it will apply to all the applications that are deployed to the container.
    Just found it in the doc:
    http://download.oracle.com/docs/cd/B32110_01/web.1013/b28952/classload.htm#CIHFFBCA
    Even easier, what you evaluate is a simpler approach where you install and publish the Oracle JDBC driver you wish to use, with the name "oracle.jdbc" and set it with a higher version (which I assume you are doing) than the deafault one -- whereby from how the config in the application.xml is set and where the oracle.jdbc driver is imported, it should pick up the higher version -- so that way you don't even need to change the config file -- simply publish the later versioned library using the name oracle.jdbc and it should be picked up.
    Currently the version in 10.1.3.3 is:
    <shared-library name="oracle.jdbc" parent="api" version="10.1.0_2">
    So if you published the jdbc driver you want to use with the name oracle.jdbc and a higher version, then the import of oracle.jdbc will default to the latest version, which should pick up your library.
    Thus all you need to do is a one-off publishing operation of a new shared-library (oracle.jdbc: 10.1.2.3 for example) and it then should be picked up implicitly by all deployed applications.
    Worth testing my theory though ... ;-)
    -steve-

  • Oracle JDBC driver 10.1.0.2.0

    Hi All,
    I have installed Oracle 9iR2 on Windows 2000 Advance server, and i am looking for Oracle JDBC driver 10.1.0.2.0 to be installed and configured, it would be real help if some one could send me the download path and how to continue further with installing the JDBC driver
    Thanks,
    Kumar

    You can download the latest JDBC drivers from http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html
    You just need to place the jar somewhere and add the location to your classpath.
    Kuassi

  • Location of 'oracle.jdbc.OracleDriver'

    Hi everyone,
    I am starting out learning JDBC and am trying to compile and run this sample Java program:
    package project1;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    import oracle.jdbc.OracleDriver;
    public class jdbc_test1 {
    * @param args
    * @throws SQLException
    public static void main (String[] args) throws SQLException {
    try {
    DriverManager.registerDriver(new OracleDriver());
    catch (SQLException e) {
    e.printStackTrace();
    Runtime.getRuntime().exit(1);
    When I 'make' the project, I get the error 'OracleDriver not found' on the 'import' line.
    My environment:
    Windows Vista
    Oracle 10.2.0.3.0
    JDeveloper 10.1.3.3 and 11.1.1
    CLASSPATH: .;d:\App\Oracle\product\10.2.0\db_1\jdbc\lib\ojdbc14.jar;d:\App\Oracle\product\10.2.0\db_1\jlib\orai
    18n.jar
    I searched both jar files looking for OracelDriver, but found nothing. What am I missing?
    Thanks.
    rr

    I get the error 'OracleDriver not found' Note that this kind of driver to be imported is depreciated.....
    http://forums.oracle.com/forums/ann.jspa?annID=201
    As a substitution for this use....the following packages....
    import java.sql.*;
    import oracle.jdbc.*;
    import oracle.jdbc.pool.OracleDataSource;
    and make then the appropriate changes in your main() method... such as:
    public static void main(String args[]) throws Exception
       Connection con =null;
       try
         OracleDataSource ods = new OracleDataSource();    
         ods.setURL("jdbc:oracle:thin:scott/tiger@//<host_name>:<listener_port>/<your_tns>");
         con = ods.getConnection();
       catch (Exception ex)
         //System.out.println("Unable to connect..."+ex.printStackTrace());
         System.out.println("Unable to connect..."+ex);
         System.exit(-1);
       }Greetings...
    Sim

  • Differences between Oracle JDBC Thin and Thick Drivers

    If any body is looking for this information...
    ============================================================
    I have a question concerning the Oracle JDBC thin vs. thick drivers
    and how they might affect operations from an application perspective.
    We're in a Solais 8/Oracle 8.1.7.2 environment. We have several
    applications on several servers connecting to the Oracle database.
    For redundancy, we're looking into setting up TAF (transparent
    application failover). Currently, some of our apps use the Oracle
    <B>JDBC thin</B> drivers to talk to the database, with a connection
    string that like this:
    <B> jdbc:oracle:thin:@host:port:ORACLE_SID </B>
    In a disaster recovery mode, where we would switch the database
    from one server to another, the host name in the above string
    would become invalid. That means we have to shut down our application
    servers and restart them with an updated string.
    Using the Oracle <B>OCI (thick)</B> driver though, allows us to connect
    to a Net8 service instead of a specific server:
    <B> jdbc:oracle:oci8:@NET8_SERVICE_NAME </B>
    Coupled with the FAILOVER=ON option configured in Net8, it is
    then possible to direct a connection from the first server to
    the failover database on another server. This is exactly what
    we would like to do.
    My question is, from an application perspective, how is the Oracle
    thick driver different from the thin driver? If everything
    else is "equal" (i.e. the thick driver is compatible with the
    app servers) would there be something within the the thick/OCI
    driver that could limit functionality vs. the thin driver?
    My understand, which obviously is sketchy, is that the thick
    driver is a superset of the thin driver. If this is the case,
    and for example if all database connections were handled through
    a configuration file with the above OCI connection string, then
    theoretically the thick driver should work.
    ============================================================
    <B>
    In the case with the Oracle, they provide a thin driver that is a 100% Java driver for client-side use without the need of an Oracle installation (maybe that's why we need to input server name and port number of the database server). This is platform indipendent, and has good performance and some features.
    The OCI driver on the other hand is not java, require Oracle installation, platform dependent, performance is faster, and has a complete list of all the features.
    </B>
    ========================================================
    I hope this is what you expect.
    JDBC OCI client-side driver: This is a JDBC Type 2 driver that uses Java native methods to call entrypoints in an underlying C library. That C library, called OCI (Oracle Call Interface), interacts with an Oracle database. <B>The JDBC OCI driver requires an Oracle (7.3.4 or above) client installation (including SQL*Net v2.3 or above) and all other dependent files.</B> The use of native methods makes the JDBC OCI driver platform specific. Oracle supports Solaris, Windows, and many other platforms. This means that the Oracle JDBC OCI driver is not appropriate for Java applets, because it depends on a C library to be preinstalled.
    JDBC Thin client-side driver: This is a JDBC Type 4 driver that uses Java to connect directly to Oracle. It emulates Oracle's SQL*Net Net8 and TTC adapters using its own TCP/IP based Java socket implementation. <B>The JDBC Thin driver does not require Oracle client software to be installed, but does require the server to be configured with a TCP/IP listener. Because it is written entirely in Java, this driver is platform-independent.</B> The JDBC Thin driver can be downloaded into any browser as part of a Java application. (Note that if running in a client browser, that browser must allow the applet to open a Java socket connection back to the server.
    JDBC Thin server-side driver: This is another JDBC Type 4 driver that uses Java to connect directly to Oracle. This driver is used internally by the JServer within the Oracle server. This driver offers the same functionality as the client-side JDBC Thin driver (above), but runs inside an Oracle database and is used to access remote databases. Because it is written entirely in Java, this driver is platform-independent. There is no difference in your code between using the Thin driver from a client application or from inside a server.
    ======================================================
    How does one connect with the JDBC Thin Driver?
    The the JDBC thin driver provides the only way to access Oracle from the Web (applets). It is smaller and faster than the OCI drivers, and doesn't require a pre-installed version of the JDBC drivers.
    import java.sql.*;
    class dbAccess {
    public static void main (String args []) throws SQLException
    DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
    Connection conn = DriverManager.getConnection
    ("jdbc:oracle:thin:@qit-uq-cbiw:1526:orcl", "scott", "tiger");
    // @machineName:port:SID, userid, password
    Statement stmt = conn.createStatement();
    ResultSet rset = stmt.executeQuery("select BANNER from SYS.V_$VERSION");
    while (rset.next())
    System.out.println (rset.getString(1)); // Print col 1
    stmt.close();
    How does one connect with the JDBC OCI Driver?
    One must have Net8 (SQL*Net) installed and working before attempting to use one of the OCI drivers.
    import java.sql.*;
    class dbAccess {
    public static void main (String args []) throws SQLException
    try {
    Class.forName ("oracle.jdbc.driver.OracleDriver");
    } catch (ClassNotFoundException e) {
    e.printStackTrace();
    Connection conn = DriverManager.getConnection
    ("jdbc:oracle:oci8:@qit-uq-cbiw_orcl", "scott", "tiger");
    // or oci7 @TNSNames_Entry, userid, password
    Statement stmt = conn.createStatement();
    ResultSet rset = stmt.executeQuery("select BANNER from SYS.V_$VERSION");
    while (rset.next())
    System.out.println (rset.getString(1)); // Print col 1
    stmt.close();
    =================================================================

    Wow, not sure what your question was, but there sure was a lot of information there...
    There really is only one case where failover occurs, and it would not normally be in a disaster recovery situation, where you define disaster recovery as the obliteration of your current server farm, network and concievably the operational support staff. This would require a rebuild of your server, network etc and isn't something done with software.
    Fail over is normally used for high availablity that would take over in case of hardware server failure, or when your support staff wants to do maintenance on the primary server.
    Using the thin and thick driver should have ZERO affect on a failover. Transparent failover will make the secondary server the same IP as the primary, therefore the hostname will still point to the appropriate server. If you are doing this wrong, then you will have to point all your applications to a new IP address. This should be something that you tell your management is UNACCEPTABLE in a fail-over situation, since it is almost sure to fail to fail-over.
    You point out that you are providing the TNSNAME, rather than the HOSTNAME when using the thick driver. That's true within your application, but that name is resolved to either a HOSTNAME, or IP ADDRESS before it is sent to the appropriate Oracle server/instance. It is resolved using either a NAME server (same as DNS server but for Oracle), or by looking at a TNSNAMES file. Since the TNSNAMES files profilerate like rabbits within an organization you don't want a fail over that will make you find and switch all the entries, so you must come up with a fail over that does not require it.
    So, the application should not be concerned with either the hostname, or the IP address changing during fail over. That makes use of the thin or thick client acceptable for fail over.
    Don't know if this will help, but this shows the communication points.
    THIN DRIVER
    client --> dns --> server/port --> SID
    THICK DRIVER
    client --> names server --> dns --> server/port --> SID
    client --> tnsnames     --> dns --> server/port --> SID

  • Oracle JDBC Connectivity

    I am trying to connect to oracle8.0.5 database from JDK1.3 on
    windows 2000 os
    my program code is as follows
    import java.sql.*;
    class JEmpt{
    public static void main (String args [])
         throws SQLException {
         try
              Class.forName("oracle.jdbc.driver.OracleDriver");
              Connection conn =
              DriverManager.getConnection
    ("jdbc:oracle:thin:@127.0.0.1:1521:ORCL","SYSTEM","MANAGER");
              Statement stmt = conn.createStatement ();
              ResultSet rset = stmt.executeQuery ("select
    ENAME from EMP");
              while (rset.next ()) {
              System.out.println (rset.getString (1));
         catch(Exception e)
              System.out.println("Exception : "+e.getMessage
    but i get the following error
    Exception in thread "main" java.sql.SQLException: Connection
    refused: no further information
    at oracle.jdbc.dbaccess.DBError.check_error<DBError.java:228>
    at
    oracle.jdbc.driver.OracleConnection.<init><OracleConnection.java:
    110>
    at oracle.jdbc.driver.OracleDriver.connect<OracleDriver.java:148>
    at java.sql.DriverManager.getConnection<Unknown Source>
    at java.sql.DriverManager.getConnection<Unknown Source>
    at Employee.main<Employee.java:23>
    your help wii be highly appreciated
    looking forward for yr reply
    lekha

    Hi lekha
    try this:
    import oracle.jdbc.driver.*;
    DriverManager.registerDriver(new OracleDriver());
    conn = DriverManager.getConnection(...)
    and ensure that your CLASSPATH can see
    classes111.zip/classes12.zip.
    Tarik

  • Oracle JDBC Driver Compile Errors

    I'd like to try out this new Preview Edition but I get the following errors:
    Error(22,8): class oracle.jdbc.driver.OracleCallableStatement is not public; cannot be accessed from outside of package oracle.jdbc.driver
    Error(23,8): class oracle.jdbc.driver.OracleTypes is not public; cannot be accessed from outside of package oracle.jdbc.driver
    These erors occur at the import statements:
    import oracle.jdbc.driver.OracleCallableStatement;
    import oracle.jdbc.driver.OracleTypes;
    when I attempt to compile a JDev 10.1.3 project in the 11g Technology Preview Edition. Any idea why?
    TIA,
    Jeff

    We don't support project migration from 10.1.3 to the
    technology preview.
    Does the problem reproduce if you create a new
    project in 11tp?Shay,
    Thanks for the quick response. I created a new application in 11tp from scratch. I created a View Object and pasted the offending code into it and got the same compile errors. I actually got the code about a year ago from Steve's Not Yet Documented Applications. He has since removed the App from the page, changed the code and added it to the Dev Guide. The sample app showed how to bind a View object to a REF Cursor returned from a stored procedure and it looked something like this:
    CallableStatement cs = conn.prepareCall("{?=call package.name(P_CODIGO => ?)}");
    cs.rgisterOutParameter(1,OracleTypes.CURSOR);
    cs.setInt(2,16782);
    cs.executeQuery();
    ResultSet result = ((OracleCallableStatement)cs).getCursor(1);
    Changing the code to look more like what is now in the DEV GUIDE will more than likely work because he eliminates the need for the OracleCallableStatement.
    This brings me to my next point. If migration is not currently supported, will it be when the production release of JDEV 11g is available? Shame on me for just quickly skimming the release notes but when the import wizard ran on my project it did not warn me that the feature is not supported or that problems are likely. Upon resolving the issues with the callable statement, I had significant other compile errors in my jspx pages that will probably not be as trivial to fix. If project upgrades are not performed "easily" it will certainly push the 11g adoption date out considerably.
    Thanks again, your comments are always encouraged.
    Jeff

  • NullPointerException at oracle.jdbc.driver.OracleDriver.connect()

    I have written a java stored procedure. The method can be executed properly in local PC environment.
    but when the java program is load into Oracle DB JVM by loadjava command. such method is called in SQL> prompt as a java stored procedure. I got
    java.lang.NullPointerException
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:379)
    at java.sql.DriverManager.getConnection(DriverManager.java:573)
    at java.sql.DriverManager.getConnection(DriverManager.java:187)
    at WCZSynchronizer.testLocalConn(WCZSynchronizer:901)
    as shown in the trace file.
    The line in my own java program WCZSynchronizer is simply
    Connection conn = java.sql.DriverManager.getConnection(db_connection_string,username,password);
    I am sure that the db_connection_string, username and password are correct as it works in my local PC.
    I even try to get default connection by
    Connection conn = java.sql.DriverManager.getConnection("jdbc:default:connection:");
    and
    Connection conn = new oracle.jdbc.driver.OracleDriver().defaultConnection();
    I got the same NullPointerException in both cases too.
    In fact, the java stored procedure worked before. but suddenly it's failed! The Oracle DB server is under my control and I did not change any configuration nor setting on it.
    I can't find similar case from this forum. Do any one know why?
    thanks.

    First try debugging the test case by making sure that none of the parameters passed to getConnection is null.
    When you are sure that none of the parameters are null, if the issue still reproduces. Let us know
    - The driver version
    - The jar file you are using
    cheers
    Ashok

  • Preparedstatement problem in oracle jdbc 10.1.0, 10.2.0

    Hello,
    Im using oracle jdbc to connect oracle9.0.1.0.1
    i have a table like
    id-NUMBER
    RESULT-VARCHAR2(100)
    E_DATE-DATE
    STATE-VARCHAR2(1)
    when i write the code like
    "update TBMIS_AUDIT_ISSUE_PROJECT set RESULT=? , E_DATE=?      where PROJ_ID=? and ISSUE_NO=?"
    pstmt.setstring(1, "Test");using preparedstatement, the result column will not be updated correct(ex:%|st).
    but if i change the order of columns like:
    "update TBMIS_AUDIT_ISSUE_PROJECT set E_DATE=?  RESULT=?   where PROJ_ID=? and ISSUE_NO=?"
    pstmt.setstring(2, "Test");it will be correct.
    when i put the column which type is VARCHAR2 in the first place like:
    "update TBMIS_AUDIT_ISSUE_PROJECT set STATE=?, E_DATE=?  RESULT=?   where PROJ_ID=? and ISSUE_NO=?"
    pstmt.setstring(1, "1");the same, the state column will not be updated correct(ex:%)
    but result column will be correct
    looks something wrong in preparedstatement at jdbc 10.1.0 or 10.2.0
    it works well when the driver is jdbc 8.1.7(classes12.zip)
    or working without preparedstatement
    so. is it the bug? or something i missed
    thanks

    and..
    it happened when
    VARCHAR2( size ) less then 1829
    when varchar2 ( size > 1829)
    it doen not happend..
    my table scheme like this
    create table TBMIS_AUDIT  (
       ID                   NUMBER(10)                     not null,
       S_DATE               DATE,
       E_DATE               DATE,
       NOTE                 VARCHAR2(200),
       STATUS             VARCHAR2(1)
    );my code is
    String sql = "update TBMIS_AUDIT set  NOTE=? , S_DATE=?"
                    + ",  STATUS=? where ISSUE_NO=?";
    PreparedStatement pstmt = con.prepareStatement(sql);
    pstmt.setString(1, "ok!!");
    pstmt.setTimestamp(2, new Timestamp(System.currentTimeMillis()));
    pstmt.setString(3, "1");
    pstmt.setString(4, "1");the note column will be filled with some wrong character
    if NOTE is VARCHAR2(2000), it works well again..
    or changing E_DATE to Timestamp in oracle

  • Enable SSL between oracle JDBC Connection in weblogic server.

    Hi ALL,
    I have an requirement to enable SSL Mechanism in weblogic JDBC Connection Pool.we are using Oracle9i Enterprise Edition Release 9.2.0.7.0 - 64bit Production and Driver as "jdbc:oracle:thin@..." / oracle.jdbc.OracleDriver.
    weblogic server 8.1 SP4
    can anybody know what are the steps / configuration has to be done for enable Oracle Advanced Security encryption on the JDBC Oracle Thin driver with a WebLogic JDBC Connection Pool.
    Thanks,
    Karthik,

    Hi,
    I changed the code as given below. Still getting the same error. Can I migrate my question to jdbc section? I am new to this forum.
    import java.sql.*;
    public class jdbc {
    public static void main(String[] args) throws ClassNotFoundException, SQLException
    Class.forName("oracle.jdbc.driver.OracleDriver");
    String url = "jdbc:oracle:thin:@localhost:1521:xe";
    Connection conn =
    DriverManager.getConnection(url,"jestin","jj");
    conn.setAutoCommit(false);
    Statement stmt = conn.createStatement();
    ResultSet rset =
    stmt.executeQuery("select BANNER from SYS.V_$VERSION");
    while (rset.next()) {
    System.out.println (rset.getString(1));
    stmt.close();
    System.out.println ("Ok.");
    jestinjoy@debian:~/java$ javac -classpath /usr/lib/java/ jdbc.java
    jestinjoy@debian:~/java$ java jdbc
    Exception in thread "main" java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
         at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:169)
         at jdbc.main(jdbc.java:7)
    same error when I give the command without classpath

  • How to use Oracle jdbc driver fixedString property?

    Oracle pads values in char columns so if I insert "a" in a CHAR(2) column then I cannot get that record by comparing that column to "a", I should get it by comparing it to "a ". Right?
    To solve this problem the Oracle jdbc driver has the property fixedString but I cannot make it work. (look for fixedString here )
    I'm using ojdbc14.jar driver for Oracle 10gR2 and accessing an Oracle 10gR2 database.
    This is my code:
    try {
    Properties props = new Properties();
    props.put("user", "****");
    props.put("password", "****");
    props.put("fixedString", true);
    Class.forName("oracle.jdbc.driver.OracleDriver");
    String jdbcUrl = "jdbc:oracle:thin:@<host>:<port>:<sid>";
    Connection connection = DriverManager.getConnection(jdbcUrl, props);
    PreparedStatement ps = connection.prepareStatement(
    "SELECT * FROM MY_TABLE WHERE MY_TABLE_ID = ?");
    ps.setObject(1, "abc"); // (*)
    // MY_TABLE_ID is CHAR(15)
    ResultSet rs = ps.executeQuery();
    while (rs.next())
    System.out.print("data: ");
    System.out.println(rs.getString("MY_TABLE_ID"));
    rs.close();
    ps.close();
    connection.close();
    } catch (SQLException ex) {
    ex.printStackTrace();
    } catch (ClassNotFoundException ex) {
    ex.printStackTrace();
    The above code executes fine (no exceptions thrown) but the ResultSet is empty after executeQuery().
    If I change the line (*) for
    ps.setObject(1, "abc ");
    Then I get the column I wanted. So it seems the driver is ignoring the fixedString option.
    I've also tried changing the line (*) for
    ps.setObject(1, "abc", java.sql.Types.CHAR);
    But the ResultSet I get is empty again. What am I missing?
    Thanks in advance

    Es un Bug se corrige en la versión del OAS 10.1.2.3
    Bug 10222534: UNABLE TO SET FIXEDSTRING PROPERTY IN DATASOURCE

  • Workaround for using Oracle JDBC extension with WLS pooling

    Reading the newsgroup I saw that many of us encountered the problems
    with ClassCastException when tried to use Oracle JDBC extension
    with WLS pooling. I also had.
    In this case BEA recommends to use dangerous
    method getVendorConnection() which exposes
    the physical connection object to your code.
    Yes it's really dangerous because of unsafe usage may breaks
    WLS pooled connection(s).
    Moreover, this practice will make your JDBC code
    unportable (your JDBC code in addition to Oracle dependence
    became Weblogic dependent):
    void doSmth() {
    Connection con = ...;
    Connection vCon = ((WLConnection)con).getVendorConnection();
    // + mess of usage con in one places and vCon in others
    // (where Oracle extensions are needed)
    // !Don't forget to don't close vCon!
    Sux.
    I found the workaround.
    Introduction
    ============
    Yes the real cause of ClassCastException is that
    in depth of Oracle driver the casting
    to class oracle.jdbc.driver.OracleConnection
    (not to interface oracle.jdbc.OracleConnection)
    is performed.
    Someone can say that this is bug or pure desing.
    Weblogic pooled connection provide dynamic
    implementation for all public interfaces
    which real physical (wrapped) connection object implements.
    Great feature!
    But I guess that all interface methods implemented
    by simple call-delegation to physical (wrapped) connection object.
    In case of oracle.jdbc.OracleConnection interface
    this approach doesn't work for at least one its method:
    public OracleConnection unwrap()
    WLS pooled connection shoudn't implement this method by
    delegation to physical connection object BUT should
    return physical connection object itself!
    // Wrong implementation of unwrap()
    // delegation is used
    public OracleConnection unwrap() {
    return physicalConnection.unwrap();
    // Right implementation of unwrap()
    // physical connection returned
    public OracleConnection unwrap() {
    return physicalConnection;
    Workaround
    ==========
    1. Develop your own OracleConnection wrapper class:
    import oracle.jdbc.OracleConnection;
    import weblogic.jdbc.extensions.WLConnection;
    public class MyOracleConnectionImpl implements OracleConnection {
    private OracleConnection con;
    public MyOracleConnectionImpl(OracleConnection connection)
    throws SQLException
    this.con = connection;
    public OracleConnection unwrap() {
    return (OracleConnection)
    ((WLConnection)con).getVendorConnection();
    /* Implement all other methods by delegation to con object */
    2. Don't get Connections directly from DataSource --
    develop your own simple (may be static) utility
    class which retrives Connections from dataSource
    and returns them wrapped into your MyOracleConnectionImpl
    to your code from some method:
    puclic abstract class MyConnectionSource {
    public static Connection getConnection() {
    Connection con = // get it from DataSource
    return new MyOracleConnectionImpl((OracleConnection)con);
    3. Add attribute RemoveInfectedConnectionsEnabled="false"
    to definition of your JDBCConnectionPool within config.xml
    You may do it because of you `safely` use vendorConnection --
    you don't expose it to application code.
    4. Enjoy the Oracle JDBC extensions in your code!
    Example:
    Connection con = MyConnectionSource.getConnection;
    ArrayDescriptor add =
    ArrayDescriptor.createDescriptor("your_type", con);
    Hope it helps to someone.
    Best regards,
    Eugene Voytitsky

    Hello Eugene Voytitsky,
    Thanks Eugene Voytitsky for your idea
    I have tried the solution suggested by You, but it did not work.
    It still throws ClassCastException.
    I am sorry for posting the whole code of two classes below.
    I did this to give you more clarity.
    I am also indicating the place where the exception was thrown..
    Please let me know if I am doing something wrong.
    OracleConnection Wrapper class
    package ejbTesting;
    // sql imports
    import java.sql.CallableStatement;
    import java.sql.Connection;
    import java.sql.DatabaseMetaData;
    import java.sql.PreparedStatement;
    import java.sql.SQLException;
    import java.sql.SQLWarning;
    import java.sql.Statement;
    // util imports
    import java.util.Map;
    import java.util.Properties;
    // imports from Oracle Driver Classes
    import oracle.jdbc.OracleConnection;
    import oracle.jdbc.OracleOCIFailover;
    import oracle.jdbc.OracleSavepoint;
    // import from Weblogic extensions
    import weblogic.jdbc.extensions.WLConnection;
    public class WeblogicConnectionWrapper implements OracleConnection
         // oracle connection object
         private OracleConnection connection;
         public WeblogicConnectionWrapper (OracleConnection orclConnection)
              try
                   this.connection = orclConnection;
              catch(Exception unexpected )
                   unexpected.printStackTrace();
         public OracleConnection unwrap()
              try
              // The datasource returns a weblogic.jdbc.pool.Connection
              // This needs to be type casted to weblogic.jdbc.extensions.WLConnection
              // Only this weblogic.jdbc.extensions.WLConnection CAN BE type casted
              // to OracleConnection
         return (OracleConnection) ((WLConnection) connection).getVendorConnection();
         catch(Exception sqlException )
              sqlException.printStackTrace ();
              return null;
         /* Implement all other methods by delegation to connection object */      
    public Connection _getPC()
    return connection._getPC();
    public void archive(int i, int j, String s)
    throws SQLException
    connection.archive(i, j, s);
    public void assertComplete()
    throws SQLException
    connection.assertComplete();
    public void clearWarnings()
    throws SQLException
    connection.clearWarnings();
    public void close()
    throws SQLException
    connection.close();
    public void commit()
    throws SQLException
    connection.commit();
    public Statement createStatement()
    throws SQLException
    return connection.createStatement();
    public Statement createStatement(int i, int j)
    throws SQLException
    return connection.createStatement(i, j);
    public boolean getAutoClose()
    throws SQLException
    return connection.getAutoClose();
    public boolean getAutoCommit()
    throws SQLException
    return connection.getAutoCommit();
    public CallableStatement getCallWithKey(String s)
    throws SQLException
    return connection.getCallWithKey(s);
    public String getCatalog()
    throws SQLException
    return connection.getCatalog();
    public boolean getCreateStatementAsRefCursor()
    return connection.getCreateStatementAsRefCursor();
    public int getDefaultExecuteBatch()
    return connection.getDefaultExecuteBatch();
    public int getDefaultRowPrefetch()
    return connection.getDefaultRowPrefetch();
    public Object getDescriptor(String s)
    return connection.getDescriptor(s);
    public boolean getExplicitCachingEnabled()
    throws SQLException
    return connection.getExplicitCachingEnabled();
    public boolean getImplicitCachingEnabled()
    throws SQLException
    return connection.getImplicitCachingEnabled();
    public boolean getIncludeSynonyms()
    return connection.getIncludeSynonyms();
    public Object getJavaObject(String s)
    throws SQLException
    return connection.getJavaObject(s);
    public DatabaseMetaData getMetaData()
    throws SQLException
    return connection.getMetaData();
    public Properties getProperties()
    return connection.getProperties();
    public boolean getRemarksReporting()
    return connection.getRemarksReporting();
    public boolean getRestrictGetTables()
    return connection.getRestrictGetTables();
    public String getSQLType(Object obj)
    throws SQLException
    return connection.getSQLType(obj);
    public String getSessionTimeZone()
    return connection.getSessionTimeZone();
    public int getStatementCacheSize()
    throws SQLException
    return connection.getStatementCacheSize();
    public PreparedStatement getStatementWithKey(String s)
    throws SQLException
    return connection.getStatementWithKey(s);
    public int getStmtCacheSize()
    return connection.getStmtCacheSize();
    public short getStructAttrCsId()
    throws SQLException
    return connection.getStructAttrCsId();
    public boolean getSynchronousMode()
    return connection.getSynchronousMode();
    public int getTransactionIsolation()
    throws SQLException
    return connection.getTransactionIsolation();
    public Map getTypeMap()
    throws SQLException
    return connection.getTypeMap();
    public String getUserName()
    throws SQLException
    return connection.getUserName();
    public boolean getUsingXAFlag()
    return connection.getUsingXAFlag();
    public SQLWarning getWarnings()
    throws SQLException
    return connection.getWarnings();
    public boolean getXAErrorFlag()
    return connection.getXAErrorFlag();
    public boolean isClosed()
    throws SQLException
    return connection.isClosed();
    public boolean isLogicalConnection()
    return connection.isLogicalConnection();
    public boolean isReadOnly()
    throws SQLException
    return connection.isReadOnly();
    public String nativeSQL(String s)
    throws SQLException
    return connection.nativeSQL(s);
    public Object openJoltConnection(String s, short word0, short word1)
    return connection.openJoltConnection(s, word0, word1);
    public void oracleReleaseSavepoint(OracleSavepoint oraclesavepoint)
    throws SQLException
    connection.oracleReleaseSavepoint(oraclesavepoint);
    public void oracleRollback(OracleSavepoint oraclesavepoint)
    throws SQLException
    connection.oracleRollback(oraclesavepoint);
    public OracleSavepoint oracleSetSavepoint()
    throws SQLException
    return connection.oracleSetSavepoint();
    public OracleSavepoint oracleSetSavepoint(String s)
    throws SQLException
    return connection.oracleSetSavepoint(s);
    public int pingDatabase(int i)
    throws SQLException
    return connection.pingDatabase(i);
    public CallableStatement prepareCall(String s)
    throws SQLException
    return connection.prepareCall(s);
    public CallableStatement prepareCall(String s, int i, int j)
    throws SQLException
    return connection.prepareCall(s, i, j);
    public CallableStatement prepareCallWithKey(String s)
    throws SQLException
    return connection.prepareCallWithKey(s);
    public PreparedStatement prepareStatement(String s)
    throws SQLException
    return connection.prepareStatement(s);
    public PreparedStatement prepareStatement(String s, int i, int j)
    throws SQLException
    return connection.prepareStatement(s, i, j);
    public PreparedStatement prepareStatementWithKey(String s)
    throws SQLException
    return connection.prepareStatementWithKey(s);
    public void purgeExplicitCache()
    throws SQLException
    connection.purgeExplicitCache();
    public void purgeImplicitCache()
    throws SQLException
    connection.purgeImplicitCache();
    public void putDescriptor(String s, Object obj)
    throws SQLException
    connection.putDescriptor(s, obj);
    public void registerApiDescription(String s, short word0, short word1, String
    s1)
    connection.registerApiDescription(s, word0, word1, s1);
    public void registerSQLType(String s, Class class1)
    throws SQLException
    connection.registerSQLType(s, class1);
    public void registerSQLType(String s, String s1)
    throws SQLException
    connection.registerSQLType(s, s1);
    public void registerTAFCallback(OracleOCIFailover oracleocifailover, Object
    obj)
    throws SQLException
    connection.registerTAFCallback(oracleocifailover, obj);
    public void rollback()
    throws SQLException
    connection.rollback();
    public void setAutoClose(boolean flag)
    throws SQLException
    connection.setAutoClose(flag);
    public void setAutoCommit(boolean flag)
    throws SQLException
    connection.setAutoCommit(flag);
    public void setCatalog(String s)
    throws SQLException
    connection.setCatalog(s);
    public void setCreateStatementAsRefCursor(boolean flag)
    connection.setCreateStatementAsRefCursor(flag);
    public void setDefaultExecuteBatch(int i)
    throws SQLException
    connection.setDefaultExecuteBatch(i);
    public void setDefaultRowPrefetch(int i)
    throws SQLException
    connection.setDefaultRowPrefetch(i);
    public void setExplicitCachingEnabled(boolean flag)
    throws SQLException
    connection.setExplicitCachingEnabled(flag);
    public void setImplicitCachingEnabled(boolean flag)
    throws SQLException
    connection.setImplicitCachingEnabled(flag);
    public void setIncludeSynonyms(boolean flag)
    connection.setIncludeSynonyms(flag);
    public void setReadOnly(boolean flag)
    throws SQLException
    connection.setReadOnly(flag);
    public void setRemarksReporting(boolean flag)
    connection.setRemarksReporting(flag);
    public void setRestrictGetTables(boolean flag)
    connection.setRestrictGetTables(flag);
    public void setSessionTimeZone(String s)
    throws SQLException
    connection.setSessionTimeZone(s);
    public void setStatementCacheSize(int i)
    throws SQLException
    connection.setStatementCacheSize(i);
    public void setStmtCacheSize(int i)
    throws SQLException
    connection.setStmtCacheSize(i);
    public void setStmtCacheSize(int i, boolean flag)
    throws SQLException
    connection.setStmtCacheSize(i, flag);
    public void setSynchronousMode(boolean flag)
    connection.setSynchronousMode(flag);
    public void setTransactionIsolation(int i)
    throws SQLException
    connection.setTransactionIsolation(i);
    public void setTypeMap(Map map)
    throws SQLException
    connection.setTypeMap(map);
    public void setUsingXAFlag(boolean flag)
    connection.setUsingXAFlag(flag);
    public void setWrapper(OracleConnection oracleconnection)
    connection.setWrapper(oracleconnection);
    public void setXAErrorFlag(boolean flag)
    connection.setXAErrorFlag(flag);
    public void shutdown(int i)
    throws SQLException
    connection.shutdown(i);
    public void startup(String s, int i)
    throws SQLException
    connection.startup(s, i);
    Util class to get Wrapped Connections from
    datasource
    package ejbTesting;
    // j2ee imports
    import javax.naming.InitialContext;
    import javax.sql.DataSource;
    // sql imports
    import java.sql.Connection;
    // imports from Oracle Driver Classes
    import oracle.jdbc.OracleConnection;
    * Wrapper class for the DataSource Connection from Weblogic pool
    public class DataSourceConnectionWrapper
         // datasource variable
         private static transient DataSource datasource = null;
         private static String dbName = "jdbc/workbench";
    * Method that returns the database connection
         public static Connection getConnection()
              try
                   // initialsing the datasource object
                   initialiseDataSource ();
                   // Getting a connection from the datasource
                   Connection con = datasource.getConnection( );
                   // wrapping it custom wrapper class and
                   // returning the connection object
                   return new WeblogicConnectionWrapper((OracleConnection)con);
              catch(Exception exception )
                   exception.printStackTrace();
                   return null;
         private static void initialiseDataSource( ) throws Exception
    if ( datasource == null )
    try
    InitialContext ic = new InitialContext( );
    datasource = (DataSource) ic.lookup( dbName );
    catch (Exception ne )
    throw new Exception( "NamingException while looking up DataSource with
    JNDI name" +
    dbName + ": \n" + ne.getMessage( ) );
    Exception Stack Trace
    The line 46 in DataSourceConnectionWrapper
    corresponds to
    return new WeblogicConnectionWrapper((OracleConnection)con);
    Which I feel is logical as the connection which we get from Weblogic
    datasource cannot be type casted to OracleConnection
    java.lang.ClassCastException: weblogic.jdbc.pool.Connection
    at ejbTesting.DataSourceConnectionWrapper.getConnection(DataSourceConnectionWrapper.java:46)

Maybe you are looking for

  • How to add multiple datatable into a report

    Hello! I have a little issue. I'm creatring a report with one dataset containing multiple datatables lets call them datatable1 and datatable2. I have a separate program that's going to collect the data I need, and then export the report into a pdf fi

  • OSX Mountain Lion isn't working with my Macbook white A1181

    I don't know why but it wont let me download Mountain Lion on my macbook (the first white one - A1181), saying that it isn't compatible. Can someone help? Please.

  • How do I know both processors are running?

    From the topic heading....it sounds pretty simple. I generally use the Activity Monitor that displays a floating CPU window. Usually, it has two bars showing the load on both processors. I recently have issues with the 'G5 deep sleep'...and after the

  • Photos in iOS5

    What happened to the rotate button in the Photos app in iOS5? And is there still no way to Delete All or delete a whole event in the Events tab?

  • My apps won't update with my new apple id

    i registered my macbook with a previous apple ID and just recently made a new one and the apps that I had downloaded with my old apple ID won't update unless I use my old apple ID which I no longer have access to..i changed my apple ID on my macbook