pietermartin / sqlg

TinkerPop graph over sql
MIT License
243 stars 51 forks source link

NoSuchMethodError when creating a graph #349

Closed chrishmorris closed 5 years ago

chrishmorris commented 5 years ago

java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkState(ZLjava/lang/String;Ljava/lang/Object;)V

at org.umlg.sqlg.structure.topology.Schema.createSqlgSchemaVertexLabel(Schema.java:439)
at org.umlg.sqlg.structure.topology.Topology.<init>(Topology.java:399)
at org.umlg.sqlg.structure.SqlgGraph.<init>(SqlgGraph.java:319)
at org.umlg.sqlg.structure.SqlgGraph.open(SqlgGraph.java:248)
at org.umlg.sqlg.structure.SqlgGraph.open(SqlgGraph.java:238)

The problem was resolved by removing some unneeded dependencies and:

rm -rf ~/.m2/repository/com/google/guava/
mvn compile

According to mvn dependency:tree, I'm actually getting guava version 23.4-jre. TheSqlg pom does not specify a version:

        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
        </dependency>

I suggest specifying:


      <version>23.4-jre</version>
pietermartin commented 5 years ago

The root pom contains the version and it is <version>23.4-jre</version> Not quite understanding why this is happening by you. Which version are you working on? How are you importing Sqlg into your project?

pietermartin commented 5 years ago

Closing this for now. Please open it again if the issue persists.