Ibasis Caused by: java.lang.RuntimeException: JavaBeansDataExchange could not instantiate result class. Cause: java.lang.InstantiationException:解决办法
现象:
Caused by: com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in ibatis-maps/OsobyAdresy.xml.
--- The error occurred while applying a result map.
--- Check the getOsobaById-AutoResultMap.
--- The error occured while instantiating the result object
--- Cause: java.lang.RuntimeException: JavaBeansDataExchange could not instantiate result class. Cause: java.lang.InstantiationException: cz.dynawest.isir.beans.Osoba
at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryWithCallback(MappedStatement.java:204)
at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryForObject(MappedStatement.java:120)
at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlMapExecutorDelegate.java:518)
at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlMapExecutorDelegate.java:493)
at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForObject(SqlMapSessionImpl.java:106)
at com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForObject(SqlMapClientImpl.java:82)
... 9 more
Caused by: java.lang.RuntimeException: JavaBeansDataExchange could not instantiate result class. Cause: java.lang.InstantiationException: cz.dynawest.isir.beans.Osoba
at com.ibatis.sqlmap.engine.exchange.JavaBeanDataExchange.setData(JavaBeanDataExchange.java:108)
at com.ibatis.sqlmap.engine.mapping.result.ResultMap.setResultObjectValues(ResultMap.java:371)
at com.ibatis.sqlmap.engine.mapping.result.AutoResultMap.setResultObjectValues(AutoResultMap.java:57)
at com.ibatis.sqlmap.engine.mapping.statement.RowHandlerCallback.handleResultObject(RowHandlerCallback.java:64)
at com.ibatis.sqlmap.engine.execution.SqlExecutor.handleResults(SqlExecutor.java:385)
at com.ibatis.sqlmap.engine.execution.SqlExecutor.handleMultipleResults(SqlExecutor.java:300)
at com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery(SqlExecutor.java:189)
at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.sqlExecuteQuery(MappedStatement.java:221)
at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryWithCallback(MappedStatement.java:189)
... 16 more
Caused by: java.lang.InstantiationException: cz.dynawest.isir.beans.Osoba
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at com.ibatis.common.resources.Resources.instantiate(Resources.java:302)
at com.ibatis.sqlmap.engine.mapping.result.ResultObjectFactoryUtil.createObjectInternally(ResultObjectFactoryUtil.java:123)
at com.ibatis.sqlmap.engine.mapping.result.ResultObjectFactoryUtil.createObjectThroughFactory(ResultObjectFactoryUtil.java:91)
at com.ibatis.sqlmap.engine.exchange.JavaBeanDataExchange.setData(JavaBeanDataExchange.java:106)
... 24 more
解决办法:增加default constructor
分享到:
相关推荐
在Java应用程序运行过程中,"java.lang.OutOfMemoryError: PermGen space"错误是常见的一个问题,尤其是在使用Tomcat这样的Java应用服务器时。这个错误表明应用程序在 PermGen 区域(Permanent Generation)耗尽了...
标题中的问题“scrcpy投屏 AssertionError: java.lang.reflect.InvocationTargetException”是用户在尝试使用Scrcpy时遇到的一个常见错误。这个错误通常意味着在执行某个方法时,Java运行时环境遇到了未预期的情况。...
Caused by: java.net.UnknownHostException: openapi.alipay.com
08-13 18:29:22.924: E/AndroidRuntime(1875): Caused by: Java.lang.ClassNotFoundException:XXXXX in loader dalvik.system.PathClassLoader[/data/app/XXXX.apk] 我想大家经常因为疏忽出现...
在这个特定的场景中,异常堆栈跟踪显示了 `Caused by: java.lang.ClassNotFoundException: org.apache.commons.collections.Transformer`,这表明系统无法找到 `org.apache.commons.collections.Transformer` 类。...
异常:Caused by: java.lang.IllegalStateException: Method has too many Body parameters Caused by: java.lang.IllegalStateException: Method has too many Body parameters: public abstract ...
在Java编程中,`java.lang.ClassNotFoundException` 是一个常见的运行时异常,通常发生在尝试通过类加载器加载指定类时,但找不到对应的字节码文件。在这个特定的问题中,`ClassNotFoundException` 引发的原因是缺少...
在这个特定的场景中,异常堆栈跟踪显示 `Caused by: java.lang.ClassNotFoundException: org.objectweb.asm.Type`,这表明在运行时,系统无法找到`org.objectweb.asm.Type`这个类。`org.objectweb.asm` 是一个用于...
"java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver" 解决方案 [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket. 解决了jsp连接 sql server 2000的问题
在Java编程中,`java.lang.ClassNotFoundException`是一个常见的运行时异常,它表示JVM尝试加载一个类时,找不到对应的.class文件。在这个特定的错误中,我们看到的是`org.apache.commons.dbcp.BasicDataSource`,这...
然而,当你遇到“javax.net.ssl.SSLException: java.lang.RuntimeException: Could not generate DH keypair”的错误时,这意味着在建立SSL/TLS连接时,Diffie-Hellman(DH)密钥交换算法遇到了问题。DH是一种非对称...
在Java 6、7和8中,Java平台的标准版(Java SE)包含了Java企业版(Java EE)的一些API,如JAXB(Java Architecture for XML Binding)。然而,从Java 9开始,为了实现模块化并提高系统的可维护性和安全性,Java EE...
java.lang.NoSuchFieldError: Companion 问题的解决方案
### 错误解析:Caused by: android.system.ErrnoException: write failed: ENOSPC (No space left 在Android开发过程中,可能会遇到“Caused by: android.system.ErrnoException: write failed: ENOSPC (No space ...
Caused by: java.lang.RuntimeException: javax.management.remote.JMXServerErrorException: java.lang.AssertionError: Registered more than one instance with the same objectName : com.bea:Name=wl04,Type=...
### java.lang.UnsupportedClassVersionError: Bad version number in .class file 异常的解决办法 #### 一、问题概述 在使用MyEclipse进行Java开发的过程中,可能会遇到`java.lang.UnsupportedClassVersionError:...
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory 需要jar log4j-1.2.16.jar slf4j-api-1.6.1.jar slf4j-log4j12-1.6.1.jar