tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Savitha Akella <savitha.saraswa...@gmail.com>
Subject Re: Could not find datasource when starting tomcat
Date Mon, 29 Aug 2011 17:36:00 GMT
Hi ,

Usually in the "resource" tag , we define the name parameter as below:

name="jndi/dbName"

Make this change and hopefully it should work.

Thanks

On Mon, Aug 29, 2011 at 10:20 AM, Alaeddine HAOUAS <
a.haouas@nouvellemarque.com> wrote:

> Hi,
>
>
>
> I try to "backup" a java 1.5 web application with servlet/JSP using
> tomcat-6.0.20.
>
>
>
> I am having the following error when starting my tomcat in Eclipse (sysdeo
> plugin v3.2.1) :
>
>
>
> FATAL [main] DatasourceConnectionProvider:47 - Could not find datasource:
> dbName
>
> javax.naming.NameNotFoundException
>
>
>
>
>
> I have read the Context Container documentation to make a correct context
> file. I added a context file 'proto.xml' in conf\catalina\localhost. The
> file content :
>
>
>
> <Context reloadable="true"
> docBase="C:\eclipse\workspace-intranet\sadeteProto\web"
> workDir="C:\eclipse\workspace-intranet\sadeteProto\work" >
>
>
>
>    <Environment name="server.name"                type="java.lang.String"
> value="xxxxx" />
>
>    <Environment name="jdbc.prefix"                type="java.lang.String"
> value="" />
>
>
>
>
>
>                <Resource name="dbName" auth="Container"
> type="javax.sql.DataSource"
>
>    driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
>
>
>
> url="jdbc:sqlserver://xxx.xx.xx.xxx:1433?database=DB_copie&amp;autoReconnect
> =true"
>
>    username="User_DB"
>
>    password="xxx" />
>
>
>
> </Context>
>
>
>
>
>
> In the hibernate config file I have the following property :
>
> <property name="connection.datasource">dbName</property>
>
>
>
>
>
> Any idea how to make the datasource visible for my application ?
>
>
>
> Thanks
>
>
>
>
>
> Alaeddine
>
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message