SOAP API: Cannot replace a deleted user in a ticket

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
covfefe
Posts: 5
Joined: 30 Jun 2017, 16:46

SOAP API: Cannot replace a deleted user in a ticket

Post by covfefe »

Greetings alltogether! :D

I have several tickets in which a user who was already deleted is either reporter or assignee.
This is a big problem if you want to process tickets like I do with the Java via the Mantis SOAP API.
I have no write access to the database behind our Mantis system.

My Mantis version is 2.0.0, schema version is 209.
The version of the JAVA library for connecting to Mantis is mantis-axis-soap-client-1.2.19.jar

I have the following code snippet which causes an exception, to be precise it is the method mc_issue_update.
My Question: Is there a work around for this or if I have to change the deleted reporter or assignee in all those tickets/issues by hand?

Code: Select all

// mantisconnection is the variable holding new MantisConnectLocator().getMantisConnectPort(url);
IssueData issue_to_replace_the_reporter = mantisconnection.getIssue(a_mantis_bug_id);

// account_to_replace holds an AccountData object with my user
issue_to_replace_the_reporter.setReporter(account_to_replace);

// this.mantisUser and this.mantisPwd are the account credentials for accessing Mantis via API
mantisconnection.mc_issue_update(this.mantisUser, this.mantisPwd, issueId, issue);
In my case, it results in the following error (the user which is stated there that he/she would not exist anymore does in fact not exist anymore in the database table mantis_user_table)

Code: Select all

Exception in thread "main" AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Client
 faultSubcode: 
 faultString: User '9' does not exist.
 faultActor: 
 faultNode: 
 faultDetail: 
	{http://xml.apache.org/axis/}stackTrace:User '16' does not exist.
	at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
	at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
	at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(Unknown Source)
	at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
	at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
	at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
	at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
	at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
	at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
	at org.apache.axis.client.Call.invoke(Call.java:2767)
	at org.apache.axis.client.Call.invoke(Call.java:2443)
	at org.apache.axis.client.Call.invoke(Call.java:2366)
	at org.apache.axis.client.Call.invoke(Call.java:1812)
	at biz.futureware.mantis.rpc.soap.client.MantisConnectBindingStub.mc_issue_update(MantisConnectBindingStub.java:2161)[/color]
// Remark: the further entries list my classes and the invocation of mc_issue_update as the source of the error[/color]
Best regards
covfefe
Posts: 5
Joined: 30 Jun 2017, 16:46

Re: SOAP API: Cannot replace a deleted user in a ticket

Post by covfefe »

SORRY FOLKS! IT WAS A FALSE ALARM!

In the case below, the assigne was the problematic field and not the reporter.
After replacing the assignee instead of the reporter, it worked well! :D

Thanks to the forum hwoever I found the solution because writing about the issue
makes you thinking about it more precisely. :D
Post Reply