zoukankan      html  css  js  c++  java
  • elcipse整合spring+hibernate+myeclipse~

    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中指定  
      <jsp-config>
        <taglib>
           <taglib-uri>/tags/struts-html</taglib-uri> 
           <taglib-location>/WEB-INF/struts-html.tld</taglib-location>  
        </taglib>
        <taglib>
           <taglib-uri>/tags/struts-bean</taglib-uri> 
           <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>  
        </taglib>
      </jsp-config>
      在jsp中引用  
    <%@ taglib uri="/WEB-INF/struts-bean.tld"   prefix="bean" %>
    <%@ taglib uri="/WEB-INF/struts-html.tld"   prefix="html" %>

    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下面这个<property>标签

       <property name="mappingResources">
        <list>
         <value>
          com/ssh/beans/po/Customer.hbm.xml
         </value>
        </list>
       </property>

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

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

  • 相关阅读:

    java 线程池
    java 普通内部类和静态内部类
    JVM
    java httpUtil
    maven 常见问题
    计算java对象的内存占用
    HTML5简单入门系列(九)
    HTML5简单入门系列(八)
    HTML5简单入门系列(七)
  • 原文地址:https://www.cnblogs.com/AriLee/p/1999257.html
Copyright © 2011-2022 走看看