Community
Participate
Working Groups
31 tests from the org.eclipse.jst.ws.jaxws.dom.runtime.tests.dom.validation package have failed in two consecutive WTP 3.5.0 builds. http://build.eclipse.org/webtools/committers/wtp4x-R3.5.0-I/20130108063043/I-3.5.0-20130108063043/ http://build.eclipse.org/webtools/committers/wtp4x-R3.5.0-I/20130108224252/I-3.5.0-20130108224252/ All tests fail with similar errors to the following with only the project name changing: org.eclipse.core.internal.resources.ResourceException: Errors occurred during the build. at org.eclipse.core.internal.resources.Project$1.run(Project.java:620) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2345) at org.eclipse.core.internal.resources.Project.internalBuild(Project.java:597) at org.eclipse.core.internal.resources.Project.build(Project.java:114) at org.eclipse.jst.ws.jaxws.testutils.project.TestProject$9.run(TestProject.java:451) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2345) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2327) at org.eclipse.jst.ws.jaxws.testutils.project.TestProjectsUtils.executeWorkspaceRunnable(TestProjectsUtils.java:320) at org.eclipse.jst.ws.jaxws.testutils.project.TestProjectsUtils.access$0(TestProjectsUtils.java:315) at org.eclipse.jst.ws.jaxws.testutils.project.TestProjectsUtils$3.run(TestProjectsUtils.java:336) at org.eclipse.jst.ws.jaxws.testutils.threading.TestContextThread.run(TestContextThread.java:72) Contains: Errors running builder 'Validation' on project 'ValidationTest1357638849871'. java.lang.NullPointerException at org.eclipse.wst.validation.internal.model.FilterRule$TargetRuntime.matchesProject(FilterRule.java:574) at org.eclipse.wst.validation.internal.model.FilterGroup.shouldValidate(FilterGroup.java:187) at org.eclipse.wst.validation.Validator$V2.shouldValidateProject(Validator.java:1323) at org.eclipse.wst.validation.Validator.shouldValidateProject(Validator.java:358) at org.eclipse.wst.validation.Validator.shouldValidateProject(Validator.java:338) at org.eclipse.wst.validation.internal.ValManager$ValidatorProjectManager$ValProjectMap.load(ValManager.java:1207) at org.eclipse.wst.validation.internal.ValManager$ValidatorProjectManager$ValProjectMap.<init>(ValManager.java:1165) at org.eclipse.wst.validation.internal.ValManager$ValidatorProjectManager.<init>(ValManager.java:1074) at org.eclipse.wst.validation.internal.ValManager$ValidatorProjectManager.get(ValManager.java:1092) at org.eclipse.wst.validation.internal.ValManager.accept(ValManager.java:747) at org.eclipse.wst.validation.internal.ValManager.clean(ValManager.java:989) at org.eclipse.wst.validation.internal.operations.ValidationBuilder.newClean(ValidationBuilder.java:300) at org.eclipse.wst.validation.internal.operations.ValidationBuilder.clean(ValidationBuilder.java:117) at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:728) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239) at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:256) at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:394) at org.eclipse.core.internal.resources.Project$1.run(Project.java:618) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2345) at org.eclipse.core.internal.resources.Project.internalBuild(Project.java:597) at org.eclipse.core.internal.resources.Project.build(Project.java:114) at org.eclipse.jst.ws.jaxws.testutils.project.TestProject$9.run(TestProject.java:451) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2345) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2327) at org.eclipse.jst.ws.jaxws.testutils.project.TestProjectsUtils.executeWorkspaceRunnable(TestProjectsUtils.java:320) at org.eclipse.jst.ws.jaxws.testutils.project.TestProjectsUtils.access$0(TestProjectsUtils.java:315) at org.eclipse.jst.ws.jaxws.testutils.project.TestProjectsUtils$3.run(TestProjectsUtils.java:336) at org.eclipse.jst.ws.jaxws.testutils.threading.TestContextThread.run(TestContextThread.java:72) From the above error an NPE is thrown at FilterRule line 574. That matchesProject method was added to FilterRule and committed 2 days ago as part of Bug 380173. I've ran all the tests locally on OSX and I've been unable to reproduce any of the test failures and a breakpoint set at FilterRule line 574 is never hit.
Danail could you have a look at these tests and see if you can reproduce or spot any issues with them due to that change in FilterRule.
Hi Shane, I managed to reproduce the bug manually. Steps: 1. Create a new Server -> Runtime Environment (e.g. Apache Tomcat 6) 2. Create a new dynamic web project and make sure that you do not specify target runtime 3. Open Preferences -> Validation 3.1 Choose a configurable validator (e.g. XML Schema Validator), press the "..." button 3.2 Add an exclude group 3.3 Add a rule for the exclude group via pressing Add Rule... 3.4 Let the rule be applicable for the runtime created on step 1 4. Confirm all the preferences dialog 5. Upon project rebuild the exception occurs As a solution I could propose that org.eclipse.wst.validation.internal.model.FilterRule.TargetRuntime.matchesProject(IProject) should return false in case the project has no runtime I am assigning the bug to WTP common tools Regards, Danail
Created attachment 225438 [details] Moview: Reproducing the bug This short movie demonstrates how to reproduce the NullPointerException
Thanks Danail. Updating bug title.
Fix was committed to master for WTP 3.5.0.
Resolving...