cancel
Showing results for 
Search instead for 
Did you mean: 

running Share outside of Alfresco

mmogley
Champ in-the-making
Champ in-the-making
Has anyone been able to successfully run a Share instance in an external Tomcat outside of the Alfresco install? 

I'm trying to set up a Maven-based build using the share app as a starting point.  I've been able to successfully build and deploy the app to my own Tomcat (6.0.18).  However, when I actually start up Tomcat, I get a number of warnings in the console of the type:

17:47:11,921  WARN  [web.scripts.DeclarativeRegistry] Unable to register script classpath:alfresco/webscripts/org/alfresco/test/exception.get.desc.xml due to error: Failed to read Web Script description document classpath:alfresco/webscriptsorg/alfresco/test/exception.get.desc.xml ; Document org/alfresco/test/exception.get.desc.xml does not exist within store classpath:alfresco/webscripts
17:47:11,921  WARN  [web.scripts.DeclarativeRegistry] Unable to register script classpath:alfresco/webscripts/org/alfresco/test/jsonecho.post.desc.xml due to error: Failed to read Web Script description document classpath:alfresco/webscriptsorg/alfresco/test/jsonecho.post.desc.xml ; Document org/alfresco/test/jsonecho.post.desc.xml does not exist within store classpath:alfresco/webscripts
17:47:11,921  WARN  [web.scripts.DeclarativeRegistry] Unable to register script classpath:alfresco/webscripts/org/alfresco/test/requestbody.put.desc.xml due to error: Failed to read Web Script description document classpath:alfresco/webscriptsorg/alfresco/test/requestbody.put.desc.xml ; Document org/alfresco/test/requestbody.put.desc.xml does not exist within store classpath:alfresco/webscripts
17:47:11,921  WARN  [web.scripts.DeclarativeRegistry] Unable to register script classpath:alfresco/webscripts/org/alfresco/test/runas.get.desc.xml due to error: Failed to read Web Script description document classpath:alfresco/webscriptsorg/alfresco/test/runas.get.desc.xml ; Document org/alfresco/test/runas.get.desc.xml does not exist within store classpath:alfresco/webscripts
17:47:11,921  WARN  [web.scripts.DeclarativeRegistry] Unable to register script classpath:alfresco/webscripts/org/alfresco/web/messages.get.desc.xml due to error: Failed to read Web Script description document classpath:alfresco/webscriptsorg/alfresco/web/messages.get.desc.xml ; Document org/alfresco/web/messages.get.desc.xml does not exist within store classpath:alfresco/webscripts

On inspection, all the referenced resources in the warnings appear to be present in the webapp.

Further, when I try to actually go to the site home page, I get the following exception:

javax.servlet.ServletException: Servlet execution threw an exception

root cause

java.lang.NoClassDefFoundError: org/alfresco/web/framework/exception/ContentLoaderException
   java.lang.Class.forName0(Native Method)
   java.lang.Class.forName(Class.java:169)
   org.alfresco.util.ReflectionHelper.newObject(ReflectionHelper.java:64)
   org.alfresco.web.site.PageMapperFactory.newInstance(PageMapperFactory.java:51)
   org.alfresco.web.site.HttpRequestContextFactory.newInstance(HttpRequestContextFactory.java:97)
   org.alfresco.web.site.FrameworkHelper.initRequestContext(FrameworkHelper.java:180)
   org.alfresco.web.site.servlet.DispatcherServlet.service(DispatcherServlet.java:121)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

On inspection, I notice that the ContentLoaderException class is indeed missing from the alfresco-webframework.jar.  But I got this directly from the share.war bundled with Alfresco3-Enterprise.

Has anyone experienced these or similar issues, and if so, how have you dealt with them?

Thanks,

Michael
2 REPLIES 2

mindthegab
Champ in-the-making
Champ in-the-making
I have a working Maven project running 3.0 SHARE on maven.
This is the base for our 3.0 Maven Alfresco archetypes, maybe you want to give it a try.
See the 3.0.0 branch here:

http://maven-alfresco-archetypes.googlecode.com/svn/branches/3.0.0/alfresco-root/alfresco-share/


Contributions are welcome!

mindthegab
Champ in-the-making
Champ in-the-making
Check out the new version of Maven Alfresco Lifecycle (1.1.0) which features a Share archetype (http://wiki.alfresco.com/wiki/Managing_Alfresco_Lifecyle_with_Maven#NEW.21.21.21_How_to_manage_Alfre...).

This is now hosted in the new Maven Alfresco Community repo (http://maven.alfresco.com/).