Issue with extending Nuxeo Platform for Version Control.

Platform: Nuxeo 5.7.2 Fasttrack OS: Ubuntu 13.04

I have created an xml file in my

<?xml version="1.0"?>
<extension target="org.nuxeo.ecm.core.versioning.VersioningService" point="versioningRules">
  <versioningRule typeName="QMSDocument">
    <initialState major="0" minor="0"/>
    <options lifeCycleState="*">
      <minor default="true"/>
      <major/>
    </options>
  </versioningRule>
</extension>

I have a document type QMSDocument defined in and imported from Studio.

The problem is the Nuxeo Platform is ignoring my versioning override xml file. Did I miss something, or is this something that will have to be repackaged in a jar?

Please note that I am new to Nuxeo and do not have any experience with Java or xml programming. Thank you.

0 votes

2 answers

1082 views

ANSWER



The filename should end with “-config.xml” to be taken into account (cf this documentation).

1 votes



Okay, when I modify the file name, I start receiving these errors: ERROR [http-bio-0.0.0.0-8080-exec-8] [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/nuxeo].[Nuxeo Status Servlet]] Servlet.service() for servlet [Nuxeo Status Servlet] in context with path [/nuxeo] threw exception [java.lang.NullPointerException] with root cause java.lang.NullPointerException

    at org.nuxeo.ecm.platform.web.common.exceptionhandling.NuxeoExceptionFilter.getHandler(NuxeoExceptionFilter.java:62)
    at org.nuxeo.ecm.platform.web.common.exceptionhandling.NuxeoExceptionFilter.handleException(NuxeoExceptionFilter.java:73)
    at org.nuxeo.ecm.platform.web.common.exceptionhandling.NuxeoExceptionFilter.doFilter(NuxeoExceptionFilter.java:82)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.nuxeo.ecm.platform.web.common.encoding.NuxeoEncodingFilter.doFilter(NuxeoEncodingFilter.java:59)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:724)
09/18/2013

Well, I suppose this means your file is used now, that's a positive point!
Unfortunately I can't help you with the error, hopefully someone more versed in that area can answer that part.
09/18/2013

Thank you for the direction. Hopefully someone can look at the XML code and tell me what is incorrect.
09/18/2013


I finally figured this issue out. In Studio in Advanced Settings -> XML Extensions I created a new extension called defaultVersioningOverride and added this:

<extension point="versioningRules" target="org.nuxeo.ecm.core.versioning.VersioningService">
  <versioningRule typeName="QMSDocument" enabled="true">
    <!-- <initialState major="0" minor="0"/> -->
    <options lifeCycleState="*">
      <minor default="true"/>
      <major/>
    </options>
  </versioningRule>
</extension>
0 votes