Title: RE: DataSources..how to get servlets to work with them?
Thanks for the reply.
 
I have looked all the way back to May of last year in the Orion archive..and I have tried several different options that others have said worked. EVERY time I either get a ClassCastException, or a username/login is invalid Exception. The username and password are EXACTLY the ones we use with the DriverManager JDBC 1 calls we make. It works fine in this manner. I have full access to the database and I can log in and do SQL stuff on the machine or telnet from my local box and do it. I am at a loss as to why this is not working. I have turned on Datasource debugging, and it shows a bunch of connections being made, but when I try to get a connection, the exception is thrown.
 
Is there any plausible reason why the username and password would be rejected by DataSources, but not by a direct programatic call using DriverManager? This is making little sense to me other than that I can't see how Orion is implementing the call to the database when trying to establish a connection.
 
You mentioned put it in the application.xml. What am I putting there, and which one? I have the application.xml in /config/ of Orion, and the application.xml in the META-INF dir for my application (which is in c:\bm\META-INF\application.xml).
 
Thanks.
-----Original Message-----
From: Kesav Kumar [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 26, 2001 12:29 PM
To: Orion-Interest
Subject: RE: DataSources..how to get servlets to work with them?

Its all depends how do you configure your data-source.xml file.

Use the following example

<?xml version="1.0"?>
<!DOCTYPE data-sources PUBLIC "Orion data-sources" "http://www.orionserver.com/dtds/data-sources.dtd">
<data-sources>
        <data-source class="com.evermind.sql.ConnectionDataSource" location="jdbc/VoicePublishDS" connection-driver="oracle.jdbc.driver.OracleDriver" url="jdbc:oracle:oci8:@mydb" password="scott" username="tiger" name="Oracle8i"/>

        <data-source class="com.evermind.sql.OrionPooledDataSource" location="jdbc/VoicePublishDSPool" inactivity-timeout="3600" max-connections="30" min-connections="5" source-location="jdbc/VoicePublishDS" name="Default data-source" max-connect-attempts="3"/>

</data-sources>

In your application.xml include this data-sources.xml.

Kesav Kumar Kolla
Voquette Inc
650 356 3740(W)
510 889 6840(R)
Voquette...Delivering Sound Information



-----Original Message-----
From: Duffey, Kevin [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 26, 2001 10:13 AM
To: Orion-Interest
Subject: DataSources..how to get servlets to work with them?


Ok..I read the OrionSupport and did as it says. It appears that this works:

InitialContext ctx = new InitialContext();
DataSource ds = (DataSource) ctx.lookup("jdbc/MyDS");

The problem is, when I try to get a connection from the datasource, its
telling me I am using an invalid user and password. But, it is the same
username and password we use via direct JDBC 1 calls in our own persistence
layer.

We are using Oracle driver, and hardcoded ips to the database. Any ideas?

Reply via email to