Page tree
Skip to end of metadata
Go to start of metadata

Symptoms

Test connection from Sharepoint Administration page failed with

Connection Test:Unrecognized error::

The following appears in the atlassian-confluence.log:

2012-11-29 18:13:59,135 WARN [http-9090-3] [apache.cxf.phase.PhaseInterceptorChain] doLog Interceptor has thrown exception, unwinding now
 -- referer: http://10.60.1.192:9090/admin/sharepoint-admin/editAlias.action?serverAlias=Hades+Site+@+SP+Poseidon&atl_token=d841c30f894ee134e89ecbc0d77edc61d513ec42 | url: /rest/sharepoint/1.0/SharePoint-admin/TestConnection | userName: administrator
org.apache.cxf.interceptor.Fault: Response was of unexpected text/html ContentType.  Incoming portion of HTML stream: <HTML xmlns:o="urn:schemas-microsoft-com:office:office" dir="ltr">
<HEAD><meta name="GENERATOR" content="Microsoft SharePoint" /><meta name="progid" content="SharePoint.WebPartPage.Document" /><meta HTTP-EQUIV="Content-Type" content="text/html; charset=utf-8" /><meta HTTP-EQUIV="Expires" content="0" /><title>
		Home - KL-Connie hades
</title>
------ Huge chunk of HTML code of a SharePoint page here ------
</HEAD>
<BODY scroll="yes" onload="javascript:if (typeof(_spBodyOnLoadWrapper) != 'undefined') _spBodyOnLoadWrapper();">
------ Huge chunk of HTML code of a SharePoint page here ------
</BODY>
</HTML>
	at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:73)
....
	at $Proxy1603.getListCollection(Unknown Source)
	at com.atlassian.confluence.extra.sharepoint.ws.cxf.CXFListsServiceWrapper.getLists(CXFListsServiceWrapper.java:308)
	at com.atlassian.confluence.extra.sharepoint.ws.WebServiceAccessorImpl.testConnection(WebServiceAccessorImpl.java:433)
	at com.atlassian.confluence.extra.sharepoint.rest.SharePointAdminResult.performConnectionTest(SharePointAdminResult.java:69)
	at com.atlassian.confluence.extra.sharepoint.rest.SharePointAdminResult.TestConnection(SharePointAdminResult.java:48)
....

or/and:

2012-11-29 18:13:59,507 ERROR [http-9090-3] [extra.sharepoint.ws.WebServiceAccessorImpl] testConnection SOAP Service Call failed!
 -- referer: http://10.60.1.192:9090/admin/sharepoint-admin/editAlias.action?serverAlias=Hades+Site+@+SP+Poseidon&atl_token=d841c30f894ee134e89ecbc0d77edc61d513ec42 | url: /rest/sharepoint/1.0/SharePoint-admin/TestConnection | userName: administrator
javax.xml.ws.WebServiceException: org.apache.cxf.interceptor.Fault: Response was of unexpected text/html ContentType.  Incoming portion of HTML stream: <HTML xmlns:o="urn:schemas-microsoft-com:office:office" dir="ltr">
<HEAD><meta name="GENERATOR" content="Microsoft SharePoint" /><meta name="progid" content="SharePoint.WebPartPage.Document" /><meta HTTP-EQUIV="Content-Type" content="text/html; charset=utf-8" /><meta HTTP-EQUIV="Expires" content="0" /><title>
		Home - KL-Connie hades
</title>
------Huge chunk of HTML code of a SharePoint page here------
</HEAD>
<BODY scroll="yes" onload="javascript:if (typeof(_spBodyOnLoadWrapper) != 'undefined') _spBodyOnLoadWrapper();">
------Huge chunk of HTML code of a SharePoint page here------
</BODY>
</HTML>
	at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:73)
....

Cause

This is caused by an incorrect SharePoint Site URL. The URL should point to a SharePoint Site, not a SharePoint Site page. So the correct URL should not be ended by a page name or any .asp or .aspx page (e.g. default.aspx). Here is an example of the correct and wrong SharePoint Site URL configured in Confluence:

Resolution

  1. Go to Confluence Admin > SharePoint Admin
  2. Edit the problematic SharePoint connection
  3. Correct the SharePoint Site URL
  4. Update SharePoint Settings
  5. Test Setting.