  | Mailing List | | Home | | Forum Home | | JBoss - Java Application Server | | Tomcat - JSP/Servlet container | | Struts - A MVC web framework | | iText - An open source PDF Java Library | | JDOM - JDOM XML Parser | | JSP - A mailing list about Java Server Pages specification and reference | | J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition | | J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog | | Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology | |
Struts & Hibernate
|
|
|
  | | | Jdbc for Jdbc gurus | Jdbc for Jdbc gurus 2004-09-23 - By Lurangwa N.
Back
Hi ; I am having oracle 8.0.6 with JavaTM 2 SDK, Standard Edition Version 1.4.2 running on windows 2000 Client. I have setup env path as PATH=C:\jdk1.3\jdk\bin;C:\orant\jdbc\lib\classes102.zip; CLASSPATH=.;C:\orant\jdbc\lib\classes102.zip /************** connection *******************/ In my source code i do the following: try { Class.forName ("oracle.jdbc.driver.OracleDriver"); } catch (ClassNotFoundException e) { e.printStackTrace(); } Connection conn = DriverManager.getConnection("jdbc:oracle:oci8:@(protected)" , "scott", "tiger");
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(); /***************** end ************************/ My program compiles well but when i run it , I get the following error Exception in thread "main" java.lang.UnsatisfiedLinkError: no ocijdbc8 in java.l ibrary.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1491) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:834) at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:232) at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:252) at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja va:365) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:260) at java.sql.DriverManager.getConnection(DriverManager.java:512) at java.sql.DriverManager.getConnection(DriverManager.java:171) at Emp1.main(Emp1.java:20) Can anyone tell me what is this all about! I will appreciate any help Lurangwa
-- ---- ---- ---- ---- ---- ----- Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage!
__ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ __ To unsubscribe, send email to listserv@(protected) and include in the body of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
<DIV><BR>Hi ;<BR>I am having oracle 8.0.6 with JavaTM 2 SDK, Standard Edition Version 1.4.2 running on windows 2000 Client. I have setup env path as<BR>  ; PATH=C:\jdk1.3\jdk\bin;C:\orant\jdbc\lib\classes102.zip;<BR> CLASSPATH=.;C:\orant\jdbc\lib\classes102.zip<BR>/************** connection **** ***************/<BR>In my source code i do the following:<BR> try<BR > {<BR> Class.forName ("oracle.jdbc.driver.OracleDriver");<BR> } catch (ClassNotFoundException e) {<BR> e .printStackTrace();<BR> }<BR> Connection conn = DriverManager .getConnection("jdbc:oracle:oci8:@(protected)", "scott", "tiger"); <BR> <BR> Statement stmt = conn.createStatement();<BR> ResultSet rset = stmt.executeQuery("select BANNER from SYS.V_$VERSION");<BR> while (rset.next())<BR> System.out.println (rset .getString(1)); // Print col 1<BR> <BR>   ; stmt.close();<BR>/***************** end ************************/</DIV> <DIV>My program compiles well but when i run it , I get the following error<BR >Exception in thread "main" java.lang.UnsatisfiedLinkError: no ocijdbc8 in java .l<BR>ibrary.path<BR> at java.lang .ClassLoader.loadLibrary(ClassLoader.java:1491)<BR>   ; at java.lang.Runtime.loadLibrary0(Runtime.java:788)<BR>   ; at java.lang.System.loadLibrary(System.java:834) <BR> at oracle.jdbc.oci8.OCIDBAccess .logon(OCIDBAccess.java:232)<BR> at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:252)<BR> at oracle.jdbc.driver.OracleDriver .getConnectionInstance(OracleDriver.ja<BR>va:365)<BR> at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java :260)<BR> &nbs p; at java.sql.DriverManager.getConnection(DriverManager.java:512)<BR> at java.sql.DriverManager.getConnection (DriverManager.java:171)<BR> at Emp1 .main(Emp1.java:20)</DIV> <DIV>Can anyone tell me what is this all about!</DIV> <DIV>I will appreciate any help</DIV> <DIV>Lurangwa</DIV> <DIV><BR> </DIV><p> <hr size=1>Do you Yahoo!?<br> <a href="http://us.rd.yahoo.com/mail_us/taglines/100/*http://promotions.yahoo .com/new_mail/static/efficiency.html">New and Improved Yahoo! Mail</a> - 100MB free storage! __ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ __ To unsubscribe, send email to listserv@(protected) and include in the body of the message "signoff SERVLET-INTEREST". <p> Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html <p>
|
|
 |