Why the combination of two mavern dependencies makes the program stop working?

0

I have the problem, because I work on a Java project, I use Maven to manage dependencies, and after adding one I had output like that:

Process finished with code -1073740791 (0xC0000409)

What I did is I merged two of my projects that worked. One of this projects uses Processing for drawing some images, and the other uses OWL API to work with ontologies.

I found out, that whis two dependencies are problematc:

    <dependency>
        <groupId>edu.stanford.protege</groupId>
        <artifactId>code-generation</artifactId>
        <version>2.0.0</version>
    </dependency>

and

    <dependency>
        <groupId>org.processing</groupId>
        <artifactId>core</artifactId>
        <version>3.3.7</version>
    </dependency>

If they are apart - in separate projects, everything works. If I add them to one pom file, I've got the Proces finished ... message.

My question is do you know why this happens and is there a way to solve it?

java
maven
processing
owl
owl-api
asked on Stack Overflow Jun 13, 2020 by quikq • edited Jun 13, 2020 by quikq

1 Answer

1

This may happen if the dependencies of this two are conflicting, in this case, one is omitted and the oldest version is kept:

(org.slf4j:slf4j-api:jar:1.7.12:compile - omitted for conflict with 1.7.10)

You can solve this exluding the offending dependency in one of the projects:

 <dependency>
   <groupId>edu.stanford.protege</groupId>
   <artifactId>code-generation</artifactId>
   <version>2.0.0</version>
   <exclusions>
     <exclusion>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-api</artifactId>
     </exclusion>
   </exclusions>
 </dependency>

I can't test if this is the problem, but hope this can help.

answered on Stack Overflow Jun 13, 2020 by Decly

User contributions licensed under CC BY-SA 3.0