cancel
Showing results for 
Search instead for 
Did you mean: 

Configuration Google docs on alfresco 3.4d

vuilled
Champ in-the-making
Champ in-the-making
Hi,

I know that the question was widely answered but I try all method to integrate gdocs in my alfresco 3.4d  and i didn't get a working solution.

Following is what I made :

I add this line to the alfresco.global.properties:

#————-
# Google Docs activation
#————-

# Enables google editable functionality
googledocs.googleeditable.enabled=true

# System google docs authentication credentials
googledocs.username=MyUserName
googledocs.password=MyPass

And here is the content of my share-config-custom.xml


<alfresco-config>

<config evaluator="string-compare" condition="DocumentLibrary" replace="true">
<tree>
<!–
            Whether the folder Tree component should enumerate child folders or not.
            This is a relatively expensive operation, so should be set to "false" for Repositories with broad folder structures.
        

  –>
  <evaluate-child-folders>false</evaluate-child-folders>
<!–
            Optionally limit the number of folders shown in treeview throughout Share.
        

  –>
  <maximum-folder-count>-1</maximum-folder-count>
  </tree>
<!–
         Used by the "Manage Aspects" action

         For custom aspects, remember to also add the relevant i18n string(s)
            cm_myaspect=My Aspect
     

  –>
<aspects>
<!–  Aspects that a user can see
  –>
<visible>
  <aspect name="cm:generalclassifiable" />
  <aspect name="cm:complianceable" />
  <aspect name="cm:dublincore" />
  <aspect name="cm:effectivity" />
  <aspect name="cm:summarizable" />
  <aspect name="cm:versionable" />
  <aspect name="cm:templatable" />
  <aspect name="cm:emailed" />
  <aspect name="emailserver:aliasable" />
  <aspect name="cm:taggable" />
  <aspect name="app:inlineeditable" />
  <aspect name="gd:googleEditable" />
  <aspect name="cm:geographic" />
  <aspect name="exif:exif" />
  </visible>
<!–  Aspects that a user can add. Same as "visible" if left empty
  –>
  <addable />
<!–  Aspects that a user can remove. Same as "visible" if left empty
  –>
  <removeable />
  </aspects>
<!–
         Used by the "Change Type" action

         Define valid subtypes using the following example:
            <type name="cm:content">
               <subtype name="cm:mysubtype" />
            </type>

         Remember to also add the relevant i18n string(s):
            cm_mysubtype=My SubType
     

  –>
<types>
  <type name="cm:content" />
  <type name="cm:folder" />
  </types>
<!–
         If set, will present a WebDAV link for the current item on the Document and Folder details pages.
         Also used to generate the "View in Alfresco Explorer" action for folders.
     

  –>
  <repository-url>http://localhost:8080/alfresco</repository-url>
<!–
         Google Docsô integration
     

  –>
<google-docs>
<!–
            Enable/disable the Google Docs UI integration (Extra types on Create Content menu, Google Docs actions).
        

  –>
  <enabled>true</enabled>
<!–
            The mimetypes of documents Google Docs allows you to create via the Share interface.
            The I18N label is created from the "type" attribute, e.g. google-docs.doc=Google Docs&trade; Document
        

  –>
<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>


  </config>
  
   <!– Repository Library config section –>
   <config evaluator="string-compare" condition="RepositoryLibrary" replace="true">
      <!–
         Whether the link to the Repository Library appears in the header component or not.
      –>
      <visible>true</visible>
   </config>

   <config evaluator="string-compare" condition="Remote">
      <remote>
         <endpoint>
            <id>alfresco-noauth</id>
            <name>Alfresco - unauthenticated access</name>
            <description>Access to Alfresco Repository WebScripts that do not require authentication</description>
            <connector-id>alfresco</connector-id>
            <endpoint-url>http://localhost:8080/alfresco/s</endpoint-url>
            <identity>none</identity>
         </endpoint>

         <endpoint>
            <id>alfresco</id>
            <name>Alfresco - user access</name>
            <description>Access to Alfresco Repository WebScripts that require user authentication</description>
            <connector-id>alfresco</connector-id>
            <endpoint-url>http://localhost:8080/alfresco/s</endpoint-url>
            <identity>user</identity>
         </endpoint>

         <endpoint>
            <id>alfresco-feed</id>
            <name>Alfresco Feed</name>
            <description>Alfresco Feed - supports basic HTTP authentication via the EndPointProxyServlet</description>
            <connector-id>http</connector-id>
            <endpoint-url>http://localhost:8080/alfresco/s</endpoint-url>
            <basic-auth>true</basic-auth>
            <identity>user</identity>
         </endpoint>
      </remote>
   </config>



</alfresco-config>

