I'm a newbie in the process of evaluating Alfresco for my company (Alfresco 4.0 Community Edition). I'm working through the "Working with Custom Content Types" tutorial (2nd edition), and I'm running into problems configuring the tutorial model in Share. XML files below:
scModel.xml in $TOMCAT_HOME/shared/classes/alfresco/extension:
<?xml version="1.0" encoding="UTF-8"?> <!– Definition of new Model –> <model name="sc:somecomodel" xmlns="http://www.alfresco.org/model/dictionary/1.0"> <!– Optional meta-data about the model –> <description>Someco Model</description> <author>Jeff Potts</author> <version>1.0</version>
<!– Imports are required to allow references to definitions in other models –> <imports> <!– Import Alfresco Dictionary Definitions –> <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d" /> <!– Import Alfresco Content Domain Model Definitions –> <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm" /> </imports>
<!– Introduction of new namespaces defined by this model –> <namespaces> <namespace uri="http://www.someco.com/model/content/1.0" prefix="sc" /> </namespaces> <types> <!– Enterprise-wide generic document type –> <type name="sc:doc"> <title>Someco Document</title> <parent>cm:content</parent> <associations> <association name="sc:relatedDocuments"> <title>Related Documents</title> <source> <mandatory>false</mandatory> <many>true</many> </source> <target> <class>sc:doc</class> <mandatory>false</mandatory> <many>true</many> </target> </association> </associations> <mandatory-aspects> <aspect>cm:generalclassifiable</aspect> </mandatory-aspects> </type>
someco-model-context.xml in $TOMCAT_HOME/shared/classes/alfresco/extension:
<?xml version='1.0' encoding='UTF-8'?> <!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'> <beans> <!– Registration of new models –> <bean id="extension.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap"> <property name="models"> <list> <value>alfresco/extension/scModel.xml</value> </list> </property> </bean> </beans>
share-config-custom.xml in $TOMCAT_HOME/webapps/share/classes/alfresco/web-extension:
<?xml version="1.0" encoding="utf-8"?> <alfresco-config> <!– Document Library config section –> <config evaluator="string-compare" condition="DocumentLibrary"> <!– Document Libarry config section –> <aspects> <!– Aspects that a user can see –> <visible> <aspect name="sc:webable" /> <aspect name="scroductRelated" /> </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> <types> <type name="cm:content"> <subtype name="sc:doc" /> <subtype name="sc:whitepaper" /> </type> <type name="sc:doc"> <subtype name="sc:whitepaper" /> </type> </types> </config> </alfresco-config>
The model loads fine, but when I restart after adding share-config-custom.xml. the login page is blank and the following exception is thrown:
2013-02-02 20:25:08,065 ERROR [alfresco.web.site] [http-8180-2] org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.NullPointerException java.lang.NullPointerException at org.alfresco.web.site.EditionInterceptor.preHandle(EditionInterceptor.java:87) at org.springframework.web.servlet.handler.WebRequestHandlerInterceptorAdapter.preHandle(WebRequestHandlerInterceptorAdapter.java:54) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:781) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) 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.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302) at org.tuckey.web.filters.urlrewrite.NormalRewrittenUrl.doRewrite(NormalRewrittenUrl.java:195) at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:159) at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:141) at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:90) at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:417) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.alfresco.web.scripts.servlet.StaticAssetCacheFilter.doFilter(StaticAssetCacheFilter.java:69) 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.Http11Processor.process(Http11Processor.java:857) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:662)
Searched the forms, but could not find anything. Any help would be greatly appreciated. Thanks.
as far as I see, the error you get seems to be unrelated to your configuration, since it occurs in a very general piece of Alfresco code that determines wether you are running Community or Enterprise. What version of 4.0 Community are you using and have you tried the 4.2 Community releases? Are there any errors in your log for the Repository at the same time you get the error message you've posted?
Thanks for the response Axel. From your suggestions, I took a look at the repository log and noticed a second permission denied exception, which led to me to think there might be a port issue somewhere. It turns out that the admin who installed changed the Tomcat port, but did not update the Share XML files that reference port 8080. Once we reinstalled with the default settings, it worked fine.