tomcat6 下 action 报找不到

昵称没超过10个字 发布于 2015/05/24 15:14
阅读 362
收藏 0

strtus2 自动加载指定后缀Action

发版后,有个XXAction 不需要,删除,

但会报错:java.lang.ClassNotFoundException

--------------

重现,发现,只要服务器部署过的action,删除后,都会报错(是启动就报错,还不存在任何调用)

-------------

 ERROR com.opensymphony.xwork2.util.finder.ClassFinder  - Error loading class [com...........XXXXAction]
java.lang.ClassNotFoundException: com...........XXXXAction
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1516)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1361)
        at com.opensymphony.xwork2.util.finder.ClassLoaderInterfaceDelegate.loadClass(ClassLoaderInterfaceDelegate.java:34)
        at com.opensymphony.xwork2.util.finder.ClassFinder$ClassInfo.get(ClassFinder.java:562)
        at com.opensymphony.xwork2.util.finder.ClassFinder.findClasses(ClassFinder.java:343)
        at com.struts2.bugfix.PackageBasedActionConfigBuilder.findActions(PackageBasedActionConfigBuilder.java:394)
        at com.struts2.bugfix.PackageBasedActionConfigBuilder.buildActionConfigs(PackageBasedActionConfigBuilder.java:348)
        at org.apache.struts2.convention.ClasspathPackageProvider.loadPackages(ClasspathPackageProvider.java:53)
        at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:260)
        at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
        at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:429)
        at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:473)
        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.getFilter(ApplicationFilterConfig.java:295)
        at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422)
        at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:115)
        at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3838)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4488)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
        at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1041)
        at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:964)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
        at org.apache.catalina.core.StandardService.start(StandardService.java:519)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
五月 13, 2015 2:19:12 下午 com.sun.jersey.api.core.PackagesResourceConfig init

加载中
0
昵称没超过10个字

我指的调用是应用未调用,

这种现象可能跟strtus2 改造有点关系。有个类被修改了。

com.struts2.bugfix.PackageBasedActionConfigBuilder.(这个是自己改写的类)


想问下,相关原因。。比如为什么还是知道去找指定的ACTION。。。我都已经删了。哪里存了这个类名,,为什么还会去找。。


开发没事,就服务器部署上去会有,

现在是解决是,重新建立个空的同名的类,让它不报错。

0
南湖船老大
南湖船老大
XML 里不是有配置么?
返回顶部
顶部