Obsolete Pages{{Obsolete}}
The official documentation is at: http://docs.alfresco.com
InstallationPackaging
If you just want to try this extension out without compiling follow the instructions on this page. Note that these instructions are going to vary from application server to application server implementation.
Also, not that installing extensions in this way is only intended to allow you to try the extension in a non-intrusive way. It is not the official mechanism or approach for deploying alfresco extensions. (I don't know what the official approach is, if you do, lets get this section up to date).
At this point you should be able to start another application in tomcat, another tomcat process all together, or any other RMI enabled application and get a remote reference to the Alfresco backed JCR repository you just started up.
Note: I originally intended to deploy the extension outside of the exploded WAR in the common folder of Tomcat allowing users to test the extension without compiling or tampering with the exploded war. I turns out Spring seems to have trouble with the various class loaders which give some interesting results (interesting in a bad sense).
Its not a configuration I would recommend going live with anyway but would have provided a way to deploy the application with a degree of separation.
extension-jcr-rmi-1.0.0-src.zip
from http://forge.alfresco.com/projects/jcr-rmi/ and unzipC:\AlFresco
(NB: don't use the default suggested ie: 'c:\Program Files\...')extension-jcr-rmi\lib\jcr-rmi-1-impl-classes.jar
and extension-jcr-rmi\build\dist\extension-jcr-rmi.jar
into $TOMCAT\webapps\alfresco\WEB-INF\lib
extension-jcr-rmi\config\alfresco\extension
into $TOMCAT\webapps\alfresco\WEB-INF\classes\alfresco\extension
<import resource='classpath:alfresco/jcr-context.xml' />
from $TOMCAT\webapps\alfresco\WEB-INF\classes\alfresco\extension\jcr-rmi-context.xml
jcr-rmi.properties
as required to set the port the RMI registry is running on.You can test the JCR-RMI connection thusly
extension-jcr-rmi\source\web\jsp\jcrRmiTest.jsp
into tomcat\webapps\alfresco\jsp
JCR RMI Test
RMI Registery Server Name :localhost
RMI Registery Server Name :localhost
Remote JCR reference binding name:javaContentRepository
Connection String://localhost:1099/javaContentRepository
Testing...
looking up remote reference at //localhost:1099/javaContentRepository
creating local adapter for remotereference [ServerRepository_Stub[UnicastRef [liveRef: [endpoint:[10.84.49.66:3263](remote),objID:[0]]]]]
logging in as admin admin to default workspace
looking up workspace root node
root node UUID [33368539-b771-11db-bd11-8b696c27d61b]
logging out
Some error messages, and what they might mean ...
11:55:50,866 ERROR [jcr.repository.JcrRmiBindingUtil] 'error occured while binding JCR to RMI [java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.net.MalformedURLException: no protocol: Files/Alfresco]
... is indicative of installation of AlFresco into a directory with spaces in its name.
INFO: Deploying web application archive alfresco.war
17:08:30,735 ERROR [web.context.ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanDefinitionStoreException: Cannot register alias 'NamespaceService' for bean name 'namespaceService': it's already registered for bean name 'namespaceService'
at org.springframework.beans.factory.support.AbstractBeanFactory.registerAlias(AbstractBeanFactory.java:461)
at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitions(DefaultXmlBeanDefinitionParser.java:303)
... indicates a cyclic dependancy within the Spring configuration - you forgot to remove <import resource='classpath:alfresco/jcr-context.xml' />
from jcr-rmi-context.xml
01:27:36,970 ERROR [org.alfresco.jcr.repository.JcrRmiBindingUtil] 'error occured while binding JCR to RMI [java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
java.net.ConnectException: Connection refused]
... indicates that there is a problem contacting the rmiregistry. Check that the rmiregisty is running on the specified port. Also make sure you've properly configured any firewalls.