常見錯誤總結


編譯hadoop2.2版本步驟:http://blog.csdn.net/hebutscs/article/details/29359635

wordcount程序:http://www.cnblogs.com/minkaihui/p/4074035.html

maven構建本地倉庫命令:mvn install:install-file -Dfile=sinaWeibo.jar -DgroupId=com.test.tanyy -DartifactId=qqLoginSdk4J -Dversion=1.0 -Dpackaging=jar

log4j數據寫入到數據庫:http://demojava.iteye.com/blog/1067627

 

1、tomcat啟動時,出現下面錯誤,然后tomcat不能正常關閉:

九月 06, 2014 9:53:43 上午 org.apache.catalina.core.StandardServer await
警告: StandardServer.await: Invalid command 'SUTDOWN' received

 2、運行頁面,偶爾出現

  1. Could not initialize class com.jx.classes.backend.container.ServiceProvider
  2. Could not instantiate bean class [com.jx.classes.backend.action.MainAction]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: Could not initialize class com.jx.classes.backend.container.ServiceProvider
  3. Error creating bean with name 'com.jx.classes.backend.action.MainAction': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.jx.classes.backend.action.MainAction]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: Could not initialize class com.jx.classes.backend.container.ServiceProvider
  4. Unable to instantiate Action, com.jx.classes.backend.action.MainAction, defined for 'main_index' in namespace '/'Error creating bean with name 'com.jx.classes.backend.action.MainAction': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.jx.classes.backend.action.MainAction]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: Could not initialize class com.jx.classes.backend.container.ServiceProvider

3、Caused by: java.lang.ClassNotFoundException: org.springframework.aop.support.AopUtils

      at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 32 more

在spring項目中找到modules 加入spring-aop.jar即可

 4、使用maven編譯hadoop2.2出錯:

Failed to execute goal org.apache.hadoop:hadoop-maven-plugins:2.2.0:protoc (compile-protoc) on project hadoop-common: org.apache.maven.plugin.MojoExecutionException: protoc version is 'libprotoc 2.4.1', expected version is '2.5.0' -> [Help 1]

5、Failed to execute goal org.apache.hadoop:hadoop-maven-plugins:2.2.0:protoc (compile-protoc) on project hadoop-common: org.apache.maven.plugin.MojoExecutionException: protoc failure

 

使用spring mvc和maven 的時候報錯:java.lang.ClassNotFoundException: org.springframework.web.util.Log4jConfigListener

解決辦法:ctrl+Enter 報錯項目->Deployment Assembly->Add->Java buid path entries->Next->Maven Dependencies

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM