如何将谷歌文档与露天社区4.0集成在一起? [英] how to Integrate google docs with alfresco community 4.0?

查看:101
本文介绍了如何将谷歌文档与露天社区4.0集成在一起?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现了一些用于启用Google文档的配置

I found some configuration for enable google docs

我在alfresco-global.properties中添加的这些属性

These properties I have added in alfresco-global.properties

googledocs.googleeditable.enabled = true 
googledocs.username =*******@gmail.com
googledocs.password =*************

在共享配置中,我添加了代码并增加了外观<方面名称= gd:googleEditable />

and in share-config I have added the code and added aspect <aspect name="gd:googleEditable"/>

<!-- Google Docs™ integration -->

<google-docs>

    <enabled>true</enabled>

    <creatable-types>

    <creatable type="doc">application/msword</creatable>

   <creatable type="xls">application/vnd.ms-excel</creatable>

   <creatable type="ppt">application/vnd.ms-powerpoint</creatable>

   </creatable-types>

</google-docs>

我能够在Google文档
中看到CheckOut,但无法正常使用

I am able to see CheckOut in google docs but it is not working

但是在单击此按钮时我会出错

But while clicking on this I am getting errors

2017-04-28 13:20:27,867  DEBUG [repo.googledocs.GoogleDocsServiceImpl] [http-8086-7] Creating folder SpacesStore
 2017-04-28 13:20:28,104  DEBUG [repo.googledocs.GoogleDocsServiceImpl] [http-8086-7] Setting user credentials for GDoc service. (serviceName=writely, userName=**************@gmail.com, password=***************)
 2017-04-28 13:20:28,891  ERROR [extensions.webscripts.AbstractRuntime] [http-8086-7] Exception from executeScript - redirecting to status template error: 03280002 JavaException: org.alfresco.repo.googledocs.GoogleDocsServiceInitException: 03280008 Unable to connect to Google Docs.  Please check the Google Docs authentication configuration.
 org.springframework.extensions.webscripts.WebScriptException: 03280002 JavaException: org.alfresco.repo.googledocs.GoogleDocsServiceInitException: 03280008 Unable to connect to Google Docs.  Please check the Google Docs authentication configuration.
    at org.springframework.extensions.webscripts.AbstractWebScript.createStatusException(AbstractWebScript.java:956)
    at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:171)
    at org.alfresco.repo.web.scripts.RepositoryContainer$2.execute(RepositoryContainer.java:400)
    at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:388)
    at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:462)
    at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:500)
    at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:316)
    at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:372)
    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: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.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:58)
    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.Http11AprProcessor.process(Http11AprProcessor.java:861)
    at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
    at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1584)
    at java.lang.Thread.run(Thread.java:662)
