Background
We’re using Alfresco to replace SharePoint. The primary use is document sharing and management.
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.
The issue
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.
So, the question is how to configure Alfresco online edit to work with Microsoft Office via HTTPS?
The exceptions I’ve got are:
SEVERE: Servlet.service() for servlet Spring Surf Dispatcher Servlet threw exception java.lang.nullPointerException
Update
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.
Stack trace when starting the instance.
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.<init>(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)
Stack trace when trying to access Share. Also receive the above multiple times.
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)
To enable HTTPS communication between Alfresco Community 4.0c and Microsoft Office I ended up setting Jetty to use HTTPS over the standard 7070 port. Also Alfresco Share client is using HTTPS to communicate with the web browser. However, the communications in between Alfresco repository and Share, solr and other componentes MUST NOT be HTTPS since Alfresco seems to lose connectivity and throw general error page.
By following the official instructions the setup can be done but some steps must be skipped. All else is valid but don’t change the share-config-custom.xml. Also alfresco-global.properties must have Alfresco set to standard port and Share set to HTTPS protocol and port. Make sure the web server domain is not loopback address.
Don’t know if this is a bug or feature. At least it will work with Office 2010.