Connection to Server Via IntelliJ IDEA Plugin Fails - Returned Malformed Response
Symptoms
This article refers to versions of Fisheye earlier than 2.9.
From Fisheye 2.9 onwards, the Allow remote API calls setting is turned on by default, and is not configurable. See the FishEye 2.9 upgrade guide for more information.
Attempting to configure the IntelliJ IDEA plugin in Fisheye results in the following error when trying to test the connection to the server:
com.atlassian.theplugin.commons.remoteapi.RemoteApiLoginException: Server:http://localhost:8060 returned malformed response
at com.atlassian.theplugin.commons.crucible.api.rest.CrucibleSessionImpl.realLogin(CrucibleSessionImpl.java:256)
at com.atlassian.theplugin.commons.crucible.api.rest.CrucibleSessionImpl.isLoggedIn(CrucibleSessionImpl.java:1860)
at com.atlassian.theplugin.commons.crucible.CrucibleServerFacadeImpl.testServerConnection(CrucibleServerFacadeImpl.java:170)
at
com.atlassian.connector.intellij.crucible.IntelliJCrucibleServerFacade.testServerConnection(IntelliJCrucibleServerFacade.java:405)
at com.atlassian.theplugin.idea.config.serverconfig.CrucibleConnector.connect(CrucibleConnector.java:34)
at com.atlassian.theplugin.ConnectionWrapper.run(ConnectionWrapper.java:63)
Caused by: org.jdom.input.JDOMParseException: Error on line 175: The
element type "link" must be terminated by the matching end-tag
"</link>".
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:504)
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:807)
at
com.atlassian.theplugin.commons.remoteapi.rest.AbstractHttpSession.retrievePostResponseInternalImpl(AbstractHttpSession.java:443)
at
com.atlassian.theplugin.commons.remoteapi.rest.AbstractHttpSession.retrievePostResponseWithForm(AbstractHttpSession.java:487)
at com.atlassian.theplugin.commons.crucible.api.rest.CrucibleSessionImpl.retrieveLoginResponse(CrucibleSessionImpl.java:280)
at com.atlassian.theplugin.commons.crucible.api.rest.CrucibleSessionImpl.realLogin(CrucibleSessionImpl.java:231)
... 5 more
Caused by: org.xml.sax.SAXParseException: The element type "link" must be terminated by the matching end-tag "</link>".
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:489)
... 10 more
Cause
"Allow remote API calls" option (Administration >> Server Settings) is turned OFF.
Resolution
Turn ON "Allow remote API calls" (Administration >> Server Settings).