03-06-2019 02:52 AM
Hi,
I'm trying to learn how to develop my own enricher (I believe I do understand the basic, in terms of how enrichers relate to automation chains and so on). However, I'm having problems:
Any help is welcome!
I have also asked the same question on SO.
https://stackoverflow.com/questions/55043978/nuxeo-automation-and-a-custom-enricher
03-15-2019 01:52 AM
Make sure that you are compiling the enricher code with the same version of Nuxeo libraries as is the version of the target platform.
For example sample project is using the latest version (currently 11.1-SNAPSHOT) and the result code will not be compatible with Nuxeo platform 9.2. Especially abstract methods can have problems.
So there should be this section in pom.xml with <version>9.2</version>
in your case:
<parent>
<groupId>org.nuxeo</groupId>
<artifactId>nuxeo-addons-parent</artifactId>
<version>9.2</version>
</parent>
The reason why the java.lang.AbstractMethodError
is thrown here is in JsonGenerator
. Nuxeo 9.2 uses org.codehaus.jackson.JsonGenerator
while newer Nuxe versions use com.fasterxml.jackson.core.JsonGenerator
.
Then this method signature (in 9.2):
public void write(org.codehaus.jackson.JsonGenerator jsonGenerator, DocumentModel documentModel) throws IOException;
... is not compatible with this (in 10.3 for example):
public void write(com.fasterxml.jackson.core.JsonGenerator json, DocumentModel document) throws IOException;
And Java is then not able to find correct write()
method implementation and throws AbstractMethodError
.
BTW: I answered this question for you also on https://stackoverflow.com/a/55124006/9709361
03-15-2019 01:52 AM
Make sure that you are compiling the enricher code with the same version of Nuxeo libraries as is the version of the target platform.
For example sample project is using the latest version (currently 11.1-SNAPSHOT) and the result code will not be compatible with Nuxeo platform 9.2. Especially abstract methods can have problems.
So there should be this section in pom.xml with <version>9.2</version>
in your case:
<parent>
<groupId>org.nuxeo</groupId>
<artifactId>nuxeo-addons-parent</artifactId>
<version>9.2</version>
</parent>
The reason why the java.lang.AbstractMethodError
is thrown here is in JsonGenerator
. Nuxeo 9.2 uses org.codehaus.jackson.JsonGenerator
while newer Nuxe versions use com.fasterxml.jackson.core.JsonGenerator
.
Then this method signature (in 9.2):
public void write(org.codehaus.jackson.JsonGenerator jsonGenerator, DocumentModel documentModel) throws IOException;
... is not compatible with this (in 10.3 for example):
public void write(com.fasterxml.jackson.core.JsonGenerator json, DocumentModel document) throws IOException;
And Java is then not able to find correct write()
method implementation and throws AbstractMethodError
.
BTW: I answered this question for you also on https://stackoverflow.com/a/55124006/9709361
04-04-2019 07:23 AM
Thank you, I've completely missed the versions part of the deal.
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.