Graphaware tx-api: module-info has been compiled by a more recent version of the Java Runtime

extension
graphaware

(Jiropole) #1

Neo4j 3.4.5, java 1.8.0_191.

Trying to build a transaction event handler using GraphAware's Improved Transaction Event API. Extension works until I try to bring in the above package, after which Neo4j cannot start, with error "module-info has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0".

    <properties>
        <neo4j.version>3.4.5</neo4j.version>
        <neo4j.java.version>1.7.0</neo4j.java.version>
        <graphaware.version>3.4.5.52</graphaware.version>
    </properties>

I also have the same version of the GA framework in the server /plugins.

Thoughts welcome.


(Christophe Willemsen) #2

When you build a java module like this one, you are embedding the implicit dependencies of neo4j and the framework ( mostly neo4j ).

Another problem is that you will not have those exceptions when compiling your module, because the neo4j and graphaware dependencies are probably scoped to "provided".

A solution is to enforce the implicit dependencies to be built on jdk8, and exclude those that are not, with the help of the maven enforcer plugin.

You can check this commit on one of our modules that does exactly that :


(Jiropole) #3

Thank you, Cristophe,

I'm passing this down the chain, as I'm not qualified to render a proper response. I'll post our solution back if and when we figure it out.


(Jiropole) #4

To follow up, yes it appears that Neo4j uses a version of asm built with Java 1.9. So @Christophe_Willemsen's solution was correct. This worked for us:

            <exclusions>
                <exclusion>
                    <groupId>org.ow2.asm</groupId>
                    <artifactId>asm</artifactId>
                </exclusion>
            </exclusions>