cancel
Showing results for 
Search instead for 
Did you mean: 

Google Docs cannot save to alfresco

bopolissimus
Confirmed Champ
Confirmed Champ
Hi All,

<ul>
  <li>Linux (Ubuntu Precise, Ubuntu Quantal, Linux Mint Nadia)</li>
  <li>alfresco-community-4.2.b linux installer</li>
  <li>Tested with browser hitting port 8080 and with apache reverse proxy sitting in front of alfresco.</li>
  <li>All alfrescos are not directly accessible from the internet, only from the LAN.</li>
</ul>

I have an alfresco 4.2.b instance which previously worked perfectly with Google Docs.  Recently I tested google docs again and, while the document will open in Google Docs, when I click on "Save to Alfresco", the save fails with "Failed to save Google Doc to Alfresco."

I thought it might be a problem with just that instance (installed WAR files into distribution tomcat), so I installed 4.2.b from scratch into separate virtual machines using the bundled installer.  Even with this fresh install however, saving in Google Docs fails the same way.

I've since tried on other alfresco installations (4.2.b, 4.2.c) and I get the same error in all of them. 

My client machines are Linux (tested with chrome and firefox).  In case it was a problem with my client, I tested on various other linux clients (some pristine virtual machines) and on a Windows 7 machine too.  Same error.

In case it was possibly due to the google account I was using, I switched to another free account.  That failed similarly.

Has anyone else seen this? How would I debug this?  I have
tomcat/shared/classes/alfresco/extension/custom-log4j.properties

and have uncommented:

log4j.logger.org.alfresco.repo.googledocs=debug

but I still see nothing in the debug logs.

Thanks in advance for any pointers.

Gerald
69 REPLIES 69

Thanks, i missed the connection between repo and alfresco.war, i searched for a repository.war, obviously without success.
I'll run the mmt two times in total then.

jamesbutler
Champ in-the-making
Champ in-the-making
I am also facing the same issues over the connections..I am still in a fix for it's solution..

<a href="http://www.googlesharedcontacts.com">Google apps shared contacts</a>

al34n1x
Champ in-the-making
Champ in-the-making
Hi Team,
I'm still facing the same issue. I can't save Gdocs on Alfresco. I've installed the last amp package available in the web (2.0.3). Is there any workaround to get this fixed? i saw that a guy just changed the dir permissions … i've installed the whole system as root user..should i chown the alfresco dir to another user? Thanks!

Can you post here the section of the log file where it lists the modules that are installed when you start up alfresco? Can you also post the line from the log file which lists the version number of Alfresco?

al34n1x
Champ in-the-making
Champ in-the-making
About the modules, you can refer to the below information

09:44:12,122 INFO  [org.alfresco.repo.module.ModuleServiceImpl] Found 2 module(s).
09:44:12,239 INFO  [org.alfresco.repo.module.ModuleServiceImpl] Starting module 'org.alfresco.module.vti' version 1.2.
09:44:12,273 INFO  [org.alfresco.repo.module.ModuleServiceImpl] Starting module 'org.alfresco.integrations.google.docs' version 2.0.3.


About the Alfresco Version, not sure where to look at, because i'm not able to see in the log, but i pulled out this information, i know that this log information shows the root dir, but as you can see is alfresco 4.2.c.


09:44:10,411 INFO  [org.alfresco.repo.admin.ConfigurationChecker] The Alfresco root data directory ('dir.root') is: /opt/alfresco-4.2.c/alf_data


Finally, this is the exception message that i'm getting when i try to save the document on GDOCS, where acasas is one of my ids.


09:51:18,837 ERROR [org.springframework.extensions.webscripts.AbstractRuntime] Exception from executeScript - redirecting to status template error: 07250001 No Refresh Token Provided for acasas
org.springframework.extensions.webscripts.WebScriptException: 07250001 No Refresh Token Provided for acasas
        at org.alfresco.integrations.google.docs.webscripts.CreateContent.executeImpl(CreateContent.java:167)
        at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:64)
        at org.alfresco.repo.web.scripts.RepositoryContainer$3.execute(RepositoryContainer.java:433)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:433)
        at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:495)
        at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:533)
