我是个新手。我在运行单元测试时遇到这个错误。
消息:严重:加载类[com.ecs.local.register.action.RegisterActionTest]java时出错。lang.NoClassDefFoundError:org/apache/struts2/StrutsTestCase
但是我的项目已经包括了JUnit和StrutsTestCase。希望你的帮助。非常感谢!
Oct 14, 2013 4:11:09 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\jre7\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Java\jdk1.7.0_40\bin;C:\Program Files\apache-maven-3.1.0\bin;.
Oct 14, 2013 4:11:09 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.j2ee.server:test' did not find a matching property.
Oct 14, 2013 4:11:09 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Oct 14, 2013 4:11:09 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 550 ms
Oct 14, 2013 4:11:09 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Oct 14, 2013 4:11:09 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.37
Oct 14, 2013 4:11:10 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Parsing configuration file [struts-default.xml]
Oct 14, 2013 4:11:10 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Parsing configuration file [struts-plugin.xml]
Oct 14, 2013 4:11:10 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Parsing configuration file [struts.xml]
Oct 14, 2013 4:11:10 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Choosing bean (struts) for (com.opensymphony.xwork2.ObjectFactory)
Oct 14, 2013 4:11:10 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Choosing bean (struts) for (com.opensymphony.xwork2.FileManagerFactory)
Oct 14, 2013 4:11:10 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.XWorkConverter)
Oct 14, 2013 4:11:10 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.CollectionConverter)
Oct 14, 2013 4:11:10 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.ArrayConverter)
Oct 14, 2013 4:11:10 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.DateConverter)
Oct 14, 2013 4:11:10 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.NumberConverter)
Oct 14, 2013 4:11:10 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.StringConverter)
Oct 14, 2013 4:11:10 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.ConversionPropertiesProcessor)
Oct 14, 2013 4:11:10 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.ConversionFileProcessor)
Oct 14, 2013 4:11:10 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.ConversionAnnotationProcessor)
Oct 14, 2013 4:11:10 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.TypeConverterCreator)
Oct 14, 2013 4:11:10 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.TypeConverterHolder)
Oct 14, 2013 4:11:10 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Choosing bean (struts) for (com.opensymphony.xwork2.TextProvider)
Oct 14, 2013 4:11:10 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Choosing bean (struts) for (com.opensymphony.xwork2.LocaleProvider)
Oct 14, 2013 4:11:10 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Choosing bean (struts) for (com.opensymphony.xwork2.ActionProxyFactory)
Oct 14, 2013 4:11:10 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.ObjectTypeDeterminer)
Oct 14, 2013 4:11:10 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Choosing bean (struts) for (org.apache.struts2.dispatcher.mapper.ActionMapper)
Oct 14, 2013 4:11:10 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Choosing bean (jakarta) for (org.apache.struts2.dispatcher.multipart.MultiPartRequest)
Oct 14, 2013 4:11:10 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Choosing bean (struts) for (org.apache.struts2.views.freemarker.FreemarkerManager)
Oct 14, 2013 4:11:10 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Choosing bean (struts) for (org.apache.struts2.components.UrlRenderer)
Oct 14, 2013 4:11:10 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Choosing bean (struts) for (com.opensymphony.xwork2.validator.ActionValidatorManager)
Oct 14, 2013 4:11:10 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Choosing bean (struts) for (com.opensymphony.xwork2.util.ValueStackFactory)
Oct 14, 2013 4:11:10 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Choosing bean (struts) for (com.opensymphony.xwork2.util.reflection.ReflectionProvider)
Oct 14, 2013 4:11:10 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Choosing bean (struts) for (com.opensymphony.xwork2.util.reflection.ReflectionContextFactory)
Oct 14, 2013 4:11:10 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Choosing bean (struts) for (com.opensymphony.xwork2.util.PatternMatcher)
Oct 14, 2013 4:11:10 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Choosing bean (struts) for (org.apache.struts2.dispatcher.StaticContentLoader)
Oct 14, 2013 4:11:10 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Choosing bean (struts) for (com.opensymphony.xwork2.UnknownHandlerManager)
Oct 14, 2013 4:11:10 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Choosing bean (struts) for (org.apache.struts2.views.util.UrlHelper)
Oct 14, 2013 4:11:10 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Choosing bean (struts) for (com.opensymphony.xwork2.util.TextParser)
Oct 14, 2013 4:11:10 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Overriding property struts.i18n.reload - old value: false new value: true
Oct 14, 2013 4:11:10 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Overriding property struts.configuration.xml.reload - old value: false new value: true
Oct 14, 2013 4:11:10 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger error
SEVERE: Unable to read class [com.ecs.local.register.action.RegisterActionTest]
Could not load org/apache/struts2/StrutsTestCase.class - [unknown location]
at com.opensymphony.xwork2.util.finder.ClassFinder.readClassDef(ClassFinder.java:722)
at com.opensymphony.xwork2.util.finder.ClassFinder.access$400(ClassFinder.java:70)
at com.opensymphony.xwork2.util.finder.ClassFinder$InfoBuildingVisitor.extractSuperInterfaces(ClassFinder.java:767)
at com.opensymphony.xwork2.util.finder.ClassFinder$InfoBuildingVisitor.visit(ClassFinder.java:754)
at org.objectweb.asm.ClassReader.accept(Unknown Source)
at org.objectweb.asm.ClassReader.accept(Unknown Source)
at com.opensymphony.xwork2.util.finder.ClassFinder.readClassDef(ClassFinder.java:717)
at com.opensymphony.xwork2.util.finder.ClassFinder.<init>(ClassFinder.java:112)
at org.apache.struts2.convention.PackageBasedActionConfigBuilder.findActions(PackageBasedActionConfigBuilder.java:390)
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: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:424)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:115)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4072)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4726)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Oct 14, 2013 4:11:10 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger error
SEVERE: Error loading class [com.ecs.local.register.action.RegisterActionTest]
java.lang.NoClassDefFoundError: org/apache/struts2/StrutsTestCase
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2854)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1159)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1647)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
at com.opensymphony.xwork2.util.finder.ClassLoaderInterfaceDelegate.loadClass(ClassLoaderInterfaceDelegate.java:34)
at com.opensymphony.xwork2.util.finder.ClassFinder$ClassInfo.get(ClassFinder.java:562)
at org.apache.struts2.convention.PackageBasedActionConfigBuilder$3.test(PackageBasedActionConfigBuilder.java:622)
at org.apache.struts2.convention.PackageBasedActionConfigBuilder$3.test(PackageBasedActionConfigBuilder.java:609)
at com.opensymphony.xwork2.util.finder.ClassFinder.findClasses(ClassFinder.java:342)
at org.apache.struts2.convention.PackageBasedActionConfigBuilder.findActions(PackageBasedActionConfigBuilder.java:393)
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: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:424)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:115)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4072)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4726)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.lang.ClassNotFoundException: org.apache.struts2.StrutsTestCase
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
... 39 more
Oct 14, 2013 4:11:10 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Oct 14, 2013 4:11:10 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Oct 14, 2013 4:11:10 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/32 config=null
Oct 14, 2013 4:11:10 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1248 ms
谢谢大家!我已经解决了我的问题。因为我是一个新手,所以我不知道如何使用单元测试,所以当应用程序在服务器上运行时,我会使用StrutsTestCase。再次感谢大家!
这是我们单个模块的pom.xml 我们有很多模块,当我们从intellji运行时,当我们尝试将单个模块转换为。jar并通过-mvn clean安装运行,我们得到了这个错误。 这是错误代码
我有一个简单的项目和一些EJB,我试图部署到一个服务器。这就是我如何尝试初始化我的: 没什么特别的。 这就是我的相关部分如下所示: 没有这一部分,我可以建立我的项目。但在这一部分,我得到了一个例外: 我该怎么办?非常感谢。
Apache Kafka:分布式消息传递系统 Apache Storm:实时消息处理 我们如何在实时数据管道中使用这两种技术来处理事件数据? 在实时数据管道方面,我觉得两者做的工作是一样的。如何在数据管道上同时使用这两种技术?
我正在使用Flink从Apache Pulsar读取数据。我在pulsar中有一个分区主题,有8个分区。在本主题中,我生成了1000条消息,分布在8个分区中。我的笔记本电脑中有8个内核,因此我有8个子任务(默认情况下,并行度=#个内核)。在执行Eclipse中的代码后,我打开了Flink UI,发现一些子任务没有收到任何记录(空闲)。我希望所有8个子任务都能得到利用(我希望每个子任务都映射到我的主
我们需要的是直接的API来设置和使用集群消息队列。我们最初的计划是使用Camel在集群JMS或ActiveMQ队列上进行消费/生产。Kafka如何使这项任务变得更容易?在任何一种情况下,应用程序本身都将在WebLogic服务器上运行。 消息传递将是点对点类型,其中有多个相同服务的实例在运行,但根据负载平衡策略,只有一个实例应该处理消息并发出结果。消息队列也是群集的,因此服务实例或队列实例的失败都不
目前我正在研究Apache spark和Apache ignite框架。 这篇文章介绍了它们之间的一些原则差异,但我意识到我仍然不理解它们的目的。 我的意思是,哪一个问题更容易产生火花而不是点燃,反之亦然?