Now I have exactly:
Linux2.2.16
jdk1.2.2
j2sdk1.2.1
Orion1.3.8
Oracle8.1.6.1
I tried drivers for Oracle8.1.6.x java2, and Oracle8.1.7. java2, both
java thin;
????????????????????????????????????????????????????????????????????????????????
But I found another interesting afair ...
When I want to use (jdbc/OracleEJBDS):
<data-source
class="com.evermind.sql.ConnectionDataSource"
name="Oracle"
location="jdbc/OracleDS"
xa-location="jdbc/xa/OracleXADS"
ejb-location="jdbc/OracleEJBDS"
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"
/>
and web.xml:
<context-param>
<param-name>OracleEJBDS</param-name>
<param-value>jdbc/OracleEJBDS</param-value>
</context-param>
<resource-ref>
<description>Test Data Source</description>
<res-ref-name>OracleEJBDS</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Application</res-auth>
</resource-ref>
then following code throws the same exception,
but much sooner ... I can't call DataSource.getConnection(xxx) method.
like this:
final private String dbName = "jdbc/OracleEJBDS";
InitialContext ic = new InitialContext();
DataSource ds = (DataSource) ic.lookup(dbName);
Connection con = ds.getConnection(); //** <-- DOESN'T WORK ... ?
:-(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
"J.T. Wenting" wrote:
>
> 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
> >
--
#md