zhangkaitao / es

JavaEE项目开发脚手架(我的公众号:kaitao-1234567,我的新书:《亿级流量网站架构核心技术》)
https://github.com/zhangkaitao/es
Apache License 2.0
2.17k stars 1.59k forks source link

启动后停留在SpringMVC初始化阶段无反应 #67

Open blooming opened 10 years ago

blooming commented 10 years ago

开涛你好,我在本机执行各脚本均没有报错(db-maven-plugin的下载需要翻墙),也把src/main/resources/spring-speed-up.xml中的profile改了,最后执行jetty.bat后,启动过程停止在了SpringMVC的初始化阶段,怎么也不往下走了,请问这是我哪里做的不对吗? es_error

blooming commented 10 years ago

用Tomcat启动也是同样的问题

jptiancai commented 9 years ago

@blooming 我用mvn clean tomcat:run命令启动,试着改了jetty.bat中的文件, 在公司无法上传图片,把控制台的信息粘贴过来吧

[INFO]  tomcat starting
[INFO] Scanning for projects...
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:mave
n-assembly-plugin:2.2-beta-5: Failed to parse plugin descriptor for org.apache.m
aven.plugins:maven-assembly-plugin:2.2-beta-5 (C:\Maven\repo\m2\org\apache\maven
\plugins\maven-assembly-plugin\2.2-beta-5\maven-assembly-plugin-2.2-beta-5.jar):
 error in opening zip file
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building web 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:mave
n-assembly-plugin:2.2-beta-5: Failed to parse plugin descriptor for org.apache.m
aven.plugins:maven-assembly-plugin:2.2-beta-5 (C:\Maven\repo\m2\org\apache\maven
\plugins\maven-assembly-plugin\2.2-beta-5\maven-assembly-plugin-2.2-beta-5.jar):
 error in opening zip file
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ es-web ---
[INFO] Deleting C:\Users\zhajiang\GithubProject\es-master\web\target
[INFO]
[INFO] >>> tomcat-maven-plugin:1.1:run (default-cli) @ es-web >>>
[INFO]
[INFO] --- maven-enforcer-plugin:1.0-beta-1:enforce (enforce-versions) @ es-web
---
[INFO]
[INFO] --- native2ascii-maven-plugin:1.0-alpha-1:native2ascii (default) @ es-web
 ---
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ es-web ---

