ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bob <gnomek...@gmail.com>
Subject Re: sql server 2k parameterized queries
Date Thu, 23 Mar 2006 08:54:51 GMT

On 23/03/06, Bruce Wexler <bwexler@massconnections.com> wrote:
> Caused by: com.ibatis.dao.client.DaoException: Failed to queryForPaginatedList - id [getProductListByCategory],
parameterObject [DOGS], pageSize [4].  Cause: com.ibatis.common.jdbc.exception.NestedSQLException:
> --- The error occurred in com/ibatis/jpetstore/persistence/sqlmapdao/sql/Product.xml.
> --- The error occurred while applying a parameter map.
> --- Check the getProductListByCategory-InlineParameterMap.
> --- Check the statement (query failed).
> --- Cause: java.sql.SQLException: [DataDirect][SQLServer JDBC Driver][SQLServer]Invalid
object name 'PRODUCT'.

I'm no expert, but to me that indicates that it is connecting to the
server and sending the query.  The query is then coming back
suggesting that SQL server had a problem with the request.  In this
case, it is suggesting to me that it cannot find the PRODUCT table.

I would check three things...
1) Are you connecting to the correct server / table
2) Does the user you are connecting as have permissions to execute
that query (I assume it does since you seem to be using sa)
3) Is the default table for your user the table you want to use

Try using SQL Profiler to track what query is being made to the
server, then Query Analyser to log in and check if you actually do
have permissions to run that query.

> database.properties file:
> driver=com.ddtek.jdbc.sqlserver.SQLServerDriver

One other difference is that I am using the driver

I'm also setting up the data source in tomcat's server.xml - but I
guess thats not going to be your problem


View raw message