- 浏览: 1330787 次
- 性别:
- 来自: 北京
文章分类
最新评论
-
kay11:
...
JAVA生成简单的随机字符串(a-zA-Z0-9) -
zhangliguoaccp:
您好关于登录页面的验验证码这块怎么解决的?还有登录成功后,跳转 ...
JAVA,模拟HTTP登录 -
107x:
不错,谢谢!
<c:foreach 循环 map -
wenjin:
不知楼主是不还在想请叫一下我自己开的Tomcat下载一个文件C ...
Android 下载文件及写入SD卡 -
zyywgf:
JSTL c标签,fn标签,fmt标签
org.hibernate.InstantiationException: Cannot instantiate abstract class or interface: com.ssh.po.Operator at org.hibernate.tuple.PojoInstantiator.instantiate(PojoInstantiator.java:78) at org.hibernate.tuple.PojoInstantiator.instantiate(PojoInstantiator.java:100) at org.hibernate.tuple.entity.AbstractEntityTuplizer.instantiate(AbstractEntityTuplizer.java:351) at org.hibernate.persister.entity.AbstractEntityPersister.instantiate(AbstractEntityPersister.java:3606) at org.hibernate.impl.SessionImpl.instantiate(SessionImpl.java:1275) at org.hibernate.impl.SessionImpl.instantiate(SessionImpl.java:1264) at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1299) at org.hibernate.loader.Loader.getRow(Loader.java:1206) at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:580) at org.hibernate.loader.Loader.doQuery(Loader.java:701) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236) at org.hibernate.loader.Loader.doList(Loader.java:2220) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104) at org.hibernate.loader.Loader.list(Loader.java:2099) at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378) at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338) at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121) at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79) at com.ssh.dao.impl.LoginDAOImpl.isOperator(LoginDAOImpl.java:40) at com.ssh.manager.impl.LoginManagerImpl.isOperator(LoginManagerImpl.java:24) at com.ssh.action.LoginAction.execute(LoginAction.java:51) at org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58) at org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67) at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51) at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190) at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304) at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190) at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Unknown Source)
org.hibernate.InstantiationException: Cannot instantiate abstract class or interface: com.ssh.po.Operator(实例化Operator的出错了)
说明下项目中的几个class或者interface:
(1)public abstract class Operator implements java.io.Serializable {...}
(2)public class OperatorImpl extends Operator implements java.io.Serializable{..}
最终需要instance的应该是OperatorImpl而不是Operator,故在操作数据库的SQL中应用OperatorImpl类。
程序修改代码由:
hql = "from Operator t where t.operatorName = ? ";
变为:
hql = "from OperatorImpl t where t.operatorName = ? ";
发表评论
-
Spring 和JFreeChart 用出现Unable to validate using XSD
2012-08-09 17:31 1770错误显示: 信息: XML validation disab ... -
web.xml不认<taglib>解决办法:
2012-07-11 15:24 961在web.xml不认<taglib>解决办法: ... -
Portal服务器,Portlet容器,Portlet 的区别
2011-08-24 17:06 1646这里所说的Portal是指JCP-JSR168规范所描述的 ... -
AMF,RTMP,RTMPT,RTMPS(转)
2011-04-28 13:10 19211. AMF AMF(是Action Message F ... -
web.xml 中的listener,filter,servlet 加载顺序
2011-04-22 13:35 1103首先,加载顺序与它们 ... -
JDOM修改XML中指定节点的内容
2011-03-21 09:45 2187UpdateXML 写道 package com.util; ... -
SSH配置多个数据源
2011-01-18 16:35 9885SSH配置多个数据源 1. 编写hibernate的数据库配 ... -
SSH中调用存储过程
2010-12-29 08:46 5572SSH中调用带返回结果集的存储过程: public clas ... -
HibernateDaoSupport与JdbcDaoSupport总结
2010-12-28 13:56 1334Spring框架中Dao支持总结:Dao 的支持类可以有 ... -
DBCP,CP30及proxool连接池在spring+hibernate中的配置
2010-12-22 17:08 5924用spring默认的连接池性能效率不高, 如果数据库重启, 应 ... -
IP过滤DEMO
2010-11-01 15:59 1266import java.io.IOException; im ... -
FCKEditor Demo
2010-11-01 15:56 1991FCKEditor 的官方下载: http://source ... -
htmlunit带框架的简单处理测试demo
2010-07-07 14:58 3742package com.htmlunit.test; i ... -
模式在SSH中的简单举例
2010-05-17 14:37 1103闲着没事,瞎想,回想了几个简单的模式在SSH的应用。有不对的还 ... -
AspectJ入门 安装及简单使用
2010-05-15 19:20 7099一、下载安装 1. download http: ... -
org.apache.commons.lang.RandomStringUtils
2010-05-05 09:01 2015来自包:apache的commons-lang.jar包下载: ... -
spring字符集过滤器配置
2010-05-04 14:53 2630<!-- spring的字符集过滤器 --> ... -
org.hibernate.hql.ast.QuerySyntaxException: ? is not mapped
2010-05-03 21:52 41292010-5-3 21:48:23 org.apache.ca ... -
java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit
2010-05-03 21:32 4196MyEclipse 开发 SSH 整合时 java.la ... -
JTA事务(转)
2010-04-30 16:33 9500JTA:Java Transaction API ...
相关推荐
class AbstractEmployee(ABC): def __init__(self, first, last): self.firstName = first self.lastName = last @abstractmethod def earnings(self): pass ``` 在这个例子中,`AbstractEmployee` 类是一个...
<br> 测试代码完成测试 <br> 报错:Cannot instantiate class: org.jnp.interfaces.NamingContextFactory <br> 添加 引用 <br>继续报错是因为JNDI访问名称错误,也是用了原来的那个了。哈哈。...
### Tomcat移植到WebLogic问题及解决方法 #### 背景 在IT项目开发过程中,经常需要将现有的应用程序从一种应用服务器环境移植到另一种环境中。例如,将使用Tomcat作为应用服务器的Java Web应用程序移植到WebLogic...
throw new Error('Cannot instantiate abstract class!'); } } AbstractClass.prototype.abstractMethod = function() { throw new Error('Method must be implemented in subclass!'); }; ``` 接口(Interface...
MyBatis Generator (MBG) 是一个强大的工具,它允许开发者自动生成MyBatis的映射文件、模型类和DAO接口。在Eclipse环境中,MBG通常以插件的形式存在,便于开发人员集成到他们的开发流程中。"mybatis.generator ...
**Answer**: An abstract class cannot be instantiated directly because it contains one or more abstract methods, and Java does not provide a constructor for abstract classes. When you attempt to create...
To make use of the interface, create a class called BurpExtender which implements one or more methods of the interface, and place this into the application's classpath at startup. For example, if burp...
在Unity3D游戏开发中,Prefabs(预设)和Instantiate(实例化)是两个非常重要的概念,它们是构建游戏对象和动态管理游戏世界的基石。本文将深入探讨这两个概念,帮助初学者理解并掌握它们在实际项目中的应用。 ...
Unity3D Prefabs 与 Instantiate 教程 Unity 3D 中的 Prefabs 是一种资源类型,可以被重复使用的游戏对象。它可以被置入多个场景中,又或者能够在一个场景中被多次置入。当你在一个场景中增加一个 Prefabs,你就...
MyBatis Generator(MBG)是MyBatis框架的一个实用工具,它自动化了数据库到Java对象的代码生成过程,极大地简化了开发工作。MBG能够根据数据库表结构自动生成Java实体类、Mapper接口和XML映射文件,以及Service和...
throw new Error("Cannot instantiate abstract class!"); } } // 抽象方法示例 _abstractmethod() { throw new Error("This method must be implemented in derived classes."); } } ``` 在这里,我们检查...
把下载的jar包放在 Maven仓库的 org\mybatis\generator\mybatis-generator-core\1.3.5 下面即可,然后在generatorConfig配置文件中加上 </plugin> 即可
public class LoggingAspect { @Before("execution(* com.example.service.*.*(..))") public void logBefore(JoinPoint joinPoint) { // 日志记录代码 } @AfterReturning("execution(* com.example.service....
本文实例为大家分享了Unity中Instantiate实例化物体卡顿问题的解决方法,供大家参考,具体内容...public class Test : MonoBehaviour { public GameObject prefab; private void Update() { if (Input.GetKeyDown
composer require bizley/deep-instantiate:^1.0 用法 直接-只需调用new \Bizley\DeepInstantiate\Container() 。全局-设置\Yii::$container = new \Bizley\DeepInstantiate\Container();在您的输入脚本中。 增强...
throw new InstantiationException("Cannot instantiate this class."); } } ``` 5. **JVM序列化机制与单例**: 如果单例类实现了`Serializable`接口,那么在反序列化时可能会创建新的实例。为了避免这种情况...
This allows you to define the type of objects to create while letting subclasses decide which class to instantiate. It lets you decouple the creation of objects from their usage by providing a ...
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/...
console.log('You cannot instantiate BaseClass directly.'); } } } class DerivedClass extends BaseClass {} new BaseClass(); // 输出:You cannot instantiate BaseClass directly. new DerivedClass(); /...
nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator]: ...