You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by maninder s batth <an...@netscape.net> on 2002/12/03 14:23:24 UTC
DataSource config problem :(
Hi
i spent 7 hours trying to figure out the problem, but no luck, anyone
with leads pls help!!!!!
i have following data source configuration in server.xml
<Resource name="jdbc/NPGnomonDB" auth="Container"
type="javax.sql.DataSource" />
<ResourceParams name="jdbc/NPGnomonDB" >
<parameter><name>factory</name><value>com.ddtek.jdbcx.sqlserver.SQLServerDataSource</value></parameter>
<parameter><name>DatabaseName</name><value>some_Db</value></parameter>
<parameter><name>Password></name><value>sa</value></parameter>
<parameter><name>ServerName></name><value>1.1.1.3</value></parameter>
<parameter><name>User</name><value>sa</value></parameter>
</ResourceParams>
and my web.xml has
<resource-ref>
<description>
Data Source
</description>
<res-ref-name>
jdbc/NPGnomonDB
</res-ref-name>
<res-type>
javax.sql.DataSource
</res-type>
<res-auth>
Container
</res-auth>
</resource-ref>
The class com.ddtek.jdbcx.sqlserver.SQLServerDataSource does implements
javax.sql.DataSource
in my source code i have following lines
Context iCtx = InitialContext();
Context ctx = (Context) iCtx.lookup("java:comp/env");
DataSource ds = (DataSource) ctx.lookup("jdbc/NPGnomonDB");
and i get the following error
javax.servlet.ServletException: javax.naming.NamingException: Could not create resource factory instance, com.ddtek.jdbcx.sqlserver.SQLServerDataSource
at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:146)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:312)
at org.apache.naming.NamingContext.lookup(NamingContext.java:834)
at org.apache.naming.NamingContext.lookup(NamingContext.java:181)
at org.apache.naming.NamingContext.lookup(NamingContext.java:822)
at org.apache.naming.NamingContext.lookup(NamingContext.java:194)
Any leads ??
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: DataSource config problem :(
Posted by maninder s batth <an...@netscape.net>.
Jacob Kjome wrote:
>
> DBCP ultimately wraps your DataSource object.
no it doesnt, if you specify a different factory class DBCP plays no role.
> So, the config is specific to DBCP, not to your implementation of your
> DataSource. Someone please correct me if I am wrong.
yes, the examples given are specific to DBCP's BasicDataSourceFactory
>
>
> Jake
>
> At 06:32 AM 12/3/2002 -0800, you wrote:
>
>> I could be wrong but isnt
>> <parameter><name>username></name><value>sa</value></parameter>
>> specific to dbcp .BasicDataSourceFactory ? I am using
>> SQLServerDataSource and according the docs
>> they specify a param called User whose value should be a user name.
>>
>> Jacob Kjome wrote:
>>
>>>
>>> <parameter><name>User</name><value>sa</value></parameter>
>>>
>>> should be....
>>>
>>> <parameter><name>username</name><value>sa</value></parameter>
>>>
>>> Also, I'm not sure if the names are case sensitive. I suggest using
>>> All lower case just to be sure.
>>>
>>> Jake
>>>
>>> At 05:23 AM 12/3/2002 -0800, you wrote:
>>>
>>>> Hi
>>>> i spent 7 hours trying to figure out the problem, but no luck,
>>>> anyone with leads pls help!!!!!
>>>> i have following data source configuration in server.xml
>>>> <Resource name="jdbc/NPGnomonDB" auth="Container"
>>>> type="javax.sql.DataSource" />
>>>> <ResourceParams name="jdbc/NPGnomonDB" >
>>>> <parameter><name>factory</name><value>com.ddtek.jdbcx.sqlserver.SQLServerDataSource</value></parameter>
>>>>
>>>> <parameter><name>DatabaseName</name><value>some_Db</value></parameter>
>>>> <parameter><name>Password></name><value>sa</value></parameter>
>>>> <parameter><name>ServerName></name><value>1.1.1.3</value></parameter>
>>>> <parameter><name>User</name><value>sa</value></parameter>
>>>> </ResourceParams>
>>>> and my web.xml has
>>>> <resource-ref>
>>>> <description>
>>>> Data Source
>>>> </description>
>>>> <res-ref-name>
>>>> jdbc/NPGnomonDB
>>>> </res-ref-name>
>>>> <res-type>
>>>> javax.sql.DataSource
>>>> </res-type>
>>>> <res-auth>
>>>> Container
>>>> </res-auth>
>>>> </resource-ref>
>>>>
>>>> The class com.ddtek.jdbcx.sqlserver.SQLServerDataSource does
>>>> implements javax.sql.DataSource
>>>>
>>>> in my source code i have following lines
>>>> Context iCtx = InitialContext();
>>>> Context ctx = (Context) iCtx.lookup("java:comp/env");
>>>> DataSource ds = (DataSource) ctx.lookup("jdbc/NPGnomonDB");
>>>>
>>>> and i get the following error
>>>>
>>>> javax.servlet.ServletException: javax.naming.NamingException: Could
>>>> not create resource factory instance,
>>>> com.ddtek.jdbcx.sqlserver.SQLServerDataSource
>>>> at
>>>> org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:146)
>>>>
>>>> at
>>>> javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:312)
>>>>
>>>> at org.apache.naming.NamingContext.lookup(NamingContext.java:834)
>>>> at org.apache.naming.NamingContext.lookup(NamingContext.java:181)
>>>> at org.apache.naming.NamingContext.lookup(NamingContext.java:822)
>>>> at org.apache.naming.NamingContext.lookup(NamingContext.java:194)
>>>>
>>>>
>>>> Any leads ??
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> To unsubscribe, e-mail:
>>>> <ma...@jakarta.apache.org>
>>>> For additional commands, e-mail:
>>>> <ma...@jakarta.apache.org>
>>>
>>>
>>
>> --
>> Your favorite stores, helpful shopping tools and great gift ideas.
>> Experience the convenience of buying online with Shop@Netscape!
>> http://shopnow.netscape.com/
>>
>>
>>
>> --
>> To unsubscribe, e-mail:
>> <ma...@jakarta.apache.org>
>> For additional commands, e-mail:
>> <ma...@jakarta.apache.org>
>
>
--
Your favorite stores, helpful shopping tools and great gift ideas.
Experience the convenience of buying online with Shop@Netscape!
http://shopnow.netscape.com/
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: DataSource config problem :(
Posted by Jacob Kjome <ho...@visi.com>.
DBCP ultimately wraps your DataSource object. So, the config is specific
to DBCP, not to your implementation of your DataSource. Someone please
correct me if I am wrong.
Jake
At 06:32 AM 12/3/2002 -0800, you wrote:
>I could be wrong but isnt
><parameter><name>username></name><value>sa</value></parameter>
>specific to dbcp .BasicDataSourceFactory ? I am using SQLServerDataSource
>and according the docs
>they specify a param called User whose value should be a user name.
>
>Jacob Kjome wrote:
>
>>
>><parameter><name>User</name><value>sa</value></parameter>
>>
>>should be....
>>
>><parameter><name>username</name><value>sa</value></parameter>
>>
>>Also, I'm not sure if the names are case sensitive. I suggest using All
>>lower case just to be sure.
>>
>>Jake
>>
>>At 05:23 AM 12/3/2002 -0800, you wrote:
>>
>>>Hi
>>>i spent 7 hours trying to figure out the problem, but no luck, anyone
>>>with leads pls help!!!!!
>>>i have following data source configuration in server.xml
>>><Resource name="jdbc/NPGnomonDB" auth="Container"
>>>type="javax.sql.DataSource" />
>>><ResourceParams name="jdbc/NPGnomonDB" >
>>><parameter><name>factory</name><value>com.ddtek.jdbcx.sqlserver.SQLServerDataSource</value></parameter>
>>>
>>><parameter><name>DatabaseName</name><value>some_Db</value></parameter>
>>><parameter><name>Password></name><value>sa</value></parameter>
>>><parameter><name>ServerName></name><value>1.1.1.3</value></parameter>
>>><parameter><name>User</name><value>sa</value></parameter>
>>></ResourceParams>
>>>and my web.xml has
>>><resource-ref>
>>><description>
>>>Data Source
>>></description>
>>><res-ref-name>
>>>jdbc/NPGnomonDB
>>></res-ref-name>
>>><res-type>
>>>javax.sql.DataSource
>>></res-type>
>>><res-auth>
>>>Container
>>></res-auth>
>>></resource-ref>
>>>
>>>The class com.ddtek.jdbcx.sqlserver.SQLServerDataSource does implements
>>>javax.sql.DataSource
>>>
>>>in my source code i have following lines
>>>Context iCtx = InitialContext();
>>>Context ctx = (Context) iCtx.lookup("java:comp/env");
>>>DataSource ds = (DataSource) ctx.lookup("jdbc/NPGnomonDB");
>>>
>>>and i get the following error
>>>
>>>javax.servlet.ServletException: javax.naming.NamingException: Could not
>>>create resource factory instance, com.ddtek.jdbcx.sqlserver.SQLServerDataSource
>>> at
>>> org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:146)
>>>
>>> at
>>> javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:312)
>>> at org.apache.naming.NamingContext.lookup(NamingContext.java:834)
>>> at org.apache.naming.NamingContext.lookup(NamingContext.java:181)
>>> at org.apache.naming.NamingContext.lookup(NamingContext.java:822)
>>> at org.apache.naming.NamingContext.lookup(NamingContext.java:194)
>>>
>>>
>>>Any leads ??
>>>
>>>
>>>
>>>
>>>
>>>--
>>>To unsubscribe, e-mail:
>>><ma...@jakarta.apache.org>
>>>For additional commands, e-mail:
>>><ma...@jakarta.apache.org>
>>
>
>--
>Your favorite stores, helpful shopping tools and great gift ideas.
>Experience the convenience of buying online with Shop@Netscape!
>http://shopnow.netscape.com/
>
>
>
>--
>To unsubscribe, e-mail: <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: DataSource config problem :(
Posted by maninder s batth <an...@netscape.net>.
I could be wrong but isnt
<parameter><name>username></name><value>sa</value></parameter>
specific to dbcp .BasicDataSourceFactory ? I am using
SQLServerDataSource and according the docs
they specify a param called User whose value should be a user name.
Jacob Kjome wrote:
>
> <parameter><name>User</name><value>sa</value></parameter>
>
> should be....
>
> <parameter><name>username</name><value>sa</value></parameter>
>
> Also, I'm not sure if the names are case sensitive. I suggest using
> All lower case just to be sure.
>
> Jake
>
> At 05:23 AM 12/3/2002 -0800, you wrote:
>
>> Hi
>> i spent 7 hours trying to figure out the problem, but no luck, anyone
>> with leads pls help!!!!!
>> i have following data source configuration in server.xml
>> <Resource name="jdbc/NPGnomonDB" auth="Container"
>> type="javax.sql.DataSource" />
>> <ResourceParams name="jdbc/NPGnomonDB" >
>> <parameter><name>factory</name><value>com.ddtek.jdbcx.sqlserver.SQLServerDataSource</value></parameter>
>>
>> <parameter><name>DatabaseName</name><value>some_Db</value></parameter>
>> <parameter><name>Password></name><value>sa</value></parameter>
>> <parameter><name>ServerName></name><value>1.1.1.3</value></parameter>
>> <parameter><name>User</name><value>sa</value></parameter>
>> </ResourceParams>
>> and my web.xml has
>> <resource-ref>
>> <description>
>> Data Source
>> </description>
>> <res-ref-name>
>> jdbc/NPGnomonDB
>> </res-ref-name>
>> <res-type>
>> javax.sql.DataSource
>> </res-type>
>> <res-auth>
>> Container
>> </res-auth>
>> </resource-ref>
>>
>> The class com.ddtek.jdbcx.sqlserver.SQLServerDataSource does
>> implements javax.sql.DataSource
>>
>> in my source code i have following lines
>> Context iCtx = InitialContext();
>> Context ctx = (Context) iCtx.lookup("java:comp/env");
>> DataSource ds = (DataSource) ctx.lookup("jdbc/NPGnomonDB");
>>
>> and i get the following error
>>
>> javax.servlet.ServletException: javax.naming.NamingException: Could
>> not create resource factory instance,
>> com.ddtek.jdbcx.sqlserver.SQLServerDataSource
>> at
>> org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:146)
>>
>> at
>> javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:312)
>> at org.apache.naming.NamingContext.lookup(NamingContext.java:834)
>> at org.apache.naming.NamingContext.lookup(NamingContext.java:181)
>> at org.apache.naming.NamingContext.lookup(NamingContext.java:822)
>> at org.apache.naming.NamingContext.lookup(NamingContext.java:194)
>>
>>
>> Any leads ??
>>
>>
>>
>>
>>
>> --
>> To unsubscribe, e-mail:
>> <ma...@jakarta.apache.org>
>> For additional commands, e-mail:
>> <ma...@jakarta.apache.org>
>
>
--
Your favorite stores, helpful shopping tools and great gift ideas.
Experience the convenience of buying online with Shop@Netscape!
http://shopnow.netscape.com/
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: DataSource config problem :(
Posted by Jacob Kjome <ho...@visi.com>.
<parameter><name>User</name><value>sa</value></parameter>
should be....
<parameter><name>username</name><value>sa</value></parameter>
Also, I'm not sure if the names are case sensitive. I suggest using All
lower case just to be sure.
Jake
At 05:23 AM 12/3/2002 -0800, you wrote:
>Hi
>i spent 7 hours trying to figure out the problem, but no luck, anyone with
>leads pls help!!!!!
>i have following data source configuration in server.xml
><Resource name="jdbc/NPGnomonDB" auth="Container"
>type="javax.sql.DataSource" />
><ResourceParams name="jdbc/NPGnomonDB" >
><parameter><name>factory</name><value>com.ddtek.jdbcx.sqlserver.SQLServerDataSource</value></parameter>
><parameter><name>DatabaseName</name><value>some_Db</value></parameter>
><parameter><name>Password></name><value>sa</value></parameter>
><parameter><name>ServerName></name><value>1.1.1.3</value></parameter>
><parameter><name>User</name><value>sa</value></parameter>
></ResourceParams>
>and my web.xml has
><resource-ref>
><description>
>Data Source
></description>
><res-ref-name>
>jdbc/NPGnomonDB
></res-ref-name>
><res-type>
>javax.sql.DataSource
></res-type>
><res-auth>
>Container
></res-auth>
></resource-ref>
>
>The class com.ddtek.jdbcx.sqlserver.SQLServerDataSource does implements
>javax.sql.DataSource
>
>in my source code i have following lines
>Context iCtx = InitialContext();
>Context ctx = (Context) iCtx.lookup("java:comp/env");
>DataSource ds = (DataSource) ctx.lookup("jdbc/NPGnomonDB");
>
>and i get the following error
>
>javax.servlet.ServletException: javax.naming.NamingException: Could not
>create resource factory instance, com.ddtek.jdbcx.sqlserver.SQLServerDataSource
> at
> org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:146)
> at
> javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:312)
> at org.apache.naming.NamingContext.lookup(NamingContext.java:834)
> at org.apache.naming.NamingContext.lookup(NamingContext.java:181)
> at org.apache.naming.NamingContext.lookup(NamingContext.java:822)
> at org.apache.naming.NamingContext.lookup(NamingContext.java:194)
>
>
>Any leads ??
>
>
>
>
>
>--
>To unsubscribe, e-mail: <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>