It's the same old issue with Eclipse - it uses a happy (communistic?)
global classpath of all source directories in your workscpace's
projects, no matter if production or test code.

It's one of the reasons I believe Eclipse is still broken to unusable ...

If we rename classes, we only work around a long standing and well known
issue of Eclipse only, rather than a real bug. Netbeans, IDEA, Maven,
Ant, Gradle - all would do the right stuff, just Eclipse messes it up.
I'm not happy to work around this crap, but since Eclipse has such a
market share, it can be considered protective for our users and thus
pragmatic, I guess :/

- René

Am 15.08.11 00:52, schrieb Christian Grobmeier:
> Hello Maurizio,
> 
> thanks for your feedback, even when you don't use Eclipse.
> 
> I have tracked down the problem. It is actually because there are two
> org.apache.struts2.TestAction classes, one in core and one in the
> junit plugin. This confused Eclipse. I think we should fix it, because
> it is more "luck" that it worked so far.
> 
> I have a patch ready and will create a new issue for you to apply, if
> you agree :-)
> 
> Cheers
> Christian
> 
> 
> On Sun, Aug 14, 2011 at 7:07 PM, Maurizio Cucchiara
> <[email protected]> wrote:
>> Hi Christian,
>> I have to say I'm not a big eclipse fun (I strongly prefer IntelliJ).
>> BTW I am not able to reproduce the problem in my eclipse environment
>> (which is more or less a sterile environment, nothing more of the
>> Indigo Release and the Maven integration plugin).
>> My original guess it is something with your eclipse environment. The
>> only suggestion I can give you is to run in a clean eclipse
>> installation.
>> Sorry I can't help you more.
>>
>> Maurizio Cucchiara
>>
>>
>>
>> On 14 August 2011 13:56, Christian Grobmeier <[email protected]> wrote:
>>> Hello,
>>>
>>> I have a weird problem with the junit plugin in my app. In addition I
>>> can reproduce a similar problem with the trunks version of the junit
>>> plugin.
>>>
>>> Using the turnk version and "mvn test" everything turns out well.
>>> Using eclipse "run as junit test" leads to tons of errors for me in
>>> StrutsTestCaseTest and StrutsSSpringJunit4TestCase. The
>>> StrutsSpringTestCaseTest runs fine.
>>>
>>> First warnings rise in my eclipse console:
>>>
>>> WARNING:  [51:58.743] The visited object is null, VisitorValidator
>>> will not be able to handle validation properly. Please make sure the
>>> visited object is not null for VisitorValidator to function properly
>>> WARNING:  [51:58.929] The visited object is null, VisitorValidator
>>> will not be able to handle validation properly. Please make sure the
>>> visited object is not null for VisitorValidator to function properly
>>> WARNING:  [51:58.929] Could not find action or result
>>> WARNING:  [51:59.055] The visited object is null, VisitorValidator
>>> will not be able to handle validation properly. Please make sure the
>>> visited object is not null for VisitorValidator to function properly
>>> WARNING:  [51:59.055] Could not find action or result
>>> WARNING:  [51:59.333] The visited object is null, VisitorValidator
>>> will not be able to handle validation properly. Please make sure the
>>> visited object is not null for VisitorValidator to function properly
>>> WARNING:  [51:59.442] The visited object is null, VisitorValidator
>>> will not be able to handle validation properly. Please make sure the
>>> visited object is not null for VisitorValidator to function properly
>>> WARNING:  [51:59.442] Could not find action or result
>>> WARNING:  [51:59.556] The visited object is null, VisitorValidator
>>> will not be able to handle validation properly. Please make sure the
>>> visited object is not null for VisitorValidator to function properly
>>> WARNING:  [51:59.556] Could not find action or result
>>>
>>> Then the erros below.
>>>
>>> Can one reproduce the behaviour?
>>>
>>> In my app which uses this plugin it is the other way round. I
>>> getActionMapping always returns null when I use "mvn test", but
>>> Eclipse wents fine. I think the two problems are somehow related.
>>>
>>> Unfortunately I have no idea what the problem could be.
>>>
>>> Cheers
>>> Christian
>>>
>>>
>>>
>>> Two of the exceptions:
>>>
>>> javax.servlet.ServletException: Error code [404], Error: [No result
>>> defined for action org.apache.struts2.TestAction and result input]
>>>        at 
>>> org.apache.struts2.StrutsJUnit4TestCase.executeAction(StrutsJUnit4TestCase.java:133)
>>>        at 
>>> org.apache.struts2.StrutsSpringJUnit4TestCaseTest.getValueFromStack(StrutsSpringJUnit4TestCaseTest.java:72)
>>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>        at 
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>>        at 
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>>        at java.lang.reflect.Method.invoke(Method.java:597)
>>>        at 
>>> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
>>>        at 
>>> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
>>>        at 
>>> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
>>>        at 
>>> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
>>>        at 
>>> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
>>>        at 
>>> org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)
>>>        at 
>>> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
>>>        at 
>>> org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:82)
>>>        at 
>>> org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)
>>>        at 
>>> org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:240)
>>>        at 
>>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
>>>        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
>>>        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
>>>        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
>>>        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
>>>        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
>>>        at 
>>> org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
>>>        at 
>>> org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
>>>        at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
>>>        at 
>>> org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:180)
>>>        at 
>>> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
>>>        at 
>>> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>>>        at 
>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
>>>        at 
>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
>>>        at 
>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
>>>        at 
>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
>>>
>>>
>>>
>>> No result defined for action org.apache.struts2.TestAction and result input
>>>        at 
>>> com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:376)
>>>        at 
>>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:278)
>>>        at 
>>> com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:265)
>>>        at 
>>> org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
>>>        at 
>>> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
>>>        at 
>>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
>>>        at 
>>> com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:133)
>>>        at 
>>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
>>>        at 
>>> com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:211)
>>>        at 
>>> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
>>>        at 
>>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
>>>        at 
>>> com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:211)
>>>        at 
>>> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
>>>        at 
>>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
>>>        at 
>>> com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:190)
>>>        at 
>>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
>>>        at 
>>> org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)
>>>        at 
>>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
>>>        at 
>>> org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:90)
>>>        at 
>>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
>>>        at 
>>> org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:243)
>>>        at 
>>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
>>>        at 
>>> com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)
>>>        at 
>>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
>>>        at 
>>> com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)
>>>        at 
>>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
>>>        at 
>>> com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145)
>>>        at 
>>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
>>>        at 
>>> com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171)
>>>        at 
>>> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
>>>        at 
>>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
>>>        at 
>>> com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:176)
>>>        at 
>>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
>>>        at 
>>> org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
>>>        at 
>>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
>>>        at 
>>> com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:192)
>>>        at 
>>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
>>>        at 
>>> com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187)
>>>        at 
>>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
>>>        at 
>>> org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
>>>        at 
>>> org.apache.struts2.StrutsSpringJUnit4TestCaseTest.getActionProxy(StrutsSpringJUnit4TestCaseTest.java:58)
>>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>        at 
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>>        at 
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>>        at java.lang.reflect.Method.invoke(Method.java:597)
>>>        at 
>>> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
>>>        at 
>>> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
>>>        at 
>>> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
>>>        at 
>>> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
>>>        at 
>>> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
>>>        at 
>>> org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)
>>>        at 
>>> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
>>>        at 
>>> org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:82)
>>>        at 
>>> org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)
>>>        at 
>>> org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:240)
>>>        at 
>>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
>>>        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
>>>        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
>>>        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
>>>        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
>>>        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
>>>        at 
>>> org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
>>>        at 
>>> org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
>>>        at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
>>>        at 
>>> org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:180)
>>>        at 
>>> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
>>>        at 
>>> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>>>        at 
>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
>>>        at 
>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
>>>        at 
>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
>>>        at 
>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [email protected]
>>> For additional commands, e-mail: [email protected]
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to