Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 356986 - auto detect XML-RPC (was: IllegalArgumentException when enabling XML-RPC)
Summary: auto detect XML-RPC (was: IllegalArgumentException when enabling XML-RPC)
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: 3.6   Edit
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: 3.8   Edit
Assignee: Frank Becker CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 359210
  Show dependency tree
 
Reported: 2011-09-07 14:31 EDT by Steffen Pingel CLA
Modified: 2012-05-14 05:01 EDT (History)
2 users (show)

See Also:


Attachments
mylyn/context/zip (30.44 KB, application/octet-stream)
2011-09-09 14:27 EDT, Frank Becker CLA
no flags Details
mylyn/context/zip (324.78 KB, application/octet-stream)
2011-10-30 17:12 EDT, Frank Becker CLA
no flags Details
mylyn/context/zip (16.48 KB, application/octet-stream)
2011-11-07 15:17 EST, Frank Becker CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steffen Pingel CLA 2011-09-07 14:31:23 EDT
Steps:
1. Enable xmlrpc on a repository that does not support XML-RPC

Exception Stack Trace:
java.lang.IllegalArgumentException
	at org.eclipse.core.runtime.ListenerList.add(ListenerList.java:103)
	at org.eclipse.core.internal.jobs.InternalJob.addJobChangeListener(InternalJob.java:158)
	at org.eclipse.core.runtime.jobs.Job.addJobChangeListener(Job.java:162)
	at org.eclipse.mylyn.internal.bugzilla.core.BugzillaClientManager.repositoryChanged(BugzillaClientManager.java:111)
	at org.eclipse.mylyn.internal.tasks.core.TaskRepositoryManager$5.run(TaskRepositoryManager.java:467)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.mylyn.internal.tasks.core.TaskRepositoryManager.notifyRepositorySettingsChanged(TaskRepositoryManager.java:459)
	at org.eclipse.mylyn.internal.tasks.core.TaskRepositoryManager$1.propertyChange(TaskRepositoryManager.java:77)
	at org.eclipse.mylyn.tasks.core.TaskRepository.notifyChangeListeners(TaskRepository.java:830)
	at org.eclipse.mylyn.tasks.core.TaskRepository.setProperty(TaskRepository.java:823)
	at org.eclipse.mylyn.internal.bugzilla.ui.tasklist.BugzillaRepositorySettingsPage.applyToInternal(BugzillaRepositorySettingsPage.java:710)
	at org.eclipse.mylyn.internal.bugzilla.ui.tasklist.BugzillaRepositorySettingsPage.applyTo(BugzillaRepositorySettingsPage.java:559)
...
Comment 1 Steffen Pingel CLA 2011-09-07 14:32:35 EDT
I also got an error popup "Can not get the Default Milestons using XMLRPC".
Comment 2 Frank Becker CLA 2011-09-07 16:23:40 EDT
I hope to have an fix soon.

The problem is that when finish is pressed we did not validate the settings!
Comment 3 Frank Becker CLA 2011-09-09 00:40:39 EDT
Steffen,
shoud i use the New gerrit instance for this fix?
Hope that i can do this later Today.
Comment 4 Steffen Pingel CLA 2011-09-09 03:31:31 EDT
That's up to you. If it's a bigger a change or you would like some feedback it's a good idea to push it to Gerrit but if you are confident that the change does not require a review you can also push it directly to the Eclipse.org.
Comment 5 Frank Becker CLA 2011-09-09 14:27:06 EDT
Steffen,

