java常见错误

1、org.apache.commons.dbcp.basicdatasource not found  缺少包:commons-dbcp.jar,commons-pool.jar  
  在spring-framework-2.0.1-with-dependencies\spring-framework-2.0.1\lib\jakarta-commons目录下导入即可。
2、项目myeclipse 的add and remove project deployments 不能执行:需要通过Add重新添加jdk,这里需要另起一个名称,jdk5.x,否则会出现错误。
3、hibernate.cfg.xml,applicationContext.xml配置文件可通过myeclipse生成,注意其路径都在src根目录下。
4、/hibernate.cfg.xml找不到,是其配置文件有误,仔细查看。
5、JSPException,请导入相应的数据驱动包。

6、ISO-8859-4无法保存错误:myeclipse的属性:files and edits 中所有jsp、php等选择为FTP-8即可。

7、struts标签库无法识别:myeclipse的属性,添加add struts capablities即可。

8、org.springframework.orm.hibernate3.hibernatesupport not found:

  缺少包:spring-hibernate3.jar 

  在spring-framework-2.0.1-with-dependencies\spring-framework-2.0.1\dist\modules导入其下边的spring-hibernate3.jar包即可。

9、在eclipse中启动tomcat时出现的问题:
严重: Exception during cleanup after start failed
LifecycleException: Container StandardContext[/MAMIS.myeclipse.bak] has not been started
解决方案:
把tomcat下conf里(\Tomcat 5.0\conf\Catalina\localhost)的相应文件删了就行了。
实在不行:连同\Tomcat 5.0\webapps和\Tomcat 5.0\work下的都删了。

10、用myeclipse布置struts报错  
  org.apache.jasper.JasperException:  
  This absolute uri (http://jakarta.apache.org/struts/tags-bean) cannot be resolved in either web.xml or the jar files deployed with this application  

解决方案:

你的jsp中的taglib配置不对,http://jakarta.apache.org/struts/tags-bean这个链接已经被删除了  
  可以手动配置在struts的开发包中找到struts-html.tld文件,将他放到WEB-INF/tlds目录下面  
  在web.xml中指定  
 
 
  /tags/struts-html  
  /WEB-INF/struts-html.tld  
 
 
  /tags/struts-bean  
  /WEB-INF/struts-bean.tld  
 
 
  在jsp中引用  



11、P Status 404 - Servlet action is not available

解决方法: 

type Status report

message Servlet action is not available

description The requested resource (Servlet action is not available) is not available.

问题原因:

1.、web.xml文件中未配置ActionServlet。

2、struts-config.xml文件未配置你要访问的Action。

3、你的jsp文件form标记中action属性的路径名称错误。

4、非以上三种情况。

针对以上4种情况相应的解决方案如下:

1、在web.xml文件中加上ActionServlet的配置信息

  action
  org.apache.struts.action.ActionServlet
  config
  /WEB-INF/struts-config.xml

2、在struts-config.xml文件检查你要访问的Action配置文件。

3、检查jsp文件form标记中action属性的路径名称是否与struts-config.xml文件中action标记的path属性的路径名称一致。

4、非以上情况的解决办法就是检查web容器的log日志,如果时tomcat则检查下logs目录下的localhost_log文件,看里边是否记录有错误信息,然后根据错误信息提示将其纠正。

5、解决找不到Action问题 
HTTP Status 404 - Servlet action is not available

type Status report

message Servlet action is not available

description The requested resource (Servlet action is not available) is not available.
Apache Tomcat/5.0.28

就是找不到我们的action。

去掉applicationContext.xml下面这个标签

 
 
 
  com/ssh/beans/po/Customer.hbm.xml
 
 
 

问题在于构件路径(lib)内的包重叠(提示:前提是你要保证这个问题出现之前都正常),所以你要确定构建路径里的包不能重复!

建议:在导入包时,按照默认导入,不要把所有的包都导进工程,在操作中在把需要的jar包导进去(最好不要把整个liberaries导进去),这样即可以减小工程的大小,又能确保struts\spring\hibernate之间的包不会重叠或者被替换。

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/16956283/viewspace-598211/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/16956283/viewspace-598211/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值