parseHtmlError when I call postTaskData() on Bugzilla Connector [message #65610] |
Mon, 16 February 2009 17:49  |
Eclipse User |
|
|
|
Using Bugzilla 3.2.2 and Mylyn 3.0.4.
Bugzilla's 'errorlog' has nothing valid in it.
I get this error upon a postTaskData() call to update an existing bug's
description via the Bugzilla Connector API:
org.eclipse.core.runtime.CoreException: A repository error has occurred.
at
org.eclipse.mylyn.internal.bugzilla.core.BugzillaClient.pars eHtmlError(BugzillaClient.java:1351)
at
org.eclipse.mylyn.internal.bugzilla.core.BugzillaClient.post TaskData(BugzillaClient.java:868)
at
org.eclipse.mylyn.internal.bugzilla.core.BugzillaTaskDataHan dler.postTaskData(BugzillaTaskDataHandler.java:254)
....
....
....
The code:
TasksUiPlugin.getDefault().getPreferenceStore().setValue(
ITasksUiPreferenceConstants.REPOSITORY_SYNCH_SCHEDULE_ENABLE D, false);
TaskRepositoryManager manager = TasksUiPlugin.getRepositoryManager();
TaskRepository repository = new
TaskRepository(BugzillaCorePlugin.CONNECTOR_KIND, URL);
repository.setCredentials(AuthenticationType.REPOSITORY,
new AuthenticationCredentials(USER, PASS), false);
repository.setTimeZoneId("Canada/Eastern");
manager.addRepository(repository);
TaskList taskList = TasksUiPlugin.getTaskList();
AbstractRepositoryConnector abstractRepositoryClient =
manager.getRepositoryConnector(BugzillaCorePlugin.CONNECTOR_ KIND);
BugzillaRepositoryConnector connector = (BugzillaRepositoryConnector)
abstractRepositoryClient;
TaskData taskData = null;
try {
taskData = connector.getTaskData(repository, "1", new
NullProgressMonitor());
} catch (CoreException e1) {
e1.printStackTrace();
}
TaskAttribute desc = taskData.getRoot().getMappedAttribute(
TaskAttribute.DESCRIPTION);
System.out.println("Current desc value is "+desc.getValue()); /* THIS
WORKS!*/
String newDescriptionText = "New description!!!!!";
desc.setValue(newDescriptionText);
Set<TaskAttribute> changed = new HashSet<TaskAttribute>();
changed.add(desc);
try {
connector.getTaskDataHandler().postTaskData(repository, taskData,
changed, new NullProgressMonitor()); /* THIS THROWS THE EXCEPTION */
} catch (CoreException e) {
e.printStackTrace();
return;
}
Any ideas would be appreciated!
Thanks,
V
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02548 seconds