The integration didn't work i cannot create new google docs from share document library. After that I try to follow this methodology : http://aboutalfresco.blogspot.com/2010/06/alfresco-google-docs-integration.html. Again I didn't get any result.


Here is the result of the alfresco.log

11:46:52,085 INFO  [org.springframework.extensions.webscripts.DeclarativeRegistry] Registered 315 Web Scripts (+0 failed), 325 URLs
11:46:52,085 INFO  [org.springframework.extensions.webscripts.DeclarativeRegistry] Registered 8 Package Description Documents (+0 failed)
11:46:52,085 INFO  [org.springframework.extensions.webscripts.DeclarativeRegistry] Registered 0 Schema Description Documents (+0 failed)
11:46:52,319 ERROR [org.springframework.extensions.config.BaseConfigService] Input stream invalid - skipped for source: classpath:alfresco/web-extension/share-config-custom.xml'
org.springframework.extensions.config.ConfigException: 04260001 Failed to parse config stream
   at org.springframework.extensions.config.xml.XMLConfigService.parse(XMLConfigService.java:198)
   at org.springframework.extensions.config.BaseConfigService.appendConfig(BaseConfigService.java:253)
   at org.springframework.extensions.config.BaseConfigService.parse(BaseConfigService.java:283)
   at org.springframework.extensions.config.xml.XMLConfigService.initConfig(XMLConfigService.java:131)
   at org.springframework.extensions.config.BaseConfigService.reset(BaseConfigService.java:144)
   at org.springframework.extensions.webscripts.AbstractRuntimeContainer.reset(AbstractRuntimeContainer.java:243)
   at org.springframework.extensions.webscripts.PresentationContainer.reset(PresentationContainer.java:113)
   at org.springframework.extensions.webscripts.LocalWebScriptRuntimeContainer.reset(LocalWebScriptRuntimeContainer.java:114)
   at org.springframework.extensions.webscripts.AbstractRuntimeContainer.onApplicationEvent(AbstractRuntimeContainer.java:263)
   at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)
   at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:294)
   at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:858)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:419)
   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:261)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:192)
   at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3972)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
   at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:905)
   at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:740)
   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:500)
   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
   at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
   at org.apache.catalina.core.StandardService.start(StandardService.java:519)
   at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
   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.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: org.dom4j.DocumentException: Invalid byte 1 of 1-byte UTF-8 sequence. Nested exception: Invalid byte 1 of 1-byte UTF-8 sequence.
   at org.dom4j.io.SAXReader.read(SAXReader.java:484)
   at org.dom4j.io.SAXReader.read(SAXReader.java:343)
   at org.springframework.extensions.config.xml.XMLConfigService.parse(XMLConfigService.java:164)
   … 39 more
11:46:52,366 INFO  [org.springframework.extensions.webscripts.AbstractRuntimeContainer] Initialised Spring Surf Container Web Script Container (in 2178.2666ms)
11:46:52,413 INFO  [org.springframework.extensions.webscripts.TemplateProcessorRegistry] Registered template processor freemarker for extension ftl
11:46:52,460 INFO  [org.springframework.extensions.webscripts.ScriptProcessorRegistry] Registered script processor javascript for extension js
11:46:52,757 INFO  [org.springframework.extensions.webscripts.TemplateProcessorRegistry] Registered template processor freemarker for extension ftl
11:46:52,757 INFO  [org.springframework.extensions.webscripts.ScriptProcessorRegistry] Registered script processor javascript for extension js
11:46:52,944 INFO  [org.springframework.extensions.webscripts.TemplateProcessorRegistry] Registered template processor freemarker for extension ftl
11:46:52,944 INFO  [org.springframework.extensions.webscripts.ScriptProcessorRegistry] Registered script processor javascript for extension js

Anyone can help me.

Thanks in advance
11 REPLIES 11

vuilled
Champ in-the-making
Champ in-the-making
Finally integration in 3.4d works with this config:

In the global-properties :

googledocs.googleeditable.enabled=true
googledocs.username=xxx
googledocs.password=xxx

In the share config custom :

<!– Document Library config section –>
<config evaluator="string-compare" condition="DocumentLibrary" replace="true">

  <aspects>
         <!– Aspects that a user can see –>
         <visible>
            <aspect name="cm:generalclassifiable" />
            <aspect name="cm:complianceable" />
            <aspect name="cm:dublincore" />
            <aspect name="cm:effectivity" />
            <aspect name="cm:summarizable" />
            <aspect name="cm:versionable" />
            <aspect name="cm:templatable" />
            <aspect name="cm:emailed" />
            <aspect name="emailserver:aliasable" />
            <aspect name="cm:taggable" />
            <aspect name="app:inlineeditable" />
            <aspect name="gd:googleEditable" />
            <aspect name="cm:geographic" />
            <aspect name="exif:exif" />
         </visible>

         <!– Aspects that a user can add. Same as "visible" if left empty –>
         <addable>
         </addable>

         <!– Aspects that a user can remove. Same as "visible" if left empty –>
         <removeable>
         </removeable>
      </aspects>

      <google-docs>
         <!–
            Enable/disable the Google Docs UI integration (Extra types on Create Content menu, Google Docs actions).
         –>
         <enabled>true</enabled>

         <!–
            The mimetypes of documents Google Docs allows you to create via the Share interface.
            The I18N label is created from the "type" attribute, e.g. google-docs.doc=Google Docs&trade; Document
         –>
         <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>

        </config>

