AnsweredAssumed Answered

running Share outside of Alfresco

Question asked by mmogley on Jan 9, 2009
Latest reply on Dec 5, 2009 by mindthegab
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

Outcomes