I use gerrit (http://review.mylyn.org/27) to make sure that we have no failing tests. Can you please review so we are sure that my approach is OK.
Comment 6 Frank Becker CLA 2011-09-09 14:27:09 EDT
Created attachment 203083 [details]
mylyn/context/zip
Comment 7 Frank Becker CLA 2011-09-09 14:34:53 EDT
We have a failing test!

org.eclipse.mylyn.trac.tests.core.TracTaskDataHandlerXmlRpcTest.testAttachmentChangesLastModifiedDate

I think that this is not related to my changes!
Comment 8 Steffen Pingel CLA 2011-09-09 15:28:20 EDT
No worries, I have already run the clean up script which has fixed the failing test.
Comment 9 Steffen Pingel CLA 2011-09-16 06:21:58 EDT
I have commented on the review: http://review.mylyn.org/#change,27 . We'll need to improve the validation a bit before we can push this.
Comment 10 Frank Becker CLA 2011-09-16 16:17:04 EDT
(In reply to comment #9)
> I have commented on the review: http://review.mylyn.org/#change,27 . We'll need
> to improve the validation a bit before we can push this.

I put my comment!
Comment 11 Steffen Pingel CLA 2011-09-16 17:44:28 EDT
I see two new reviews: 
http://review.mylyn.org/#change,45
http://review.mylyn.org/#change,46

Can you push an update to the original one at http://review.mylyn.org/#change,27 instead?
Comment 12 Frank Becker CLA 2011-09-17 01:24:25 EDT
(In reply to comment #11)
> I see two new reviews: 
> http://review.mylyn.org/#change,45
> http://review.mylyn.org/#change,46
> 
> Can you push an update to the original one at
> http://review.mylyn.org/#change,27 instead?

Sorry,

I  only want to push http://review.mylyn.org/#change,47 for bug#354023 (the XMLRPC part)
Comment 13 Steffen Pingel CLA 2011-09-17 05:12:02 EDT
(In reply to comment #10)
> (In reply to comment #9)
> > I have commented on the review: http://review.mylyn.org/#change,27 . We'll
> need
> > to improve the validation a bit before we can push this.
> 
> I put my comment!

Did you publish the comments? Initially comments are only drafts but once you select "Review" and then "Publish Comments" the comments become visible for others as well.
Comment 14 Frank Becker CLA 2011-09-17 09:27:20 EDT
(In reply to comment #13)
> (In reply to comment #10)
> > (In reply to comment #9)
> > > I have commented on the review: http://review.mylyn.org/#change,27 . We'll
> > need
> > > to improve the validation a bit before we can push this.
> > 
> > I put my comment!
> 
> Did you publish the comments? Initially comments are only drafts but once you
> select "Review" and then "Publish Comments" the comments become visible for
> others as well.

Sorry I did not know this!

Now you can see my comments!
Comment 15 Steffen Pingel CLA 2011-09-19 14:20:18 EDT
Thanks. We should either check if XML-RPC is available transparently when making an XML-RPC call or store that as part of the configuration. It also makes sense to check that as part of validation but there shouldn't be another job that does verification.
Comment 16 Frank Becker CLA 2011-10-30 17:12:10 EDT
Steffen,

I start from scratch and create patch set 2 for review 27.

Can you review this?
Comment 17 Frank Becker CLA 2011-10-30 17:12:16 EDT
Created attachment 206184 [details]
mylyn/context/zip
Comment 18 Steffen Pingel CLA 2011-11-01 06:36:59 EDT
I'll try to take a look later this week but the change looks quite large so it might take some time.
Comment 19 Frank Becker CLA 2011-11-01 12:35:47 EDT
(In reply to comment #18)
> I'll try to take a look later this week but the change looks quite large so it
> might take some time.

I found some failing Tests so wait until i have a fix for this
Comment 20 Frank Becker CLA 2011-11-05 03:26:25 EDT
*** Bug 362314 has been marked as a duplicate of this bug. ***
Comment 21 Frank Becker CLA 2011-11-07 15:17:00 EST
Steffen,

i create patch set 4
Comment 22 Frank Becker CLA 2011-11-07 15:17:03 EST
Created attachment 206549 [details]
mylyn/context/zip
Comment 23 Steffen Pingel CLA 2011-11-08 09:21:19 EST
Thanks. Some of the problems from the last review are still present in the latest patch set. The entire logic for validation XML-RPC connectivity should be encapsulated in BugzillaClient.validate() which should return an object that describes the discovered properties for the Bugzilla installation (version, XML-RPC available, etc.).
Comment 24 Steffen Pingel CLA 2011-11-08 10:04:22 EST
Concerning an extra control for reporting validation results on the settings page: I would prefer if we came up with a generic solution in the framework (bug 219680).
Comment 25 Frank Becker CLA 2011-11-11 15:09:37 EST
(In reply to comment #24)
> Concerning an extra control for reporting validation results on the settings
> page: I would prefer if we came up with a generic solution in the framework
> (bug 219680).

Steffen,

I have comment on the review!
Comment 26 Steffen Pingel CLA 2012-02-01 09:46:56 EST
Frank, I reverted commit 0d08a0917251974ba720a2bd2828f19f252e3b7f for now. The spirit of the change seems fine but the API proposal needs more work and discussion before we can proceed with that. 

I have opened this bug to track the enhancement that I think your change implemented. We have often discussed that as a desirable feature enhancement on conference calls:

 370331: automatically validate when pressing finish on repository setting page
 https://bugs.eclipse.org/bugs/show_bug.cgi?id=370331
Comment 27 Frank Becker CLA 2012-05-12 09:11:12 EDT
This was fixes with bug#370331