Error in Oracle 2 Day Plus Java Developer Guide for XE

After creating the connection successfully I tried to follow the document. Section 2-4 includes some sample code (Example 2-1) to determine the JDBC Driver Version. After a straight copy/paste and compile the following error was printed in the log:
"C:\Program Files\jDeveloper10g13\jdk\bin\javaw.exe" -ojvm -classpath "C:\Program Files\jDeveloper10g13\jdev\mywork\HRApp\View\classes;C:\Program Files\jDeveloper10g13\j2ee\home\lib\ojsp.jar;C:\Program Files\jDeveloper10g13\j2ee\home\jsp\lib\taglib\ojsputil.jar;C:\Program Files\jDeveloper10g13\j2ee\home\oc4j.jar;C:\Program Files\jDeveloper10g13\j2ee\home\lib\oc4j-internal.jar;C:\Program Files\jDeveloper10g13\j2ee\home\lib\servlet.jar;C:\Program Files\jDeveloper10g13\jdev\lib\ojc.jar;C:\Program Files\jDeveloper10g13\jdbc\lib\ojdbc14dms.jar;C:\Program Files\jDeveloper10g13\jdbc\lib\orai18n.jar;C:\Program Files\jDeveloper10g13\jdbc\lib\ocrs12.jar;C:\Program Files\jDeveloper10g13\diagnostics\lib\ojdl.jar;C:\Program Files\jDeveloper10g13\lib\dms.jar" hr.JDBCVersion
Exception in thread main
java.sql.SQLException: Io exception: Invalid connection string format, a valid format is: "host:port:sid"
     at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)
     at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:175)
     at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:287)
     at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:328)
     at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:434)
     at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:151)
     at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
     at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:571)
     at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:218)
     at hr.JDBCVersion.main(JDBCVersion.java:19)
Process exited with exit code 1.
Since I installed Oracle XE with all the standard defaults, I changed the line
String jdbcUrl = "jdbc:oracle:thin:@localhost:1521/XE";
to
String jdbcUrl = "jdbc:oracle:thin:@localhost";
which now produces the following error log:
"C:\Program Files\jDeveloper10g13\jdk\bin\javaw.exe" -ojvm -classpath "C:\Program Files\jDeveloper10g13\jdev\mywork\HRApp\View\classes;C:\Program Files\jDeveloper10g13\j2ee\home\lib\ojsp.jar;C:\Program Files\jDeveloper10g13\j2ee\home\jsp\lib\taglib\ojsputil.jar;C:\Program Files\jDeveloper10g13\j2ee\home\oc4j.jar;C:\Program Files\jDeveloper10g13\j2ee\home\lib\oc4j-internal.jar;C:\Program Files\jDeveloper10g13\j2ee\home\lib\servlet.jar;C:\Program Files\jDeveloper10g13\jdev\lib\ojc.jar;C:\Program Files\jDeveloper10g13\jdbc\lib\ojdbc14dms.jar;C:\Program Files\jDeveloper10g13\jdbc\lib\orai18n.jar;C:\Program Files\jDeveloper10g13\jdbc\lib\ocrs12.jar;C:\Program Files\jDeveloper10g13\diagnostics\lib\ojdl.jar;C:\Program Files\jDeveloper10g13\lib\dms.jar" hr.JDBCVersion
Exception in thread main
java.sql.SQLException: Io exception: SO Exception was generated
     at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)
     at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:175)
     at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:287)
     at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:328)
     at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:434)
     at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:151)
     at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
     at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:571)
     at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:218)
     at hr.JDBCVersion.main(JDBCVersion.java:19)
Process exited with exit code 1.
How am I supposed to learn anything if the code examples are flawed? Please help me... this is driving me nuts.

Can you provide the URL to the problematic instructions?
The JDBC URL should probably be: jdbc:oracle:thin:@localhost:1521:XE
And one more thing - your JDeveloper is installed in a directory that has a space in its name (Program Files) - this may cause problems so reinstall it in a new directory without a space in the path.