[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 40 resources
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.0:compile (default-compile) @ es-web ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 219 source files to C:\Users\zhajiang\GithubProject\es-master\w
eb\target\classes
[WARNING] 注意:某些输入文件使用或覆盖了已过时的 API。
[WARNING] 注意:要了解详细信息,请使用 -Xlint:deprecation 重新编译。
[WARNING] 注意:某些输入文件使用了未经检查或不安全的操作。
[WARNING] 注意:要了解详细信息,请使用 -Xlint:unchecked 重新编译。
[INFO]
[INFO] <<< tomcat-maven-plugin:1.1:run (default-cli) @ es-web <<<
[INFO]
[INFO] --- tomcat-maven-plugin:1.1:run (default-cli) @ es-web ---
[INFO] Running war on http://localhost:8080/es-web
[INFO] Creating Tomcat server configuration at C:\Users\zhajiang\GithubProject\e
s-master\web\target\tomcat
2014-9-30 17:53:53 org.apache.catalina.startup.Embedded start
信息: Starting tomcat server
2014-9-30 17:53:53 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/6.0.29
2014-9-30 17:53:55 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring root WebApplicationContext
2014-9-30 17:54:02 com.alibaba.druid.pool.DruidDataSource info
信息: {dataSource-1} inited
Hibernate: select taskdefini0_.id as id1_4_, taskdefini0_.bean_class as bean_cla
2_4_, taskdefini0_.bean_name as bean_nam3_4_, taskdefini0_.cron as cron4_4_, tas
kdefini0_.description as descript5_4_, taskdefini0_.method_name as method_n6_4_,
 taskdefini0_.name as name7_4_, taskdefini0_.is_start as is_start8_4_ from maint
ain_task_definition taskdefini0_ where 1=1
2014-9-30 17:54:16 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring FrameworkServlet 'spring'
2014-9-30 17:54:22 org.apache.coyote.http11.Http11Protocol init
信息: Initializing Coyote HTTP/1.1 on http-8080
2014-9-30 17:54:22 org.apache.coyote.http11.Http11Protocol start
信息: Starting Coyote HTTP/1.1 on http-8080

其中出现一行信息,打开浏览器输入地址就成功了.你再试试

[INFO] Running war on http://localhost:8080/es-web
yyh19890221 commented 9 years ago

也出现了 一楼的问题 三楼的方法还是一样 有解决的吗?

huguangju commented 9 years ago

同问 :question:

wolfGit commented 9 years ago

你需要修改设置maven启动的内存大小! 查找%M2_HOME%\bin。修改该目录下的mvn.bat文件 查找@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 添加: set MAVEN_OPTS=-Xmx512m -XX:MaxPermSize=128m

huguangju commented 9 years ago

@wolfGit 这是解决 java.lang.OutOfMemoryError: Java heap space 运行maven内存溢出的方法,跟此问题无关吧

gmboonie commented 9 years ago

@huguangju 你解决这个问题了没有呢?同问。

xForMe commented 9 years ago

wo 的也是,启动了半天都没有效果

xianlaizhang commented 9 years ago

十一月 30, 2014 11:00:33 下午 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/permittedTaglibs is already defin ed 十一月 30, 2014 11:00:33 下午 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/scriptfree is already defined 十一月 30, 2014 11:00:33 下午 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://java.sun.com/jstl/sql_rt is already defined 十一月 30, 2014 11:00:33 下午 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://java.sun.com/jstl/sql is already defined 十一月 30, 2014 11:00:33 下午 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://java.sun.com/jsp/jstl/sql is already defined 十一月 30, 2014 11:00:33 下午 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://java.sun.com/jstl/xml_rt is already defined 十一月 30, 2014 11:00:33 下午 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://java.sun.com/jstl/xml is already defined 十一月 30, 2014 11:00:33 下午 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://java.sun.com/jsp/jstl/xml is already defined 十一月 30, 2014 11:00:34 下午 org.apache.catalina.core.ApplicationContext log 信息: No Spring WebApplicationInitializer types detected on classpath 十一月 30, 2014 11:00:34 下午 org.apache.catalina.core.ApplicationContext log 信息: Initializing Spring root WebApplicationContext 十一月 30, 2014 11:00:43 下午 com.alibaba.druid.pool.DruidDataSource info 信息: {dataSource-1} inited Hibernate: select taskdefini0_.id as id14, taskdefini0_.bean_class as bean_cla24, taskdefini0_.b ean_name as bean_nam34, taskdefini0_.cron as cron44, taskdefini0_.description as descript54, t askdefini0_.method_name as method_n64, taskdefini0_.name as name74, taskdefini0_.isstart as is start84 from maintain_taskdefinition taskdefini0 where 1=1 十一月 30, 2014 11:01:38 下午 org.apache.catalina.core.ApplicationContext log 信息: Initializing Spring FrameworkServlet 'spring' 同问?一只卡在这里....

wolfGit commented 9 years ago

最近工作有点忙,忘了回复大家解决问题了! es的demo,本人在自己电脑中通过测试。 如果你们遇到这个问题后,不知道可不可以先修改一下Maven的内存和Java的内存设置。

本人电脑测试,需要修改的内容如下:

修改设置maven启动的内存大小。 查找%M2_HOME%\bin。修改该目录下的mvn.bat文件 查找@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 添加: set MAVEN_OPTS=-Xmx512m -XX:MaxPermSize=128m

xianlaizhang commented 9 years ago

@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
set MAVEN_OPTS=-Xmx512m -XX:MaxPermSize=128m 这个已经设置了,还是出现同样的问题?我使用的环境是jdk1.8.20 maven是3.2.2,请问你编译使用的环境是什么,可以编译运行的,谢谢

xForMe commented 9 years ago

同上

rmx2909149 commented 9 years ago

同样的问题,一直没解决。 在tomcat中部署显示如下错误。 二月 05, 2015 11:17:07 下午 org.apache.catalina.core.ApplicationContext log 信息: No Spring WebApplicationInitializer types detected on classpath 二月 05, 2015 11:17:10 下午 org.apache.catalina.core.ApplicationContext log 信息: Initializing Spring root WebApplicationContext 二月 05, 2015 11:17:10 下午 org.apache.catalina.core.StandardContext listenerStart 严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener java.lang.NullPointerException at org.apache.catalina.webresources.AbstractArchiveResource.getContent(AbstractArchiveResource.java:163) at org.apache.catalina.loader.WebappClassLoader.findResourceInternal(WebappClassLoader.java:2589) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2414) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:880) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1294) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1177) at org.springframework.util.ClassUtils.forName(ClassUtils.java:238) at org.springframework.web.context.ContextLoader.determineContextClass(ContextLoader.java:406) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:342) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:280)

ewawa commented 9 years ago

最后怎么解决的?

ewawa commented 9 years ago

已解决:jdk一定要用1.6的,1.7不行。

Jdoing commented 9 years ago

把JDK版本从jdk1.7.0_79改为jdk1.7.0_17就行了

virtuecai commented 9 years ago

福利来了, 解决方案已验证升级spring版本 http://blog.csdn.net/penker_zhao/article/details/46401245 本人用的64位jdk测试通过.

guangxinCool commented 7 years ago

我出现了卡在log4j那不动了。发现是mybatis中resultMap命名成resultType这个了。