Closed marco-eckstein closed 4 months ago
This issue has been solved in jQA 2.1.x, please use the latest Neo4j v5 distribution (see https://jqassistant.github.io/jqassistant/doc/2.1.0/#_command_line).
The M2 central UI has room for improvements… Seems that it’s easier to click on „View All“ beside latest version and then „Browse“ for the version of interest. This takes you to a directory view containing all files. From there you can download the ZIP distribution.
Yes, thanks, I had just found it and deleted my other comments. This is what I just had typed concurrently to you:
Thanks. It was very hard to find. The quick start links to the wrong package - the one where 2.0.10 is the latest version. Both quick start and the manual you linked ask the user to download a zip file "from the Download menu". This is misleading, as there is no download menu on the site. Instead, it should read Download the *-distribution.zip file from Versions | Browse. Also, on https://jqassistant.github.io/jqassistant/doc/2.1.0/#_command_line, the link text should not be JDK 11 / JDK 17 or later, but be prefixed with jQAssistant for.
The quickstart section of the manual has been updated: https://github.com/jQAssistant/jqa-manual/commit/621331c2981bca9d13b654d05f993a6ccfdc34bf
This issue has been solved in jQA 2.1.x, please use the latest Neo4j v5 distribution (see https://jqassistant.github.io/jqassistant/doc/2.1.0/#_command_line).
I have just tried to run jQAssistant 2.3.1 (jqassistant-commandline-neo4jv4-2.3.1-distribution.zip
) as described in the quickstart of the user manual:
./bin/jqassistant.sh scan -f lib
This lead to the following error message:
2024-07-10 06:12:56.499 [main] INFO StoreFactory - Connecting to store at file:/path/to/jqassistant-commandline-neo4jv4-2.3.1/jqassistant/store'
Exception in thread "main" java.lang.LinkageError: Cannot to link java.nio.DirectByteBuffer
at org.neo4j.internal.unsafe.UnsafeUtil.<clinit>(UnsafeUtil.java:128)
at org.neo4j.memory.RuntimeInternals.guessHeaderSize(RuntimeInternals.java:158)
at org.neo4j.memory.RuntimeInternals.<clinit>(RuntimeInternals.java:53)
at org.neo4j.memory.HeapEstimator.<clinit>(HeapEstimator.java:103)
at org.neo4j.internal.collector.RecentQueryBuffer.<clinit>(RecentQueryBuffer.java:37)
at org.neo4j.graphdb.factory.module.GlobalModule.<init>(GlobalModule.java:212)
at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.createGlobalModule(DatabaseManagementServiceFactory.java:272)
at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.build(DatabaseManagementServiceFactory.java:133)
at org.neo4j.dbms.api.DatabaseManagementServiceBuilder.newDatabaseManagementService(DatabaseManagementServiceBuilder.java:101)
at org.neo4j.dbms.api.DatabaseManagementServiceBuilder.build(DatabaseManagementServiceBuilder.java:94)
at com.buschmais.xo.neo4j.embedded.api.FileDatabaseManagementServiceFactory.createDatabaseManagementService(FileDatabaseManagementServiceFactory.java:39)
at com.buschmais.xo.neo4j.embedded.api.EmbeddedNeo4jXOProvider.createDatastore(EmbeddedNeo4jXOProvider.java:49)
at com.buschmais.xo.impl.XOManagerFactoryImpl.<init>(XOManagerFactoryImpl.java:48)
at com.buschmais.xo.impl.bootstrap.XOBootstrapServiceImpl.createXOManagerFactory(XOBootstrapServiceImpl.java:41)
at com.buschmais.xo.api.bootstrap.XO.createXOManagerFactory(XO.java:48)
at com.buschmais.jqassistant.core.store.impl.AbstractGraphStore.start(AbstractGraphStore.java:71)
at com.buschmais.jqassistant.commandline.task.AbstractStoreTask.withStore(AbstractStoreTask.java:49)
at com.buschmais.jqassistant.commandline.task.ScanTask.run(ScanTask.java:51)
at com.buschmais.jqassistant.commandline.Main.executeTask(Main.java:320)
at com.buschmais.jqassistant.commandline.Main.executeTasks(Main.java:278)
at com.buschmais.jqassistant.commandline.Main.interpretCommandLine(Main.java:204)
at com.buschmais.jqassistant.commandline.Main.run(Main.java:82)
at com.buschmais.jqassistant.commandline.Main.main(Main.java:63)
Caused by: java.lang.IllegalAccessException: module java.base does not open java.nio to unnamed module @4ca1042e
at java.base/java.lang.invoke.MethodHandles.privateLookupIn(MethodHandles.java:259)
at org.neo4j.internal.unsafe.UnsafeUtil.<clinit>(UnsafeUtil.java:111)
... 22 more
Here is the environment:
$ java --version
openjdk 17.0.7 2023-04-18
OpenJDK Runtime Environment Temurin-17.0.7+7 (build 17.0.7+7)
OpenJDK 64-Bit Server VM Temurin-17.0.7+7 (build 17.0.7+7, mixed mode, sharing)
$ sw_vers
ProductName: macOS
ProductVersion: 12.7.5
BuildVersion: 21H1222
After downgrading to Java 11, the error does not occur anymore:
sdk install java 11.0.23-tem
sdk use java 11.0.23-tem
There will be a warning about illegal reflective access, though:
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access using Lookup on org.neo4j.internal.unsafe.UnsafeUtil (file:/path/to/jqassistant-commandline-neo4jv4-2.3.1/lib/org.neo4j-neo4j-unsafe-4.4.34.jar) to class java.nio.Buffer
WARNING: Please consider reporting this to the maintainers of org.neo4j.internal.unsafe.UnsafeUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
The problem was caused by a typo in the user manual:
Bug Description
When running
bin\jqassistant.cmd scan -f lib
injqassistant-commandline-distribution-2.0.10
, I getException in thread "main" java.lang.LinkageError: Cannot to link java.nio.DirectByteBuffer
, caused byjava.lang.IllegalAccessException: module java.base does not open java.nio to unnamed module @184cf7cf
. This and a similar problem can be mitigated by adding the arguments--add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED
to thejava
command injqassistant.cmd
, but then I getjava.io.IOException: java.lang.UnsupportedOperationException
caused byjava.lang.UnsupportedOperationException
.Expected Behaviour
There should be no exception.
Your Environment
How can we reproduce the bug?
Run
bin\jqassistant.cmd scan -f lib
injqassistant-commandline-distribution-2.0.10
with JDK 21.