What version of the Oracle JDBC drivers are you using? This problem occurs
with drivers with versions < 8.1.6, so you probably need to upgrade.
Your JDBC driver should be in a file called Classes12.zip or newer, not
Classes111.zip or older.
Jeroen T. Wenting
[EMAIL PROTECTED]
Murphy was wrong, things that can't go wrong will anyway
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Martin Dolog
> Sent: Thursday, November 02, 2000 10:44
> To: Orion-Interest
> Subject: Oracle data-source & connect
>
>
> Hello,
>
> I am new w/ Orion and I have the following problem:
>
> I can't connect however it seems to be connected
> but when I want to call some method from Connection class
> (like con.getMetaData or con.createStatement) I just get
> exception: java.sql.SQLException: Io exception: The Network Adapter
> could not establish the connection
>
> When I check listener log file,
> there is of course no record about getting connection.
>
> I have Oracle8.0.6, jdk1.2.2, orion1.3.8
>
> My data-source.xml looks like:
>
> <data-source
> class="com.evermind.sql.ConnectionDataSource"
> name="Oracle"
> location="jdbc/OracleDS"
> xa-location="jdbc/xa/OracleXADS"
> ejb-location="jdbc/OracleDS"
> connection-driver="oracle.jdbc.driver.OracleDriver"
> username="scott"
> password="tiger"
> url="jdbc:oracle:thin:scott/tiger@localhost:1512:pc29"
> inactivity-timeout="30"
> schema="database-schemas/oracle.xml"
> />
>
>
> web.xml looks like:
>
> <context-param>
> <param-name>OracleDS</param-name>
> <param-value>jdbc/OracleDS</param-value>
> </context-param>
>
> <resource-ref>
> <description>Test Data Source</description>
> <res-ref-name>OracleDS</res-ref-name>
> <res-type>javax.sql.DataSource</res-type>
> <res-auth>Application</res-auth>
> </resource-ref>
>
>
> and EJB code:
>
> final private String dbName = "jdbc/OracleDS";
> String s = "";
>
> /********** THIS PART WORK FINE, BUT IT DOESN'T MAKE
> CONNECTION AT ALL
> ***/
> InitialContext ic = new InitialContext();
> DataSource ds = (DataSource) ic.lookup(dbName);
> Connection con = ds.getConnection();
> s = "Conected";
> if ( con.isClosed() )
> s += "Closed";
> else
> s += "NOT Closed";
> /**************** THIS PART DOESN'T WORK !!! *******************
> DatabaseMetaData dm = con.getMetaData();
> s += dm.getDriverVersion();
> Statement st = con.createStatement();
> ResultSet rs = st.executeQuery("SELECT ename FROM emp");
> if ( rs.next() )
> s += rs.getString("ename");
> else
> s += "Empty";
> */
> con.close();
> return s;
>
>
>
> I really don't know what to do. I spent two days over that problem
> and I am lost!!! Thank you VERY much for any advice.
>
> <<<btw: I spend another day w/ java:comp/env/jdbc/OracleDS :(( >>>
>
> Martin
>