都是夏昕电子书上的例子,报错如下:
javax.servlet.ServletException:
--- The error occurred in user.xml.
--- The error occurred while applying a parameter map.
--- Check the getUser-InlineParameterMap.
--- Check the parameter mapping for the 'name' property.
--- Cause: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]The specified SQL type is not supported by this driver.
org.springframework.web.servlet.FrameworkServlet.serviceWrapper(FrameworkServlet.java:402)
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:355)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
javax.servlet.ServletException:
--- The error occurred in user.xml.
--- The error occurred while applying a parameter map.
--- Check the getUser-InlineParameterMap.
--- Check the parameter mapping for the 'name' property.
--- Cause: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]The specified SQL type is not supported by this driver.
org.springframework.web.servlet.FrameworkServlet.serviceWrapper(FrameworkServlet.java:402)
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:355)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
2个例子我单独运行都成功了,上面那个例子上我把这2个例子综合了下,就是判断数据库里有没有输入的用户名和密码。
真的很谢谢了
请具体指出来好吗?
这句改成
li=(LoginInfo)sqlMap.queryForObject("getUser",user);试试
例外根据抱错,应该是SQL类型不支持,贴出你的loginInfo BEAN来
[email protected]