Links

  • 1. Sogeti
  • 2. JBoss
  • 3. IBM
  • 4. Oracle
  • 5. SpringSource
  • 6. NL-JUG
  • 7. Java

Archives

Syndication  RSS 2.0

RSS 1.0
RSS 2.0

Bookmark this site

Add 'JCN Blog' site to delicious  Add 'JCN Blog' site to technorati  Add 'JCN Blog' site to digg  Add 'JCN Blog' site to dzone

Posted by Barend Garvelink at 12:25 on Sunday 3 February    Add 'Oracle thin JDBC to TNS name' site to delicious  Add 'Oracle thin JDBC to TNS name' site to technorati  Add 'Oracle thin JDBC to TNS name' site to digg  Add 'Oracle thin JDBC to TNS name' site to dzone

To establish an Oracle thin JDBC connection to a TNS alias (tnsname), make sure you pass the oracle.net.tns_admin system property to the JVM. Its value should be the directory in which your tnsnames.ora file is located. After that, you can just pass the TNS alias in place of the host name in the JDBC URL.

E.g. if you simply try to connect to jdbc:oracle:thin:@MYDB, which is in your tnsnames.ora file, you’ll get an SQLException with a detail message of Io exception: Unknown host specified. If you fire up the JVM with a -Doracle.net.tns_admin=/oracle/10g/NETWORK/ADMIN, or use System.setProperty(String,String) after startup, the connection will be established successfully.

Oh yeah? Well what’s this SQLException “Io exception: SO Exception was generated“, then? you ask? The exception message is a bit deceptive, as the “SO” suggests OCI when we’re really using thin. I encountered this exception with the ojdbc14.jar included with OC4J standalone 10.1.3.1.0. Using the JDBC driver from the Oracle client 10.2 package stops it occuring, but causes OC4J standalone to log a warning about a missing getStatistics method every few seconds, which is hardly any less annoying. I’m not sure what’s causing it to happen, but a version upgrade seems to fix it. If that’s not an option, you can always use good old jdbc:oracle:thin:@host:port/service, which is what I settled for in the end.

Posted by Eric Gunnewegh at 8:30 on Tuesday 8 August    Add 'JDBC 4.0 Enhancements in Java SE 6' site to delicious  Add 'JDBC 4.0 Enhancements in Java SE 6' site to technorati  Add 'JDBC 4.0 Enhancements in Java SE 6' site to digg  Add 'JDBC 4.0 Enhancements in Java SE 6' site to dzone

Java Platform, Standard Edition (Java SE) version 6 (code name Mustang), is currently in its second beta release and is scheduled to be delivered in October of this year. Java SE 6 includes several enhancements to the Java Database Connectivity (JDBC) API. These enhancements will be released as JDBC version 4.0. The main objectives of the new JDBC features are to provide a simpler design and better developer experience. This article provides an overview of the JDBC 4.0 enhancements and what benefits they offer to enterprise Java developers. We will explore the new JDBC features with the help of a sample loan processing application using Apache Derby as the back-end database.

Posted by Ruud Steeghs at 15:50 on Friday 23 June    Add 'Making the Most of JDBC with WebRowSet' site to delicious  Add 'Making the Most of JDBC with WebRowSet' site to technorati  Add 'Making the Most of JDBC with WebRowSet' site to digg  Add 'Making the Most of JDBC with WebRowSet' site to dzone

Database to XML and back again. If everyone’s doing some or all of this, then shouldn’t we write it once, get it right, and standardize? JDBC 3.0′s WebRowSet offers a profound increase in power over the old ResultSet. Sharad Acharya shows you what’s possible.

Posted by jcn at 5:00 on Wednesday 30 June    Add 'JDBC 4.0 – Next Generation API' site to delicious  Add 'JDBC 4.0 – Next Generation API' site to technorati  Add 'JDBC 4.0 – Next Generation API' site to digg  Add 'JDBC 4.0 – Next Generation API' site to dzone

De JDBC 4.0 API wordt nu ontwikkeld om de thema’s van Tiger, zoals easy-of-development, annotaties, etc. ook door te voeren in de andere API’s. Daarnaast gebruikt de expertgroep deze mogelijkheid om JDBC direct te updaten met de laatste specificaties van SQL (2003) en stonden er nog een aantal openstaande puntjes open die nog niet in JDBC 3.0 mee waren genomen. Dus wat gaat er allemaal veranderen?
Read the rest of this entry »


© 2020 Java Competence Network. All Rights Reserved.