On 10/21/07, satsuma <karijakari@hotmail.com> wrote:
> I'm trying to make simple stateless session bean to connect to PostgreSQL
> database. I've read the instructions at this page:
> http://openejb.apache.org/databases.html
> http://openejb.apache.org/databases.html
>
> When I add the <Resource> tag in the openejb.xml file, I can not start the
> server anymore.
>
> I get the following exceptions:
>
> org.apache.openejb.OpenEJBException: Unable to read OpenEJB configuration
> file at /opt/openejb-3.0-beta-1/conf/openejb.xml: unexpected element
> (uri:"http://www.openejb.org/System/Configuration", local:"Resourse").
Hi,
Read your email again - I'm sure you'll spot the issue ;-) If not,
read on. Hint: read the exception message (it should've been clearer,
but it's clear enough to pinpoint the cause of the issue).
> My openejb.xml looks like this, I have only added the <Resource> tag to the
> end.
The best bet is to use Find feature in your editor. Try to look for
Resource or better yet use grep 'Resource'. I'm sure you'll be
surprised.
> <Resourse id="PostgreSQL Database" type="DataSource">
> JdbcDriver org.postgreql.Driver
> JdbcUrl jdbc:postgresql://localhost/test
> UserName postgres
> Password pass
> </Resourse>
Got it now? I intentionally removed other parts of the configuration
file to get the problem highlighted.
Okey, you asked for a solution, here it is: change Resourse to
Resource (note the doubled 's' which is incorrect). That's it!
Jacek
--
Jacek Laskowski
http://www.JacekLaskowski.pl
|