前言:
而今兄弟们对“myeclipse导入war包”大体比较关切,你们都想要知道一些“myeclipse导入war包”的相关知识。那么小编同时在网络上收集了一些有关“myeclipse导入war包””的相关文章,希望小伙伴们能喜欢,兄弟们一起来学习一下吧!1. 找不到dubbo2.8.4包的问题
在编译Maven工程的过程中,出现如下问题:
Description Resource Path Location TypeArtifactDescriptorException: Failed to read artifact descriptor for com.alibaba:dubbo:jar:2.8.4: UnresolvableModelException: Failure to find com.alibaba:dubbo-parent:pom:2.8.4 in was cached in the local repository, resolution will not be reattempted until the update interval of thirdparty has elapsed or updates are forced pom.xml /FileIO line 1 Maven Dependency Problem
本地Maven的配置如下:settings.xml:
<settings xmlns="" xmlns:xsi="" xsi:schemaLocation=" "> <mirrors><mirror><id>CN</id><name>OSChina Central</name> <url>;/url><mirrorOf>central</mirrorOf></mirror></mirrors><localRepository>D:\Java\m2\repository</localRepository></settings>
可见,本地的Maven库存放位置为:D:\Java\m2\repository,在这个目录下,有如下结构(正常情况下,异常情况下是没有这个结果的,而且dubbo2.8.4这个版本没有公开发布到maven中心库,需要自己进行编译,编译成功后,就可以得到如下的文件结构):
编译过程:1.从github上将大猫download下来,下载地址:
下载下来后,解压,在解压后的路径中,执行: mvn install -Dmaven.test.skip=true
执行完毕后,就可以生成本地maven库中dubbo的目录结构,这样工程中所有使用dubbo2.8.4的地方,都可以正常的编译:
2. 用Maven构建web工程,出现如下错误:
Description Resource Path Location TypeThe superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path index.jsp /web Maven Webapp/src/main/webapp line 1 JSP Problem
这个错误是因为没有导入web工程的运行时环境导致的,解决办法如下:
然后将project clean后,重新构建,错误自动消失。
3. 修改项目的JDK版本,有时会出现MyEclipse打出的war包,部署到Tomcat服务器上不能够使用的情况,错误一般如下,对于这种情况,要认真检查项目使用JDK版本,以及服务器运行时的JDK版本,只要匹配就不会有问题。
Unsupported major.minor version 52.0 (unable to load class:What it means is that , your code is compiled with different version of java to java version which is running it . make sure you compile and runt it with the same version if java.
4. Maven POM中添加的 Spring版本和Myeclipse提供的Spring版本中出现冲突,解决办法是将Myeclipse中自带的Spring 4.1从Build中移除掉:
十一月 12, 2015 8:16:31 下午 org.apache.catalina.startup.VersionLoggerListener log信息: Server version: Apache Tomcat/8.0.21十一月 12, 2015 8:16:31 下午 org.apache.catalina.startup.VersionLoggerListener log信息: Server built: Mar 23 2015 14:11:21 UTC十一月 12, 2015 8:16:31 下午 org.apache.catalina.startup.VersionLoggerListener log信息: Server number: 8.0.21.0十一月 12, 2015 8:16:31 下午 org.apache.catalina.startup.VersionLoggerListener log信息: OS Name: Windows 7十一月 12, 2015 8:16:31 下午 org.apache.catalina.startup.VersionLoggerListener log信息: OS Version: 6.1十一月 12, 2015 8:16:31 下午 org.apache.catalina.startup.VersionLoggerListener log信息: Architecture: amd64十一月 12, 2015 8:16:31 下午 org.apache.catalina.startup.VersionLoggerListener log信息: Java Home: C:\Program Files\Java\jdk1.8.0_45\jre十一月 12, 2015 8:16:31 下午 org.apache.catalina.startup.VersionLoggerListener log信息: JVM Version: 1.8.0_45-b14十一月 12, 2015 8:16:31 下午 org.apache.catalina.startup.VersionLoggerListener log信息: JVM Vendor: Oracle Corporation十一月 12, 2015 8:16:31 下午 org.apache.catalina.startup.VersionLoggerListener log信息: CATALINA_BASE: D:\tools\apache-tomcat-8.0.21十一月 12, 2015 8:16:31 下午 org.apache.catalina.startup.VersionLoggerListener log信息: CATALINA_HOME: D:\tools\apache-tomcat-8.0.21十一月 12, 2015 8:16:31 下午 org.apache.catalina.startup.VersionLoggerListener log信息: Command line argument: -Dmaven.multiModuleProjectDirectory=M2_HOME十一月 12, 2015 8:16:31 下午 org.apache.catalina.startup.VersionLoggerListener log信息: Command line argument: -Dcatalina.base=D:\tools\apache-tomcat-8.0.21十一月 12, 2015 8:16:31 下午 org.apache.catalina.startup.VersionLoggerListener log信息: Command line argument: -Dcatalina.home=D:\tools\apache-tomcat-8.0.21十一月 12, 2015 8:16:31 下午 org.apache.catalina.startup.VersionLoggerListener log信息: Command line argument: -Dwtp.deploy=D:\tools\apache-tomcat-8.0.21\webapps十一月 12, 2015 8:16:31 下午 org.apache.catalina.startup.VersionLoggerListener log信息: Command line argument: -Djava.endorsed.dirs=D:\tools\apache-tomcat-8.0.21\endorsed十一月 12, 2015 8:16:31 下午 org.apache.catalina.startup.VersionLoggerListener log信息: Command line argument: -Djava.library.path=C:\Program Files\Java\jdk1.8.0_45\bin;D:\tools\apache-tomcat-8.0.21\bin十一月 12, 2015 8:16:31 下午 org.apache.catalina.startup.VersionLoggerListener log信息: Command line argument: -Dfile.encoding=GBK十一月 12, 2015 8:16:31 下午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent信息: Loaded APR based Apache Tomcat Native library 1.1.33 using APR version 1.5.1.十一月 12, 2015 8:16:31 下午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent信息: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].十一月 12, 2015 8:16:31 下午 org.apache.catalina.core.AprLifecycleListener initializeSSL信息: OpenSSL successfully initialized (OpenSSL 1.0.1m 19 Mar 2015)十一月 12, 2015 8:16:33 下午 org.apache.coyote.AbstractProtocol init信息: Initializing ProtocolHandler ["http-apr-8080"]十一月 12, 2015 8:16:33 下午 org.apache.coyote.AbstractProtocol init信息: Initializing ProtocolHandler ["ajp-apr-8009"]十一月 12, 2015 8:16:33 下午 org.apache.catalina.startup.Catalina load信息: Initialization processed in 2776 ms十一月 12, 2015 8:16:33 下午 org.apache.catalina.core.StandardService startInternal信息: Starting service Catalina十一月 12, 2015 8:16:33 下午 org.apache.catalina.core.StandardEngine startInternal信息: Starting Servlet Engine: Apache Tomcat/8.0.21十一月 12, 2015 8:16:33 下午 org.apache.catalina.startup.HostConfig deployDirectory信息: Deploying web application directory D:\tools\apache-tomcat-8.0.21\webapps\docs十一月 12, 2015 8:16:33 下午 org.apache.catalina.util.SessionIdGeneratorBase createSecureRandom信息: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [177] milliseconds.十一月 12, 2015 8:16:33 下午 org.apache.catalina.startup.HostConfig deployDirectory信息: Deployment of web application directory D:\tools\apache-tomcat-8.0.21\webapps\docs has finished in 623 ms十一月 12, 2015 8:16:33 下午 org.apache.catalina.startup.HostConfig deployDirectory信息: Deploying web application directory D:\tools\apache-tomcat-8.0.21\webapps\examples十一月 12, 2015 8:16:34 下午 org.apache.catalina.core.ApplicationContext log信息: ContextListener: contextInitialized()十一月 12, 2015 8:16:34 下午 org.apache.catalina.core.ApplicationContext log信息: SessionListener: contextInitialized()十一月 12, 2015 8:16:34 下午 org.apache.catalina.startup.HostConfig deployDirectory信息: Deployment of web application directory D:\tools\apache-tomcat-8.0.21\webapps\examples has finished in 439 ms十一月 12, 2015 8:16:34 下午 org.apache.catalina.startup.HostConfig deployDirectory信息: Deploying web application directory D:\tools\apache-tomcat-8.0.21\webapps\FileIO十一月 12, 2015 8:16:44 下午 org.apache.jasper.servlet.TldScanner scanJars信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.十一月 12, 2015 8:16:44 下午 org.apache.catalina.core.ApplicationContext log信息: No Spring WebApplicationInitializer types detected on classpath十一月 12, 2015 8:16:44 下午 org.apache.catalina.core.ApplicationContext log信息: Initializing Spring root WebApplicationContextlog4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).log4j:WARN Please initialize the log4j system properly.log4j:WARN See for more info.十一月 12, 2015 8:16:45 下午 org.apache.catalina.core.StandardContext listenerStart严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListenerorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'secretKeyService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void com.cetc.di.db.secretkeydb.service.impl.secretKeyServiceImpl.setSecretKeyMapper(com.cetc.di.db.secretkeydb.dao.secretKeyDtoMapper); nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.cetc.di.db.secretkeydb.dao.secretKeyDtoMapper] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}Related cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'secretKeyDtoMapper' defined in file [D:\tools\apache-tomcat-8.0.21\webapps\FileIO\WEB-INF\classes\com\cetc\di\db\secretkeydb\dao\secretKeyDtoMapper.class]: Cannot resolve reference to bean 'sqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring-mybatis.xml]: Cannot resolve reference to bean 'dataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [spring-mybatis.xml]: Initialization of bean failed; nested exception is java.lang.NoSuchMethodError: org.springframework.core.annotation.AnnotatedElementUtils.getMergedAnnotationAttributes(Ljava/lang/reflect/AnnotatedElement;Ljava/lang/Class;)Lorg/springframework/core/annotation/AnnotationAttributes; at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:326) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1204) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:538) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:229) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:725) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480) at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4728) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5166) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1096) at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1756) 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)Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void com.cetc.di.db.secretkeydb.service.impl.secretKeyServiceImpl.setSecretKeyMapper(com.cetc.di.db.secretkeydb.dao.secretKeyDtoMapper); nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.cetc.di.db.secretkeydb.dao.secretKeyDtoMapper] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {} at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:630) at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87) at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:323) ... 26 moreCaused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.cetc.di.db.secretkeydb.dao.secretKeyDtoMapper] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {} at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException(DefaultListableBeanFactory.java:1261) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1009) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:904) at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:587) ... 28 moreRelated cause:org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'secretKeyDtoMapper' defined in file [D:\tools\apache-tomcat-8.0.21\webapps\FileIO\WEB-INF\classes\com\cetc\di\db\secretkeydb\dao\secretKeyDtoMapper.class]: Cannot resolve reference to bean 'sqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring-mybatis.xml]: Cannot resolve reference to bean 'dataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [spring-mybatis.xml]: Initialization of bean failed; nested exception is java.lang.NoSuchMethodError: org.springframework.core.annotation.AnnotatedElementUtils.getMergedAnnotationAttributes(Ljava/lang/reflect/AnnotatedElement;Ljava/lang/Class;)Lorg/springframework/core/annotation/AnnotationAttributes; at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:336) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1471) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1216) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:538) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:229) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298) at org.springframework.beans.factory.support.AbstractBeanFactory.getTypeForFactoryBean(AbstractBeanFactory.java:1418) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryBean(AbstractAutowireCapableBeanFactory.java:803) at org.springframework.beans.factory.support.AbstractBeanFactory.isTypeMatch(AbstractBeanFactory.java:541) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:406) at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:381) at org.springframework.beans.factory.BeanFactoryUtils.beanNamesForTypeIncludingAncestors(BeanFactoryUtils.java:187) at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1066) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1006) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:904) at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:587) at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87) at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:323) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1204) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:538) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:229) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:725) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480) at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4728) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5166) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1096) at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1756) 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)Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring-mybatis.xml]: Cannot resolve reference to bean 'dataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [spring-mybatis.xml]: Initialization of bean failed; nested exception is java.lang.NoSuchMethodError: org.springframework.core.annotation.AnnotatedElementUtils.getMergedAnnotationAttributes(Ljava/lang/reflect/AnnotatedElement;Ljava/lang/Class;)Lorg/springframework/core/annotation/AnnotationAttributes; at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:336) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1471) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1216) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:538) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:229) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328) ... 46 moreCaused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [spring-mybatis.xml]: Initialization of bean failed; nested exception is java.lang.NoSuchMethodError: org.springframework.core.annotation.AnnotatedElementUtils.getMergedAnnotationAttributes(Ljava/lang/reflect/AnnotatedElement;Ljava/lang/Class;)Lorg/springframework/core/annotation/AnnotationAttributes; at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:548) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:229) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328) ... 56 moreCaused by: java.lang.NoSuchMethodError: org.springframework.core.annotation.AnnotatedElementUtils.getMergedAnnotationAttributes(Ljava/lang/reflect/AnnotatedElement;Ljava/lang/Class;)Lorg/springframework/core/annotation/AnnotationAttributes; at org.springframework.transaction.annotation.SpringTransactionAnnotationParser.parseTransactionAnnotation(SpringTransactionAnnotationParser.java:42) at org.springframework.transaction.annotation.AnnotationTransactionAttributeSource.determineTransactionAttribute(AnnotationTransactionAttributeSource.java:154) at org.springframework.transaction.annotation.AnnotationTransactionAttributeSource.findTransactionAttribute(AnnotationTransactionAttributeSource.java:133) at org.springframework.transaction.interceptor.AbstractFallbackTransactionAttributeSource.computeTransactionAttribute(AbstractFallbackTransactionAttributeSource.java:151) at org.springframework.transaction.interceptor.AbstractFallbackTransactionAttributeSource.getTransactionAttribute(AbstractFallbackTransactionAttributeSource.java:100) at org.springframework.transaction.interceptor.TransactionAttributeSourcePointcut.matches(TransactionAttributeSourcePointcut.java:41) at org.springframework.aop.support.AopUtils.canApply(AopUtils.java:225) at org.springframework.aop.support.AopUtils.canApply(AopUtils.java:262) at org.springframework.aop.support.AopUtils.findAdvisorsThatCanApply(AopUtils.java:294) at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findAdvisorsThatCanApply(AbstractAdvisorAutoProxyCreator.java:118) at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findEligibleAdvisors(AbstractAdvisorAutoProxyCreator.java:88) at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.getAdvicesAndAdvisorsForBean(AbstractAdvisorAutoProxyCreator.java:69) at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.wrapIfNecessary(AbstractAutoProxyCreator.java:328) at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization(AbstractAutoProxyCreator.java:291) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:422) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1573) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:540) ... 62 more十一月 12, 2015 8:16:45 下午 org.apache.catalina.core.StandardContext startInternal严重: Error listenerStart十一月 12, 2015 8:16:45 下午 org.apache.catalina.core.StandardContext startInternal严重: Context [/FileIO] startup failed due to previous errors十一月 12, 2015 8:16:45 下午 org.apache.catalina.core.StandardContext listenerStop严重: Exception sending context destroyed event to listener instance of class com.github.miemiedev.mybatis.paginator.CleanupMybatisPaginatorListenerjava.lang.NullPointerException at com.github.miemiedev.mybatis.paginator.CleanupMybatisPaginatorListener.contextDestroyed(CleanupMybatisPaginatorListener.java:15) at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4775) at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5389) at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:160) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1096) at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1756) 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)十一月 12, 2015 8:16:45 下午 org.apache.catalina.core.ApplicationContext log信息: Closing Spring root WebApplicationContext十一月 12, 2015 8:16:45 下午 org.apache.catalina.startup.HostConfig deployDirectory信息: Deployment of web application directory D:\tools\apache-tomcat-8.0.21\webapps\FileIO has finished in 11,456 ms十一月 12, 2015 8:16:45 下午 org.apache.catalina.startup.HostConfig deployDirectory信息: Deploying web application directory D:\tools\apache-tomcat-8.0.21\webapps\host-manager十一月 12, 2015 8:16:45 下午 org.apache.catalina.startup.HostConfig deployDirectory信息: Deployment of web application directory D:\tools\apache-tomcat-8.0.21\webapps\host-manager has finished in 35 ms十一月 12, 2015 8:16:45 下午 org.apache.catalina.startup.HostConfig deployDirectory信息: Deploying web application directory D:\tools\apache-tomcat-8.0.21\webapps\manager十一月 12, 2015 8:16:45 下午 org.apache.catalina.startup.HostConfig deployDirectory信息: Deployment of web application directory D:\tools\apache-tomcat-8.0.21\webapps\manager has finished in 15 ms十一月 12, 2015 8:16:45 下午 org.apache.catalina.startup.HostConfig deployDirectory信息: Deploying web application directory D:\tools\apache-tomcat-8.0.21\webapps\ROOT十一月 12, 2015 8:16:45 下午 org.apache.catalina.startup.HostConfig deployDirectory信息: Deployment of web application directory D:\tools\apache-tomcat-8.0.21\webapps\ROOT has finished in 9 ms十一月 12, 2015 8:16:45 下午 org.apache.coyote.AbstractProtocol start信息: Starting ProtocolHandler ["http-apr-8080"]十一月 12, 2015 8:16:45 下午 org.apache.coyote.AbstractProtocol start信息: Starting ProtocolHandler ["ajp-apr-8009"]十一月 12, 2015 8:16:45 下午 org.apache.catalina.startup.Catalina start信息: Server startup in 12662 ms
5.dubbo出现,Duplicate application configs,这个是因为,一个war包中,一次只能够有一个dubbo的app,出现这个错误的原因是因为在一个工程中,同时定义了两个dubbo的app,解决办法是将另外一个APP中要注册的服务放到另外一个APP中,就OK了。
标签: #myeclipse导入war包