| Summary: | Annotation Properties view causes IllegalArgumentException when quickly setting annotations | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [WebTools] WTP Webservices | Reporter: | Danail Branekov <danail.branekov> | ||||||||||
| Component: | jst.ws.jaxws | Assignee: | Shane Clarke <shane_clarke> | ||||||||||
| Status: | RESOLVED FIXED | QA Contact: | Shane Clarke <shane_clarke> | ||||||||||
| Severity: | normal | ||||||||||||
| Priority: | P3 | ||||||||||||
| Version: | 3.2.4 | ||||||||||||
| Target Milestone: | 3.4 M7 | ||||||||||||
| Hardware: | PC | ||||||||||||
| OS: | Windows 7 | ||||||||||||
| Whiteboard: | |||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Danail Branekov
Created attachment 204002 [details]
Flash movie demonstrating the issue (part1)
Created attachment 204003 [details]
Flash movie demonstrating the issue (part2)
I just figured out that I can only reproduce the bug in case the annotation processing is turned on. I am not sure whether this is releated to the bug, or annotation processing simply slows down resource change event handling thus helping raising the exception Hi Danail, i've tried to reproduce following your description but have so far been unable to do so. I'm also unable to play the attached flash movie. Could you try downloading the attachments, unraring them and see if you have any problem with the extracted swf movie? H Shane, I had hard time reproducing this today either. As the issue seems to have something to do with asynchronous event processing, you would probably need a project with a larger content. I am attaching such a project for reference. I have also managed to record a WMV movie which is much smaller - also attached. In the movie I am creating a new web project, generate an endpoint bean and start modifying an endpoint (WeatherSoapImpl) annotations via the view Regards, Danail Created attachment 205001 [details]
Movie demonstrating the error
Created attachment 205002 [details]
Sample project
I was able play the wmv and recreate the problem using the wsdl file in the attached project. There's an error thrown when the annotation processing is enabled for the wsdl location rule trying to read the wsdl file at http://ws.cdyne.com/WeatherWS/Weather.asmx?wsdl which it's unable to do: javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR: Problem parsing '- WSDL Document -'.: org.xml.sax.SAXParseException: The element type "br" must be terminated by the matching end-tag "</br>". at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(Unknown Source) at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source) at org.eclipse.jst.ws.jaxws.core.utils.WSDLUtils.readWSDL(WSDLUtils.java:96) at org.eclipse.jst.ws.internal.jaxws.core.annotations.validation.WebServiceWSDLLocationRule.validateWSDL(WebServiceWSDLLocationRule.java:130) at org.eclipse.jst.ws.internal.jaxws.core.annotations.validation.WebServiceWSDLLocationRule.checkWSDLocation(WebServiceWSDLLocationRule.java:97) at org.eclipse.jst.ws.internal.jaxws.core.annotations.validation.WebServiceWSDLLocationRule.process(WebServiceWSDLLocationRule.java:77) at com.sun.mirror.apt.AnnotationProcessors$CompositeAnnotationProcessor.process(AnnotationProcessors.java:83) at org.eclipse.jdt.apt.core.internal.APTDispatchRunnable.dispatchToFileBasedProcessor(APTDispatchRunnable.java:655) at org.eclipse.jdt.apt.core.internal.APTDispatchRunnable.runAPTInFileBasedMode(APTDispatchRunnable.java:344) at org.eclipse.jdt.apt.core.internal.APTDispatchRunnable.build(APTDispatchRunnable.java:682) at org.eclipse.jdt.apt.core.internal.APTDispatchRunnable.access$1(APTDispatchRunnable.java:674) at org.eclipse.jdt.apt.core.internal.APTDispatchRunnable$1.run(APTDispatchRunnable.java:273) at org.eclipse.jdt.apt.core.internal.env.BuildEnv$CallbackRequestor.acceptBinding(BuildEnv.java:611) at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:925) at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:577) at org.eclipse.jdt.core.dom.ASTParser.createASTs(ASTParser.java:888) at org.eclipse.jdt.apt.core.internal.env.BaseProcessorEnv.createASTs(BaseProcessorEnv.java:859) at org.eclipse.jdt.apt.core.internal.env.BuildEnv.createASTs(BuildEnv.java:356) at org.eclipse.jdt.apt.core.internal.env.AbstractCompilationEnv.newBuildEnv(AbstractCompilationEnv.java:111) at org.eclipse.jdt.apt.core.internal.APTDispatchRunnable.build(APTDispatchRunnable.java:283) at org.eclipse.jdt.apt.core.internal.APTDispatchRunnable.run(APTDispatchRunnable.java:225) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975) at org.eclipse.jdt.apt.core.internal.APTDispatchRunnable.runAPTDuringBuild(APTDispatchRunnable.java:150) at org.eclipse.jdt.apt.core.internal.AptCompilationParticipant.processAnnotations(AptCompilationParticipant.java:193) at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.processAnnotations(AbstractImageBuilder.java:627) at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:338) at org.eclipse.jdt.internal.core.builder.IncrementalImageBuilder.build(IncrementalImageBuilder.java:134) at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildDeltas(JavaBuilder.java:265) at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:193) at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:629) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:172) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:203) at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:255) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:258) at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:311) at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:343) at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:144) at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:242) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) Caused by: org.xml.sax.SAXParseException: The element type "br" must be terminated by the matching end-tag "</br>". at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:249) at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:284) ... 41 more With that rule removed but annotation processing still enabled i was unable to reproduce the first error. Danail I found that the changes i made to fix Bug #371936 has also resolved this issue. With those changes reverted i can reproduce the problem in a runtime workspace. Reapply the fix and can't reproduce. I also made a further change to the wsdl location rule to print a warning in the above case when it's unable to locate the wsdl file at the given wsdlLocation: http://ws.cdyne.com/WeatherWS/Weather.asmx?wsdl Marking as resolved. Reopening as the new warning message is causing a test failure at: junit.framework.AssertionFailedError: Markers unexpectedly found expected:<0> but was:<1> at org.eclipse.jst.ws.jaxws.dom.runtime.tests.dom.validation.ValidationTestsSetUp.assertNoValidationErrors(ValidationTestsSetUp.java:250) at org.eclipse.jst.ws.jaxws.dom.runtime.tests.dom.validation.WsValidationTest.testWsdlLocationInWebInfCorrect(WsValidationTest.java:139) The rule is unable to read the WSDL file because the file has no content. Couple of ways to fix this. Use a wsdl file with valid content in the test or ignore markers with a serverity of warning in ValidationTestsSetUp.assertNoValidationErrors Danail, what you think? Hi Shane, I think that using a valid WSDL content seems to be the right way - the test verifies that there are no issues reported when everything is OK. Ignoring warnings in the the assertNoValidationErrors method might have side effects which could hide potential future regressions. As you have introduced a new validation check, I would recommend providing new tests to verify that proper warnings are reported in case the WSDL is not accessible or is empty. See method ValidationTestsSetUp.validateResourceMarkers(IResource, MarkerData...) usages for examples on how a test can specify markers expectations Regards, Danail Current test updated to run with valid wsdl content and new tests added. |