org.springframework.jdbc.UncategorizedSQLException: ConnectionCallback; uncategorized SQLException for SQL []; SQL state [null]; error code [0]; java.lang.InstantiationException: cn.at.bean.domain.ConstantInt; nested exception is java.sql.SQLException: java.lang.InstantiationException: cn.at.bean.domain.ConstantInt
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:83)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:349)
at cn.at.mo.framework.dao.AbstractStorage.execute(AbstractStorage.java:133)
at cn.at.mo.framework.dao.AbstractStorage.execute(AbstractStorage.java:168)
at cn.at.mo.framework.dao.AbstractStorage.executeQuery(AbstractStorage.java:93)
at cn.at.mo.framework.dao.dao.impl.AbstractDao.findBySql(AbstractDao.java:367)
at cn.at.dao.ConstantIntDao.getCommentId(ConstantIntDao.java:43)
at cn.at.dao.TestConstantIntDao.testGetCommentId(TestConstantIntDao.java:41)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:83)
at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:231)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:88)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:174)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: java.sql.SQLException: java.lang.InstantiationException: cn.at.bean.domain.ConstantInt
at cn.at.mo.framework.dao.CrudBuilder.from(CrudBuilder.java:471)
at cn.at.mo.framework.dao.dao.impl.AbstractDao.from(AbstractDao.java:398)
at cn.at.mo.framework.dao.dao.impl.AbstractDao$5.execute(AbstractDao.java:371)
at cn.at.mo.framework.dao.AbstractStorage$5.execute(AbstractStorage.java:102)
at cn.at.mo.framework.dao.AbstractStorage$8.execute(AbstractStorage.java:172)
at cn.at.mo.framework.dao.AbstractStorage$7.doInConnection(AbstractStorage.java:136)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:342)
... 36 more
Caused by: java.lang.InstantiationException: cn.at.bean.domain.ConstantInt
at java.lang.Class.newInstance0(Class.java:357)
at java.lang.Class.newInstance(Class.java:325)
at cn.at.mo.framework.dao.CrudBuilder.from(CrudBuilder.java:426)
... 42 more
 
每个bean对象 都应该有一个默认无参数的构造方法 负责查询的时候 通过反射的方式实例化的时候 就会抛出无法实例化的情况  

Caused by: java.lang.InstantiationException: cn.at.bean.domain.ConstantInt的更多相关文章

  1. java.lang.NoSuchMethodException: cn.pb.bean.Category.<init>()报错

    代码如下: package cn.pb.bean; import java.util.ArrayList;import java.util.List; /** * 分类的实体类 */public cl ...

  2. 整合spring boot时操作数据库时报错Caused by: java.lang.InstantiationException: tk.mybatis.mapper.provider.base.B

    原文:https://blog.csdn.net/u__f_o/article/details/82756701 一般出现这种情况,应该是没有扫描到对应的mapper包,即在启动类下配置MapperS ...

  3. Caused by: java.lang.UnsupportedClassVersionError: com/zy/example/domain/Student : Unsupported major.minor version 51.0

    JVM的版本比jdk的版本老,即JVM的版本低于jdk的版本.换个新版本的就可以解决问题.

  4. Error invoking SqlProvider method (com.github.abel533.mapper.MapperProvider.dynamicSQL). Cause: java.lang.InstantiationException: com.github.abel533.mapper.MapperProvider

    org.apache.ibatis.exceptions.PersistenceException: ### Error querying database.  Cause: org.apache.i ...

  5. Caused by: java.lang.ClassNotFoundException: Could not load requested class :XXX.XXX.XXX 异常处理

    在ssh整合中:出现的异常 Exception sending context initialized event to listener instance of class org.springfr ...

  6. Spring.之.报错:Caused by: java.lang.IllegalArgumentException: No Spring Session store is configured: set the 'spring.session.store-type' property

    Spring.之.报错 No Spring Session store is configured springboot在启动的时候报如下错误: Error starting ApplicationC ...

  7. Caused by: java.lang.NoSuchMethodError: javax.persistence.spi.PersistenceUnitInfo.getValidationMode

    进行 spring mvc jpa整合时.Junit方法测试时. 异常: org.springframework.beans.factory.BeanCreationException: Error ...

  8. 异常:Caused by: java.lang.NoClassDefFoundError: Could not initialize class net.sf.log4jdbc.Properties

    参考文章: 使用Log4jdbc-log4j2监听MyBatis中运行的SQL和Connection 使用 log4jdbc格式化输出SQL,maven配置如下: <dependency> ...

  9. Caused by: java.lang.NoClassDefFoundError: freemarker/cache/TemplateLoader

    1.错误描写叙述 usage: java org.apache.catalina.startup.Catalina [ -config {pathname} ] [ -nonaming ] { -he ...

随机推荐

  1. A1014. Waiting in Line

    Suppose a bank has N windows open for service. There is a yellow line in front of the windows which ...

  2. (转)基于http协议的api接口对于客户端的身份认证方式以及安全措施

    由于http是无状态的,所以正常情况下在浏览器浏览网页,服务器都是通过访问者的cookie(cookie中存储的 jsessionid)来辨别客户端的身份的,当客户端进行登录服务器也会将登录信息存放在 ...

  3. [luogu3294][背单词]

    题目链接 题意 读完题目就一个感受:这出题人tm不会说人话吗.真的感觉这个题理解题意比想出正解更难. 其实题目的意思就是,给出一些单词,给这些单词编个号,然后要求其他的单词中是这个单词后缀的词都在这个 ...

  4. Runtime.getRuntime().exec(...),当参数中有空格时!

    原以为不会有什么问题,但在测试时发现,问题大了. 如果想调用f:\mp3\i love you.mp3时, 我原以为正确的写法是: //在文件名前后加个双引号来解决文件名中有空格的情况 String ...

  5. 在android模拟器上http 链接的图片地址可能不会显示

    AndroidStudio将targetSDK升为28后,http请求会无反应.Google表示,为保证用户数据和设备的安全,针对下一代 Android 系统(Android P) 的应用程序,将要求 ...

  6. Windows android SDK环境配置及判断安装成功

  7. RPC与REST的区别

    https://blog.csdn.net/douliw/article/details/52592188 RPC是以动词为中心的, REST是以名词为中心的, 此处的 动词指的是一些方法, 名词是指 ...

  8. Luogu P3355 骑士共存问题

    题目链接 \(Click\) \(Here\) 二分图最大独立集.对任意两个可以相互攻击的点,我们可以选其中一个.对于不会互相攻击的,可以全部选中.所以我们只需要求出最大匹配,根据定理,二分图最大独立 ...

  9. (字典序问题) nyoj1542-最小字符串

    题目描述: 给你一个由小写字母组成的字符串,最多删除其中一个字符,使其字典序最小. 字典序概念在数学中,字典或词典顺序(也称为词汇顺序,字典顺序,字母顺序或词典顺序)是基于字母顺序排列的单词按字母顺序 ...

  10. php php-fpm安装 nginx配置php

    centos 6.2 linux下安装php5.6.6源码 PHP在 5.3.3 之后已经把php-fpm并入到php的核心代码中了. 所以php-fpm不需要单独的下载安装.要想php支持php-f ...