SSH的小例子时总是编译出问题

启动Server时的错误

2011-11-27 11:32:06 org.apache.catalina.core.AprLifecycleListener init
信息: Loaded APR based Apache Tomcat Native library 1.1.20.
2011-11-27 11:32:12 org.apache.catalina.core.AprLifecycleListener init
信息: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
2011-11-27 11:32:15 org.apache.coyote.AbstractProtocolHandler init
信息: Initializing ProtocolHandler ["http-apr-8080"]
2011-11-27 11:32:15 org.apache.coyote.AbstractProtocolHandler init
信息: Initializing ProtocolHandler ["ajp-apr-8009"]
2011-11-27 11:32:15 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 10185 ms
2011-11-27 11:32:15 org.apache.catalina.core.StandardService startInternal
信息: Starting service Catalina
2011-11-27 11:32:15 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/7.0.11
2011-11-27 11:32:16 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory docs
2011-11-27 11:32:18 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory examples
2011-11-27 11:32:19 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: contextInitialized()
2011-11-27 11:32:19 org.apache.catalina.core.ApplicationContext log
信息: SessionListener: contextInitialized()
2011-11-27 11:32:19 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory host-manager
2011-11-27 11:32:20 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory manager
2011-11-27 11:32:20 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory ROOT
2011-11-27 11:32:20 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory Spring_2700_Registration_5
2011-11-27 11:32:26 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
信息: Parsing configuration file [struts-default.xml]
2011-11-27 11:32:26 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter struts2
java.lang.NoClassDefFoundError: org/apache/commons/lang/StringUtils
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:198)
at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:101)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:180)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:380)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:424)
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:273)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:254)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:372)
at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:98)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4542)
at org.apache.catalina.core.StandardContext$2.call(StandardContext.java:5220)
at org.apache.catalina.core.StandardContext$2.call(StandardContext.java:5215)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.lang.StringUtils
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1676)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1521)
... 20 more
2011-11-27 11:32:26 org.apache.catalina.core.StandardContext startInternal
严重: Error filterStart
2011-11-27 11:32:26 org.apache.catalina.core.StandardContext startInternal
严重: Context [/Spring_2700_Registration_5] startup failed due to previous errors
2011-11-27 11:32:27 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
严重: The web application [/Spring_2700_Registration_5] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
2011-11-27 11:32:27 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory Spring_5000
2011-11-27 11:32:32 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter struts2
java.lang.NoClassDefFoundError: ActionSupport
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2818)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1148)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1643)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1521)
at com.opensymphony.xwork2.util.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:138)
at com.opensymphony.xwork2.ObjectFactory.getClassInstance(ObjectFactory.java:96)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.verifyAction(XmlConfigurationProvider.java:398)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:355)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:460)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages(XmlConfigurationProvider.java:265)
at org.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages(StrutsXmlConfigurationProvider.java:111)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:189)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:371)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:415)
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:273)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:254)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:372)
at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:98)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4542)
at org.apache.catalina.core.StandardContext$2.call(StandardContext.java:5220)
at org.apache.catalina.core.StandardContext$2.call(StandardContext.java:5215)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.ClassNotFoundException: ActionSupport
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1676)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1521)
... 33 more
2011-11-27 11:32:32 org.apache.catalina.core.StandardContext startInternal
严重: Error filterStart
2011-11-27 11:32:32 org.apache.catalina.core.StandardContext startInternal
严重: Context [/Spring_5000] startup failed due to previous errors
2011-11-27 11:32:32 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory struts2_3000_BBS2009_01
2011-11-27 11:32:33 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
信息: Parsing configuration file [struts-default.xml]
2011-11-27 11:32:34 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
信息: Unable to locate configuration files of the name struts-plugin.xml, skipping
2011-11-27 11:32:34 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
信息: Parsing configuration file [struts-plugin.xml]
2011-11-27 11:32:34 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
信息: Parsing configuration file [struts.xml]
2011-11-27 11:32:35 org.apache.coyote.AbstractProtocolHandler start
信息: Starting ProtocolHandler ["http-apr-8080"]
2011-11-27 11:32:35 org.apache.coyote.AbstractProtocolHandler start
信息: Starting ProtocolHandler ["ajp-apr-8009"]
2011-11-27 11:32:35 org.apache.catalina.startup.Catalina start
信息: Server startup in 19460 ms

尝试这解决,结果问题越来越大。

这是我所有的包

真不知道问题出在哪

3个回答

[quote]试了,但错误还是那样。还有一个问题,能不能告诉我一下用spring3.0时一般都加什么包,我还是用2.5的,主要是不知道应该怎么试应该加什么包,3.0和2.5的差别挺大的[/quote]

把你的邮箱给我,我把包发给你

你先整合3个当中的二个,测试正常后再把另外一个也整合进去啊。

[quote]java.lang.NoClassDefFoundError: org/apache/commons/lang/StringUtils
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register[/quote]

这个是org.apache.commons.lang.StringUtils这个类没找到,应该是少了一个公用的包,commons-lang-XX.jar XX是表示版本号, 这个包到处都可以找的到的,你再把这个包引进后看看

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问