整合Spring+Struts2+Maven时遇到异常,如下:
三月 22, 2014 11:59:57 下午 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: D:\Program Files\Java\jdk1.7.0_45\bin;D:\Program Files\Tomcat 8.0\bin 三月 23, 2014 12:00:04 上午 org.apache.coyote.AbstractProtocol init 信息: Initializing ProtocolHandler ["http-nio-8080"] 三月 23, 2014 12:00:06 上午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector 信息: Using a shared selector for servlet write/read 三月 23, 2014 12:00:06 上午 org.apache.coyote.AbstractProtocol init 信息: Initializing ProtocolHandler ["ajp-nio-8009"] 三月 23, 2014 12:00:06 上午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector 信息: Using a shared selector for servlet write/read 三月 23, 2014 12:00:06 上午 org.apache.catalina.startup.Catalina load 信息: Initialization processed in 11782 ms 三月 23, 2014 12:00:07 上午 org.apache.catalina.core.StandardService startInternal 信息: Starting service Catalina 三月 23, 2014 12:00:07 上午 org.apache.catalina.core.StandardEngine startInternal 信息: Starting Servlet Engine: Apache Tomcat/8.0.3 三月 23, 2014 12:00:07 上午 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory D:\Program Files\Tomcat 8.0\webapps\docs 三月 23, 2014 12:00:10 上午 org.apache.catalina.util.SessionIdGenerator createSecureRandom 信息: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [303] milliseconds. 三月 23, 2014 12:00:10 上午 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory D:\Program Files\Tomcat 8.0\webapps\hrms 三月 23, 2014 12:00:35 上午 org.apache.catalina.core.ApplicationContext log 信息: No Spring WebApplicationInitializer types detected on classpath 三月 23, 2014 12:00:38 上午 org.apache.catalina.core.ApplicationContext log 信息: Initializing Spring root WebApplicationContext [org.springframework.web.context.ContextLoader]Root WebApplicationContext: initialization started [org.springframework.web.context.support.XmlWebApplicationContext]Refreshing Root WebApplicationContext: startup date [Sun Mar 23 00:00:40 CST 2014]; root of context hierarchy [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.beans.factory.config.PropertyPlaceholderConfigurer]Loading properties file from class path resource [config.properties] [org.springframework.beans.factory.support.DefaultListableBeanFactory]Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@1728d1e: defining beans [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0,testService,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.ConfigurationClassPostProcessor$ImportAwareBeanPostProcessor#0]; root of factory hierarchy [org.springframework.web.context.ContextLoader]Root WebApplicationContext: initialization completed in 13476 ms [com.opensymphony.xwork2.config.providers.XmlConfigurationProvider]Parsing configuration file [struts-default.xml] [com.opensymphony.xwork2.config.providers.XmlConfigurationProvider]Parsing configuration file [struts-plugin.xml] [com.opensymphony.xwork2.config.providers.XmlConfigurationProvider]Parsing configuration file [struts.xml] [org.apache.struts2.config.BeanSelectionProvider]Choosing bean (spring) for (com.opensymphony.xwork2.ObjectFactory) [org.apache.struts2.config.BeanSelectionProvider]Choosing bean (struts) for (com.opensymphony.xwork2.FileManager) [org.apache.struts2.config.BeanSelectionProvider]Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.XWorkConverter) [org.apache.struts2.config.BeanSelectionProvider]Choosing bean (struts) for (com.opensymphony.xwork2.TextProvider) [org.apache.struts2.config.BeanSelectionProvider]Choosing bean (struts) for (com.opensymphony.xwork2.ActionProxyFactory) [org.apache.struts2.config.BeanSelectionProvider]Choosing bean (struts) for (com.opensymphony.xwork2.conversion.ObjectTypeDeterminer) [org.apache.struts2.config.BeanSelectionProvider]Choosing bean (struts) for (org.apache.struts2.dispatcher.mapper.ActionMapper) [org.apache.struts2.config.BeanSelectionProvider]Choosing bean (jakarta) for (org.apache.struts2.dispatcher.multipart.MultiPartRequest) [org.apache.struts2.config.BeanSelectionProvider]Choosing bean (struts) for (org.apache.struts2.views.freemarker.FreemarkerManager) [org.apache.struts2.config.BeanSelectionProvider]Choosing bean (struts) for (org.apache.struts2.components.UrlRenderer) [org.apache.struts2.config.BeanSelectionProvider]Choosing bean (struts) for (com.opensymphony.xwork2.validator.ActionValidatorManager) [org.apache.struts2.config.BeanSelectionProvider]Choosing bean (struts) for (com.opensymphony.xwork2.util.ValueStackFactory) [org.apache.struts2.config.BeanSelectionProvider]Choosing bean (struts) for (com.opensymphony.xwork2.util.reflection.ReflectionProvider) [org.apache.struts2.config.BeanSelectionProvider]Choosing bean (struts) for (com.opensymphony.xwork2.util.reflection.ReflectionContextFactory) [org.apache.struts2.config.BeanSelectionProvider]Choosing bean (struts) for (com.opensymphony.xwork2.util.PatternMatcher) [org.apache.struts2.config.BeanSelectionProvider]Choosing bean (struts) for (org.apache.struts2.dispatcher.StaticContentLoader) [org.apache.struts2.config.BeanSelectionProvider]Choosing bean (struts) for (com.opensymphony.xwork2.UnknownHandlerManager) [org.apache.struts2.config.BeanSelectionProvider]Choosing bean (struts) for (org.apache.struts2.views.util.UrlHelper) [org.apache.struts2.spring.StrutsSpringObjectFactory]Initializing Struts-Spring integration... [com.opensymphony.xwork2.spring.SpringObjectFactory]Setting autowire strategy to name [org.apache.struts2.spring.StrutsSpringObjectFactory]... initialized Struts-Spring integration successfully [com.opensymphony.xwork2.config.providers.XmlConfigurationProvider]Unable to find parent packages strust-default,json-default [org.apache.struts2.convention.PackageBasedActionConfigBuilder]Unable to scan named packages java.lang.NullPointerException at com.opensymphony.xwork2.util.URLUtil.isJBossUrl(URLUtil.java:112) at com.opensymphony.xwork2.util.finder.UrlSet.getUrls(UrlSet.java:266) at com.opensymphony.xwork2.util.finder.UrlSet.<init>(UrlSet.java:56) at org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildUrlSet(PackageBasedActionConfigBuilder.java:401) at org.apache.struts2.convention.PackageBasedActionConfigBuilder.findActions(PackageBasedActionConfigBuilder.java:386) at org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildActionConfigs(PackageBasedActionConfigBuilder.java:344) at org.apache.struts2.convention.ClasspathPackageProvider.loadPackages(ClasspathPackageProvider.java:53) at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:245) at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66) at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:390) at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:437) at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74) at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51) at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260) at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4574) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5184) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:726) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:702) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:697) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1134) at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1780) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) 三月 23, 2014 12:01:04 上午 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory D:\Program Files\Tomcat 8.0\webapps\manager 三月 23, 2014 12:01:04 上午 org.apache.coyote.AbstractProtocol start 信息: Starting ProtocolHandler ["http-nio-8080"] 三月 23, 2014 12:01:04 上午 org.apache.coyote.AbstractProtocol start 信息: Starting ProtocolHandler ["ajp-nio-8009"] 三月 23, 2014 12:01:04 上午 org.apache.catalina.startup.Catalina start 信息: Server startup in 58047 ms
这个异常没有见过,经过谷歌、度娘、必应一翻后,找到如下网友
http://hi.baidu.com/kongzhonghu/item/9f5e964a9b5ea7e3bcf4514a
看了一下,确实自己的"struts.xml"配置是有相关设置,修改后,再次尝试,还是相同的错误。
再找,几个小时去过了,还是没有找到,问群友,问同事最后,把所有的Jar包都换了,Spring换到最新4.0.2.RELEASE,Struts2换到2.3.16.1,再次尝试还是报错,如下:
三月 23, 2014 1:29:36 上午 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: D:\Program Files\Java\jdk1.7.0_45\bin;D:\Program Files\Tomcat 8.0\bin 三月 23, 2014 1:29:37 上午 org.apache.coyote.AbstractProtocol init 信息: Initializing ProtocolHandler ["http-nio-8080"] 三月 23, 2014 1:29:37 上午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector 信息: Using a shared selector for servlet write/read 三月 23, 2014 1:29:37 上午 org.apache.coyote.AbstractProtocol init 信息: Initializing ProtocolHandler ["ajp-nio-8009"] 三月 23, 2014 1:29:37 上午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector 信息: Using a shared selector for servlet write/read 三月 23, 2014 1:29:37 上午 org.apache.catalina.startup.Catalina load 信息: Initialization processed in 2681 ms 三月 23, 2014 1:29:38 上午 org.apache.catalina.core.StandardService startInternal 信息: Starting service Catalina 三月 23, 2014 1:29:38 上午 org.apache.catalina.core.StandardEngine startInternal 信息: Starting Servlet Engine: Apache Tomcat/8.0.3 三月 23, 2014 1:29:38 上午 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory D:\Program Files\Tomcat 8.0\webapps\docs 三月 23, 2014 1:29:40 上午 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory D:\Program Files\Tomcat 8.0\webapps\hrms 三月 23, 2014 1:29:46 上午 org.apache.catalina.core.ApplicationContext log 信息: No Spring WebApplicationInitializer types detected on classpath 三月 23, 2014 1:29:47 上午 org.apache.catalina.core.ApplicationContext log 信息: Initializing Spring root WebApplicationContext [org.springframework.web.context.ContextLoader]Root WebApplicationContext: initialization started [org.springframework.web.context.support.XmlWebApplicationContext]Refreshing Root WebApplicationContext: startup date [Sun Mar 23 01:29:47 CST 2014]; root of context hierarchy [org.springframework.beans.factory.xml.XmlBeanDefinitionReader]Loading XML bean definitions from class path resource [spring.xml] [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer]Loading properties file from class path resource [config.properties] [org.springframework.web.context.ContextLoader]Root WebApplicationContext: initialization completed in 2398 ms [com.opensymphony.xwork2.config.providers.XmlConfigurationProvider]Parsing configuration file [struts-default.xml] [com.opensymphony.xwork2.config.providers.XmlConfigurationProvider]Parsing configuration file [struts-plugin.xml] [com.opensymphony.xwork2.config.providers.XmlConfigurationProvider]Parsing configuration file [struts.xml] [org.apache.struts2.config.AbstractBeanSelectionProvider]Choosing bean (spring) for (com.opensymphony.xwork2.ObjectFactory) [org.apache.struts2.config.AbstractBeanSelectionProvider]Choosing bean (struts) for (com.opensymphony.xwork2.factory.ActionFactory) [org.apache.struts2.config.AbstractBeanSelectionProvider]Choosing bean (struts) for (com.opensymphony.xwork2.factory.ResultFactory) [org.apache.struts2.config.AbstractBeanSelectionProvider]Choosing bean (struts) for (com.opensymphony.xwork2.factory.ConverterFactory) [org.apache.struts2.config.AbstractBeanSelectionProvider]Choosing bean (struts) for (com.opensymphony.xwork2.factory.InterceptorFactory) [org.apache.struts2.config.AbstractBeanSelectionProvider]Choosing bean (struts) for (com.opensymphony.xwork2.factory.ValidatorFactory) [org.apache.struts2.config.AbstractBeanSelectionProvider]Choosing bean (struts) for (com.opensymphony.xwork2.FileManagerFactory) [org.apache.struts2.config.AbstractBeanSelectionProvider]Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.XWorkConverter) [org.apache.struts2.config.AbstractBeanSelectionProvider]Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.CollectionConverter) [org.apache.struts2.config.AbstractBeanSelectionProvider]Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.ArrayConverter) [org.apache.struts2.config.AbstractBeanSelectionProvider]Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.DateConverter) [org.apache.struts2.config.AbstractBeanSelectionProvider]Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.NumberConverter) [org.apache.struts2.config.AbstractBeanSelectionProvider]Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.StringConverter) [org.apache.struts2.config.AbstractBeanSelectionProvider]Choosing bean (struts) for (com.opensymphony.xwork2.conversion.ConversionPropertiesProcessor) [org.apache.struts2.config.AbstractBeanSelectionProvider]Choosing bean (struts) for (com.opensymphony.xwork2.conversion.ConversionFileProcessor) [org.apache.struts2.config.AbstractBeanSelectionProvider]Choosing bean (struts) for (com.opensymphony.xwork2.conversion.ConversionAnnotationProcessor) [org.apache.struts2.config.AbstractBeanSelectionProvider]Choosing bean (struts) for (com.opensymphony.xwork2.conversion.TypeConverterCreator) [org.apache.struts2.config.AbstractBeanSelectionProvider]Choosing bean (struts) for (com.opensymphony.xwork2.conversion.TypeConverterHolder) [org.apache.struts2.config.AbstractBeanSelectionProvider]Choosing bean (struts) for (com.opensymphony.xwork2.TextProvider) [org.apache.struts2.config.AbstractBeanSelectionProvider]Choosing bean (struts) for (com.opensymphony.xwork2.LocaleProvider) [org.apache.struts2.config.AbstractBeanSelectionProvider]Choosing bean (struts) for (com.opensymphony.xwork2.ActionProxyFactory) [org.apache.struts2.config.AbstractBeanSelectionProvider]Choosing bean (struts) for (com.opensymphony.xwork2.conversion.ObjectTypeDeterminer) [org.apache.struts2.config.AbstractBeanSelectionProvider]Choosing bean (struts) for (org.apache.struts2.dispatcher.mapper.ActionMapper) [org.apache.struts2.config.AbstractBeanSelectionProvider]Choosing bean (jakarta) for (org.apache.struts2.dispatcher.multipart.MultiPartRequest) [org.apache.struts2.config.AbstractBeanSelectionProvider]Choosing bean (struts) for (org.apache.struts2.views.freemarker.FreemarkerManager) [org.apache.struts2.config.AbstractBeanSelectionProvider]Choosing bean (struts) for (org.apache.struts2.components.UrlRenderer) [org.apache.struts2.config.AbstractBeanSelectionProvider]Choosing bean (struts) for (com.opensymphony.xwork2.validator.ActionValidatorManager) [org.apache.struts2.config.AbstractBeanSelectionProvider]Choosing bean (struts) for (com.opensymphony.xwork2.util.ValueStackFactory) [org.apache.struts2.config.AbstractBeanSelectionProvider]Choosing bean (struts) for (com.opensymphony.xwork2.util.reflection.ReflectionProvider) [org.apache.struts2.config.AbstractBeanSelectionProvider]Choosing bean (struts) for (com.opensymphony.xwork2.util.reflection.ReflectionContextFactory) [org.apache.struts2.config.AbstractBeanSelectionProvider]Choosing bean (struts) for (com.opensymphony.xwork2.util.PatternMatcher) [org.apache.struts2.config.AbstractBeanSelectionProvider]Choosing bean (struts) for (org.apache.struts2.dispatcher.StaticContentLoader) [org.apache.struts2.config.AbstractBeanSelectionProvider]Choosing bean (struts) for (com.opensymphony.xwork2.UnknownHandlerManager) [org.apache.struts2.config.AbstractBeanSelectionProvider]Choosing bean (struts) for (org.apache.struts2.views.util.UrlHelper) [org.apache.struts2.config.AbstractBeanSelectionProvider]Choosing bean (struts) for (com.opensymphony.xwork2.util.TextParser) [org.apache.struts2.spring.StrutsSpringObjectFactory]Initializing Struts-Spring integration... [com.opensymphony.xwork2.spring.SpringObjectFactory]Setting autowire strategy to name [org.apache.struts2.spring.StrutsSpringObjectFactory]... initialized Struts-Spring integration successfully [com.opensymphony.xwork2.util.finder.UrlSet]Cannot translate url to external form! java.lang.NullPointerException at com.opensymphony.xwork2.util.finder.UrlSet.load(UrlSet.java:93) at com.opensymphony.xwork2.util.finder.UrlSet.<init>(UrlSet.java:83) at org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildUrlSet(PackageBasedActionConfigBuilder.java:415) at org.apache.struts2.convention.PackageBasedActionConfigBuilder.readUrls(PackageBasedActionConfigBuilder.java:410) at org.apache.struts2.convention.PackageBasedActionConfigBuilder.findActions(PackageBasedActionConfigBuilder.java:389) at org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildActionConfigs(PackageBasedActionConfigBuilder.java:347) at org.apache.struts2.convention.ClasspathPackageProvider.loadPackages(ClasspathPackageProvider.java:53) at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:268) at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67) at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:445) at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:489) at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74) at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:57) at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260) at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4574) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5184) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:726) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:702) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:697) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1134) at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1780) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) [org.apache.struts2.convention.PackageBasedActionConfigBuilder]Unable to scan named packages java.lang.NullPointerException at com.opensymphony.xwork2.util.finder.UrlSet.includeClassesUrl(UrlSet.java:193) at org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildUrlSet(PackageBasedActionConfigBuilder.java:442) at org.apache.struts2.convention.PackageBasedActionConfigBuilder.readUrls(PackageBasedActionConfigBuilder.java:410) at org.apache.struts2.convention.PackageBasedActionConfigBuilder.findActions(PackageBasedActionConfigBuilder.java:389) at org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildActionConfigs(PackageBasedActionConfigBuilder.java:347) at org.apache.struts2.convention.ClasspathPackageProvider.loadPackages(ClasspathPackageProvider.java:53) at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:268) at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67) at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:445) at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:489) at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74) at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:57) at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260) at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4574) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5184) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:726) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:702) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:697) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1134) at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1780) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) 三月 23, 2014 1:29:52 上午 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory D:\Program Files\Tomcat 8.0\webapps\manager 三月 23, 2014 1:29:53 上午 org.apache.coyote.AbstractProtocol start 信息: Starting ProtocolHandler ["http-nio-8080"] 三月 23, 2014 1:29:53 上午 org.apache.coyote.AbstractProtocol start 信息: Starting ProtocolHandler ["ajp-nio-8009"] 三月 23, 2014 1:29:53 上午 org.apache.catalina.startup.Catalina start 信息: Server startup in 15110 ms
好了,不能再傻起认为是配置、jar包或自己代码写的问题了,我得换个角度了,我使用了Myeclipse+Tomcat8.0+Maven+Spring+Struts2。Maven、Spring、Struts2已经被我排除,现在就是看IDE工具了,再看看异常“java.lang.NullPointerException”这跟IDE工具没有半毛钱关系(至少我到现在还没有看到工具会让代码抛这个异常),所以只有Tomcat8兄弟了,又是一轮查询没有结果,嘿嘿。。。。看到一篇文章,不多说,地址如下:
https://issues.apache.org/jira/browse/WW-4294
哥们环境和我的差不多,再看看异常信息跟我的差不多,看看下面的回答,Fuck!!“It's a bug in Apache Tomcat 8, will be solved with 8.0.4 version”不多说,换个Tomcat6,问题解决。
好吧,别问我心里有多爽,你自己去体会吧,再次来上一小曲《一瞬间》
链接: http://pan.baidu.com/s/1dD9WNGd 密码: v4r5
Tomcat官方Bug说明:
https://issues.apache.org/bugzilla/show_bug.cgi?id=56125