Similar Messages

  • Oracle Database Express Edition 2 Day Plus Java Developer Guide??

    I posted in the JDeveloper forum, as well as sending email via your feedback link found on the tutorial but I am a little disappointed by this:
    The Oracle® Database Express Edition 2 Day Plus Java Developer Guide has some errors in it.
    in Windows, I simply chose, start
    -> programs -> Oracle Database Express Edition -> Go To Database Home Page -> click documentation from the link -> and run the Oracle® Database Express Edition 2 Day Plus Java Developer Guide tutorial.
    the problem is there are mistake(s) in the tutorial, for example: section 4-19 is this:
    "The complete code for the method should now be as follows:
    public boolean authenticateUser(String userid, String password,
    HttpSession session) throws SQLException { "
    it needs to be this:
    public boolean authenticateUser(String jdbcURL, String userid, String password,
    HttpSession session) throws SQLException {
    Also:
    there is no mention that :
    the port and SID must also be passed in the
    ds.setURL(jdbcUrl) found in the authenticateUser() method, or an exception is thrown. This differs from value of the jdbcUrl string found in the getDBConnection() , which makes it hard to figure out
    The tutorial is great even if it doesn't work out of the box, but I am disappointed that errata or completed code for this project is not available, especially when you explicitely point to it via the steps mentioned above.
    Thanks,
    Patrick

    The tutorial seems to be using the old JDeveloper 10.1.2.
    If you are aiming to learn JDeveloper then just use the tutorials linked from the JDeveloper home page.
    http://www.oracle.com/technology/obe/obe1013jdev/index.htm

  • Java developer guide

    Hi,
    in Documentation Library of Oracle DataBase Express Edizion (XE) there is a documentation "java developer guide part number b25320.01". There are other of the such "java developer guide b25320.01" for begining with Jdeveloper?
    Sorry for my bad English...

    Try our tutorials page:
    http://www.oracle.com/technology/obe/obe1013jdev/index.htm
    And the books on the ADF learning center:
    http://www.oracle.com/technology/products/adf/learnadf.html

  • Newly released BOEXI31 Java Developer Guide available

    I've been slogging along with the OLD BOEXI3x Java Developer Guide documentation which incorrectly references various security and principal classes.
    However, I've just noticed this morning that a NEWER version of the DG is available at:
    http://help.sap.com/businessobject/product_guides/boexir31/en/boesdk_java_dg_12_en.zip
    which DOES reference the correct packages in the examples and scenarios.
    ...in case anyone shared my confusion.

    Thanks for posting!
    If you find any further doc bugs, please post in the forums, and I'll be able to forward the info.
    Sincerely,
    Ted Ueda

  • Oracle Application Server 10g Installation Guide for Windows

    The link to Oracle Application Server 10g Installation Guide for Windows on the OTN Web Site don't work. Using search on site does not turn up any installation document for Oracle Application Server 10g.
    How can I find the Installtion Guide or the Quick Installtion Guide for Oracle Application Server 10g for Windows?

    Hi,
    The docs you seek are available through the OTN documentation pages at: http://otn.oracle.com/documentation/index.html.
    Click on the link for "Oracle Application Server Release 10g (9.0.4)" and then on the "View Library" link for part B10468_04 - Oracle Application Server 10g Online Documentation 10g (9.0.4.0.0) for Microsoft Windows.
    The Docs are located under the Documentation tab.
    Alternatively, here is the direct link to the Documentation Tab interface of the Library:
    http://download.oracle.com/docs/cd/B10468_04/docs.htm
    Regards,
    Les

  • Oracle Fusion Middleware Administrator's Guide for Oracle SOA Suite

    Somebody knows where to find this document for BAM 11g TP4 ?
    Oracle Fusion Middleware Administrator's Guide for Oracle SOA Suite
    I need to add new users for BAM and I m not able and the User's Guide for Oracle Business Activity Monitoring tells me I should look for the login management in this doc.
    Tanks

    Weird? fmwadmin stands for Fusion MiddleWare Admin. Quite easy to remember...
    --olaf                                                                                                                                                                                                                                               

  • Java programming guide for Sun ONE

    Where can I find the "Sun ONE LDAP SDK for Java Programming Guide" for version 5.2. ?
    I have the programming guide for Netscape Directory SDK 4.0 for Java. Will that do?
    Thanks for your help.
    [email protected]

    this to also create and manage the LDAP groups. We
    are using the Sun ONE 5.2 LDAP directory server. Are
    there significant advantages to using JNDI over the
    SunONE directory SDK, or vice versa?JNDI (bundled with J2SE) in combination with the Booster Pack release version 1.0, provides API support for accessing both static and dynamic Groups. It also provides API support for the new extensions and controls that are made available in Sun ONE DS 5.2.
    The Booster Pack can be downloaded from:
    http://java.sun.com/products/jndi/
    You can also check the LDAP trail of the JNDI Tutorial that contains detailed descriptions and examples of how to use JNDI . It is available at:
    http://java.sun.com/products/jndi/tutorial/ldap/index.html

  • Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile

    Where can I find "Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile"?
    Thanks a lot for your time.

    Hi, this is referring to the JavaDocs for Java methods/classes supported by ADF Mobile. You can typically right (or ctrl) click on any ADF Mobile specific Java method and select "JavaDoc". You can open up a sample app that contains any Java class - for example the HR sample app, and find any method with name "adfmf*". You should be able to see the Java doc for the ADF Mobile related methods/classes.
    Thanks,
    Joe Huang

  • Developer Guide for ADF Product Development

    Hello All, I am planning to learn Oracle ADF, Can anyone one please share Oracle ADF Developer Guide link or document or please share document number. Please also share some good examples on this and other useful documents which i can learn quick and faster Thanks in advance. Thanks, Niranjan.

    Check out http://docs.oracle.com/cd/E37547_01/tutorials/toc.htm for tutorials and samples. Find the fusion developers guide at http://docs.oracle.com/middleware/1212/adf/ADFFD/index.html
    Timo

  • Error connecting oracle 11g through SQL Developer

    i am using SQL Developer to connect to oracle 11g which is installed to another machine in same network
    means i am using a client machine to get connected to oracle installed to host machine through SQL Developer
    iam getting this error
    network adapter could not establish the connection
    vendor code 170002
    my listener.ora
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = his-zoheb.PCSTECH.COM)(PORT = 1521))
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    my tnsnames.ora
    ORCL =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = his-ansari.pcstech.com)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = orcl)
    iam not understanding what is problem
    please somebody help

    I would say it's vendor code 17002 (not 170002). And such a message is thrown by SQL Developer , unfortunately very generic for any kind of connection problems.
    Start sqlplus and try to connect, very likely you get a better error message.
    Recently I had such a connection problem and the reason was - No Listener.
    Werner

  • Endeca portlet/ component java developement guide

    i am new to endeca. i like to develope the endeca component or portlet, but i dont know how the component are working please any one gaive me the link for quick start to built my own component. what i need exactly is , whaen a user click url , how the page generate ,what are the classe the request pass through , simply i need lifecycle or architecture of component in endeca.

    There is a component SDK for Studio, which is covered in the Studio Administration and Customization Guide.
    Developing Custom Components

  • Major Defect in Oracle 9i RAC Quick Install Guide for Linux

    Using Oracle Cluster File System, the section labeled Creating Quorum Disk and SERVCONFIG files is wrong. The command
    touch /u01/cmdiskfile
    should be replaced with
    dd if=/dev/zero of=/u01/cmdiskfile bs=4096 count=65
    Failure to do this will cause oracle cluster manager to spew errors and die in less than 30 seconds.

    My email address is [email protected]
    I like to speak to some one who has done a 9.2.0.5 RAC installation on AS 2.1. Could they send me an email so that I could get some help in doing this task successfully.

  • Error installing Oracle 9i Database Enterprise/personal edition for win xp

    Hi,
    Not sure if anyone can help me, but I just finish downloading the
    Oracle Database Release 2 Enterprise/Standard/Personal Edition for Windows NT/2000/XP (32 bit)
    When I finished unzipping the 3 files into Disk1, Disk2, and Disk3 folders I tried running the setup.exe file but nothing happens.
    I am using windows XP as my operating system. Can anyone tell me why the setup is not working?
    Thank you.

    XP Professional, or XP Home?
    There are a lot of cases where people have tried and failed to install on XP Home. Also a few successes.
    Also, how is your firewall and anti-virus software configured. Those may be blocking your install process.

  • Pdf version of web developer guide for ADF

    Hie
    it was bad to do a lot of search for the pdf version of http://download.oracle.com/docs/cd/E12839_01/web.1111/b31973/toc.htm
    can anyone please provide me?
    any one from oracle can please provide and easy reference to such info?

    In the upper right-hand corner of the very page for which you gave the link is a link titled "View PDF" ;)
    John

  • Java development tool for optimalization of the code

    I'm searching for a program, that would detect not used variables, methods, etc. in Java code. Can you help me to find such?

    Why do you want a program to cover up poor program design?
    The best solution to your problem is: don't declare variables you don't use, and don't write methods you don't use.
    Additionally, you shouldn't copy and paste other code. If you must, read other people's code to get a good idea of how it works, then do it for yourself, if not just for the sake of keeping organized and not having any unused stuff.
    As far as speed optimization goes (I know that's not what your question was about, but, for your information), you can compile with the -O option to take care of that. If you are worried about class file size, you can compile with the -g:none option to remove debugging information.
    Jason

Maybe you are looking for