Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Mylyn » parseHtmlError when I call postTaskData() on Bugzilla Connector
parseHtmlError when I call postTaskData() on Bugzilla Connector [message #596332] Mon, 16 February 2009 22:49
Vinny  is currently offline Vinny Friend
Messages: 20
Registered: July 2009
Junior Member
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
Previous Topic:"Bugzilla – Suspicious Action" error encountered after Bugzilla 3.2.2 upgrade
Next Topic:parseHtmlError when I call postTaskData() on Bugzilla Connector
Goto Forum:
  


Current Time: Sun Dec 21 04:09:51 GMT 2014

Powered by FUDForum. Page generated in 0.01514 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software