Jdbctemplate.queryforobject (String, object[], class<string>) hints that the dataaccessexception must be introduced

Source: Internet
Author: User
Tags aop

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.