Skip to main content



      Home
Home » Language IDEs » ServerTools (WTP) » JSTL 1.1 sql query tag problem
JSTL 1.1 sql query tag problem [message #23279] Sat, 15 May 2004 09:07 Go to next message
Eclipse UserFriend
Originally posted by: bbozek.email.hinet.hr

JSTL 1.1 sql query tag doesn't work with
"com.microsoft.jdbc.sqlserver.SQLServerDriver" driver.
Does somebody have code that works with that driver and jstl sql query tag?

code example:
************************************************************ ***
<sql:setDataSource
var="ds"
driver="com.microsoft.jdbc.sqlserver.SQLServerDriver"

url="jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=EppCM"
user="test"
password="test" />


<sql:query var="books" dataSource="${ds}">
SELECT * FROM EPP_CM
</sql:query>
************************************************************ ****
exception: "java.sql.SQLException: No suitable driver"


My other applications and JSP pages work with same driver just fine on my
Tomcat 5.0 server.

I found on web that some other people have same problem.


Thanks!
Re: JSTL 1.1 sql query tag problem [message #23470 is a reply to message #23279] Sun, 16 May 2004 05:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: annix.sina.com

No suitable driver
Re: JSTL 1.1 sql query tag problem [message #23641 is a reply to message #23279] Mon, 17 May 2004 13:42 Go to previous messageGo to next message
Eclipse UserFriend
This typically means that the jar file that contains the driver is not
on your classpath. First double check that you haven't mistype the
driver name in your driver string. Even better, remove this information
from your JSP and place into a JNDI lookup using the Tomcat
Adminstrator. Then you the JNDI lookup to get your datasource.

The remember that the Microsoft JDBC driver does NOT support any
database, before SQL 2000. If you are trying to connect to an earlier
database, you will get an error. I did not think that this was the error
it would report, but I might be wrong. You might want to try the jTDS
JDBC driver, see http://jtds.sf.net

HTH,

Jeff Duska

BBozek wrote:
> JSTL 1.1 sql query tag doesn't work with
> "com.microsoft.jdbc.sqlserver.SQLServerDriver" driver.
> Does somebody have code that works with that driver and jstl sql query tag?
>
> code example:
> ************************************************************ ***
> <sql:setDataSource
> var="ds"
> driver="com.microsoft.jdbc.sqlserver.SQLServerDriver"
>
> url="jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=EppCM"
> user="test"
> password="test" />
>
>
> <sql:query var="books" dataSource="${ds}">
> SELECT * FROM EPP_CM
> </sql:query>
> ************************************************************ ****
> exception: "java.sql.SQLException: No suitable driver"
>
>
> My other applications and JSP pages work with same driver just fine on my
> Tomcat 5.0 server.
>
> I found on web that some other people have same problem.
>
>
> Thanks!
>
>
Re: JSTL 1.1 sql query tag problem [message #23728 is a reply to message #23641] Tue, 18 May 2004 01:51 Go to previous message
Eclipse UserFriend
Originally posted by: bbozek.email.hinet.hr

I have remove var from setDataSource and dataSource from query tag.
Now everything works fine.
I have spend few hours to found that problem this morning.
Examples I have found on the web obviously wasn't correct.
Thanks for help anyway.
I will test JNDI lookup also.

FIXED CODE
************************************************************ *****
<sql:setDataSource
driver="com.microsoft.jdbc.sqlserver.SQLServerDriver"

url="jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=EppCM"
user="test"
password="test" />

<sql:query var="books" >
SELECT * FROM EPP_CM
</sql:query>
************************************************************ ******

Branko




"Jeff Duska" <Jeff.Duska@noaa.gov> wrote in message
news:c8at3b$mkv$1@eclipse.org...
> This typically means that the jar file that contains the driver is not
> on your classpath. First double check that you haven't mistype the
> driver name in your driver string. Even better, remove this information
> from your JSP and place into a JNDI lookup using the Tomcat
> Adminstrator. Then you the JNDI lookup to get your datasource.
>
> The remember that the Microsoft JDBC driver does NOT support any
> database, before SQL 2000. If you are trying to connect to an earlier
> database, you will get an error. I did not think that this was the error
> it would report, but I might be wrong. You might want to try the jTDS
> JDBC driver, see http://jtds.sf.net
>
> HTH,
>
> Jeff Duska
>
> BBozek wrote:
> > JSTL 1.1 sql query tag doesn't work with
> > "com.microsoft.jdbc.sqlserver.SQLServerDriver" driver.
> > Does somebody have code that works with that driver and jstl sql query
tag?
> >
> > code example:
> > ************************************************************ ***
> > <sql:setDataSource
> > var="ds"
> > driver="com.microsoft.jdbc.sqlserver.SQLServerDriver"
> >
> > url="jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=EppCM"
> > user="test"
> > password="test" />
> >
> >
> > <sql:query var="books" dataSource="${ds}">
> > SELECT * FROM EPP_CM
> > </sql:query>
> > ************************************************************ ****
> > exception: "java.sql.SQLException: No suitable driver"
> >
> >
> > My other applications and JSP pages work with same driver just fine on
my
> > Tomcat 5.0 server.
> >
> > I found on web that some other people have same problem.
> >
> >
> > Thanks!
> >
> >
Previous Topic:May 15 Summary of Web Tools Project Proposal
Next Topic:Problem with FTP client
Goto Forum:
  


Current Time: Sat May 03 07:09:53 EDT 2025

Powered by FUDForum. Page generated in 0.02888 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top