But Now I have a second problem. If I have good understand everybody with the good permission in share must be able to checkout document and to edit it using the google username that he indicates in the user profile right?

This don't work for me when I checkout the document and then log with my google username I have read only permission in the file (as set in the configuration of my google app domain). Normally alfresco must automatically transfert the owner of the document to my user?

Anybody know an issu for that ? is that possible that it is because I use google app for domain?

Thanks

loftux
Star Contributor
Star Contributor
http://issues.alfresco.com/jira/browse/ALF-7657 Google Docs - Fail to set role writer for more than one user
http://issues.alfresco.com/jira/browse/ALF-7661 Google Docs - Only share to user doing check out and not all on ACL

ALF-7661 has a patch that also will resolve the issue in ALF-7657.

If you think I am correct in wanting only the user doing checkout to have the document shared in Google Docs, then vote for this issue.

vuilled
Champ in-the-making
Champ in-the-making
Hi,

Thanks for your quick answer.

First I don't be sure that the fix will resolve my problem because in my case only the master account that is configured in the alfresco-global.properties have the write access in google.No another account can get this access even if there is only one member in the share site.

I will try to apply the patch, but I am relatively new in alfresco and java can please explain me how to apply this patch.

Thanks

loftux
Star Contributor
Star Contributor
Is the user you are trying to check out to outside your google app domain? There is a setting in Google Apps for allowing to share outside your app domain.

Since you have only one user, it should work, so you are most likely not hit by the bug (yet). Better get this working before starting to apply patches.

If you want to, instructions for svn dev is at http://wiki.alfresco.com/wiki/Alfresco_SVN_Development_Environment
I just checkout the specific version of alfresco needed (from project root, 3.4.d is r25020), then I have this build script that compiles it all
#!/bin/bash
#build script
export JAVA_HOME=/Library/Java/Home
export TOMCAT_HOME=/opt/alfresco/svn/tomcat
export APP_TOMCAT_HOME=/opt/alfresco/svn/tomcat
export VIRTUAL_TOMCAT_HOME=/opt/alfresco/svn/virtual-tomcat

ant -Ddir.continuous.dist=alfdist -Ddir.continuous.assemble=alfassemble -Ddir.file.name.spp=alfresco_spp -Ddir.file.name.quickr=alfresco_quickr -Ddir.file.name.dod5105=alfresco_dod5105 -Dalfresco.basedir=/opt/alfresco/code/40a build distribute-amps

cp projects/web-client/build/dist/alfresco.war .
cp projects/slingshot/build/dist/share.war .
Adjust the paths in the export statements above to fit your environment.

vuilled
Champ in-the-making
Champ in-the-making
No the user how try to check out document is in the google app domain.

what I don't understand is that even with the log4j.logger.org.alfresco.repo.googledocs=debug line in the alfresco-global.properties no bug appear in the alfresco.log  :cry:

loftux
Star Contributor
Star Contributor
No the user how try to check out document is in the google app domain.

what I don't understand is that even with the log4j.logger.org.alfresco.repo.googledocs=debug line in the alfresco-global.properties no bug appear in the alfresco.log  :cry:
Try this instead
log4j.logger.org.alfresco.repo.googledocs.GoogleDocsServiceImpl=debug

vuilled
Champ in-the-making
Champ in-the-making
Thanks

I try with this
log4j.logger.org.alfresco.repo.googledocs.GoogleDocsServiceImpl=debug
but I didn't get any debug entry in my log File and gdocs always don't set the right permission to the file while user make a checkout

Any ohter ideas?

rever
Champ in-the-making
Champ in-the-making
Have you been able to get Check Out with Google wokring? I am not even able to see the check out button on the document screen. I followed all the directions I could. Any help would be greatly appreciated.

muthukimoses
Champ in-the-making
Champ in-the-making
once we rename the file <web-extension>\share-config-custom.xml.sample, is one supposed to overwrite the other file? because we have 2 files with the same name.

at times the instructions in the user manual are not clear cuthttp://docs.alfresco.com/4.0/index.jsp?topic=%2Fcom.alfresco.enterprise.doc%2Ftasks%2Fgoogledocs-ena...