Closed Joe6688 closed 9 years ago
springside-core 这个依赖在你本地的repository有没有?
我先来说下你这两种操作的原理 1、maven build 遵循maven的project模型和build周期,读取pom文件解析依赖、资源、源文件等进行编译生成指定的目标package 2、eclipse export 遵循eclipse的project模块,使用jdt的compile和eclipse的build周期,在.project里读取工程信息,在.classpath里读取依赖、资源、源文件等编译生成指定的目标package
你所描述的问题可能的原因: 可能你使用maven导入工程模型后,手动加入了springside的jar依赖,而这个手动加入的过程是遵循eclipse的工程模型;表现就是在你的project下面除了maven dependencys的jars外,还有直接引用的jar文件; 另外一个可能就是这些jar放入了web-inf/lib目录里面,而eclipse export会包含这些jars,但maven的build周期不会包含这些jars,这个可能性比较大。
改正,希望你遵循maven的规范,所依赖的jars都使用maven仓库引入,而不是放在本地;即使防在本地,也要按照maven的build周期正确复制到target的目标目录中。
@jacarrichan 多谢回复,springside-core 在本地有的啊,maven出来的war包lib里面也都包含所有需要的jar包
@joelin 天呐,多谢你解释这么多!我现在知道两者的具体区别了!但是我感觉不是手动加入jar包的问题,因为springside的依赖包我还是使用的库里面的,只是一些辅助的包例如json解析的jar包,极光推送的jar包是手动加入的。而且maven出来的war包在lib目录下也是有所有需要的依赖包的。
最开始我也怀疑是jar的问题,但是我对比了下,jar包是一个不缺的。然后我用eclipse导出war里面的文件去替换maven出来的文件,发现,当我把classes里面的所有文件替换后,就没有错误了。maven出来的war里面的classes文件好像有问题。
然后我又用target下面classes里面的文件去替换maven导出war文件里面的classes,发现也是可以正常启动的,所以我感觉是classes编译问题。我现在还在对比尝试中。网上也搜了很多,但是很少有我这种情况,我也是实在不知该如何才来这里提问题的。再次多谢回复!
mvn dependency:tree
能不能把结果贴进来?
@jacarrichan 下面是结果
[INFO] com.jie.net.laugh:laugh-web:war:1.0.0 [INFO] +- cn.jpush.api:jpush-client:jar:3.2.3:system [INFO] +- com.qiniu.api:qiniu-java-sdk:jar:6.1.9:system [INFO] +- com.squareup.okhttp:okhttp:jar:2.3.0:system [INFO] +- okio:okio:jar:1.3.0:system [INFO] +- org.json:json:jar:1.0.0:system [INFO] +- com.goolge.gson:json:jar:2.2.4:system [INFO] +- it.sauronsoftware.jave:jave:jar:1.0.2:system [INFO] +- org.springside:springside-core:jar:4.2.3-GA:compile [INFO] +- org.hibernate:hibernate-entitymanager:jar:4.3.5.Final:compile [INFO] | +- org.jboss.logging:jboss-logging:jar:3.1.3.GA:compile [INFO] | +- org.jboss.logging:jboss-logging-annotations:jar:1.2.0.Beta1:compile [INFO] | +- org.hibernate:hibernate-core:jar:4.3.5.Final:compile [INFO] | | +- antlr:antlr:jar:2.7.7:compile [INFO] | | - org.jboss:jandex:jar:1.1.0.Final:compile [INFO] | +- dom4j:dom4j:jar:1.6.1:compile [INFO] | | - xml-apis:xml-apis:jar:1.0.b2:compile [INFO] | +- org.hibernate.common:hibernate-commons-annotations:jar:4.0.4.Final:compile [INFO] | +- org.hibernate.javax.persistence:hibernate-jpa-2.1-api:jar:1.0.0.Final:compile [INFO] | +- org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:jar:1.0.0.Final:compile [INFO] | - org.javassist:javassist:jar:3.18.1-GA:compile [INFO] +- org.springframework.data:spring-data-jpa:jar:1.6.0.RELEASE:compile [INFO] | +- org.springframework.data:spring-data-commons:jar:1.8.0.RELEASE:compile [INFO] | +- org.springframework:spring-orm:jar:4.0.5.RELEASE:compile [INFO] | | - org.springframework:spring-jdbc:jar:4.0.5.RELEASE:compile [INFO] | +- org.springframework:spring-context:jar:4.0.5.RELEASE:compile [INFO] | +- org.springframework:spring-aop:jar:4.0.5.RELEASE:compile [INFO] | | - aopalliance:aopalliance:jar:1.0:compile [INFO] | +- org.springframework:spring-tx:jar:4.0.5.RELEASE:compile [INFO] | +- org.springframework:spring-beans:jar:4.0.5.RELEASE:compile [INFO] | - org.springframework:spring-core:jar:4.0.5.RELEASE:compile [INFO] +- org.aspectj:aspectjrt:jar:1.7.4:compile [INFO] +- org.aspectj:aspectjweaver:jar:1.7.4:runtime [INFO] +- org.apache.tomcat:tomcat-jdbc:jar:7.0.53:runtime [INFO] | - org.apache.tomcat:tomcat-juli:jar:7.0.53:runtime [INFO] +- mysql:mysql-connector-java:jar:5.1.22:runtime [INFO] +- org.springframework:spring-webmvc:jar:4.0.5.RELEASE:compile [INFO] | +- org.springframework:spring-expression:jar:4.0.5.RELEASE:compile [INFO] | - org.springframework:spring-web:jar:4.0.5.RELEASE:compile [INFO] +- opensymphony:sitemesh:jar:2.4.2:runtime [INFO] +- javax.servlet:jstl:jar:1.2:compile [INFO] +- javax.servlet:javax.servlet-api:jar:3.0.1:provided [INFO] +- javax.servlet.jsp:jsp-api:jar:2.2:compile [INFO] +- org.apache.shiro:shiro-spring:jar:1.2.3:compile [INFO] | +- org.apache.shiro:shiro-core:jar:1.2.3:compile [INFO] | | - commons-beanutils:commons-beanutils:jar:1.8.3:compile [INFO] | - org.apache.shiro:shiro-web:jar:1.2.3:compile [INFO] +- org.apache.shiro:shiro-ehcache:jar:1.2.3:compile [INFO] | - net.sf.ehcache:ehcache-core:jar:2.6.9:compile [INFO] +- commons-codec:commons-codec:jar:1.9:compile [INFO] +- org.hibernate:hibernate-validator:jar:5.0.3.Final:compile [INFO] | +- javax.validation:validation-api:jar:1.1.0.Final:compile [INFO] | - com.fasterxml:classmate:jar:1.0.0:compile [INFO] +- com.fasterxml.jackson.core:jackson-databind:jar:2.4.0:compile [INFO] | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.4.0:compile [INFO] | - com.fasterxml.jackson.core:jackson-core:jar:2.4.0:compile [INFO] +- com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.4.0:compile [INFO] +- org.slf4j:slf4j-api:jar:1.7.7:compile [INFO] +- ch.qos.logback:logback-classic:jar:1.1.2:runtime [INFO] | - ch.qos.logback:logback-core:jar:1.1.2:runtime [INFO] +- org.slf4j:log4j-over-slf4j:jar:1.7.7:runtime [INFO] +- org.slf4j:jcl-over-slf4j:jar:1.7.7:runtime [INFO] +- org.slf4j:jul-to-slf4j:jar:1.7.7:runtime [INFO] +- com.googlecode.log4jdbc:log4jdbc:jar:1.2:runtime [INFO] +- org.apache.commons:commons-lang3:jar:3.3.2:compile [INFO] +- com.google.guava:guava:jar:17.0:compile [INFO] - commons-fileupload:commons-fileupload:jar:1.3.1:compile [INFO] - commons-io:commons-io:jar:2.2:compile [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 28.167 s [INFO] Finished at: 2015-05-07T11:46:40+08:00 [INFO] Final Memory: 13M/215M [INFO] ------------------------------------------------------------------------
你JDK安装在哪个目录?
如果项目不需要保密的话,能不能push上来? 大家到自己机器上跑跑看
@jacarrichan
D:\work_tools\Java\jdk1.6.0_43 这个有问题吗?
@jacarrichan 这个好像不太方便呢,这个项目刚上线了,我看看能不能把一些业务代码删掉然后传上来
@jacarrichan 可以了!!!打的包可以成功部署了!!! 把 .classpath 里面的output由原来的target改成WEB-INF下就成功了!!!
<classpathentry kind="output" path="target/classes"/> 改成 <classpathentry kind="output" path="src/main/webapp/WEB-INF/classes"/>
不过这是为毛啊!!!!!
你最后回复内容貌似与你的早期描述的问题不符合。。。。
@joelin 我也不懂!反正改了这个地方就好了!这个地方不改的话,maven打出来的war包部署就会报错!
你使用eclipse的maven插件? 你把classpath的 <classpathentry kind="src" path="src/main/java" output=> 这一行贴出来看看,另外如果是用eclipse的maven插件,那就是用m2e来做build的,我原来还以为你用命令行进行build的。如果你干扰了配置,修改了classes的目标,那就没办法了
@joelin 噢,原来是这样,我是用的eclipse的maven插件,不过昨天我试过 mvn eclipse:clean eclipse:eclipse ,然后再重新 mvn clean package ,但是还是不行。
下面是现在成功后的classpath文件
<?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="src" path="src/test/java" output="target/test-classes" including="*/.java"/> <classpathentry kind="src" path="src/main/java" including="**/_.java"/> <classpathentry kind="src" path="src/main/resources" excluding="_/.java"/> <classpathentry kind="output" path="src/main/webapp/WEB-INF/classes"/> <classpathentry kind="var" path="M2_REPO/javax/servlet/jstl/1.2/jstl-1.2.jar"/> <classpathentry kind="var" path="M2_REPO/javax/servlet/javax.servlet-api/3.0.1/javax.servlet-api-3.0.1.jar"/> <classpathentry kind="var" path="M2_REPO/javax/servlet/jsp/jsp-api/2.2/jsp-api-2.2.jar"/> <classpathentry kind="var" path="M2_REPO/javax/validation/validation-api/1.1.0.Final/validation-api-1.1.0.Final.jar"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="lib" path="src/main/webapp/WEB-INF/lib/jpush-client-3.2.3.jar"/> <classpathentry kind="lib" path="src/main/webapp/WEB-INF/lib/qiniu-java-sdk-6.1.9.jar"/> <classpathentry kind="lib" path="src/main/webapp/WEB-INF/lib/okhttp-2.3.0-SNAPSHOT.jar"/> <classpathentry kind="lib" path="src/main/webapp/WEB-INF/lib/okio-1.3.0-SNAPSHOT.jar"/> <classpathentry kind="lib" path="src/main/webapp/WEB-INF/lib/json-java.jar"/> <classpathentry kind="lib" path="src/main/webapp/WEB-INF/lib/gson-2.2.4.jar"/> <classpathentry kind="lib" path="src/main/webapp/WEB-INF/lib/jave-1.0.2.jar"/> <classpathentry kind="var" path="M2_REPO/org/springside/springside-core/4.2.3-GA/springside-core-4.2.3-GA.jar" sourcepath="M2_REPO/org/springside/springside-core/4.2.3-GA/springside-core-4.2.3-GA-sources.jar"/> <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-entitymanager/4.3.5.Final/hibernate-entitymanager-4.3.5.Final.jar"/> <classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging/3.1.3.GA/jboss-logging-3.1.3.GA.jar"/> <classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging-annotations/1.2.0.Beta1/jboss-logging-annotations-1.2.0.Beta1.jar"/> <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-core/4.3.5.Final/hibernate-core-4.3.5.Final.jar"/> <classpathentry kind="var" path="M2_REPO/org/jboss/spec/javax/transaction/jboss-transaction-api_1.2_spec/1.0.0.Final/jboss-transaction-api_1.2_spec-1.0.0.Final.jar"/> <classpathentry kind="var" path="M2_REPO/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar"/> <classpathentry kind="var" path="M2_REPO/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar"/> <classpathentry kind="var" path="M2_REPO/org/hibernate/common/hibernate-commons-annotations/4.0.4.Final/hibernate-commons-annotations-4.0.4.Final.jar"/> <classpathentry kind="var" path="M2_REPO/org/hibernate/javax/persistence/hibernate-jpa-2.1-api/1.0.0.Final/hibernate-jpa-2.1-api-1.0.0.Final.jar"/> <classpathentry kind="var" path="M2_REPO/org/javassist/javassist/3.18.1-GA/javassist-3.18.1-GA.jar"/> <classpathentry kind="var" path="M2_REPO/antlr/antlr/2.7.7/antlr-2.7.7.jar"/> <classpathentry kind="var" path="M2_REPO/org/jboss/jandex/1.1.0.Final/jandex-1.1.0.Final.jar"/> <classpathentry kind="var" path="M2_REPO/org/springframework/data/spring-data-jpa/1.6.0.RELEASE/spring-data-jpa-1.6.0.RELEASE.jar"/> <classpathentry kind="var" path="M2_REPO/org/springframework/data/spring-data-commons/1.8.0.RELEASE/spring-data-commons-1.8.0.RELEASE.jar"/> <classpathentry kind="var" path="M2_REPO/org/springframework/spring-core/4.0.5.RELEASE/spring-core-4.0.5.RELEASE.jar"/> <classpathentry kind="var" path="M2_REPO/org/springframework/spring-beans/4.0.5.RELEASE/spring-beans-4.0.5.RELEASE.jar"/> <classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-api/1.7.7/slf4j-api-1.7.7.jar"/> <classpathentry kind="var" path="M2_REPO/org/slf4j/jcl-over-slf4j/1.7.7/jcl-over-slf4j-1.7.7.jar"/> <classpathentry kind="var" path="M2_REPO/org/springframework/spring-orm/4.0.5.RELEASE/spring-orm-4.0.5.RELEASE.jar"/> <classpathentry kind="var" path="M2_REPO/org/springframework/spring-jdbc/4.0.5.RELEASE/spring-jdbc-4.0.5.RELEASE.jar"/> <classpathentry kind="var" path="M2_REPO/org/springframework/spring-tx/4.0.5.RELEASE/spring-tx-4.0.5.RELEASE.jar"/> <classpathentry kind="var" path="M2_REPO/org/springframework/spring-context/4.0.5.RELEASE/spring-context-4.0.5.RELEASE.jar"/> <classpathentry kind="var" path="M2_REPO/org/springframework/spring-aop/4.0.5.RELEASE/spring-aop-4.0.5.RELEASE.jar"/> <classpathentry kind="var" path="M2_REPO/aopalliance/aopalliance/1.0/aopalliance-1.0.jar"/> <classpathentry kind="var" path="M2_REPO/org/springframework/spring-expression/4.0.5.RELEASE/spring-expression-4.0.5.RELEASE.jar"/> <classpathentry kind="var" path="M2_REPO/org/aspectj/aspectjrt/1.7.4/aspectjrt-1.7.4.jar"/> <classpathentry kind="var" path="M2_REPO/org/aspectj/aspectjweaver/1.7.4/aspectjweaver-1.7.4.jar"/> <classpathentry kind="var" path="M2_REPO/org/apache/tomcat/tomcat-jdbc/7.0.53/tomcat-jdbc-7.0.53.jar"/> <classpathentry kind="var" path="M2_REPO/org/apache/tomcat/tomcat-juli/7.0.53/tomcat-juli-7.0.53.jar"/> <classpathentry kind="var" path="M2_REPO/mysql/mysql-connector-java/5.1.22/mysql-connector-java-5.1.22.jar"/> <classpathentry kind="var" path="M2_REPO/org/springframework/spring-webmvc/4.0.5.RELEASE/spring-webmvc-4.0.5.RELEASE.jar"/> <classpathentry kind="var" path="M2_REPO/org/springframework/spring-web/4.0.5.RELEASE/spring-web-4.0.5.RELEASE.jar"/> <classpathentry kind="var" path="M2_REPO/opensymphony/sitemesh/2.4.2/sitemesh-2.4.2.jar"/> <classpathentry kind="var" path="M2_REPO/org/apache/shiro/shiro-spring/1.2.3/shiro-spring-1.2.3.jar"/> <classpathentry kind="var" path="M2_REPO/org/apache/shiro/shiro-core/1.2.3/shiro-core-1.2.3.jar" sourcepath="M2_REPO/org/apache/shiro/shiro-core/1.2.3/shiro-core-1.2.3-sources.jar"/> <classpathentry kind="var" path="M2_REPO/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar" sourcepath="M2_REPO/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3-sources.jar"/> <classpathentry kind="var" path="M2_REPO/org/apache/shiro/shiro-web/1.2.3/shiro-web-1.2.3.jar" sourcepath="M2_REPO/org/apache/shiro/shiro-web/1.2.3/shiro-web-1.2.3-sources.jar"/> <classpathentry kind="var" path="M2_REPO/org/apache/shiro/shiro-ehcache/1.2.3/shiro-ehcache-1.2.3.jar"/> <classpathentry kind="var" path="M2_REPO/net/sf/ehcache/ehcache-core/2.6.9/ehcache-core-2.6.9.jar"/> <classpathentry kind="var" path="M2_REPO/commons-codec/commons-codec/1.9/commons-codec-1.9.jar"/> <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-validator/5.0.3.Final/hibernate-validator-5.0.3.Final.jar"/> <classpathentry kind="var" path="M2_REPO/com/fasterxml/classmate/1.0.0/classmate-1.0.0.jar"/> <classpathentry kind="var" path="M2_REPO/com/fasterxml/jackson/core/jackson-databind/2.4.0/jackson-databind-2.4.0.jar"/> <classpathentry kind="var" path="M2_REPO/com/fasterxml/jackson/core/jackson-annotations/2.4.0/jackson-annotations-2.4.0.jar"/> <classpathentry kind="var" path="M2_REPO/com/fasterxml/jackson/core/jackson-core/2.4.0/jackson-core-2.4.0.jar"/> <classpathentry kind="var" path="M2_REPO/com/fasterxml/jackson/module/jackson-module-jaxb-annotations/2.4.0/jackson-module-jaxb-annotations-2.4.0.jar"/> <classpathentry kind="var" path="M2_REPO/ch/qos/logback/logback-classic/1.1.2/logback-classic-1.1.2.jar"/> <classpathentry kind="var" path="M2_REPO/ch/qos/logback/logback-core/1.1.2/logback-core-1.1.2.jar"/> <classpathentry kind="var" path="M2_REPO/org/slf4j/log4j-over-slf4j/1.7.7/log4j-over-slf4j-1.7.7.jar"/> <classpathentry kind="var" path="M2_REPO/org/slf4j/jul-to-slf4j/1.7.7/jul-to-slf4j-1.7.7.jar"/> <classpathentry kind="var" path="M2_REPO/com/googlecode/log4jdbc/log4jdbc/1.2/log4jdbc-1.2.jar"/> <classpathentry kind="var" path="M2_REPO/org/apache/commons/commons-lang3/3.3.2/commons-lang3-3.3.2.jar"/> <classpathentry kind="var" path="M2_REPO/com/google/guava/guava/17.0/guava-17.0.jar"/> <classpathentry kind="var" path="M2_REPO/commons-fileupload/commons-fileupload/1.3.1/commons-fileupload-1.3.1.jar"/> <classpathentry kind="var" path="M2_REPO/commons-io/commons-io/2.2/commons-io-2.2.jar"/> </classpath>
使用maven生成war包放在tomcat下报错,但是使用eclipse导出的war包却不报错,好像是class文件编译问题,用部署成功后的classes文件覆盖后,启动正常,以下是报错信息和pom.xml
信息: Deploying web application archive D:\work_tools\apache\apache-tomcat-7.0.54\webapps\laugh-web.war 2015-5-5 17:02:46 org.apache.tomcat.websocket.server.WsSci onStartup 信息: JSR 356 WebSocket (Java WebSocket 1.0) support is not available when running on Java 6. To suppress this message, run Tomcat on Java 7, remove the WebSocket JARs from $CATALINA_HOME/lib or add the WebSocket JARs to the tomcat.util.scan.DefaultJarScanner.jarsToSkip property in $CATALINA_BASE/conf/catalina.properties. Note that the deprecated Tomcat 7 WebSocket API will be available. 2015-5-5 17:02:46 org.apache.catalina.core.ApplicationContext log 信息: No Spring WebApplicationInitializer types detected on classpath 2015-5-5 17:02:46 org.apache.catalina.core.ApplicationContext log 信息: Initializing Spring root WebApplicationContext 17:02:47.787 [localhost-startStop-1] ERROR o.s.web.context.ContextLoader - Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shiroFilter' defined in URL [file:/D:/work_tools/apache/apache-tomcat-7.0.54/webapps/laugh-web/WEB-INF/classes/applicationContext-shiro.xml]: Cannot resolve reference to bean 'securityManager' while setting bean property 'securityManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityManager' defined in URL [file:/D:/work_tools/apache/apache-tomcat-7.0.54/webapps/laugh-web/WEB-INF/classes/applicationContext-shiro.xml]: Cannot resolve reference to bean 'shiroDbRealm' while setting bean property 'realm'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shiroDbRealm' defined in URL [file:/D:/work_tools/apache/apache-tomcat-7.0.54/webapps/laugh-web/WEB-INF/classes/applicationContext-shiro.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.jie.net.laugh.service.mainuser.ShiroDbRealm]: Constructor threw exception; nested exception is java.lang.Error: Unresolved compilation problems: The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.springside.modules.utils cannot be resolved The import com.google.common cannot be resolved AuthorizingRealm cannot be resolved to a type AuthenticationInfo cannot be resolved to a type AuthenticationToken cannot be resolved to a type AuthenticationException cannot be resolved to a type UsernamePasswordToken cannot be resolved to a type UsernamePasswordToken cannot be resolved to a type Encodes cannot be resolved SecurityUtils cannot be resolved SimpleAuthenticationInfo cannot be resolved to a type ByteSource cannot be resolved The method getName() is undefined for the type ShiroDbRealm AuthorizationInfo cannot be resolved to a type PrincipalCollection cannot be resolved to a type SimpleAuthorizationInfo cannot be resolved to a type SimpleAuthorizationInfo cannot be resolved to a type HashedCredentialsMatcher cannot be resolved to a type HashedCredentialsMatcher cannot be resolved to a type Objects cannot be resolved
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityManager' defined in URL [file:/D:/work_tools/apache/apache-tomcat-7.0.54/webapps/laugh-web/WEB-INF/classes/applicationContext-shiro.xml]: Cannot resolve reference to bean 'shiroDbRealm' while setting bean property 'realm'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shiroDbRealm' defined in URL [file:/D:/work_tools/apache/apache-tomcat-7.0.54/webapps/laugh-web/WEB-INF/classes/applicationContext-shiro.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.jie.net.laugh.service.mainuser.ShiroDbRealm]: Constructor threw exception; nested exception is java.lang.Error: Unresolved compilation problems: The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.springside.modules.utils cannot be resolved The import com.google.common cannot be resolved AuthorizingRealm cannot be resolved to a type AuthenticationInfo cannot be resolved to a type AuthenticationToken cannot be resolved to a type AuthenticationException cannot be resolved to a type UsernamePasswordToken cannot be resolved to a type UsernamePasswordToken cannot be resolved to a type Encodes cannot be resolved SecurityUtils cannot be resolved SimpleAuthenticationInfo cannot be resolved to a type ByteSource cannot be resolved The method getName() is undefined for the type ShiroDbRealm AuthorizationInfo cannot be resolved to a type PrincipalCollection cannot be resolved to a type SimpleAuthorizationInfo cannot be resolved to a type SimpleAuthorizationInfo cannot be resolved to a type HashedCredentialsMatcher cannot be resolved to a type HashedCredentialsMatcher cannot be resolved to a type Objects cannot be resolved
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shiroDbRealm' defined in URL [file:/D:/work_tools/apache/apache-tomcat-7.0.54/webapps/laugh-web/WEB-INF/classes/applicationContext-shiro.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.jie.net.laugh.service.mainuser.ShiroDbRealm]: Constructor threw exception; nested exception is java.lang.Error: Unresolved compilation problems: The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.springside.modules.utils cannot be resolved The import com.google.common cannot be resolved AuthorizingRealm cannot be resolved to a type AuthenticationInfo cannot be resolved to a type AuthenticationToken cannot be resolved to a type AuthenticationException cannot be resolved to a type UsernamePasswordToken cannot be resolved to a type UsernamePasswordToken cannot be resolved to a type Encodes cannot be resolved SecurityUtils cannot be resolved SimpleAuthenticationInfo cannot be resolved to a type ByteSource cannot be resolved The method getName() is undefined for the type ShiroDbRealm AuthorizationInfo cannot be resolved to a type PrincipalCollection cannot be resolved to a type SimpleAuthorizationInfo cannot be resolved to a type SimpleAuthorizationInfo cannot be resolved to a type HashedCredentialsMatcher cannot be resolved to a type HashedCredentialsMatcher cannot be resolved to a type Objects cannot be resolved
Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.jie.net.laugh.service.mainuser.ShiroDbRealm]: Constructor threw exception; nested exception is java.lang.Error: Unresolved compilation problems: The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.springside.modules.utils cannot be resolved The import com.google.common cannot be resolved AuthorizingRealm cannot be resolved to a type AuthenticationInfo cannot be resolved to a type AuthenticationToken cannot be resolved to a type AuthenticationException cannot be resolved to a type UsernamePasswordToken cannot be resolved to a type UsernamePasswordToken cannot be resolved to a type Encodes cannot be resolved SecurityUtils cannot be resolved SimpleAuthenticationInfo cannot be resolved to a type ByteSource cannot be resolved The method getName() is undefined for the type ShiroDbRealm AuthorizationInfo cannot be resolved to a type PrincipalCollection cannot be resolved to a type SimpleAuthorizationInfo cannot be resolved to a type SimpleAuthorizationInfo cannot be resolved to a type HashedCredentialsMatcher cannot be resolved to a type HashedCredentialsMatcher cannot be resolved to a type Objects cannot be resolved
Caused by: java.lang.Error: Unresolved compilation problems: The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.springside.modules.utils cannot be resolved The import com.google.common cannot be resolved AuthorizingRealm cannot be resolved to a type AuthenticationInfo cannot be resolved to a type AuthenticationToken cannot be resolved to a type AuthenticationException cannot be resolved to a type UsernamePasswordToken cannot be resolved to a type UsernamePasswordToken cannot be resolved to a type Encodes cannot be resolved SecurityUtils cannot be resolved SimpleAuthenticationInfo cannot be resolved to a type ByteSource cannot be resolved The method getName() is undefined for the type ShiroDbRealm AuthorizationInfo cannot be resolved to a type PrincipalCollection cannot be resolved to a type SimpleAuthorizationInfo cannot be resolved to a type SimpleAuthorizationInfo cannot be resolved to a type HashedCredentialsMatcher cannot be resolved to a type HashedCredentialsMatcher cannot be resolved to a type Objects cannot be resolved
2015-5-5 17:02:47 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 'shiroFilter' defined in URL [file:/D:/work_tools/apache/apache-tomcat-7.0.54/webapps/laugh-web/WEB-INF/classes/applicationContext-shiro.xml]: Cannot resolve reference to bean 'securityManager' while setting bean property 'securityManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityManager' defined in URL [file:/D:/work_tools/apache/apache-tomcat-7.0.54/webapps/laugh-web/WEB-INF/classes/applicationContext-shiro.xml]: Cannot resolve reference to bean 'shiroDbRealm' while setting bean property 'realm'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shiroDbRealm' defined in URL [file:/D:/work_tools/apache/apache-tomcat-7.0.54/webapps/laugh-web/WEB-INF/classes/applicationContext-shiro.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.jie.net.laugh.service.mainuser.ShiroDbRealm]: Constructor threw exception; nested exception is java.lang.Error: Unresolved compilation problems: The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.springside.modules.utils cannot be resolved The import com.google.common cannot be resolved AuthorizingRealm cannot be resolved to a type AuthenticationInfo cannot be resolved to a type AuthenticationToken cannot be resolved to a type AuthenticationException cannot be resolved to a type UsernamePasswordToken cannot be resolved to a type UsernamePasswordToken cannot be resolved to a type Encodes cannot be resolved SecurityUtils cannot be resolved SimpleAuthenticationInfo cannot be resolved to a type ByteSource cannot be resolved The method getName() is undefined for the type ShiroDbRealm AuthorizationInfo cannot be resolved to a type PrincipalCollection cannot be resolved to a type SimpleAuthorizationInfo cannot be resolved to a type SimpleAuthorizationInfo cannot be resolved to a type HashedCredentialsMatcher cannot be resolved to a type HashedCredentialsMatcher cannot be resolved to a type Objects cannot be resolved
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityManager' defined in URL [file:/D:/work_tools/apache/apache-tomcat-7.0.54/webapps/laugh-web/WEB-INF/classes/applicationContext-shiro.xml]: Cannot resolve reference to bean 'shiroDbRealm' while setting bean property 'realm'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shiroDbRealm' defined in URL [file:/D:/work_tools/apache/apache-tomcat-7.0.54/webapps/laugh-web/WEB-INF/classes/applicationContext-shiro.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.jie.net.laugh.service.mainuser.ShiroDbRealm]: Constructor threw exception; nested exception is java.lang.Error: Unresolved compilation problems: The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.springside.modules.utils cannot be resolved The import com.google.common cannot be resolved AuthorizingRealm cannot be resolved to a type AuthenticationInfo cannot be resolved to a type AuthenticationToken cannot be resolved to a type AuthenticationException cannot be resolved to a type UsernamePasswordToken cannot be resolved to a type UsernamePasswordToken cannot be resolved to a type Encodes cannot be resolved SecurityUtils cannot be resolved SimpleAuthenticationInfo cannot be resolved to a type ByteSource cannot be resolved The method getName() is undefined for the type ShiroDbRealm AuthorizationInfo cannot be resolved to a type PrincipalCollection cannot be resolved to a type SimpleAuthorizationInfo cannot be resolved to a type SimpleAuthorizationInfo cannot be resolved to a type HashedCredentialsMatcher cannot be resolved to a type HashedCredentialsMatcher cannot be resolved to a type Objects cannot be resolved
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shiroDbRealm' defined in URL [file:/D:/work_tools/apache/apache-tomcat-7.0.54/webapps/laugh-web/WEB-INF/classes/applicationContext-shiro.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.jie.net.laugh.service.mainuser.ShiroDbRealm]: Constructor threw exception; nested exception is java.lang.Error: Unresolved compilation problems: The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.springside.modules.utils cannot be resolved The import com.google.common cannot be resolved AuthorizingRealm cannot be resolved to a type AuthenticationInfo cannot be resolved to a type AuthenticationToken cannot be resolved to a type AuthenticationException cannot be resolved to a type UsernamePasswordToken cannot be resolved to a type UsernamePasswordToken cannot be resolved to a type Encodes cannot be resolved SecurityUtils cannot be resolved SimpleAuthenticationInfo cannot be resolved to a type ByteSource cannot be resolved The method getName() is undefined for the type ShiroDbRealm AuthorizationInfo cannot be resolved to a type PrincipalCollection cannot be resolved to a type SimpleAuthorizationInfo cannot be resolved to a type SimpleAuthorizationInfo cannot be resolved to a type HashedCredentialsMatcher cannot be resolved to a type HashedCredentialsMatcher cannot be resolved to a type Objects cannot be resolved
Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.jie.net.laugh.service.mainuser.ShiroDbRealm]: Constructor threw exception; nested exception is java.lang.Error: Unresolved compilation problems: The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.springside.modules.utils cannot be resolved The import com.google.common cannot be resolved AuthorizingRealm cannot be resolved to a type AuthenticationInfo cannot be resolved to a type AuthenticationToken cannot be resolved to a type AuthenticationException cannot be resolved to a type UsernamePasswordToken cannot be resolved to a type UsernamePasswordToken cannot be resolved to a type Encodes cannot be resolved SecurityUtils cannot be resolved SimpleAuthenticationInfo cannot be resolved to a type ByteSource cannot be resolved The method getName() is undefined for the type ShiroDbRealm AuthorizationInfo cannot be resolved to a type PrincipalCollection cannot be resolved to a type SimpleAuthorizationInfo cannot be resolved to a type SimpleAuthorizationInfo cannot be resolved to a type HashedCredentialsMatcher cannot be resolved to a type HashedCredentialsMatcher cannot be resolved to a type Objects cannot be resolved
Caused by: java.lang.Error: Unresolved compilation problems: The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved The import org.springside.modules.utils cannot be resolved The import com.google.common cannot be resolved AuthorizingRealm cannot be resolved to a type AuthenticationInfo cannot be resolved to a type AuthenticationToken cannot be resolved to a type AuthenticationException cannot be resolved to a type UsernamePasswordToken cannot be resolved to a type UsernamePasswordToken cannot be resolved to a type Encodes cannot be resolved SecurityUtils cannot be resolved SimpleAuthenticationInfo cannot be resolved to a type ByteSource cannot be resolved The method getName() is undefined for the type ShiroDbRealm AuthorizationInfo cannot be resolved to a type PrincipalCollection cannot be resolved to a type SimpleAuthorizationInfo cannot be resolved to a type SimpleAuthorizationInfo cannot be resolved to a type HashedCredentialsMatcher cannot be resolved to a type HashedCredentialsMatcher cannot be resolved to a type Objects cannot be resolved
======================================分割线================================
<?xml version="1.0" encoding="UTF-8"?>