at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:349)
        at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:377)
        at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:209)
        at org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:118)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:61)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
        at org.apache.tomcat.util.net.AprEndpoint$SocketWithOptionsProcessor.run(AprEndpoint.java:1771)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
        at java.lang.Thread.run(Thread.java:722)
09:51:40,125 ERROR [org.springframework.extensions.webscripts.AbstractRuntime] Exception from executeScript - redirecting to status template error: 07250002 Wrapped Exception (with status template): null
org.springframework.extensions.webscripts.WebScriptException: 07250002 Wrapped Exception (with status template): null
        at org.springframework.extensions.webscripts.AbstractWebScript.createStatusException(AbstractWebScript.java:1067)
        at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:171)
        at org.alfresco.repo.web.scripts.RepositoryContainer$3.execute(RepositoryContainer.java:433)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:433)
        at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:495)
at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:533)
        at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:349)
        at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:377)
        at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:209)
        at org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:118)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:61)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
        at org.apache.tomcat.util.net.AprEndpoint$SocketWithOptionsProcessor.run(AprEndpoint.java:1771)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
        at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.NullPointerException
        at org.alfresco.integrations.google.docs.webscripts.SaveContent.executeImpl(SaveContent.java:122)
        at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:64)
        … 28 more


Thanks a lot for your help.

There are two issues I see here.  One is more informational and the other maybe the cause of what you are actually experiencing here.

<blockquote>No Refresh Token Provided for acasas</blockquote>
This is an informational exception/warning.  Google only provides an oauth refresh token the very first time you approve an oauth connection.  If for some reason it is lost, the same credentials used across multiple instances of Alfresco, only the first use would have the refresh token.  It can be reset by revoking the Alfresco Google Docs integrations access in the users Google account.  The next attempt to use the Google Docs integration within Alfresco, the user would be prompted to re-authenticate their account and the refresh token would be stored for reuse.  We provided this exception as a way for administrators to know which accounts might not be fully valid, but it won't stop a user from using the integration.  The user will just be prompted to Authenticate each time the access token expires.

<blockquote>Wrapped Exception (with status template): null</blockquote>
This may be the actual issue you are seeing.  Are you attempting to use the Repository View from Share?  When V2 of the Google Docs integration was released the decision was made to release with a known issue that the integration would not work in the repository view of Share.  We have made minor fixes towards correcting this issue in each service pack release and there is a publicly available fork (https://github.com/Pluies/Alfresco-Google-docs-plugin)  of the project by Florent Delannoy which has a fix for the issue.  An official fix should be available in the next service pack (2.0.4) which we are working to have included in the upcoming 4.2d release.  An upgrade will be required to 4.2.d because of some changes in the underlying library dependencies provided in the Alfresco war file.

al34n1x
Champ in-the-making
Champ in-the-making
Hi Jared,

Thanks for your quick response. Just a quick question and i don't want to look like a dumb, but how i can apply this patch? do you have a "How to"?
Thanks in advanced!

It is a bit more than just a normal patch.  He has all of the code along with new amps in the github project.  You'll need to navigate into each of the top level directories and then into their respective target directories. Inside the target directories are the amps you'll need.  You can apply those the same way you applied the amps you downloaded from the Alfresco site.

al34n1x
Champ in-the-making
Champ in-the-making
Hi Jared,

I've just download the 2 amps (repo and share), copied them into the {alfrescoDir}/amps and {alfrescoDir}/amps_share and ran the apply_amps.sh script  … WORKS LIKE A CHARM!

Thanks man!!!! I will keep you posted for any further issue around this topic.

jmarquez
Champ in-the-making
Champ in-the-making
i was reload the two files and Works good¡¡¡ i'm using the Alfresco 4.2 and Ubuntu 13.04 Smiley Happy

Javier