0

コンソール出力

16 May, 2013 6:06:51 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre6\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\PHP\;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\adarsh\mysql\bin;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;c:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Java\jdk1.6.0_04\bin;.;C:\apache-ant-1.8.4\bin;.;C:\apache-ant-1.8.4\lib;.;C:\Program Files (x86)\clisp-2.49
16 May, 2013 6:06:52 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:Struts2Starter' did not find a matching property.
16 May, 2013 6:06:52 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
16 May, 2013 6:06:52 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
16 May, 2013 6:06:52 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 781 ms
16 May, 2013 6:06:52 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
16 May, 2013 6:06:52 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.34

この後、コードエラーが始まります

16 May, 2013 6:06:53 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: /struts-tags is already defined
16 May, 2013 6:06:53 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Parsing configuration file [struts-default.xml]
16 May, 2013 6:06:54 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger error
SEVERE: Dispatcher initialization failed
Unable to load configuration. - bean - jar:file:/C:/adarsh/Struts/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Struts2Starter/WEB-INF/lib/struts2-core-2.3.4.1.jar!/struts-default.xml:29:72
    at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:69)
    at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:390)
    at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:436)
    at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:69)
    at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51)
    at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:278)
    at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:259)
    at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:383)
    at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:104)
    at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4650)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5306)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: Unable to load bean: type: class:com.opensymphony.xwork2.ObjectFactory - bean - jar:file:/C:/adarsh/Struts/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Struts2Starter/WEB-INF/lib/struts2-core-2.3.4.1.jar!/struts-default.xml:29:72
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:235)
    at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:102)
    at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:180)
    at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66)
    ... 18 more
Caused by: Bean type class com.opensymphony.xwork2.ObjectFactory with the name xwork has already been loaded by bean - jar:file:/C:/adarsh/Struts/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Struts2Starter/WEB-INF/lib/struts2-core-2.3.1.2.jar!/struts-default.xml:29:72 - bean - jar:file:/C:/adarsh/Struts/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Struts2Starter/WEB-INF/lib/struts2-core-2.3.4.1.jar!/struts-default.xml:29:72
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:219)
    ... 21 more
16 May, 2013 6:06:54 PM org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter struts2
Unable to load configuration. - bean - jar:file:/C:/adarsh/Struts/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Struts2Starter/WEB-INF/lib/struts2-core-2.3.4.1.jar!/struts-default.xml:29:72
    at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:449)
    at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:69)
    at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51)
    at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:278)
    at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:259)
    at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:383)
    at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:104)
    at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4650)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5306)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: Unable to load configuration. - bean - jar:file:/C:/adarsh/Struts/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Struts2Starter/WEB-INF/lib/struts2-core-2.3.4.1.jar!/struts-default.xml:29:72
    at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:69)
    at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:390)
    at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:436)
    ... 16 more
Caused by: Unable to load bean: type: class:com.opensymphony.xwork2.ObjectFactory - bean - jar:file:/C:/adarsh/Struts/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Struts2Starter/WEB-INF/lib/struts2-core-2.3.4.1.jar!/struts-default.xml:29:72
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:235)
    at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:102)
    at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:180)
    at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66)
    ... 18 more
Caused by: Bean type class com.opensymphony.xwork2.ObjectFactory with the name xwork has already been loaded by bean - jar:file:/C:/adarsh/Struts/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Struts2Starter/WEB-INF/lib/struts2-core-2.3.1.2.jar!/struts-default.xml:29:72 - bean - jar:file:/C:/adarsh/Struts/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Struts2Starter/WEB-INF/lib/struts2-core-2.3.4.1.jar!/struts-default.xml:29:72
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:219)
    ... 21 more
16 May, 2013 6:06:54 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error filterStart
16 May, 2013 6:06:54 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/Struts2Starter] startup failed due to previous errors
16 May, 2013 6:06:54 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
16 May, 2013 6:06:54 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
16 May, 2013 6:06:54 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1926 ms
## Heading ##
4

2 に答える 2

3

原因: Bean を読み込めません: タイプ: class:com.opensymphony.xwork2.ObjectFactory - bean - jar:file:/C:/adarsh/Struts/.metadata/.plugins/org.eclipse.wst.server.core/ tmp0/wtpwebapps/Struts2Starter/WEB-INF/lib/ struts2-core-2.3.4.1.jar !/struts-default.xml:29:72

原因: xwork という名前の Bean タイプ クラス com.opensymphony.xwork2.ObjectFactory は、Bean によって既にロードされています- jar:file:/C:/adarsh/Struts/.metadata/.plugins/org.eclipse.wst.server。 core/tmp0/wtpwebapps/Struts2Starter/WEB-INF/lib/ struts2-core-2.3.1.2.jar !/struts-default.xml:29:72 - bean - jar:file:/C:/adarsh/Struts/. metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Struts2Starter/WEB-INF/lib/ struts2-core-2.3.4.1.jar !/struts-default.xml:29:72

プロジェクトに Struts2 ライブラリの複数のバージョンがあるだけです。

使用したいバージョン以外のすべてのバージョンを削除すれば問題ありません。

于 2013-05-16T13:46:58.697 に答える
0

WEB-INF\classes フォルダーに struts.xml が含まれており、classess\struts.xml がロードされた後、eclipse がその struts.xml を 2 回ロードしている可能性があります。classes フォルダーをクリーニングするか、少なくともそこにある struts.xml ファイルを削除してください。

于 2013-05-16T14:52:12.410 に答える