title: Alfresco Community 4.0 with Microsoft Office integration via https
body: <p><strong>Background</strong></p>
  
  <p>We're using Alfresco to replace SharePoint. The primary use is document sharing and management.</p>
  
  <p>I've got a fresh install of Alfresco Community 4.0 using MySQL on Windows Server 2008 R2. The client is Windows 7 with Microsoft Office 2010 installed. Using Chrome and the latest IE to access Alfresco. Both browsers work mostly fine. The client has the Web Folder update (KB907306) installed as well as registry set to allow basic authentication both for SSL and non-SSL shares just for testing purposes. The real scenario needs to have only SSL.</p>
  
  <p><strong>The issue</strong></p>
  
  <p>Out of the box (well, after client updates) Microsoft Office integration works only without HTTPS. We require that it operates always with HTTPS. The Alfresco documentation contains instructions on how to set up SharePoint protocol support and HTTPS. The problem is that it won't work since Alfresco ends up crashing. It will only display error page and generates hundreds of lines in the Tomcat log (mostly stack traces). Most exceptions originate from Lucene and Quartz and it's somewhat difficult to determine which errors are relevant. When I disable the changes described in the documentation Alfresco works but still generates errors in the log.</p>
  
  <p>So, the question is <strong>how to configure Alfresco online edit to work with Microsoft Office via HTTPS</strong>?</p>
  
  <p>The exceptions I've got are:</p>
  
  <pre><code>SEVERE: Servlet.service() for servlet Spring Surf Dispatcher Servlet threw exception java.lang.nullPointerException
  </code></pre>
  
  <p><strong>Update</strong></p>
  
  <p>It seems that the Alfresco Explorer web client starts but from the beginning it has been crashing on about any action. Has done it with clean install also while Share web client has worked fine. Now after following the official instructions the Share wont' work with HTTPS.</p>
  
  <p>Stack trace when starting the instance.</p>
  
  <pre><code>java.net.ConnectException: Connection refused: connect
      at java.net.PlainSocketImpl.socketConnect(Native Method)
      at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
      at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
      at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
      at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
      at java.net.Socket.connect(Socket.java:529)
      at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:559)
      at com.sun.net.ssl.internal.ssl.SSLSocketImpl.&lt;init&gt;(SSLSocketImpl.java:401)
      at com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:123)
      at org.alfresco.encryption.ssl.AuthSSLProtocolSocketFactory.createSocket(AuthSSLProtocolSocketFactory.java:168)
      at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
      at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
      at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
      at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
      at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
      at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
      at org.alfresco.httpclient.AbstractHttpClient.executeMethod(AbstractHttpClient.java:110)
      at org.alfresco.httpclient.AbstractHttpClient.sendRemoteRequest(AbstractHttpClient.java:86)
      at org.alfresco.httpclient.HttpClientFactory$HttpsClient.sendRequest(HttpClientFactory.java:307)
      at org.alfresco.solr.client.SOLRAPIClient.getModelsDiff(SOLRAPIClient.java:1008)
      at org.alfresco.solr.tracker.CoreTracker.trackModels(CoreTracker.java:1453)
      at org.alfresco.solr.tracker.CoreTracker.trackRepository(CoreTracker.java:1126)
      at org.alfresco.solr.tracker.CoreTracker.updateIndex(CoreTracker.java:483)
      at org.alfresco.solr.tracker.CoreTrackerJob.execute(CoreTrackerJob.java:45)
      at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
      at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:563)
  </code></pre>
  
  <p>Stack trace when trying to access Share. Also receive the above multiple times. </p>
  
  <pre><code>SEVERE: Servlet.service() for servlet Spring Surf Dispatcher Servlet threw exception
  java.lang.NullPointerException
      at org.alfresco.web.site.EditionInterceptor.preHandle(EditionInterceptor.java:87)
      at org.springframework.web.servlet.handler.WebRequestHandlerInterceptorAdapter.preHandle(WebRequestHandlerInterceptorAdapter.java:54)
      at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:781)
      at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
      at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
      at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.alfresco.web.site.servlet.MTAuthenticationFilter.doFilter(MTAuthenticationFilter.java:74)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.alfresco.web.site.servlet.SSOAuthenticationFilter.doFilter(SSOAuthenticationFilter.java:307)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
      at java.lang.Thread.run(Thread.java:662)
  </code></pre>
  
  <p><a href="http://docs.alfresco.com/4.0/index.jsp?topic=/com.alfresco.enterprise.doc/tasks/SharePoint-HTTPS-setup.html" rel="nofollow">Alfresco documentation on SharePoint protocol via HTTPS</a></p>