zoukankan      html  css  js  c++  java
  • Java EE之Struts2异常[No mapping found for dependency [type=java.lang.String, name='actionPackages'#java.lang.RuntimeException]【摘抄】

    本博文摘自:http://www.blogjava.net/nkjava/archive/2009/03/29/262705.html

    出现这个问题,可能是添加了struts2-codebehind包,去除这个包就可以了

    No mapping found for dependency [type=java.lang.String, name='actionPackages']
    java.lang.RuntimeException: java.lang.RuntimeException: com.opensymphony.xwork2.inject.DependencyException: com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException: No mapping found for dependency [type=java.lang.String, name='actionPackages'] in public void org.apache.struts2.config.ClasspathPackageProvider.setActionPackages(java.lang.String).
        at com.opensymphony.xwork2.inject.ContainerBuilder$4.create(ContainerBuilder.java:132)
        at com.opensymphony.xwork2.inject.Scope$2$1.create(Scope.java:51)
        at com.opensymphony.xwork2.inject.ContainerImpl.getInstance(ContainerImpl.java:507)
        at com.opensymphony.xwork2.inject.ContainerImpl$8.call(ContainerImpl.java:540)
        at com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:574)
        at com.opensymphony.xwork2.inject.ContainerImpl.getInstance(ContainerImpl.java:538)
        at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:198)
        at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55)
        at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:360)
        at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:403)
        at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:190)
        at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
        at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:620)
        at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
        at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1233)
        at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
        at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:460)
        at org.mortbay.jetty.plugin.Jetty6PluginWebAppContext.doStart(Jetty6PluginWebAppContext.java:124)
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
        at org.mortbay.jetty.plugin.AbstractJettyRunMojo.restartWebApp(AbstractJettyRunMojo.java:441)
        at org.mortbay.jetty.plugin.AbstractJettyRunMojo$1.filesChanged(AbstractJettyRunMojo.java:402)
        at org.mortbay.util.Scanner.reportBulkChanges(Scanner.java:486)
        at org.mortbay.util.Scanner.reportDifferences(Scanner.java:352)
        at org.mortbay.util.Scanner.scan(Scanner.java:280)
        at org.mortbay.util.Scanner$1.run(Scanner.java:232)
        at java.util.TimerThread.mainLoop(Timer.java:512)
        at java.util.TimerThread.run(Timer.java:462)
    Caused by: java.lang.RuntimeException: com.opensymphony.xwork2.inject.DependencyException: com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException: No mapping found for dependency [type=java.lang.String, name='actionPackages'] in public void org.apache.struts2.config.ClasspathPackageProvider.setActionPackages(java.lang.String).
        at com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:495)
        at com.opensymphony.xwork2.inject.ContainerImpl$7.call(ContainerImpl.java:532)
        at com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:581)
        at com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:530)
        at com.opensymphony.xwork2.config.impl.LocatableFactory.create(LocatableFactory.java:32)
        at com.opensymphony.xwork2.inject.ContainerBuilder$4.create(ContainerBuilder.java:130)
        ... 27 more
    Caused by: com.opensymphony.xwork2.inject.DependencyException: com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException: No mapping found for dependency [type=java.lang.String, name='actionPackages'] in public void org.apache.struts2.config.ClasspathPackageProvider.setActionPackages(java.lang.String).
        at com.opensymphony.xwork2.inject.ContainerImpl.addInjectorsForMembers(ContainerImpl.java:144)
        at com.opensymphony.xwork2.inject.ContainerImpl.addInjectorsForMethods(ContainerImpl.java:113)
        at com.opensymphony.xwork2.inject.ContainerImpl.addInjectors(ContainerImpl.java:90)
        at com.opensymphony.xwork2.inject.ContainerImpl$1.create(ContainerImpl.java:71)
        at com.opensymphony.xwork2.inject.ContainerImpl$1.create(ContainerImpl.java:69)
        at com.opensymphony.xwork2.inject.util.ReferenceCache$CallableCreate.call(ReferenceCache.java:150)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at com.opensymphony.xwork2.inject.util.ReferenceCache.internalCreate(ReferenceCache.java:76)
        at com.opensymphony.xwork2.inject.util.ReferenceCache.get(ReferenceCache.java:116)
        at com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.<init>(ContainerImpl.java:348)
        at com.opensymphony.xwork2.inject.ContainerImpl$5.create(ContainerImpl.java:305)
        at com.opensymphony.xwork2.inject.ContainerImpl$5.create(ContainerImpl.java:304)
        at com.opensymphony.xwork2.inject.util.ReferenceCache$CallableCreate.call(ReferenceCache.java:150)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at com.opensymphony.xwork2.inject.util.ReferenceCache.internalCreate(ReferenceCache.java:76)
        at com.opensymphony.xwork2.inject.util.ReferenceCache.get(ReferenceCache.java:116)
        at com.opensymphony.xwork2.inject.ContainerImpl.getConstructor(ContainerImpl.java:594)
        at com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:491)
        ... 32 more
    Caused by: com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException: No mapping found for dependency [type=java.lang.String, name='actionPackages'] in public void org.apache.struts2.config.ClasspathPackageProvider.setActionPackages(java.lang.String).
        at com.opensymphony.xwork2.inject.ContainerImpl.createParameterInjector(ContainerImpl.java:235)
        at com.opensymphony.xwork2.inject.ContainerImpl.getParametersInjectors(ContainerImpl.java:225)
        at com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.<init>(ContainerImpl.java:287)
        at com.opensymphony.xwork2.inject.ContainerImpl$3.create(ContainerImpl.java:117)
        at com.opensymphony.xwork2.inject.ContainerImpl$3.create(ContainerImpl.java:115)
        at com.opensymphony.xwork2.inject.ContainerImpl.addInjectorsForMembers(ContainerImpl.java:141)
        ... 51 more
    2009-03-29 11:23:51.305::WARN:  Failed startup of context org.mortbay.jetty.plugin.Jetty6PluginWebAppContext@8932e8{/ssh,D:"workplace"ssh"src"main"webapp}
    java.lang.RuntimeException: java.lang.RuntimeException: com.opensymphony.xwork2.inject.DependencyException: com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException: No mapping found for dependency [type=java.lang.String, name='actionPackages'] in public void org.apache.struts2.config.ClasspathPackageProvider.setActionPackages(java.lang.String).
        at com.opensymphony.xwork2.inject.ContainerBuilder$4.create(ContainerBuilder.java:132)
        at com.opensymphony.xwork2.inject.Scope$2$1.create(Scope.java:51)
        at com.opensymphony.xwork2.inject.ContainerImpl.getInstance(ContainerImpl.java:507)
        at com.opensymphony.xwork2.inject.ContainerImpl$8.call(ContainerImpl.java:540)
        at com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:574)
        at com.opensymphony.xwork2.inject.ContainerImpl.getInstance(ContainerImpl.java:538)
        at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:198)
        at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55)
        at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:360)
        at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:403)
        at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:190)
        at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
        at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:620)
        at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
        at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1233)
        at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
        at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:460)
        at org.mortbay.jetty.plugin.Jetty6PluginWebAppContext.doStart(Jetty6PluginWebAppContext.java:124)
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
        at org.mortbay.jetty.plugin.AbstractJettyRunMojo.restartWebApp(AbstractJettyRunMojo.java:441)
        at org.mortbay.jetty.plugin.AbstractJettyRunMojo$1.filesChanged(AbstractJettyRunMojo.java:402)
        at org.mortbay.util.Scanner.reportBulkChanges(Scanner.java:486)
        at org.mortbay.util.Scanner.reportDifferences(Scanner.java:352)
        at org.mortbay.util.Scanner.scan(Scanner.java:280)
        at org.mortbay.util.Scanner$1.run(Scanner.java:232)
        at java.util.TimerThread.mainLoop(Timer.java:512)
        at java.util.TimerThread.run(Timer.java:462)
    Caused by: java.lang.RuntimeException: com.opensymphony.xwork2.inject.DependencyException: com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException: No mapping found for dependency [type=java.lang.String, name='actionPackages'] in public void org.apache.struts2.config.ClasspathPackageProvider.setActionPackages(java.lang.String).
        at com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:495)
        at com.opensymphony.xwork2.inject.ContainerImpl$7.call(ContainerImpl.java:532)
        at com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:581)
        at com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:530)
        at com.opensymphony.xwork2.config.impl.LocatableFactory.create(LocatableFactory.java:32)
        at com.opensymphony.xwork2.inject.ContainerBuilder$4.create(ContainerBuilder.java:130)
        ... 27 more
    Caused by: com.opensymphony.xwork2.inject.DependencyException: com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException: No mapping found for dependency [type=java.lang.String, name='actionPackages'] in public void org.apache.struts2.config.ClasspathPackageProvider.setActionPackages(java.lang.String).
        at com.opensymphony.xwork2.inject.ContainerImpl.addInjectorsForMembers(ContainerImpl.java:144)
        at com.opensymphony.xwork2.inject.ContainerImpl.addInjectorsForMethods(ContainerImpl.java:113)
        at com.opensymphony.xwork2.inject.ContainerImpl.addInjectors(ContainerImpl.java:90)
        at com.opensymphony.xwork2.inject.ContainerImpl$1.create(ContainerImpl.java:71)
        at com.opensymphony.xwork2.inject.ContainerImpl$1.create(ContainerImpl.java:69)
        at com.opensymphony.xwork2.inject.util.ReferenceCache$CallableCreate.call(ReferenceCache.java:150)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at com.opensymphony.xwork2.inject.util.ReferenceCache.internalCreate(ReferenceCache.java:76)
        at com.opensymphony.xwork2.inject.util.ReferenceCache.get(ReferenceCache.java:116)
        at com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.<init>(ContainerImpl.java:348)
        at com.opensymphony.xwork2.inject.ContainerImpl$5.create(ContainerImpl.java:305)
        at com.opensymphony.xwork2.inject.ContainerImpl$5.create(ContainerImpl.java:304)
        at com.opensymphony.xwork2.inject.util.ReferenceCache$CallableCreate.call(ReferenceCache.java:150)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at com.opensymphony.xwork2.inject.util.ReferenceCache.internalCreate(ReferenceCache.java:76)
        at com.opensymphony.xwork2.inject.util.ReferenceCache.get(ReferenceCache.java:116)
        at com.opensymphony.xwork2.inject.ContainerImpl.getConstructor(ContainerImpl.java:594)
        at com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:491)
        ... 32 more
    Caused by: com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException: No mapping found for dependency [type=java.lang.String, name='actionPackages'] in public void org.apache.struts2.config.ClasspathPackageProvider.setActionPackages(java.lang.String).
        at com.opensymphony.xwork2.inject.ContainerImpl.createParameterInjector(ContainerImpl.java:235)
    [INFO] Restart completed at Sun Mar 29 11:23:51 CST 2009
        at com.opensymphony.xwork2.inject.ContainerImpl.getParametersInjectors(ContainerImpl.java:225)
        at com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.<init>(ContainerImpl.java:287)
        at com.opensymphony.xwork2.inject.ContainerImpl$3.create(ContainerImpl.java:117)
        at com.opensymphony.xwork2.inject.ContainerImpl$3.create(ContainerImpl.java:115)
        at com.opensymphony.xwork2.inject.ContainerImpl.addInjectorsForMembers(ContainerImpl.java:141)
        ... 51 more
    

      

  • 相关阅读:
    1 学习wcf 编写简单的WCF服务流程 并发布在IIS上
    通过FormData对象可以组装一组用 [XMLHttpRequest]发送请求的键/值对,它可以更灵活方便的发送表单数据。
    总结下抽象类Abstract和虚方法Virtual(易混点)
    mac VirtualBox虚拟机装CentOS,并配置网络,使其发布的静态网站能访问
    CentOS 7 1810版本不能使用yum 命令
    C# 选取本月周六日方法
    使用Newtonsoft序列化对象,实现深拷贝
    linq to sql 增删改查
    C# 对象对比是否相等 工作笔记
    zabbix server和zabbix agent的安装
  • 原文地址:https://www.cnblogs.com/johnnyzen/p/8046303.html
Copyright © 2011-2022 走看看