tomcat的错误及解决方式

1.Error Infomation:
A configuration error occurred during startup.please verify the preference field with the prompt:Tomcat JDK name
没有配置Tomcat的JDK。通过windows.perferences.myEclipse.Application Server.Tomcat.JDK.选择相应的JDK即可。


2.Error Infomation:
to launch an application server,a full jdk(not just a jre) must be specified.
if the selected jre is actually part of a full jdk,please update its configuration to point to the jdk installation root directory,not to its included jre subdirectory.
选择Tomcat的JDK时,不要选择JRE的根目录,选择Java根目录即可。注:JRE根目录需要作为JDK的子目录。

3.Struts Error infomation:
java.lang.NoClassDefFoundError: org/apache/commons/beanutils/Converter
1).在web.xml文件中加上ActionServlet的配置信息
2).确定没有少引用Struts包,特别是common-beanutils.jar
3).可以将struts作为一个完整的包路径进行重新的引用

4.import org.hibernate.cfg.AnnotationConfiguration; //报错
lib . import -> hibernate.annotation.jar.

5.sessionFactory.getCurrentSession().getTransaction().commit();
The method getTransaction() is undefined for the type Session 
产生此问题的情况可能是Hibernate的版本有问题,更替新版本后即可。(默认用MyEclipse带的Hibernate包可能会产生此问题。具体可参考)

getTransaction() - Method in interface org.hibernate. Session
Get the Transaction instance associated with this session.
getTransaction() - Method in interface org.hibernate. StatelessSession
Get the current Hibernate transaction.
getTransaction() - Method in class org.hibernate.impl. SessionImpl getTransaction() - Method in class org.hibernate.impl. StatelessSessionImpl getTransaction() - Method in class org.hibernate.jdbc. JDBCContext getTransaction() - Method in class org.hibernate.transaction. WebSphereExtendedJTATransactionLookup.TransactionManagerAdapter getTransactionCount() - Method in class org.hibernate.jmx. StatisticsService
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值