Caused by: org.alfresco.repo.googledocs.GoogleDocsServiceInitException: 03280008 Unable to connect to Google Docs.  Please check the Google Docs authentication configuration.
    at org.alfresco.repo.googledocs.GoogleDocsServiceImpl.getMediaService(GoogleDocsServiceImpl.java:223)
    at org.alfresco.repo.googledocs.GoogleDocsServiceImpl.getDocumentService(GoogleDocsServiceImpl.java:177)
    at org.alfresco.repo.googledocs.GoogleDocsServiceImpl.createGoogleFolder(GoogleDocsServiceImpl.java:1039)
    at org.alfresco.repo.googledocs.GoogleDocsServiceImpl.getParentFolder(GoogleDocsServiceImpl.java:620)
    at org.alfresco.repo.googledocs.GoogleDocsServiceImpl.getParentFolder(GoogleDocsServiceImpl.java:605)
    at org.alfresco.repo.googledocs.GoogleDocsServiceImpl.getParentFolder(GoogleDocsServiceImpl.java:605)
    at org.alfresco.repo.googledocs.GoogleDocsServiceImpl.getParentFolder(GoogleDocsServiceImpl.java:605)
    at org.alfresco.repo.googledocs.GoogleDocsServiceImpl.getParentFolder(GoogleDocsServiceImpl.java:605)
    at org.alfresco.repo.googledocs.GoogleDocsServiceImpl.createGoogleDoc(GoogleDocsServiceImpl.java:438)
    at org.alfresco.repo.googledocs.GoogleEditableAspect.onCheckOut(GoogleEditableAspect.java:175)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.alfresco.repo.policy.JavaBehaviour$JavaMethodInvocationHandler.invoke(JavaBehaviour.java:173)
    at $Proxy103.onCheckOut(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.alfresco.repo.policy.TransactionInvocationHandlerFactory$TransactionHandler.invoke(TransactionInvocationHandlerFactory.java:128)
    at $Proxy103.onCheckOut(Unknown Source)
    at org.alfresco.repo.coci.CheckOutCheckInServiceImpl.invokeOnCheckOut(CheckOutCheckInServiceImpl.java:263)
    at org.alfresco.repo.coci.CheckOutCheckInServiceImpl.doCheckout(CheckOutCheckInServiceImpl.java:473)
    at org.alfresco.repo.coci.CheckOutCheckInServiceImpl.checkout(CheckOutCheckInServiceImpl.java:380)
    at org.alfresco.repo.coci.CheckOutCheckInServiceImpl.checkout(CheckOutCheckInServiceImpl.java:355)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
    at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:80)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:46)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:147)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
    at $Proxy51.checkout(Unknown Source)
    at org.alfresco.repo.jscript.ScriptNode.checkout(ScriptNode.java:2283)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:155)
    at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:243)
    at org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:119)
    at org.mozilla.javascript.gen.c12._c18(file:/C:/Alfresco/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/action/checkout.post.json.js:914)
    at org.mozilla.javascript.gen.c12.call(file:/C:/Alfresco/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/action/checkout.post.json.js)
    at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:97)
    at org.mozilla.javascript.gen.c12._c12(file:/C:/Alfresco/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/action/checkout.post.json.js:618)
    at org.mozilla.javascript.gen.c12.call(file:/C:/Alfresco/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/action/checkout.post.json.js)
    at org.mozilla.javascript.optimizer.OptRuntime.callName0(OptRuntime.java:108)
    at org.mozilla.javascript.gen.c12._c0(file:/C:/Alfresco/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/action/checkout.post.json.js:951)
    at org.mozilla.javascript.gen.c12.call(file:/C:/Alfresco/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/action/checkout.post.json.js)
    at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393)
    at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2834)
    at org.mozilla.javascript.gen.c12.call(file:/C:/Alfresco/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/action/checkout.post.json.js)
    at org.mozilla.javascript.gen.c12.exec(file:/C:/Alfresco/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/action/checkout.post.json.js)
    at org.alfresco.repo.jscript.RhinoScriptProcessor.executeScriptImpl(RhinoScriptProcessor.java:483)
    at org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:191)
    at org.alfresco.repo.processor.ScriptServiceImpl.execute(ScriptServiceImpl.java:212)
    at org.alfresco.repo.processor.ScriptServiceImpl.executeScript(ScriptServiceImpl.java:174)
    at org.alfresco.repo.web.scripts.RepositoryScriptProcessor.executeScript(RepositoryScriptProcessor.java:102)
    at org.springframework.extensions.webscripts.AbstractWebScript.executeScript(AbstractWebScript.java:1193)
    at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:86)
    ... 25 more
Caused by: com.google.gdata.util.AuthenticationException: Error authenticating (check service name)
    at com.google.gdata.client.GoogleAuthTokenFactory.getAuthException(GoogleAuthTokenFactory.java:628)
    at com.google.gdata.client.GoogleAuthTokenFactory.getAuthToken(GoogleAuthTokenFactory.java:500)
    at com.google.gdata.client.GoogleAuthTokenFactory.setUserCredentials(GoogleAuthTokenFactory.java:346)
    at com.google.gdata.client.GoogleService.setUserCredentials(GoogleService.java:362)
    at com.google.gdata.client.GoogleService.setUserCredentials(GoogleService.java:317)
    at com.google.gdata.client.GoogleService.setUserCredentials(GoogleService.java:301)
    at org.alfresco.repo.googledocs.GoogleDocsServiceImpl.getMediaService(GoogleDocsServiceImpl.java:218)
    ... 94 more

如何解决这个问题?

或者还有其他方法可以将Google Docs与Alfresco Community 4.0集成$ b ??

OR is there any other way to integrate Google Docs With Alfresco Community 4.0 ??

推荐答案

根据您所遇到的错误:

Caused by: com.google.gdata.util.AuthenticationException: Error authenticating (check service name)

似乎您的配置n使用旧的Google连接库( https://github.com/google/ gdata-java-client / issues / 451 )。

It seems that your configuration uses an old google connection library (https://github.com/google/gdata-java-client/issues/451).

setUserCredentials() uses ClientLogin, which has been deprecated since April 2012 and recently disabled. You will need to use OAuth instead.

您必须修改代码库并使用新的身份验证方法

You'll have to modify the codebase and to use the new Authentification method

祝你好运

这篇关于如何将谷歌文档与露天社区4.0集成在一起?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