Today when using Spring4 found no Jdbctemplate.queryforint (String, object[]) method, Baidu only after the original spring after 3.2.2 no longer use queryForInt () and queryForLong () and other methods. Then, switch to JdbcTemplate. queryForObject (String, object[], class<string>), the result is an error problem, prompted to introduce the DataAccessException class:
Baidu has a few posts to find this class (DataAccessException) in what jar package: Spring-tx-xxx.jar
Record this question is to feel a post of the question way is worth learning, share to everyone to see:
Attached link:http://stackoverflow.com/questions/17008764/ Spring-jdbc-giving-error-queryforobjectstring-object-classstring-from
* Finally paste the Spring jar package function explained here for easy viewing later:
Spring Aop:spring's aspect-oriented programming, which provides AOP (aspect-oriented programming) implementations
The integration of the ASPECTJ framework provided by Spring Aspects:spring
The basic implementation of the Spring beans:spring IOC includes access to configuration files, creation and management of beans, and so on.
Spring Context: Provides extended services on basic IOC capabilities, plus support for many enterprise-class services, such as mail services, task scheduling, jndi positioning, EJB integration, remote access, caching, and multiple view layer frameworks.
Spring Context Support:spring Context's extended support for MVC.
Core Toolkit for Spring core:spring
Spring expression:spring Expression Language
Spring Framework Bom:
Spring Instrument:spring Proxy interface to the server
Spring Instrument tomcat:spring Integration of the TOMCAT connection pool
Spring JDBC: A simple package for JDBC
Spring JMS: A simple package for simplifying the use of the JMS API
Spring Messaging:
Spring ORM: Integration of third-party ORM implementations, such as HIBERNATE,IBATIS,JDO and the JPA implementation of spring
Spring oxm:spring support for Object/xml mappings allows you to switch back and forth between Java and XML
Spring Test: A simple package for a test framework such as JUnit
Spring TX: Consistent declarative and programmatic transaction management for JDBC, Hibernate, JDO, JPA, and more.
Spring Web: Contains the core classes required to use the spring framework when developing web apps, including classes that automatically load Webapplicationcontext attributes, struts and JSF integration classes, File upload support classes, filter classes, and a large number of tool helper classes.
Spring WEBMVC: Contains all classes related to the SPRINGMVC framework. Contains Freemarker, JasperReports, Tiles, Velocity, and XSLT related classes for internationalization, labeling, Theme, view presentation. Of course, if your app uses a stand-alone MVC framework, you don't need any classes in this jar file.
Spring WEBMVC portlet:spring MVC Enhancements
Spring WebSocket:
Jdbctemplate.queryforobject (String, object[], class<string>) hints that the dataaccessexception must be introduced