整合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
相关推荐
Java.lang.NullPointerException 解决方案与原因分析 Java.lang.NullPointerException 是 Java 语言中一种常见的异常,它发生在 Java 应用程序尝试使用 null 对象引用时。这种异常通常是由于程序员错误地认为对象...
### Java.lang.NullPointerException 解决方法详解 在Java开发过程中,`java.lang.NullPointerException`(简称NPE)是一种常见的运行时异常。它发生在试图对空对象执行操作时,例如调用对象的方法或访问其属性等。...
遇到“MyEclipse在启动Tomcat时出现‘An internal error occurred during: "Calculating completion proposals..."’的警告窗口,通常是由于`java.lang.NullPointerException`异常引起的。通过检查项目配置、更新...
Java.lang.NullPointerException 的可能原因及处理 Java.lang.NullPointerException 是 Java 语言中最常见的异常之一,它的出现通常是由于编程不当或对象未被正确初始化所致。在本文中,我们将探讨 Java.lang....
java.lang.NullPointerException: Attempt to invoke virtual method ‘void android.widget.ImageView.setImageResource(int)’ on a null object reference 今天在家练习ListView的时候,遇到一个java.lang....
在java中,如果未初始化字符串变量,就可能会抛出java.lang.NullPointerException异常。例如: String str; str.equals("Test"); // 这里将抛出java.lang.NullPointerException异常 解决方案:在使用字符串变量...
Caused by: java.lang.NullPointerException at com.semaphore.jna.LibraryFinder.loadPath(LibraryFinder.java:64) at com.semaphore.jna.LibraryFinder.<clinit>(LibraryFinder.java:44) ... 4 more Exception ...
`NullPointerException` 是Java标准库中`java.lang`包下的一个运行时异常。当程序试图通过一个为null的引用调用方法或者访问其字段时,系统会抛出此异常。在Java中,null不是一个对象,而是表示没有对象的引用状态。...
解决报错:java.lang.NullPointerException 解决方法:将文件的编码方式改为utf-8即可! 截图: 修改成功后: 代码: import os import json import re def json_to_html(i,cvenum): print('正在处理:'+...
Java语言的核心库之一就是`java.lang`包,它是最基础且最重要的包,包含了所有Java程序都会用到的一些基本类。这个包中包含了如异常处理、基本数据类型的包装类、数学运算、类和对象操作等核心功能。 异常处理是...
- **异常路径**:`java.lang.Object -> java.lang.Throwable -> java.lang.Exception -> java.lang.RuntimeException -> java.lang.NullPointerException` - **解释**:当应用程序尝试使用未初始化的对象引用调用...
### Myeclipse安装Aptana插件后报java.lang.NullPointerException解决方案 #### 问题背景 在使用Myeclipse的过程中,不少用户遇到了一个较为常见的问题:安装Aptana插件之后,每次启动Myeclipse时都会出现`java....
错误信息中的“java.lang.NullPointerException”是一个Java运行时异常,意味着在程序试图访问或操作一个null引用的对象时抛出。这通常发生在未检查对象是否为null的情况下直接使用它。在给出的代码片段中,错误可能...
在Java编程语言中,`java.lang.Throwable` 是所有错误(Error)和异常(Exception)的顶级父类,它是异常处理机制的基础。`Throwable` 类提供了封装异常信息的方法和属性,使得开发者能够对程序中出现的问题进行捕获...
`java.lang.ExceptionInInitializerError` 是Java编程语言中一种比较特殊的异常,通常在类的静态初始化过程中遇到问题时抛出。这个错误意味着在初始化类的静态变量或静态初始化块(static block)时发生了异常。这类...
在Java XML处理中,如果遇到 `javax.xml.transform.TransformerException: java.lang.NullPointerException`,则可能是由于XML处理库在执行转换过程中遇到了 null 引用。解决方法可能包括检查输入数据的完整性、配置...
希望高手指点
出现此问题时使用:java.lang.NullPointerException at org.json.JSONObject.(JSONObject.java:144) at org.apache.sqoop.util.SqoopJsonUtil.getJsonStringforMap(SqoopJsonUtil.java:43) at org.apache.sqoop....
FtpUtil.java 包
2. java.lang.ClassNotFoundException java.lang.ClassNotFoundException 是一种常见的错误,发生在指定的类不存在时。例如,在将 JB 下的程序包放在 WTK 下编译时,如果类的名称和路径不正确,就会出现该错误。...