Myeclipse无法修改web-context-root问题 1C

拷贝web项目重命名之后想修改web-context-root好通过tomcat部署项目,使用Myeclipse通过properties找到web下的web-context-root却无法修改。Myeclipse2015不行,又装了个Myeclipse2016也不行(破解版)。
看学习视频,讲师们弄的都没问题,怎么我的软件点了却修改不了。
急急急!蛋疼

2个回答

图片说明 我这个是jboss不能修改这个context-root的问题,直接在.mymetadata里面改

图片说明

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
MyEclipse2016修改Web Context-root
MyEclipse2016中如何修改Web Context-root?
myeclipse8.5中启动web项目时报的错误
在myeclipse中的web项目,启动tomcat时发生下面的错误,请大侠们指导一下: 严重: Exception sending context initialized event to listener instance of class org.springframework.web.util.Log4jConfigListener java.lang.IllegalStateException: Web app root system property already set to different value: 'tysp.root' = [D:\tomcat\webapps\ROOT\] instead of [D:\tomcat\webapps\ROOT.myeclipse.bak\] - Choose unique values for the 'webAppRootKey' context-param in your web.xml files!
myeclipse的项目部署问题
我在myeclipse里面将项目A拷贝为一个新项目B,并重新设置了web context-root;但是每次部署tomcat时都要先把项目A部署才能部署项目B,这是为什么?
用xfixe开发webservice服务端,发布到weblogic9.1 控制台报错
而发布到tomcat5.5可以的 (已上网查资料三天) 这个问题已困扰我三天了。 开发环境:myeclipse6.0.1(用向导XFire1.2 Core Libraries+spring-1.2.6jar)+jdk1.5+weblogic9.1(自带jdk1.5) 工程lib下已加了webservices.jar和weblogic.jar 其中:http://localhost:7001/myJms/services/myJms?wsdl可以看到WSDL格式 weblogic(已破解)我建的domains是jms 附件里是我做的myJms项目,暂时只做了webserice服务端的. myEclipse里->file->new-> web service project 项目名称为myJms,再在这个项目上的src右键->new others->web services->单选 web service(服务端)->next->Create web service from Java bean...同时勾选上Create new Java bean->next->Web service name 我写的myJms 在Java Package 我New的包是cn.com.hgeagle.rescue.ws->finish [img]/upload/attachment/92394/18c013a6-3f11-3618-b855-bf1c4842463f.jpg[/img] 自动生成的java代码是 package cn.com.hgeagle.rescue.ws; public class myJmsImpl implements ImyJms { public String example(String message) { return message; } } package cn.com.hgeagle.rescue.ws; public interface ImyJms { public String example(String message); } 在WebRoot/WEB-INF文件夹下的web.xml代码是: <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <!-- --> <context-param> <param-name>contextConfigLocation</param-name> <param-value>   classpath:org/codehaus/xfire/spring/xfire.xml,/WEB-INF/applicationContext.xml </param-value> </context-param> <!-- --> <listener> <listener-class> org.springframework.web.context.ContextLoaderListener   </listener-class> </listener> <servlet> <servlet-name>XFireServlet</servlet-name> <servlet-class>org.codehaus.xfire.transport.http.XFireConfigurableServlet</servlet-class> <load-on-startup>0</load-on-startup> </servlet> <servlet-mapping> <servlet-name>XFireServlet</servlet-name> <url-pattern>/services/*</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> </web-app> 在WebServices文件夹下 services.xml为 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://xfire.codehaus.org/config/1.0"> <service> <name>myJms</name> <serviceClass>cn.com.hgeagle.rescue.ws.ImyJms</serviceClass> <implementationClass> cn.com.hgeagle.rescue.ws.myJmsImpl </implementationClass> <style>wrapped</style> <use>literal</use> <scope>application</scope> </service></beans> [img]/upload/attachment/92236/b0faf548-b7fd-3aa6-8556-876e9220b042.jpg[/img] 发布到weblogic9.1控制台报错: 信息: JDK 1.4+ collections available 2009-4-8 16:41:22 org.springframework.context.support.AbstractApplicationContext initMessageSource Unable to locate MessageSource with name 'messageSource': using default [org.springframework.context.support.DelegatingMessageSource@200309] 参考了网上的资料,在web-inf下又建了ApplicationContext.xml 内容是: <bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource"> <property name="basename"> <value>messages </value> </property> </bean> 同时,在web.xml里加上了(在servlet前): <context-param> <param-name>contextConfigLocation </param-name> <param-value>   classpath:org/codehaus/xfire/spring/xfire.xml,/WEB-INF/applicationContext.xml </param-value> </context-param> <listener> <listener-class> org.springframework.web.context.ContextLoaderListener   </listener-class> </listener> 再启动weblogic 又报错: <Error> <HTTP> <BEA-101163> <Could not load user defined listener: org.springframework.web.context.ContextLoaderListener   java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener 那我是否要再写监听程序呀?请给个思路! 附件里的图片是发布到weblogic9上,启动weblogic9控制台的错误信息 [b]问题补充:[/b] to bohemia (架构师) Spring jar包不在lib下吧?: new web service project 时,myeclipse就自动将XFire1.2 Core Libraries加上去了,包括spring-1.2.6.jar包 [b]问题补充:[/b] 我将web-xml里的 <context-param> <param-name>contextConfigLocation</param-name> <param-value>   classpath:org/codehaus/xfire/spring/xfire.xml,/WEB-INF/applicationContext.xml </param-value> </context-param> <listener> <listener-class> org.springframework.web.context.ContextLoaderListener   </listener-class> </listener> 注释掉,就报下面的错:(当时,就因为这个原因,我才加上了这些代码) 2009-4-9 9:44:15 org.springframework.context.support.AbstractApplicationContext initMessageSource 信息: Unable to locate MessageSource with name 'messageSource': using default [org.springframework.context.support.DelegatingMessageSource@200309] [b]问题补充:[/b] 同样的是这个项目,发布到tomcat5.5,控制台正常。 我是用XFire的Servlet发布WS的,我是参照了myeclipse 里的Help->MyEclipse learning Center->Web SErvices Development->Getting Started->Code-First Web Services Tutorial,也大量地在网上找了很多资料 [b]问题补充:[/b] 我控制台没有报这个错:java.lang.ClassNotFoundException 另外:我用weblogic自带的JDK1.5.04和我自己的JDK1.5.05,效果都是一样的 [b]问题补充:[/b] 我是用myEclipse部署的weblogic9. 我在WEB-INF下的webligic.xml的内容: <?xml version="1.0" encoding="UTF-8"?> <weblogic-application xmlns="http://www.bea.com/ns/weblogic/91"> <xml> <parser-factory> <saxparser-factory> org.apache.xerces.jaxp.SAXParserFactoryImpl </saxparser-factory> <document-builder-factory> org.apache.xerces.jaxp.DocumentBuilderFactoryImpl </document-builder-factory> <transformer-factory> org.apache.xalan.processor.TransformerFactoryImpl </transformer-factory> </parser-factory> </xml> <application-param> <param-name>webapp.encoding.default</param-name> <param-value>UTF-8</param-value> </application-param> <prefer-application-packages> <package-name>javax.jws.*</package-name> <package-name>org.apache.xerces.*</package-name> <package-name>org.apache.xalan.*</package-name> </prefer-application-packages> </weblogic-application> [b]问题补充:[/b] 已修改weblogic.xml: <?xml version="1.0" encoding="UTF-8"?> <wls:weblogic-web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wls="http://www.bea.com/ns/weblogic/90" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic-web-app.xsd"> <wls:context-root>GBBDXServer</wls:context-root> <wls:container-descriptor> <wls:prefer-web-inf-classes>true</wls:prefer-web-inf-classes></wls:container-descriptor> </wls:weblogic-web-app> 控制台仍报错: 2009-4-9 10:18:59 org.springframework.context.support.AbstractApplicationContext refresh 信息: No beans defined in application context [org.codehaus.xfire.transport.http.XFireConfigurableServlet$GenericWebApplicationContextX;hashCode=10111907] 2009-4-9 10:18:59 org.springframework.core.CollectionFactory <clinit> 信息: JDK 1.4+ collections available 2009-4-9 10:18:59 org.springframework.context.support.AbstractApplicationContext initMessageSource 信息: Unable to locate MessageSource with name 'messageSource': using default [org.springframework.context.support.DelegatingMessageSource@1b8378f] 2009-4-9 10:18:59 org.springframework.context.support.AbstractApplicationContext initApplicationEventMulticaster 其中:不同的是我用的是weblogic9.1的,而XFire的FAQ上用是weblogic9.0的,另外:<wls:context-root>GBBDXServer</wls:context-root>里的GBBDXServer是否要改为我自己的myJms呀?? [b]问题补充:[/b] 仍然报错: Unable to locate MessageSource with name 'messageSource': using default [org.springframework.context.support.DelegatingMessageSource@38e9e9] 估计还是和Spring文件有关,可是我没有用Spring 只是用XFire 它有自带的spring1.2.6.jar [b]问题补充:[/b] 服务是发布成功了,可控制台报错,因为我还有其它的业务要做,如对数据库表的操作,现在就报错了,下面的工作,我就不好做了 [b]问题补充:[/b] 因为项目工期紧,暂时放到tomcat5下去运行,有时间我还是要发布到weblogic9.1上的,还是要解决这个问题的 [b]问题补充:[/b] to: andilyliao weblogic下的servlet改到2.4以上 请教如何修改? 我的path: E:\bea\weblogic91\server 还是E:\bea\user_projects\domains\jms\config? 还是我项目下的weblogic.xml里? [b]问题补充:[/b] 虽然没有解决问题,但还是非常感激 bohemia
配置了log4j2.properties tomcat却提示找不到配置文件
web.xml中的配置: <!-- 配置日志文件 --> <context-param> <param-name>log4jConfigLocation</param-name> <param-value>WEB-INF/log4j2.properties</param-value> </context-param> <!-- 每60秒扫描配置文件的变化 --> <context-param> <param-name>log4jRefreshInterval</param-name> <param-value>60000</param-value> </context-param> <!-- 配置log4j监听器 --> <listener> <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class> </listener> 控制台日志: 十一月 10, 2015 10:56:04 下午 org.apache.catalina.core.ApplicationContext log 信息: No Spring WebApplicationInitializer types detected on classpath 十一月 10, 2015 10:56:04 下午 org.apache.catalina.core.ApplicationContext log 信息: Set web app root system property: 'webapp.root' = [D:\MyEclipse2014\plugins\apache-tomcat-8.0.26\webapps\gloomy\] ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console. 十一月 10, 2015 10:56:04 下午 org.apache.catalina.core.ApplicationContext log 信息: Initializing log4j from [D:\MyEclipse2014\plugins\apache-tomcat-8.0.26\webapps\gloomy\WEB-INF\log4j2.properties] 十一月 10, 2015 10:56:05 下午 org.apache.catalina.core.ApplicationContext log 信息: Initializing Spring root WebApplicationContext 十一月 10, 2015 10:56:11 下午 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deployment of web application directory D:\MyEclipse2014\plugins\apache-tomcat-8.0.26\webapps\gloomy has finished in 10,190 ms 日志jar包: ![图片说明](https://img-ask.csdn.net/upload/201511/10/1447167906_144162.jpg)
项目启动没问题,运行试试报404,大神求救哇
[INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Reactor Build Order: [INFO] [INFO] taotao-manager [INFO] taotao-manager-pojo [INFO] taotao-manager-mapper [INFO] taotao-manager-service [INFO] taotao-manager-web [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building taotao-manager 0.0.1-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ taotao-manager --- [INFO] [INFO] >>> tomcat-maven-plugin:1.1:run (default-cli) @ taotao-manager >>> [INFO] [INFO] <<< tomcat-maven-plugin:1.1:run (default-cli) @ taotao-manager <<< [INFO] [INFO] --- tomcat-maven-plugin:1.1:run (default-cli) @ taotao-manager --- [INFO] Skipping non-war project [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building taotao-manager-pojo 0.0.1-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ taotao-manager-pojo --- [INFO] Deleting D:\Myeclipse\Myeclipse10\Work\taotao-manager\taotao-manager-pojo\target [INFO] [INFO] >>> tomcat-maven-plugin:1.1:run (default-cli) @ taotao-manager-pojo >>> [INFO] [INFO] --- maven-resources-plugin:2.7:resources (default-resources) @ taotao-manager-pojo --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 0 resource [INFO] [INFO] --- maven-compiler-plugin:3.2:compile (default-compile) @ taotao-manager-pojo --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 22 source files to D:\Myeclipse\Myeclipse10\Work\taotao-manager\taotao-manager-pojo\target\classes [INFO] [INFO] <<< tomcat-maven-plugin:1.1:run (default-cli) @ taotao-manager-pojo <<< [INFO] [INFO] --- tomcat-maven-plugin:1.1:run (default-cli) @ taotao-manager-pojo --- [INFO] Skipping non-war project [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building taotao-manager-mapper 0.0.1-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ taotao-manager-mapper --- [INFO] Deleting D:\Myeclipse\Myeclipse10\Work\taotao-manager\taotao-manager-mapper\target [INFO] [INFO] >>> tomcat-maven-plugin:1.1:run (default-cli) @ taotao-manager-mapper >>> [INFO] [INFO] --- maven-resources-plugin:2.7:resources (default-resources) @ taotao-manager-mapper --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 0 resource [INFO] [INFO] --- maven-compiler-plugin:3.2:compile (default-compile) @ taotao-manager-mapper --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 11 source files to D:\Myeclipse\Myeclipse10\Work\taotao-manager\taotao-manager-mapper\target\classes [INFO] [INFO] <<< tomcat-maven-plugin:1.1:run (default-cli) @ taotao-manager-mapper <<< [INFO] [INFO] --- tomcat-maven-plugin:1.1:run (default-cli) @ taotao-manager-mapper --- [INFO] Skipping non-war project [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building taotao-manager-service 0.0.1-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ taotao-manager-service --- [INFO] Deleting D:\Myeclipse\Myeclipse10\Work\taotao-manager\taotao-manager-service\target [INFO] [INFO] >>> tomcat-maven-plugin:1.1:run (default-cli) @ taotao-manager-service >>> [INFO] [INFO] --- maven-resources-plugin:2.7:resources (default-resources) @ taotao-manager-service --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 0 resource [INFO] [INFO] --- maven-compiler-plugin:3.2:compile (default-compile) @ taotao-manager-service --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 2 source files to D:\Myeclipse\Myeclipse10\Work\taotao-manager\taotao-manager-service\target\classes [INFO] [INFO] <<< tomcat-maven-plugin:1.1:run (default-cli) @ taotao-manager-service <<< [INFO] [INFO] --- tomcat-maven-plugin:1.1:run (default-cli) @ taotao-manager-service --- [INFO] Skipping non-war project [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building taotao-manager-web 0.0.1-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ taotao-manager-web --- [INFO] Deleting D:\Myeclipse\Myeclipse10\Work\taotao-manager\taotao-manager-web\target [INFO] [INFO] >>> tomcat-maven-plugin:1.1:run (default-cli) @ taotao-manager-web >>> [INFO] [INFO] --- maven-resources-plugin:2.7:resources (default-resources) @ taotao-manager-web --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 6 resources [INFO] [INFO] --- maven-compiler-plugin:3.2:compile (default-compile) @ taotao-manager-web --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 1 source file to D:\Myeclipse\Myeclipse10\Work\taotao-manager\taotao-manager-web\target\classes [INFO] [INFO] <<< tomcat-maven-plugin:1.1:run (default-cli) @ taotao-manager-web <<< [INFO] [INFO] --- tomcat-maven-plugin:1.1:run (default-cli) @ taotao-manager-web --- [INFO] Running war on http://localhost:8080/taotao-manager-web [INFO] Creating Tomcat server configuration at D:\Myeclipse\Myeclipse10\Work\taotao-manager\taotao-manager-web\target\tomcat 九月 02, 2016 2:16:53 下午 org.apache.catalina.startup.Embedded start 信息: Starting tomcat server 九月 02, 2016 2:16:53 下午 org.apache.catalina.core.StandardEngine start 信息: Starting Servlet Engine: Apache Tomcat/6.0.29 九月 02, 2016 2:16:54 下午 org.apache.catalina.core.ApplicationContext log 信息: Initializing Spring root WebApplicationContext log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. 九月 02, 2016 2:16:56 下午 org.apache.catalina.core.ApplicationContext log 信息: Initializing Spring FrameworkServlet 'taotao-manager' 九月 02, 2016 2:16:58 下午 org.apache.coyote.http11.Http11Protocol init 信息: Initializing Coyote HTTP/1.1 on http-8080 九月 02, 2016 2:16:58 下午 org.apache.coyote.http11.Http11Protocol start 信息: Starting Coyote HTTP/1.1 on http-8080
关于servlet的问题。。。
我是个初学者,用的是tomcat5,myeclipse5在学习。。。最近学到servlet的内容时,写了个很简单的HelloWrold.java,之前我在tomcat的server.xml中在</host>之前加了一条语句: <Context path="/m" debug="0" docBase="e:/m" reloadable="true"> </Context> 然后用MyEclipse在m文件夹下创建了一个web project,名字是w HelloWorld.java代码如下: package servlets; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class HelloWorld extends HttpServlet { public void doGet(HttpServletRequest request,HttpServletResponse response) throws IOException,ServletException { response.setContentType("text/html"); PrintWriter out=response.getWriter(); out.println("<html>"); out.println("<head>"); out.println("<title>Hello World !</title>"); out.println("</head>"); out.println("<body>"); out.println("<h1>Hello World !!!</h1>"); out.println("</body>"); out.println("</html>"); } public static void main(String args[]){} } 然后将HelloWorld.java编译了一下得到HelloWorld.class,将这个类文件剪切到E:\m\w\WebRoot\WEB-INF\classes\servlets下 之后将E:\m\w\WebRoot\WEB-INF下的web.xml内容作了修改,变为如下: <?xml version="1.0" encoding="UTF-8"?> <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <servlet> <servlet-name>HelloWorld</servlet-name> <servlet-class>servlets.HelloWorld</servlet-class> </servlet> <servlet-mapping> <servlet-name>HelloWorld</servlet-name> <url-pattern>/HelloWorld</url-pattern> </servlet-mapping> </web-app> 然后启动tomcat,在浏览器中输入http://localhost:8080/m/w/HelloWorld 得到了以下输出: HTTP Status 404 - /m/w/HelloWorld -------------------------------------------------------------------------------- type Status report message /m/w/HelloWorld description The requested resource (/m/w/HelloWorld) is not available. -------------------------------------------------------------------------------- Apache Tomcat/5.0.19 是什么的原因?classpath不对?某个文件配置不对?还请各位老师指教。。。谢谢 尽量详细点因为我是初学。。。。再次谢谢!!! 补充:我将那个类文件放在tomcat下的root下时,配置那里面的web.xml和其他一些相关做法和上文一样,这时浏览器可以显示hello world!!!的字样,这时就编译成功了。。。所以我感觉可能是哪个配置不对,百思不得其解,root下的web.xml内容如下: <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app> <display-name>Welcome to Tomcat</display-name> <description> Welcome to Tomcat </description> <!-- JSPC servlet mappings start --> <servlet> <servlet-name>org.apache.jsp.index_jsp</servlet-name> <servlet-class>org.apache.jsp.index_jsp</servlet-class> </servlet> <servlet-mapping> <servlet-name>org.apache.jsp.index_jsp</servlet-name> <url-pattern>/index.jsp</url-pattern> </servlet-mapping> <!-- JSPC servlet mappings end --> <servlet> <servlet-name>HelloWorld</servlet-name> <servlet-class>servlets.HelloWorld</servlet-class> </servlet> <servlet-mapping> <servlet-name>HelloWorld</servlet-name> <url-pattern>/HelloWorld</url-pattern> </servlet-mapping> </web-app> 好像跟那个web.xml有点不一样。。。但我不懂原理所以很糊涂。。。请高手老师指教!!!
MyEclipse调试博客系统的时候出现HTTP Status 404 - /blog/
![出现错误的图片](https://img-ask.csdn.net/upload/201705/10/1494430098_612478.png) 第一个错误是:2017-5-10 20:27:26 org.apache.catalina.core.StandardContext listenerStart 严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener 整段调试信息: 2017-5-10 20:27:22 org.apache.catalina.core.AprLifecycleListener init 信息: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Users\Administrator\MyEclipse 6.0\bin;C:\Users\Administrator\MyEclipse 6.0\myeclipse\eclipse\plugins\com.genuitec.eclipse.easie.tomcat.myeclipse_6.0.1.zmyeclipse601200710\tomcat\bin 2017-5-10 20:27:23 org.apache.coyote.http11.Http11Protocol init 信息: Initializing Coyote HTTP/1.1 on http-8080 2017-5-10 20:27:23 org.apache.catalina.startup.Catalina load 信息: Initialization processed in 1668 ms 2017-5-10 20:27:23 org.apache.catalina.core.StandardService start 信息: Starting service Catalina 2017-5-10 20:27:23 org.apache.catalina.core.StandardEngine start 信息: Starting Servlet Engine: Apache Tomcat/6.0.13 2017-5-10 20:27:23 org.apache.catalina.loader.WebappClassLoader validateJarFile 信息: validateJarFile(D:\MyEclipes\.metadata\.plugins\com.genuitec.eclipse.easie.tomcat.myeclipse\tomcat\webapps\blog\WEB-INF\lib\javaee.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class 2017-5-10 20:27:25 org.apache.catalina.core.ApplicationContext log 信息: Initializing Spring root WebApplicationContext log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader). log4j:WARN Please initialize the log4j system properly. 2017-5-10 20:27:26 org.apache.catalina.core.StandardContext listenerStart 严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.io.FileNotFoundException: class path resource [com/model/Sysuser.hbm.xml] cannot be opened because it does not exist Caused by: java.io.FileNotFoundException: class path resource [com/model/Sysuser.hbm.xml] cannot be opened because it does not exist at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:135) at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:656) at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:134) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1202) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1172) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:428) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:284) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:244) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:187) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4334) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:566) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) 2017-5-10 20:27:26 org.apache.catalina.core.StandardContext start 严重: Error listenerStart 2017-5-10 20:27:26 org.apache.catalina.core.StandardContext start 严重: Context [/blog] startup failed due to previous errors 2017-5-10 20:27:26 org.apache.catalina.core.ApplicationContext log 信息: Closing Spring root WebApplicationContext 2017-5-10 20:27:26 org.apache.coyote.http11.Http11Protocol start 信息: Starting Coyote HTTP/1.1 on http-8080 2017-5-10 20:27:26 org.apache.jk.common.ChannelSocket init 信息: JK: ajp13 listening on /0.0.0.0:8009 2017-5-10 20:27:26 org.apache.jk.server.JkMain start 信息: Jk running ID=0 time=0/43 config=null 2017-5-10 20:27:26 org.apache.catalina.startup.Catalina start 信息: Server startup in 3166 ms
从myeclipse导入eclipse,不能识别为web项目(java项目转为web项目)
1、进入项目目录,找到.project文件,打开。 2、找到<natures>...</natures>代码段。 3、在第2步的代码段中加入如下标签内容并保存: <nature>org.eclipse.jem.workbench.JavaEMFNature</nature> <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature> <nature>org.eclipse.wst.common.project.facet.core.nature</nature> <nature>org.eclipse.jdt.core.javanature</nature> <nature>org.eclipse.wst.jsdt.core.jsNature</nature> 4、删除.setting下的文件,从其它EclipseJee web项目[记住为了保险起见,一定要用eclipse新建一个]的.setting文件下拷贝以下文件[其实就是把整个文件夹都拷过来] .jsdtscope org.eclipse.jst.common.project.facet.core.prefs org.eclipse.wst.common.component org.eclipse.wst.common.project.facet.core.xml org.eclipse.wst.jsdt.ui.superType.Container org.eclipse.wst.jsdt.ui.superType.name 修改org.eclipse.wst.common.component中项目名称相关的内容 比如下面的jngl_mysql换成你的项目名称。 然后wb-resource就是你的资源文件,默认是src一个。如果你是用maven可能是src/Java/main,src/java/resource这些玩意。记得加上。 [html] view plain copy print? <?xml version="1.0" encoding="UTF-8"?> <project-modules id="moduleCoreId" project-version="1.5.0"> <wb-module deploy-name="jngl_mysql"> <wb-resource deploy-path="/" source-path="/WebRoot" tag="defaultRootSource"/> <wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/> <property name="context-root" value="jngl_mysql"/> <property name="java-output-path" value="/jngl_mysql/WEB-INF/classes"/> </wb-module> </project-modules> 然后是.jsdtscope文件,这个里面记得改你的输出路径。 [html] view plain copy print? <?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="src" path="WebRoot"/> <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/> <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject"> <attributes> <attribute name="hide" value="true"/> </attributes> </classpathentry> <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/> <classpathentry kind="output" path=""/> </classpath>
struts2集成spring产生的问题
是了在用strut2集成spring,便是产生了一个问题,在网上找了一下也没找到解决方案,请大家看一下,帮忙解决一下: struts2的版本是:2.1.6, 集成spring的时候用的是struts2-spring-plugin-2.1.6.jar 开发IDE是用的MyEclipse6.0.1, 服务器版本是Tomcat 6.0 然后集成之后,我是想用sping来对struts2的Action进行管理. web.xml的内容如下: ------------------------------------------------------------------------------------------ <?xml version="1.0" encoding="UTF-8"?> <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> <listener> <listener-class> org.springframework.web.context.ContextLoaderListener </listener-class> </listener> <context-param> <param-name>contextConfigLocation</param-name> <param-value> /WEB-INF/applicationContext.xml,classpath:applicationContext-*.xml </param-value> </context-param> <filter> <filter-name>struts2</filter-name> <filter-class> org.apache.struts2.dispatcher.FilterDispatcher </filter-class> </filter> <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>*.jspa</url-pattern> </filter-mapping> <servlet> <servlet-name>velocity</servlet-name> <servlet-class> org.apache.velocity.tools.view.servlet.VelocityViewServlet </servlet-class> </servlet> <servlet-mapping> <servlet-name>velocity</servlet-name> <url-pattern>*.vm</url-pattern> </servlet-mapping> <servlet> <servlet-name>dwr</servlet-name> <servlet-class> org.directwebremoting.servlet.DwrServlet </servlet-class> <init-param> <param-name>debug</param-name> <param-value>true</param-value> </init-param> </servlet> <servlet-mapping> <servlet-name>dwr</servlet-name> <url-pattern>/dwr/*</url-pattern> </servlet-mapping> </web-app> ------------------------------------------------------------------------------------------ struts.xml内容如下: ------------------------------------------------------------------------------------------ <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd"> <struts> <!-- 配置国际化信息 --> <constant name="struts.custom.i18n.resources" value="messages" /> <!-- 设置使用的解码集 --> <constant name="struts.i18n.encoding" value="utf-8" /> <package name="pages" namespace="/pages" extends="struts-default"> <action name="display" class="DisplayAction"> <result type="velocity">welcome.vm</result> <result name="showchart" type="velocity">sdv.vm</result> <result name="JSONTree" type="velocity">treedat.vm</result> </action> <action name="treedemo" class="TreedemoAction"> <result type="velocity">treedemo.vm</result> <result name="treeJSON" type="velocity">treedat.vm</result> </action> <action name="inquire" class="DWRInquireProcess"> <result type="velocity">inquiredData.vm</result> </action> </package> </struts> ------------------------------------------------------------------------------------------ struts.properties的内容如下: ------------------------------------------------------------------------------------------ struts.action.extension = jspa struts.objectFactory = spring struts.objectFactory.spring.autoWire = name #for develop reason, we don't want the client browser cache the static content struts.serve.static.browserCache = false #we hope the server auto load the struts.xml file, when it is changed struts.configuration.xml.reload = true ------------------------------------------------------------------------------------------ spring的配置文件applicationContext.xml的内容如下: ------------------------------------------------------------------------------------------ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> <beans> <bean id="DisplayAction" class="com.intel.sdv2.action.DisplayPage"> </bean> <bean id="TreedemoAction" class="com.intel.sdv2.action.TreeDemo"></bean> <bean id="DWRInquireProcess" class="com.intel.sdv2.action.DWRFormProcess"> </bean> </beans> ------------------------------------------------------------------------------------------ 项目中用的jar包如下: ------------------------------------------------------------------------------------------ commons-logging-1.1.jar freemarker-2.3.13.jar ognl-2.6.11.jar struts2-core-2.1.6.jar xwork-2.1.2.jar commons-digester-1.8.jar commons-io-1.3.2.jar commons-fileupload-1.2.1.jar json-lib-2.1.jar velocity-1.5.jar velocity-tools-1.4.jar commons-collections-3.2.jar commons-lang-2.2.jar dwr.jar struts2-spring-plugin-2.1.6.jar ------------------------------------------------------------------------------------------ 启动Tomcat时报的错如下: ------------------------------------------------------------------------------------------ 2009-7-29 15:33:14 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info 信息: ... initialized Struts-Spring integration successfully 2009-7-29 15:33:14 org.apache.catalina.core.StandardContext filterStart 严重: Exception starting filter struts2 java.lang.NullPointerException at com.opensymphony.xwork2.util.FileManager$FileRevision.needsReloading(FileManager.java:209) at com.opensymphony.xwork2.util.FileManager.fileNeedsReloading(FileManager.java:60) at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.needsReload(XmlConfigurationProvider.java:325) at org.apache.struts2.config.StrutsXmlConfigurationProvider.needsReload(StrutsXmlConfigurationProvider.java:168) at com.opensymphony.xwork2.config.ConfigurationManager.conditionalReload(ConfigurationManager.java:220) at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:61) at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:774) at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:191) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397) at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3696) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4343) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:566) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) 2009-7-29 15:33:14 org.apache.catalina.core.StandardContext start 严重: Error filterStart 2009-7-29 15:33:14 org.apache.catalina.core.StandardContext start 严重: Context [/SDVWeb2] startup failed due to previous errors 2009-7-29 15:33:14 org.apache.catalina.core.ApplicationContext log 信息: Closing Spring root WebApplicationContext ------------------------------------------------------------------------------------------ 在没用集成Spring之间,一切运行都正常,当我把spring集成进去后,就报这样的错误了。弄不明白是什么原因?请大家看一下,有什么解决方法,谢谢!!!
Myeclipse 运行web项目是报错 求大神帮忙看看
2016-4-6 22:55:56 org.apache.catalina.core.AprLifecycleListener init 信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files (x86)\Java\jdk1.6.0_43\bin;F:\apache-tomcat-6.0.32\bin 2016-4-6 22:55:56 org.apache.coyote.http11.Http11Protocol init 信息: Initializing Coyote HTTP/1.1 on http-8088 2016-4-6 22:55:56 org.apache.catalina.startup.Catalina load 信息: Initialization processed in 266 ms 2016-4-6 22:55:56 org.apache.catalina.core.StandardService start 信息: Starting service Catalina 2016-4-6 22:55:56 org.apache.catalina.core.StandardEngine start 信息: Starting Servlet Engine: Apache Tomcat/6.0.32 2016-4-6 22:55:56 org.apache.catalina.startup.HostConfig deployDescriptor 信息: Deploying configuration descriptor host-manager.xml 2016-4-6 22:55:57 org.apache.catalina.startup.HostConfig deployDescriptor 信息: Deploying configuration descriptor manager.xml 2016-4-6 22:55:57 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory docs 2016-4-6 22:55:57 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory examples 2016-4-6 22:55:57 org.apache.catalina.core.ApplicationContext log 信息: ContextListener: contextInitialized() 2016-4-6 22:55:57 org.apache.catalina.core.ApplicationContext log 信息: SessionListener: contextInitialized() 2016-4-6 22:55:57 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory HRMS2 2016-4-6 22:55:57 org.apache.catalina.core.StandardContext filterStart 严重: Exception starting filter multipartFilter java.lang.ClassNotFoundException: net.skirnir.catalina.servlets.MultipartFilter at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:269) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422) at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:115) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4071) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4725) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1079) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1002) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:506) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1315) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061) at org.apache.catalina.core.StandardHost.start(StandardHost.java:840) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463) at org.apache.catalina.core.StandardService.start(StandardService.java:525) at org.apache.catalina.core.StandardServer.start(StandardServer.java:754) at org.apache.catalina.startup.Catalina.start(Catalina.java:595) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) 2016-4-6 22:55:57 org.apache.catalina.core.StandardContext start 严重: Error filterStart 2016-4-6 22:55:57 org.apache.catalina.core.StandardContext start 严重: Context [/HRMS2] startup failed due to previous errors 2016-4-6 22:55:57 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc 严重: The web application [/HRMS2] registered the JDBC driver [oracle.jdbc.OracleDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered. 2016-4-6 22:55:57 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc 严重: The web application [/HRMS2] registered the JDBC driver [org.postgresql.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered. 2016-4-6 22:55:57 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory ROOT 2016-4-6 22:55:57 org.apache.coyote.http11.Http11Protocol start 信息: Starting Coyote HTTP/1.1 on http-8088 2016-4-6 22:55:57 org.apache.jk.common.ChannelSocket init 信息: JK: ajp13 listening on /0.0.0.0:8009 2016-4-6 22:55:57 org.apache.jk.server.JkMain start 信息: Jk running ID=0 time=0/12 config=null 2016-4-6 22:55:57 org.apache.catalina.startup.Catalina start 信息: Server startup in 713 ms
java的web项目中关于struts2和hibernate的问题。
在我只加入struts2的时候我实现了页面跳转。但是当我加入hibernate后就会报错,不动的求大神指点。 现在贴出代码。 web.xml文件 <?xml version="1.0" encoding="UTF-8"?> <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> <display-name></display-name> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> <!--配置struts2的配置文件--> <filter> <filter-name>struts2</filter-name> <filter-class> org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilte</filter-class> </filter> <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>*.action</url-pattern> </filter-mapping> <!-- 配置hibernate文档 --> <filter> <filter-name>hibernateFilter</filter-name> <filter-class>info.util.HibernateFilter</filter-class> </filter> <filter-mapping> <filter-name>hibernateFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> </web-app> struts2.xml文件 ``` <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.1//EN" "http://struts.apache.org/dtds/struts-2.1.dtd"> <struts> <!-- <constant name="struts.enable.DynamicMethodInvocation" value="true" /> --> <constant name="struts.devMode" value="true"/> <package name="xianshi" extends="struts-default" namespace=""> <action name="xianshi" class="cn.web.user.User"> <result name="success">/add.jsp</result> </action> </package> </struts> ``` hibernate.cfg.xml文件 ``` <?xml version='1.0' encoding='UTF-8'?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> <!-- Generated by MyEclipse Hibernate Tools. --> <hibernate-configuration> <session-factory> <property name="current_session_context_class">thread</property> <property name="dialect">org.hibernate.dialect.MySQLDialect</property> <property name="myeclipse.connection.profile">test</property> <property name="connection.url"> jdbc:mysql://localhost:3306/test </property> <property name="connection.username">root</property> <property name="connection.password">6486178aa</property> <property name="connection.driver_class"> com.mysql.jdbc.Driver </property> <mapping resource="cn/web/service/Users.hbm.xml"/> </session-factory> </hibernate-configuration> ``` 报错文件 ``` 2016-11-3 16:30:29 org.apache.catalina.core.AprLifecycleListener init 信息: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Users\wzq\MyEclipse\Common\binary\com.sun.java.jdk.win32.x86_64_1.6.0.013\bin;C:\Users\wzq\MyEclipse\Common\plugins\com.genuitec.eclipse.easie.tomcat.myeclipse_9.0.0.me201109141806\tomcat\bin 2016-11-3 16:30:29 org.apache.coyote.http11.Http11Protocol init 信息: Initializing Coyote HTTP/1.1 on http-8080 2016-11-3 16:30:29 org.apache.catalina.startup.Catalina load 信息: Initialization processed in 406 ms 2016-11-3 16:30:29 org.apache.catalina.core.StandardService start 信息: Starting service Catalina 2016-11-3 16:30:29 org.apache.catalina.core.StandardEngine start 信息: Starting Servlet Engine: Apache Tomcat/6.0.13 2016-11-3 16:30:30 org.apache.catalina.core.StandardContext filterStart 严重: Exception starting filter struts2 java.lang.ClassNotFoundException: org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter 2016-11-3 16:30:30 org.apache.catalina.core.StandardContext start 严重: Error filterStart 2016-11-3 16:30:30 org.apache.catalina.core.StandardContext start 严重: Context [/111] startup failed due to previous errors 2016-11-3 16:30:30 org.apache.catalina.core.StandardContext filterStart 严重: Exception starting filter hibernateFilter java.lang.ClassNotFoundException: info.util.HibernateFilter 2016-11-3 16:30:30 org.apache.catalina.core.StandardContext filterStart 严重: Exception starting filter struts2 java.lang.ClassNotFoundException: org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilte 2016-11-3 16:30:30 org.apache.catalina.core.StandardContext start 严重: Error filterStart 2016-11-3 16:30:30 org.apache.catalina.core.StandardContext start 严重: Context [/web] startup failed due to previous errors 2016-11-3 16:30:31 org.apache.coyote.http11.Http11Protocol start 信息: Starting Coyote HTTP/1.1 on http-8080 2016-11-3 16:30:31 org.apache.jk.common.ChannelSocket init 信息: JK: ajp13 listening on /0.0.0.0:8009 2016-11-3 16:30:31 org.apache.jk.server.JkMain start 信息: Jk running ID=0 time=0/25 config=null 2016-11-3 16:30:31 org.apache.catalina.startup.Catalina start 信息: Server startup in 1459 ms 2016-11-3 16:39:21 org.apache.catalina.startup.HostConfig checkResources 信息: Reloading context [/web] 2016-11-3 16:39:21 org.apache.catalina.core.StandardContext stop 信息: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/web] has not been started 2016-11-3 16:39:21 org.apache.catalina.core.StandardContext filterStart 严重: Exception starting filter hibernateFilter java.lang.ClassNotFoundException: info.util.HibernateFilter 2016-11-3 16:39:21 org.apache.catalina.core.StandardContext filterStart 严重: Exception starting filter struts2 java.lang.ClassNotFoundException: org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilte 2016-11-3 16:39:21 org.apache.catalina.core.StandardContext start 严重: Error filterStart 2016-11-3 16:39:21 org.apache.catalina.core.StandardContext start 严重: Context [/web] startup failed due to previous errors ```
java初学MyEclipse_maven搭建web项目测试dao接口报错
[org.springframework.beans.factory.xml.XmlBeanDefinitionReader]Loading XML bean definitions from class path resource [spring.xml] [org.springframework.context.annotation.ClassPathBeanDefinitionScanner]JSR-250 'javax.annotation.ManagedBean' found and supported for component scanning [org.springframework.context.annotation.ClassPathBeanDefinitionScanner]JSR-330 'javax.inject.Named' annotation found and supported for component scanning [org.springframework.beans.factory.xml.XmlBeanDefinitionReader]Loading XML bean definitions from class path resource [spring-hibernate.xml] [org.springframework.context.support.GenericApplicationContext]Refreshing org.springframework.context.support.GenericApplicationContext@680a6131: startup date [Mon Feb 13 10:55:44 CST 2017]; root of context hierarchy [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer]Loading properties file from class path resource [config.properties] [org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor]JSR-330 'javax.inject.Inject' annotation found and supported for autowiring [org.springframework.beans.factory.support.DefaultListableBeanFactory]Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@537b20c6: defining beans [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0,userDao,userService,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,dataSource,sessionFactory,transactionManager,transactionAdvice,org.springframework.aop.config.internalAutoProxyCreator,transactionPointcut,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor]; root of factory hierarchy [com.alibaba.druid.pool.DruidAbstractDataSource]maxIdle is deprecated [com.alibaba.druid.pool.DruidDataSource]{dataSource-1} inited [org.hibernate.annotations.common.Version]HCANN000001: Hibernate Commons Annotations {4.0.1.Final} [org.hibernate.Version]HHH000412: Hibernate Core {4.2.5.Final} [org.hibernate.cfg.Environment]HHH000206: hibernate.properties not found [org.hibernate.cfg.Environment]HHH000021: Bytecode provider name : javassist [org.hibernate.dialect.Dialect]HHH000400: Using dialect: org.hibernate.dialect.MySQLDialect [org.hibernate.engine.transaction.internal.TransactionFactoryInitiator]HHH000399: Using default transaction strategy (direct JDBC transactions) [org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory]HHH000397: Using ASTQueryTranslatorFactory SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. [org.hibernate.tool.hbm2ddl.SchemaUpdate]HHH000228: Running hbm2ddl schema update [org.hibernate.tool.hbm2ddl.SchemaUpdate]HHH000102: Fetching database metadata [org.hibernate.tool.hbm2ddl.SchemaUpdate]HHH000396: Updating schema [org.hibernate.tool.hbm2ddl.TableMetadata]HHH000261: Table found: ssh_test.users [org.hibernate.tool.hbm2ddl.TableMetadata]HHH000037: Columns: [id, sex, username, address, age, name, password] [org.hibernate.tool.hbm2ddl.TableMetadata]HHH000108: Foreign keys: [] [org.hibernate.tool.hbm2ddl.TableMetadata]HHH000126: Indexes: [age, primary] [org.hibernate.tool.hbm2ddl.SchemaUpdate]HHH000232: Schema update complete [org.springframework.orm.hibernate4.HibernateTransactionManager]Using DataSource [{ CreateTime:"2017-02-13 10:55:44", ActiveCount:0, PoolingCount:1, CreateCount:1, DestroyCount:0, CloseCount:2, ConnectCount:2, Connections:[ {ID:337257430, ConnectTime:"2017-02-13 10:55:45", UseCount:2, LastActiveTime:"2017-02-13 10:55:46"} ] }] of Hibernate SessionFactory for HibernateTransactionManager [org.springframework.context.support.GenericApplicationContext]Closing org.springframework.context.support.GenericApplicationContext@680a6131: startup date [Mon Feb 13 10:55:44 CST 2017]; root of context hierarchy [org.springframework.beans.factory.support.DefaultListableBeanFactory]Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@537b20c6: defining beans [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0,userDao,userService,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,dataSource,sessionFactory,transactionManager,transactionAdvice,org.springframework.aop.config.internalAutoProxyCreator,transactionPointcut,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor]; root of factory hierarchy [com.alibaba.druid.pool.DruidDataSource]{dataSource-1} closed
myeclipse高版本项目导入到低版本出错(急)
在myeclipse10里面的web项目运行访问完全没问题,但是导出后,导入到其他电脑的myeclipse8.6就一直报错,代码一样的,在访问的时候控制台报错 严重: Servlet.service() for servlet [springmvc] in context with path [/typhon] threw exception [Handler processing failed; nested exception is java.lang.NoClassDefFoundError: antlr/SemanticException] with root cause java.lang.ClassNotFoundException: antlr.SemanticException
Myeclipse Web工程启动报错
``` 2015-12-14 10:38:51 org.apache.catalina.core.StandardContext listenerStart 严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Arrays.java:2882) at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100) at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390) at java.lang.StringBuffer.append(StringBuffer.java:224) at java.io.StringWriter.write(StringWriter.java:95) at java.io.PrintWriter.write(PrintWriter.java:412) at java.io.PrintWriter.write(PrintWriter.java:429) at java.io.PrintWriter.print(PrintWriter.java:559) at java.io.PrintWriter.println(PrintWriter.java:695) at java.lang.Throwable.printStackTraceAsCause(Throwable.java:538) at java.lang.Throwable.printStackTraceAsCause(Throwable.java:545) at java.lang.Throwable.printStackTraceAsCause(Throwable.java:545) at java.lang.Throwable.printStackTraceAsCause(Throwable.java:545) at java.lang.Throwable.printStackTraceAsCause(Throwable.java:545) at java.lang.Throwable.printStackTraceAsCause(Throwable.java:545) at java.lang.Throwable.printStackTraceAsCause(Throwable.java:545) at java.lang.Throwable.printStackTraceAsCause(Throwable.java:545) at java.lang.Throwable.printStackTraceAsCause(Throwable.java:545) at java.lang.Throwable.printStackTraceAsCause(Throwable.java:545) at java.lang.Throwable.printStackTraceAsCause(Throwable.java:545) at java.lang.Throwable.printStackTraceAsCause(Throwable.java:545) at java.lang.Throwable.printStackTraceAsCause(Throwable.java:545) at java.lang.Throwable.printStackTraceAsCause(Throwable.java:545) at java.lang.Throwable.printStackTraceAsCause(Throwable.java:545) at java.lang.Throwable.printStackTraceAsCause(Throwable.java:545) at java.lang.Throwable.printStackTraceAsCause(Throwable.java:545) at java.lang.Throwable.printStackTraceAsCause(Throwable.java:545) at java.lang.Throwable.printStackTraceAsCause(Throwable.java:545) at java.lang.Throwable.printStackTraceAsCause(Throwable.java:545) at java.lang.Throwable.printStackTraceAsCause(Throwable.java:545) at java.lang.Throwable.printStackTraceAsCause(Throwable.java:545) at java.lang.Throwable.printStackTraceAsCause(Throwable.java:545) 2015-12-14 10:38:51 org.apache.catalina.core.StandardContext start 严重: Error listenerStart 2015-12-14 10:38:51 org.apache.catalina.core.StandardContext start 严重: Context [/AutoMonitor] startup failed due to previous errors 2015-12-14 10:38:51 org.apache.catalina.core.ApplicationContext log 信息: Closing Spring root WebApplicationContext 2015-12-14 10:38:53 org.apache.catalina.core.ApplicationContext log 信息: Initializing Spring root WebApplicationContext (0 ms) [main] WARN : com.mchange.v2.c3p0.management.ActiveManagementCoordinator#attemptManageC3P0Registry : A C3P0Registry mbean is already registered. This probably means that an application using c3p0 was undeployed, but not all PooledDataSources were closed prior to undeployment. This may lead to resource leaks over time. Please take care to close all PooledDataSources. (2593 ms) [main] DEBUG: org.apache.struts2.config.PropertiesSettings#debug : struts.properties missing (2598 ms) [main] INFO : org.apache.struts2.config.BeanSelectionProvider#info : Choosing bean (struts) for class com.opensymphony.xwork2.ObjectFactory (2598 ms) [main] INFO : org.apache.struts2.config.BeanSelectionProvider#info : Choosing bean (struts) for class com.opensymphony.xwork2.conversion.impl.XWorkConverter (2598 ms) [main] INFO : org.apache.struts2.config.BeanSelectionProvider#info : Choosing bean (struts) for interface com.opensymphony.xwork2.TextProvider (2599 ms) [main] INFO : org.apache.struts2.config.BeanSelectionProvider#info : Choosing bean (struts) for interface com.opensymphony.xwork2.ActionProxyFactory (2599 ms) [main] INFO : org.apache.struts2.config.BeanSelectionProvider#info : Choosing bean (struts) for interface com.opensymphony.xwork2.conversion.ObjectTypeDeterminer (2599 ms) [main] INFO : org.apache.struts2.config.BeanSelectionProvider#info : Choosing bean (struts) for interface org.apache.struts2.dispatcher.mapper.ActionMapper (2600 ms) [main] INFO : org.apache.struts2.config.BeanSelectionProvider#info : Choosing bean (jakarta) for interface org.apache.struts2.dispatcher.multipart.MultiPartRequest (2600 ms) [main] INFO : org.apache.struts2.config.BeanSelectionProvider#info : Choosing bean (struts) for class org.apache.struts2.views.freemarker.FreemarkerManager (2617 ms) [main] DEBUG: org.apache.struts2.config.BeanSelectionProvider#debug : Choosing bean (struts) for class org.apache.struts2.views.velocity.VelocityManager to be loaded from the ObjectFactory (2618 ms) [main] INFO : org.apache.struts2.config.BeanSelectionProvider#info : Choosing bean (struts) for interface org.apache.struts2.components.UrlRenderer (2618 ms) [main] INFO : org.apache.struts2.config.BeanSelectionProvider#info : Choosing bean (struts) for interface com.opensymphony.xwork2.validator.ActionValidatorManager (2618 ms) [main] INFO : org.apache.struts2.config.BeanSelectionProvider#info : Choosing bean (struts) for interface com.opensymphony.xwork2.util.ValueStackFactory (2619 ms) [main] INFO : org.apache.struts2.config.BeanSelectionProvider#info : Choosing bean (struts) for interface com.opensymphony.xwork2.util.reflection.ReflectionProvider (2619 ms) [main] INFO : org.apache.struts2.config.BeanSelectionProvider#info : Choosing bean (struts) for interface com.opensymphony.xwork2.util.reflection.ReflectionContextFactory (2619 ms) [main] INFO : org.apache.struts2.config.BeanSelectionProvider#info : Choosing bean (struts) for interface com.opensymphony.xwork2.util.PatternMatcher (2620 ms) [main] INFO : org.apache.struts2.config.BeanSelectionProvider#info : Choosing bean (struts) for interface org.apache.struts2.dispatcher.StaticContentLoader (2620 ms) [main] INFO : org.apache.struts2.config.BeanSelectionProvider#info : Choosing bean (struts) for interface com.opensymphony.xwork2.UnknownHandlerManager (3794 ms) [main] DEBUG: org.apache.struts2.convention.PackageBasedActionConfigBuilder#debug : Processing class [com.auto.number.actions.PhoneNumAction] in package [com.auto.number.actions] (3817 ms) [main] DEBUG: org.apache.struts2.convention.PackageBasedActionConfigBuilder#debug : Processing class [com.auto.number.actions.UploadExcelDateAction] in package [com.auto.number.actions] 2015-12-14 10:38:59 org.apache.coyote.http11.Http11Protocol start 信息: Starting Coyote HTTP/1.1 on http-8080 2015-12-14 10:38:59 org.apache.jk.common.ChannelSocket init 信息: JK: ajp13 listening on /0.0.0.0:8009 2015-12-14 10:38:59 org.apache.jk.server.JkMain start 信息: Jk running ID=0 time=0/42 config=null 2015-12-14 10:38:59 org.apache.catalina.startup.Catalina start 信息: Server startup in 145762 ms ```
求解答:MyEclipse启动tomcat时出现错误,求解答?
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V Caused by: java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V at net.sf.cglib.core.ClassEmitter.begin_class(ClassEmitter.java:77) at net.sf.cglib.core.KeyFactory$Generator.generateClass(KeyFactory.java:173) at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25) at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:216) at net.sf.cglib.core.KeyFactory$Generator.create(KeyFactory.java:145) at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:117) at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:108) at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:104) at net.sf.cglib.proxy.Enhancer.<clinit>(Enhancer.java:69) at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:117) at org.hibernate.proxy.pojo.cglib.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:43) at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:162) at org.hibernate.tuple.entity.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:135) at org.hibernate.tuple.entity.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:55) at org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.<init>(EntityEntityModeToTuplizerMapping.java:56) at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:295) at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:434) at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:109) at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55) at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294) at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:805) at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:745) at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:134) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1202) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1172) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:428) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:284) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:244) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:187) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4727) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5189) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:752) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:728) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1107) at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1841) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) 三月 23, 2020 8:49:16 上午 org.apache.catalina.core.StandardContext startInternal 严重: One or more listeners failed to start. Full details will be found in the appropriate container log file 三月 23, 2020 8:49:16 上午 org.apache.catalina.core.StandardContext startInternal 严重: Context [/wljx] startup failed due to previous errors 三月 23, 2020 8:49:16 上午 org.apache.catalina.core.ApplicationContext log 信息: Closing Spring root WebApplicationContext 三月 23, 2020 8:49:16 上午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesJdbc 警告: The web application [wljx] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered. 三月 23, 2020 8:49:16 上午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads 警告: The web application [wljx] appears to have started a thread named [Timer-0] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: java.lang.Object.wait(Native Method) java.lang.Object.wait(Object.java:502) java.util.TimerThread.mainLoop(Timer.java:526) java.util.TimerThread.run(Timer.java:505) 三月 23, 2020 8:49:16 上午 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deployment of web application directory D:\myeclipse\MyEclipse2017\.metadata\.me_tcat85\webapps\wljx has finished in 20,379 ms 三月 23, 2020 8:49:16 上午 org.apache.coyote.AbstractProtocol start 信息: Starting ProtocolHandler [http-nio-8080] 三月 23, 2020 8:49:16 上午 org.apache.coyote.AbstractProtocol start 信息: Starting ProtocolHandler [ajp-nio-8009] 三月 23, 2020 8:49:16 上午 org.apache.catalina.startup.Catalina start 信息: Server startup in 40391 ms ``` ```
tomcat启动报错 Context initialization failed
环境:jdk1.8+myeclipse8.5+tomcat6.0+ssh 错误日志: 信息: Initializing Spring root WebApplicationContext 11:11:10,737 ERROR org.springframework.web.context.ContextLoader:215 - Context initialization failed org.springframework.beans.factory.BeanDefinitionStoreException:Unexpected exception parsing XML document from class path resource [beans.xml]; nested exception is java.lang.IllegalStateException: Context namespace element 'annotation-config' and its parser class [org.springframework.context.annotation.AnnotationConfigBeanDefinitionParser] are only available on JDK 1.5 and higher at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:420) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149) at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124) at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:92) at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123) at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4236) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4739) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:803) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:780) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:583) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1080) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1003) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:507) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1322) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:325) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1069) at org.apache.catalina.core.StandardHost.start(StandardHost.java:822) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463) at org.apache.catalina.core.StandardService.start(StandardService.java:525) at org.apache.catalina.core.StandardServer.start(StandardServer.java:759) at org.apache.catalina.startup.Catalina.start(Catalina.java:595) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) Caused by: java.lang.IllegalStateException: Context namespace element 'annotation-config' and its parser class [org.springframework.context.annotation.AnnotationConfigBeanDefinitionParser] are only available on JDK 1.5 and higher at org.springframework.context.config.ContextNamespaceHandler$1.parse(ContextNamespaceHandler.java:65) at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:69) at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1297) at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1287) at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135) at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:92) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:507) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:398) ... 37 more 七月 31, 2016 11:11:10 上午 org.apache.catalina.core.StandardContext listenerStart 严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [beans.xml]; nested exception is java.lang.IllegalStateException: Context namespace element 'annotation-config' and its parser class [org.springframework.context.annotation.AnnotationConfigBeanDefinitionParser] are only available on JDK 1.5 and higher at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:420) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149) at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124) at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:92) at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123) at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4236) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4739) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:803) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:780) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:583) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1080) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1003) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:507) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1322) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:325) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1069) at org.apache.catalina.core.StandardHost.start(StandardHost.java:822) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463) at org.apache.catalina.core.StandardService.start(StandardService.java:525) at org.apache.catalina.core.StandardServer.start(StandardServer.java:759) at org.apache.catalina.startup.Catalina.start(Catalina.java:595) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) 我用的JDK1.8,应该不是版本问题。 我的applicationcontext.xml写在src下beans.xml中,web.xml中有配置: <context-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:beans.xml</param-value> </context-param> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class </listener> 而且冲报的错(Unexpected exception parsing XML document from class path resource [beans.xml]; )中也可以看出找到了beans.xml这个文件但解析异常,求大神帮忙看看!
HTTP Status 500 - Servlet.init()
HTTP Status 500 - Servlet.init() for servlet springmvc threw exception type Exception report message Servlet.init() for servlet springmvc threw exception description The server encountered an internal error that prevented it from fulfilling this request. exception javax.servlet.ServletException: Servlet.init() for servlet springmvc threw exception org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023) org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589) org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312) java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) java.lang.Thread.run(Thread.java:745) root cause java.lang.IllegalArgumentException org.springframework.asm.ClassReader.<init>(Unknown Source) org.springframework.asm.ClassReader.<init>(Unknown Source) org.springframework.asm.ClassReader.<init>(Unknown Source) org.springframework.core.type.classreading.SimpleMetadataReader.<init>(SimpleMetadataReader.java:52) org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:80) org.springframework.core.type.classreading.CachingMetadataReaderFactory.getMetadataReader(CachingMetadataReaderFactory.java:101) org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:76) org.springframework.context.annotation.ConfigurationClassParser.getImports(ConfigurationClassParser.java:298) org.springframework.context.annotation.ConfigurationClassParser.getImports(ConfigurationClassParser.java:300) org.springframework.context.annotation.ConfigurationClassParser.getImports(ConfigurationClassParser.java:300) org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:230) org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:153) org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:130) org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:285) org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:223) org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:630) org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:461) org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:647) org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:598) org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:661) org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:517) org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:458) org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:138) javax.servlet.GenericServlet.init(GenericServlet.java:160) org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023) org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589) org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312) java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) java.lang.Thread.run(Thread.java:745) note The full stack trace of the root cause is available in the Apache Tomcat/7.0.42 logs. 请指点这是什么原因造成的哦,我在myeclipse开启tomcat就不会出现此错误 web中的配置是 <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5"> <display-name>springmvcfirst1208</display-name> <!-- 加载spring的容器读取speing下面的配置文件 --> <!-- 加载spring容器 --> <context-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/classes/spring/applicationContext-*.xml</param-value> </context-param> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <!-- springmvc前端控制器 --> <servlet> <servlet-name>springmvc</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> --> <init-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:spring/springmvc.xml</param-value> </init-param> </servlet> <servlet-mapping> <servlet-name>springmvc</servlet-name> <url-pattern>*.action</url-pattern> </servlet-mapping> <!-- post乱码过虑器 --> <filter> <filter-name>CharacterEncodingFilter</filter-name> <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class> <init-param> <param-name>encoding</param-name> <param-value>utf-8</param-value> </init-param> </filter> <filter-mapping> <filter-name>CharacterEncodingFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <welcome-file-list> <welcome-file>index.html</welcome-file> <welcome-file>index.htm</welcome-file> <welcome-file>index.jsp</welcome-file> <welcome-file>default.html</welcome-file> <welcome-file>default.htm</welcome-file> <welcome-file>default.jsp</welcome-file> </welcome-file-list> </web-app>
Spring hibernate 整合问题
2009-3-17 14:24:38 org.apache.catalina.core.AprLifecycleListener init 信息: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\Program Files\Java\jre1.6.0_04\bin;D:\Program Files\MyEclipse 6.0\eclipse\plugins\com.genuitec.eclipse.easie.tomcat.myeclipse_6.0.1.zmyeclipse601200710\tomcat\bin 2009-3-17 14:24:38 org.apache.coyote.http11.Http11Protocol init 信息: Initializing Coyote HTTP/1.1 on http-8080 2009-3-17 14:24:38 org.apache.catalina.startup.Catalina load 信息: Initialization processed in 994 ms 2009-3-17 14:24:38 org.apache.catalina.core.StandardService start 信息: Starting service Catalina 2009-3-17 14:24:38 org.apache.catalina.core.StandardEngine start 信息: Starting Servlet Engine: Apache Tomcat/6.0.13 log4j:WARN No such property [conversionPattern] in org.apache.log4j.TTCCLayout. 2009-3-17 14:24:40 org.apache.catalina.core.ApplicationContext log 信息: Initializing Spring root WebApplicationContext 2009-03-17 14:24:40 [org.springframework.web.context.ContextLoader]-[INFO] Root WebApplicationContext: initialization started 2009-03-17 14:24:41 [org.springframework.web.context.support.XmlWebApplicationContext]-[INFO] Refreshing org.springframework.web.context.support.XmlWebApplicationContext@1d0e2c9: display name [Root WebApplicationContext]; startup date [Tue Mar 17 14:24:41 CST 2009]; root of context hierarchy 2009-03-17 14:24:41 [org.springframework.beans.factory.xml.XmlBeanDefinitionReader]-[INFO] Loading XML bean definitions from URL [file:/E:/Test/workspace/.metadata/.plugins/com.genuitec.eclipse.easie.tomcat.myeclipse/tomcat/webapps/supermarket/WEB-INF/classes/config/spring/applicationContext.xml] 2009-03-17 14:24:42 [org.springframework.web.context.support.XmlWebApplicationContext]-[INFO] Bean factory for application context [org.springframework.web.context.support.XmlWebApplicationContext@1d0e2c9]: org.springframework.beans.factory.support.DefaultListableBeanFactory@5e7663 2009-03-17 14:24:42 [org.springframework.beans.factory.support.DefaultListableBeanFactory]-[INFO] Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@5e7663: defining beans [sessionFactorys,registerOperatorDAO,registerOperatorService,registerOperatorAction]; root of factory hierarchy 2009-03-17 14:24:42 [org.springframework.beans.factory.support.DefaultListableBeanFactory]-[INFO] Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@5e7663: defining beans [sessionFactorys,registerOperatorDAO,registerOperatorService,registerOperatorAction]; root of factory hierarchy 2009-03-17 14:24:42 [org.springframework.web.context.ContextLoader]-[ERROR] Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactorys' defined in URL [file:/E:/Test/workspace/.metadata/.plugins/com.genuitec.eclipse.easie.tomcat.myeclipse/tomcat/webapps/supermarket/WEB-INF/classes/config/spring/applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.orm.hibernate3.LocalSessionFactoryBean]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/dom4j/DocumentException at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:883) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:839) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:423) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4334) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:566) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.orm.hibernate3.LocalSessionFactoryBean]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/dom4j/DocumentException at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:115) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:61) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:877) ... 40 more Caused by: java.lang.NoClassDefFoundError: org/dom4j/DocumentException at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at org.springframework.orm.hibernate3.LocalSessionFactoryBean.class$(LocalSessionFactoryBean.java:174) at org.springframework.orm.hibernate3.LocalSessionFactoryBean.<init>(LocalSessionFactoryBean.java:174) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:100) ... 42 more Caused by: java.lang.ClassNotFoundException: org.dom4j.DocumentException at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204) at java.lang.ClassLoader.loadClassInternal(Unknown Source) ... 51 more 2009-3-17 14:24:42 org.apache.catalina.core.StandardContext listenerStart 严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactorys' defined in URL [file:/E:/Test/workspace/.metadata/.plugins/com.genuitec.eclipse.easie.tomcat.myeclipse/tomcat/webapps/supermarket/WEB-INF/classes/config/spring/applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.orm.hibernate3.LocalSessionFactoryBean]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/dom4j/DocumentException at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:883) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:839) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:423) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4334) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:566) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.orm.hibernate3.LocalSessionFactoryBean]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/dom4j/DocumentException at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:115) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:61) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:877) ... 40 more Caused by: java.lang.NoClassDefFoundError: org/dom4j/DocumentException at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at org.springframework.orm.hibernate3.LocalSessionFactoryBean.class$(LocalSessionFactoryBean.java:174) at org.springframework.orm.hibernate3.LocalSessionFactoryBean.<init>(LocalSessionFactoryBean.java:174) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:100) ... 42 more Caused by: java.lang.ClassNotFoundException: org.dom4j.DocumentException at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204) at java.lang.ClassLoader.loadClassInternal(Unknown Source) ... 51 more 2009-3-17 14:24:42 org.apache.catalina.core.StandardContext start 严重: Error listenerStart 2009-3-17 14:24:42 org.apache.catalina.core.StandardContext start 严重: Context [/supermarket] startup failed due to previous errors 2009-3-17 14:24:42 org.apache.catalina.core.ApplicationContext log 信息: Closing Spring root WebApplicationContext 2009-3-17 14:24:43 org.apache.coyote.http11.Http11Protocol start 信息: Starting Coyote HTTP/1.1 on http-8080 2009-3-17 14:24:43 org.apache.jk.common.ChannelSocket init 信息: JK: ajp13 listening on /0.0.0.0:8009 2009-3-17 14:24:43 org.apache.jk.server.JkMain start 信息: Jk running ID=0 time=0/47 config=null 2009-3-17 14:24:43 org.apache.catalina.startup.Catalina start 信息: Server startup in 4940 ms 配置文件如下 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd" default-autowire="byName"> <bean name="sessionFactorys" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> <property name="configLocation" value="classpath:hibernate.cfg.xml"> </property> </bean> <bean name="registerOperatorDAO" class="org.xsd.supermarket.system.operator.operator.impl.OperatorDAOImpl"> <property name="sessionFactorys" ref="sessionFactorys"></property> </bean> <bean name="registerOperatorService" class="org.xsd.supermarket.system.operator.operator.impl.OperatorServicesImpl"> <property name="registerOperatorDAO" ref="registerOperatorDAO"></property> </bean> <bean name="registerOperatorAction" class="org.xsd.supermarket.system.operator.operator.OperatorAction"> <property name="registerOperatorService" ref="registerOperatorService"></property> </bean> </beans> 用到的JAR包如下: <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/hibernate/hibernate3.jar"/> <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/spring/spring.jar"/> <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/struts/commons-logging-1.0.4.jar"/> <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/struts/freemarker-2.3.13.jar"/> <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/struts/ognl-2.6.11.jar"/> <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/struts/struts2-core-2.1.6.jar"/> <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/struts/struts2-spring-plugin-2.1.6.jar"/> <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/struts/xwork-2.1.2.jar"/> <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/tools/log4j-1.2.14.jar"/> <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/tools/mysql-connector-java-5.0.5-bin.jar"/> <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/tools/commons-beanutils.jar"/> <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/tools/dom4j-1.6.1.jar"/> <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/tools/jaxen-1.1-beta-7.jar"/> <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/tools/cglib-nodep-2.1_3.jar"/> <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/tools/asm-2.2.3.jar"/> <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/tools/asm-commons-2.2.3.jar"/> <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/tools/asm-util-2.2.3.jar"/> <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/tools/jta.jar"/> <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/tools/aspectjweaver.jar"/>
大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了
大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...
在中国程序员是青春饭吗?
今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...
《MySQL 性能优化》之理解 MySQL 体系结构
本文介绍 MySQL 的体系结构,包括物理结构、逻辑结构以及插件式存储引擎。
python自动下载图片
近日闲来无事,总有一种无形的力量萦绕在朕身边,让朕精神涣散,昏昏欲睡。 可是,像朕这么有职业操守的社畜怎么能在上班期间睡瞌睡呢,我不禁陷入了沉思。。。。 突然旁边的IOS同事问:‘嘿,兄弟,我发现一个网站的图片很有意思啊,能不能帮我保存下来提升我的开发灵感?’ 作为一个坚强的社畜怎么能说自己不行呢,当时朕就不假思索的答应:‘oh, It’s simple. Wait for me for a ...
一名大专同学的四个问题
【前言】   收到一封来信,赶上各种事情拖了几日,利用今天要放下工作的时机,做个回复。   2020年到了,就以这一封信,作为开年标志吧。 【正文】   您好,我是一名现在有很多困惑的大二学生。有一些问题想要向您请教。   先说一下我的基本情况,高考失利,不想复读,来到广州一所大专读计算机应用技术专业。学校是偏艺术类的,计算机专业没有实验室更不用说工作室了。而且学校的学风也不好。但我很想在计算机领...
复习一周,京东+百度一面,不小心都拿了Offer
京东和百度一面都问了啥,面试官百般刁难,可惜我全会。
达摩院十大科技趋势发布:2020 非同小可!
【CSDN编者按】1月2日,阿里巴巴发布《达摩院2020十大科技趋势》,十大科技趋势分别是:人工智能从感知智能向认知智能演进;计算存储一体化突破AI算力瓶颈;工业互联网的超融合;机器间大规模协作成为可能;模块化降低芯片设计门槛;规模化生产级区块链应用将走入大众;量子计算进入攻坚期;新材料推动半导体器件革新;保护数据隐私的AI技术将加速落地;云成为IT技术创新的中心 。 新的画卷,正在徐徐展开。...
轻松搭建基于 SpringBoot + Vue 的 Web 商城应用
首先介绍下在本文出现的几个比较重要的概念: 函数计算(Function Compute): 函数计算是一个事件驱动的服务,通过函数计算,用户无需管理服务器等运行情况,只需编写代码并上传。函数计算准备计算资源,并以弹性伸缩的方式运行用户代码,而用户只需根据实际代码运行所消耗的资源进行付费。Fun: Fun 是一个用于支持 Serverless 应用部署的工具,能帮助您便捷地管理函数计算、API ...
Python+OpenCV实时图像处理
目录 1、导入库文件 2、设计GUI 3、调用摄像头 4、实时图像处理 4.1、阈值二值化 4.2、边缘检测 4.3、轮廓检测 4.4、高斯滤波 4.5、色彩转换 4.6、调节对比度 5、退出系统 初学OpenCV图像处理的小伙伴肯定对什么高斯函数、滤波处理、阈值二值化等特性非常头疼,这里给各位分享一个小项目,可通过摄像头实时动态查看各类图像处理的特点,也可对各位调参、测试...
2020年一线城市程序员工资大调查
人才需求 一线城市共发布岗位38115个,招聘120827人。 其中 beijing 22805 guangzhou 25081 shanghai 39614 shenzhen 33327 工资分布 2020年中国一线城市程序员的平均工资为16285元,工资中位数为14583元,其中95%的人的工资位于5000到20000元之间。 和往年数据比较: yea...
为什么猝死的都是程序员,基本上不见产品经理猝死呢?
相信大家时不时听到程序员猝死的消息,但是基本上听不到产品经理猝死的消息,这是为什么呢? 我们先百度搜一下:程序员猝死,出现将近700多万条搜索结果: 搜索一下:产品经理猝死,只有400万条的搜索结果,从搜索结果数量上来看,程序员猝死的搜索结果就比产品经理猝死的搜索结果高了一倍,而且从下图可以看到,首页里面的五条搜索结果,其实只有两条才是符合条件。 所以程序员猝死的概率真的比产品经理大,并不是错...
害怕面试被问HashMap?这一篇就搞定了!
声明:本文以jdk1.8为主! 搞定HashMap 作为一个Java从业者,面试的时候肯定会被问到过HashMap,因为对于HashMap来说,可以说是Java集合中的精髓了,如果你觉得自己对它掌握的还不够好,我想今天这篇文章会非常适合你,至少,看了今天这篇文章,以后不怕面试被问HashMap了 其实在我学习HashMap的过程中,我个人觉得HashMap还是挺复杂的,如果真的想把它搞得明明白...
毕业5年,我问遍了身边的大佬,总结了他们的学习方法
我问了身边10个大佬,总结了他们的学习方法,原来成功都是有迹可循的。
python爬取百部电影数据,我分析出了一个残酷的真相
2019年就这么匆匆过去了,就在前几天国家电影局发布了2019年中国电影市场数据,数据显示去年总票房为642.66亿元,同比增长5.4%;国产电影总票房411.75亿元,同比增长8.65%,市场占比 64.07%;城市院线观影人次17.27亿,同比增长0.64%。 看上去似乎是一片大好对不对?不过作为一名严谨求实的数据分析师,我从官方数据中看出了一点端倪:国产票房增幅都已经高达8.65%了,为什...
推荐10个堪称神器的学习网站
每天都会收到很多读者的私信,问我:“二哥,有什么推荐的学习网站吗?最近很浮躁,手头的一些网站都看烦了,想看看二哥这里有什么新鲜货。” 今天一早做了个恶梦,梦到被老板辞退了。虽然说在我们公司,只有我辞退老板的份,没有老板辞退我这一说,但是还是被吓得 4 点多都起来了。(主要是因为我掌握着公司所有的核心源码,哈哈哈) 既然 4 点多起来,就得好好利用起来。于是我就挑选了 10 个堪称神器的学习网站,推...
这些软件太强了,Windows必装!尤其程序员!
Windows可谓是大多数人的生产力工具,集娱乐办公于一体,虽然在程序员这个群体中都说苹果是信仰,但是大部分不都是从Windows过来的,而且现在依然有很多的程序员用Windows。 所以,今天我就把我私藏的Windows必装的软件分享给大家,如果有一个你没有用过甚至没有听过,那你就赚了????,这可都是提升你幸福感的高效率生产力工具哦! 走起!???? NO、1 ScreenToGif 屏幕,摄像头和白板...
阿里面试,面试官没想到一个ArrayList,我都能跟他扯半小时
我是真的没想到,面试官会这样问我ArrayList。
曾经优秀的人,怎么就突然不优秀了。
职场上有很多辛酸事,很多合伙人出局的故事,很多技术骨干被裁员的故事。说来模板都类似,曾经是名校毕业,曾经是优秀员工,曾经被领导表扬,曾经业绩突出,然而突然有一天,因为种种原因,被裁员了,...
大学四年因为知道了这32个网站,我成了别人眼中的大神!
依稀记得,毕业那天,我们导员发给我毕业证的时候对我说“你可是咱们系的风云人物啊”,哎呀,别提当时多开心啦????,嗯,我们导员是所有导员中最帅的一个,真的???? 不过,导员说的是实话,很多人都叫我大神的,为啥,因为我知道这32个网站啊,你说强不强????,这次是绝对的干货,看好啦,走起来! PS:每个网站都是学计算机混互联网必须知道的,真的牛杯,我就不过多介绍了,大家自行探索,觉得没用的,尽管留言吐槽吧???? 社...
良心推荐,我珍藏的一些Chrome插件
上次搬家的时候,发了一个朋友圈,附带的照片中不小心暴露了自己的 Chrome 浏览器插件之多,于是就有小伙伴评论说分享一下我觉得还不错的浏览器插件。 我下面就把我日常工作和学习中经常用到的一些 Chrome 浏览器插件分享给大家,随便一个都能提高你的“生活品质”和工作效率。 Markdown Here Markdown Here 可以让你更愉快的写邮件,由于支持 Markdown 直接转电子邮...
看完这篇HTTP,跟面试官扯皮就没问题了
我是一名程序员,我的主要编程语言是 Java,我更是一名 Web 开发人员,所以我必须要了解 HTTP,所以本篇文章就来带你从 HTTP 入门到进阶,看完让你有一种恍然大悟、醍醐灌顶的感觉。 最初在有网络之前,我们的电脑都是单机的,单机系统是孤立的,我还记得 05 年前那会儿家里有个电脑,想打电脑游戏还得两个人在一个电脑上玩儿,及其不方便。我就想为什么家里人不让上网,我的同学 xxx 家里有网,每...
史上最全的IDEA快捷键总结
现在Idea成了主流开发工具,这篇博客对其使用的快捷键做了总结,希望对大家的开发工作有所帮助。
C++(数据结构与算法):62---搜索树(二叉搜索树、索引二叉搜索树)
一、搜索树的复杂度分析 本文考察二叉搜索树和索引二叉搜索树 二叉搜索树的渐进性能可以和跳表媲美: 查找、插入、删除操作所需的平均时间为Θ(logn) 查找、插入、删除操作的最坏情况的时间为Θ(n) 元素按升序输出时所需时间为Θ(n) 虽然在最坏情况下的查找、插入、删除操作,散列表和二叉搜索树的时间性能相同,但是散列表在最好的情况下具有超级性能Θ(1) 不过,对于一个指定的关键...
阿里程序员写了一个新手都写不出的低级bug,被骂惨了。
这种新手都不会范的错,居然被一个工作好几年的小伙子写出来,差点被当场开除了。
谁是华为扫地僧?
是的,华为也有扫地僧!2020年2月11-12日,“养在深闺人不知”的华为2012实验室扫地僧们,将在华为开发者大会2020(Cloud)上,和大家见面。到时,你可以和扫地僧们,吃一个洋...
AI 没让人类失业,搞 AI 的人先失业了
最近和几个 AI 领域的大佬闲聊 根据他们讲的消息和段子 改编出下面这个故事 如有雷同 都是巧合 1. 老王创业失败,被限制高消费 “这里写我跑路的消息实在太夸张了。” 王葱葱哼笑一下,把消息分享给群里。 阿杰也看了消息,笑了笑。在座几位也都笑了。 王葱葱是个有名的人物,21岁那年以全额奖学金进入 KMU 攻读人工智能博士,累计发表论文 40 余篇,个人技术博客更是成为深度学习领域内风向标。 ...
2020年,冯唐49岁:我给20、30岁IT职场年轻人的建议
点击“技术领导力”关注∆每天早上8:30推送 作者|Mr.K 编辑| Emma 来源|技术领导力(ID:jishulingdaoli) 前天的推文《冯唐:职场人35岁以后,方法论比经验重要》,收到了不少读者的反馈,觉得挺受启发。其实,冯唐写了不少关于职场方面的文章,都挺不错的。可惜大家只记住了“春风十里不如你”、“如何避免成为油腻腻的中年人”等不那么正经的文章。 本文整理了冯...
最全最强!世界大学计算机专业排名总结!
我正在参与CSDN200进20,希望得到您的支持,扫码续投票5次。感谢您! (为表示感谢,您投票后私信我,我把我总结的人工智能手推笔记和思维导图发送给您,感谢!) 目录 泰晤士高等教育世界大学排名 QS 世界大学排名 US News 世界大学排名 世界大学学术排名(Academic Ranking of World Universities) 泰晤士高等教育世界大学排名 中国共...
作为一名大学生,如何在B站上快乐的学习?
B站是个宝,谁用谁知道???? 作为一名大学生,你必须掌握的一项能力就是自学能力,很多看起来很牛X的人,你可以了解下,人家私底下一定是花大量的时间自学的,你可能会说,我也想学习啊,可是嘞,该学习啥嘞,不怕告诉你,互联网时代,最不缺的就是学习资源,最宝贵的是啥? 你可能会说是时间,不,不是时间,而是你的注意力,懂了吧! 那么,你说学习资源多,我咋不知道,那今天我就告诉你一个你必须知道的学习的地方,人称...
那些年,我们信了课本里的那些鬼话
教材永远都是有错误的,从小学到大学,我们不断的学习了很多错误知识。 斑羚飞渡 在我们学习的很多小学课文里,有很多是错误文章,或者说是假课文。像《斑羚飞渡》: 随着镰刀头羊的那声吼叫,整个斑羚群迅速分成两拨,老年斑羚为一拨,年轻斑羚为一拨。 就在这时,我看见,从那拨老斑羚里走出一只公斑羚来。公斑羚朝那拨年轻斑羚示意性地咩了一声,一只半大的斑羚应声走了出来。一老一少走到伤心崖,后退了几步,突...
立即提问