Sorry, the message "No suitable driver" probably means a problem with jdbc
driver.
So if you have into the data-sources.xml the definition:
<data-source
class="com.evermind.sql.DriverManagerDataSource"
name="Hypersonic"
location="jdbc/HypersonicCoreDS"
xa-location="jdbc/xa/HypersonicXADS"
ejb-location="jdbc/HypersonicDS"
connection-driver="org.hsql.jdbcDriver"
username="sa"
password=""
url="jdbc:HypersonicSQL:./database/defaultdb"
inactivity-timeout="30"
/>
you should lookup "jdbc/HypersonicDS", and you should have the driver
classes in your /orion/lib directory.
Giustino
-----Messaggio originale-----
Da: Tom Mitchell [mailto:[EMAIL PROTECTED]]
Inviato: martedì 30 gennaio 2001 12.24
A: Orion-Interest
Oggetto: Re: R: frustrated - jdbc: No suitable driver
Thanks for the reply. That is exactly how I am initializing the context
in my client application:
Hashtable ht = new Hashtable();
ht.put(Context.INITIAL_CONTEXT_FACTORY,
"com.evermind.server.ApplicationClientInitialContextFactory");
ht.put(Context.PROVIDER_URL, "ormi://192.168.1.3");
ht.put(Context.SECURITY_PRINCIPAL, "someUser");
ht.put(Context.SECURITY_CREDENTIALS, "secret");
// Obtain connection
InitialContext ctx = new InitialContext(ht);
DeVincentiis Giustino wrote:
>
> 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
--
Tom Mitchell
[EMAIL PROTECTED]
Very Current Stoneham, MA Weather
http://www.tom.org