[midPoint] jackson library in model-impl module?

Pavol Mederly mederly at evolveum.com
Mon Feb 9 14:33:46 CET 2015


Hello Manish,

you're right. There are conflicting versions of jackson, contributed by 
midPoint prism module (2.3.1), jasper reports (2.1.4), activiti (1.9.9) 
and webjars-locator (2.3.3).
Thanks for discovering that.

Among these, I think the conflict is between prism's and jasper's 
version, when newer version of jackson-databind calls older version of 
jackson-core (2.1.4).

Currently I have no better solution than upgrading activiti from 5.15.1 
to 5.17.0 and excluding jackson dependencies from jasper reports. Please 
see attached patch.
(The former - i.e. upgrading activiti - is perhaps not necessary, as 
jackson 1.9.9 uses other - nonconflicting - namespace.)

BEWARE: I have not tested whether workflows and/or reports still works 
flawlessly after the changes. Please test for yourself.

I will soon create jira issue for the problem you've reported, so we can 
deal with it more seriously in 3.1.1 or 3.2 release.

Best regards,
Pavol


On 6. 2. 2015 22:53, Manish Baid wrote:
>
>     Hi,
>     We have written a custom task and are trying to use jackson 2.3.1
>     library (midpoint's prism module uses the same version) but are
>     getting following error:
>
>     ObjectMapper
>     com.fasterxml.jackson.core.JsonFactory.requiresPropertyOrdering()Z
>
>
>     2015-02-06 05:43:34,663 [] [midPointScheduler_Worker-4] ERROR
>     (com.evolveum.midpoint.task.quartzimpl.execution.JobExecutor):
>     Task handler threw unexpected exception:
>     java.lang.NoSuchMethodError:
>     com.fasterxml.jackson.core.JsonFactory.requiresPropertyOrdering()Z; task
>     = Task(id:1423158997535-0-1, name:PermissionSetEvaluate,
>     oid:00000000-0000-0000-0000-000000000120)
>     java.lang.NoSuchMethodError:
>     com.fasterxml.jackson.core.JsonFactory.requiresPropertyOrdering()Z
>             at
>     com.fasterxml.jackson.databind.ObjectMapper.<init>(ObjectMapper.java:445)
>     ~[jackson-databind-2.3.1.jar:2.3.1]
>             at
>     com.fasterxml.jackson.databind.ObjectMapper.<init>(ObjectMapper.java:366)
>     ~[jackson-databind-2.3.1.jar:2.3.1]
>             at
>     com.evolveum.midpoint.model.impl.permissionset.PermissionSetEvaluation.run(PermissionSetEvaluation.java:65)
>     ~[model-impl-3.2-SNAPSHOT.jar:na]
>             at
>     com.evolveum.midpoint.task.quartzimpl.execution.JobExecutor.executeHandler(JobExecutor.java:479)
>     [task-quartz-impl-3.2-SNAPSHOT.jar:na]
>             at
>     com.evolveum.midpoint.task.quartzimpl.execution.JobExecutor.executeRecurrentTask(JobExecutor.java:359)
>     [task-quartz-impl-3.2-SNAPSHOT.jar:na]
>             at
>     com.evolveum.midpoint.task.quartzimpl.execution.JobExecutor.execute(JobExecutor.java:162)
>     [task-quartz-impl-3.2-SNAPSHOT.jar:na]
>             at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
>     [quartz-2.1.3.jar:na]
>             at
>     org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
>     [quartz-2.1.3.jar:na]
>
>
>     Looked at the /WEB-INF/lib, looks like there are different
>     combination of jackson libraries built which can be causing this.
>
>     Here is the sample code snippet...
>
>         @Override
>         public TaskRunResult run(Task task) {
>             LOGGER.trace("CleanUpTaskHandler.run starting");
>
>             long progress = task.getProgress();
>             OperationResult opResult = new
>     OperationResult(OperationConstants.RECOMPUTE);
>             TaskRunResult runResult = new TaskRunResult();
>             runResult.setOperationResult(opResult);
>             runResult.setProgress(progress);
>             runResult.setRunResultStatus(TaskRunResultStatus.FINISHED);
>             ObjectMapper objectMapper = new ObjectMapper();
>     ........
>
>
>     Regards
>
>
>
>
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20150209/b699d4d7/attachment.htm>
-------------- next part --------------
Index: gui/admin-gui/pom.xml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- gui/admin-gui/pom.xml	(revision 557bbccd8083e8b73d41fbcfb5025cf20fd5fa03)
+++ gui/admin-gui/pom.xml	(revision )
@@ -532,6 +532,18 @@
 					<groupId>xml-apis</groupId>
   					<artifactId>xml-apis</artifactId>
 				</exclusion>
+                <exclusion>
+                    <groupId>com.fasterxml.jackson.core</groupId>
+                    <artifactId>jackson-core</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>com.fasterxml.jackson.core</groupId>
+                    <artifactId>jackson-databind</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>com.fasterxml.jackson.core</groupId>
+                    <artifactId>jackson-annotations</artifactId>
+                </exclusion>
 			</exclusions>
 		</dependency>
 		<dependency>
Index: build-system/pom.xml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- build-system/pom.xml	(revision 557bbccd8083e8b73d41fbcfb5025cf20fd5fa03)
+++ build-system/pom.xml	(revision )
@@ -68,8 +68,8 @@
         <jdbc.mysql>5.1.31</jdbc.mysql>
         <wicket.version>6.17.0</wicket.version>
         <groovy.version>1.8.6</groovy.version>
-        <activiti-engine.version>5.15.1</activiti-engine.version>
-        <activiti-spring.version>5.15.1</activiti-spring.version>
+        <activiti-engine.version>5.17.0</activiti-engine.version>
+        <activiti-spring.version>5.17.0</activiti-spring.version>
         <commons-email.version>1.3</commons-email.version>
         <xmlsec.version>2.0.1</xmlsec.version>
         <connid.version>1.4.0.49</connid.version>
@@ -128,6 +128,12 @@
                 <groupId>org.activiti</groupId>
                 <artifactId>activiti-engine</artifactId>
                 <version>${activiti-engine.version}</version>
+                <!--<exclusions>-->
+                    <!--<exclusion>-->
+                        <!--<groupId>org.codehaus.jackson</groupId>-->
+                        <!--<artifactId>jackson-core-asl</artifactId>-->
+                    <!--</exclusion>-->
+                <!--</exclusions>-->
             </dependency>
             <dependency>
                 <groupId>org.activiti</groupId>
Index: model/report-impl/pom.xml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- model/report-impl/pom.xml	(revision 557bbccd8083e8b73d41fbcfb5025cf20fd5fa03)
+++ model/report-impl/pom.xml	(revision )
@@ -79,6 +79,20 @@
 	<groupId>net.sf.jasperreports</groupId>
 	<artifactId>jasperreports</artifactId>
 	<version>6.0.0</version>
+    <exclusions>
+        <exclusion>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-core</artifactId>
+        </exclusion>
+        <exclusion>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-databind</artifactId>
+        </exclusion>
+        <exclusion>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-annotations</artifactId>
+        </exclusion>
+    </exclusions>
 </dependency>
 <!-- <dependency> -->
 <!-- 	<groupId>com.google.code.maven-play-plugin.org.apache.commons</groupId> -->


More information about the midPoint mailing list