Hi,
I'd blame JDBC for that one, JDBC is pretty quirky about drivers, and as
a result you need to have hypersonic's driver
in the system classpath (instead of in Orion's lib path). The reason is
that JDBC ignores drivers in "children" classloaders (claims to do so as
a security meassure) regardless of who registered it. So: the
registration is fine (hence no error message),
but when you try to get a Connection instance the DriverManager doesnt
query the Hypersonic source (due to the caller ClassLoader).

Hope that clears things up, we're considering circumviening the
DriverManager altogether to solve this problem in the future (this is one
of the most common "gotcha's" in the setup).

Have a nice day! :)

/Magnus Stenman, the Orion team

----- Original Message ----- 
From: Bernard Sauterel <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, October 29, 1999 2:44 PM
Subject: ejb examples


> Hi.
> 
> Trying to use your "Useless news" example.
> 
> I get the following error message when connecting to ".../news" url:
> 
> 500 Internal Server Error
> 
> javax.ejb.EJBException: Database error: No suitable driver
>         at EntityHomeWrapper1.findByContent(Compiled Code)
>         at __jspPage3._jspService(Compiled Code)
>         at com.evermind.server.http.EvermindHttpJspPage.service(JAX)
>         at com.evermind.server.http.HttpApplication.lv(JAX)
>         at com.evermind.server.http.JSPServlet.service(JAX)
>         at cu.it(JAX)
>         at cu.forward(JAX)
>         at c4.kr(Compiled Code)
>         at c.run(Compiled Code)
> 
> Some points:
> - I think classpath to Hypersonic is ok at least for server (otherwise I
> will
>   got an error message on startup).
> - Do I needs to add class-path to Hypersonic on others configuration
>   files ?
> - Do I needs to create manually a Hypersonic database, and add required
>   tables ?
> 
> Below are my data-sources.xml and orion-ejb-jar.xml configuration file:
> 
> orion-ejb-jar.xml
> 
> <orion-ejb-jar>
> <deployment-version>0.7.9</deployment-version>
> <enterprise-beans>
> <entity>
> <data-source-name>/jdbc/xa/DefaultXADS</data-source-name>
> ...
> 
> data-sources.xml:
> 
> <data-sources>
> <data-source class="com.evermind.sql.ConnectionDataSource"
> location="/jdbc/DefaultDS">
>        <name>Default data-source</name>
>        <description>
>         Hypersonic SQL source.
>        </description>
>        <url>jdbc:HypersonicSQL:defaultdb</url>
>        <connection-driver>hSql.hDriver</connection-driver>
>        <username>sa</username>
>        <password></password>
>       </data-source>
> <data-source class="com.evermind.sql.DefaultConnectionPoolDataSource"
> location="/jdbc/DefaultPooledDS">
> <name>Default ConnectionPool data-source</name>-
> <description></description>
> <source-location>/jdbc/DefaultDS</source-location>
> <username>sa</username>
> <password></password>
> </data-source>
> <data-source class="com.evermind.sql.DefaultXADataSource"
> location="/jdbc/xa/DefaultXADS">
> <name>Default Transactional data-source</name>
> <description></description>
> <source-location>/jdbc/DefaultDS</source-location>
> <username>sa</username>
> <password></password>
> </data-source>
> <data-source class="com.evermind.server.ejb.EJBDataSource"
> location="/jdbc/DefaultEJBDS">
> <name>Default EJB-aware data-source</name>
> <description></description>
> <source-location>/jdbc/xa/DefaultXADS</source-location>
> <username>sa</username>
> <password></password>
> </data-source>
> </data-sources>

Reply via email to