Try initializing the context this way:
...
Properties props = new Properties();
props.setProperty("java.naming.factory.initial","com.evermind.server.Applica
tionClientInitialContextFactory");
props.setProperty("java.naming.provider.url", "ormi://localhost/app-name");
props.setProperty("java.naming.security.principal", "admin");
props.setProperty("java.naming.security.credentials", "123");
InitialContext ctx = new InitialContext(props);
...
Giustino De Vincentiis
-----Messaggio originale-----
Da: Tom Mitchell [mailto:[EMAIL PROTECTED]]
Inviato: martedì 30 gennaio 2001 1.23
A: Orion-Interest
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Oggetto: frustrated - jdbc: No suitable driver
Hi All,
I am used to WebLogic, so please pardon my ignorance...
I am trying to get my WebLogic application to run on Orion.
I have a DataSource set up to PostgreSql. It seems OK because this
Orion JSP works fine:
InitialContext ctx = new InitialContext();
out.print("<br>Context: " + ctx);
DataSource ds = (DataSource) ctx.lookup("jdbc/DefaultDS");
Connection conn = ds.getConnection();
// Create query and get results
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("select count(*) FROM
weathersnapshots");
// List results
while ( rs.next() ) {
out.println( "<br>" + rs.getObject(1) + "<br>");
}
// Close connection - important!
conn.close();
This runs fine and gives me the count of rows in the table.
When I try to get the standalone client to the same DataSource to run, I
get this:
Context: javax.naming.InitialContext@316e52
Exception in thread "main" java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at com.evermind.sql.DriverManagerDataSource.getConnection(JAX)
at Test.main(Test.java:18)
No errors appear on the server's console. I can not imagine why I would
want to have a DB driver's jar in my client's classpath (ALTHOUGH I HAVE
TRIED THAT).
I have an application-client.xml:
<application-client>
</application-client>
I have scoured the list archives and can not find the solution.
Remember, within the container, it runs fine. It is the standalone app
that does not work.
Using:
Orion 1.4.5
JDK 1.3
Win2K
Thanks in advance.
--
Tom Mitchell
[EMAIL PROTECTED]
Very Current Stoneham, MA Weather
http://www.tom.org