grammarviz2_src icon indicating copy to clipboard operation
grammarviz2_src copied to clipboard

Errors in building GrammarViz 3.0

Open PANXIONG-CN opened this issue 2 years ago • 6 comments

Dear Dr. Pavel.

Thank you very much for sharing the amazing GrammarViz 3.0 software, which is very helpful for my research and I intend to use this software to detect anomalies in my data.

But I have some problems while installing this amazing software.

1, first of all, is the Maven installation plug-in error, I checked that it may be a problem with the HTTP security (https://support.sonatype.com/hc/en-us/articles/360041287334), I manually carried out the installation of the required plug-ins, manually download the file maven-install- plugin-2.2.pom, and copied to the directory (~/.m2/repository/org/apache/maven/plugins/maven-install-plugin).

  1. Next I followed the instructions on GITHUB to install it, but it reported an error, please check the attached error message for details.

JAVA and Maven versions are consistent with your Github!

Thank you very much for taking your valuable time to answer for me out-error.log out-version.log .

PANXIONG-CN avatar Nov 17 '21 05:11 PANXIONG-CN

hi! i found solution that:

  • copy new pom.xml pom.zip
  • and run mvn -Dhttps.protocols=TLSv1.2 package -Psingle

tanhhkhcndn avatar Dec 09 '21 16:12 tanhhkhcndn

Thanks, it built successfully!

PANXIONG-CN avatar Dec 10 '21 03:12 PANXIONG-CN

I tried this (as well as the vanilla Maven instruction w/o the new pom.xml) and can't get things to work. Disclaimer: I am totally useless when it comes to Linux. Here's the terminal:

pwisspace@pwisspace-VirtualBox:~/Desktop/grammarviz2_src$ ls -sal
total 92
 4 drwxrwxr-x 7 pwisspace pwisspace  4096 Dec 13 10:03 .
 4 drwxr-xr-x 3 pwisspace pwisspace  4096 Dec 13 09:42 ..
 4 -rw-rw-r-- 1 pwisspace pwisspace  1445 Dec 13 09:42 citation.bib
 4 -rw-rw-r-- 1 pwisspace pwisspace  1024 Dec 13 09:42 .classpath
 4 drwxrwxr-x 3 pwisspace pwisspace  4096 Dec 13 09:42 data
 4 drwxrwxr-x 8 pwisspace pwisspace  4096 Dec 13 09:42 .git
 4 -rw-rw-r-- 1 pwisspace pwisspace    48 Dec 13 09:42 .gitignore
20 -rw-rw-r-- 1 pwisspace pwisspace 18026 Dec 13 09:42 LICENSE.txt
12 -rw-rw-r-- 1 pwisspace pwisspace 10346 Dec  9 23:19 pom.xml
 4 -rw-rw-r-- 1 pwisspace pwisspace   540 Dec 13 09:42 .project
 4 drwxrwxr-x 8 pwisspace pwisspace  4096 Dec 13 09:42 RCode
12 -rw-rw-r-- 1 pwisspace pwisspace  8514 Dec 13 09:42 README.md
 4 drwxrwxr-x 5 pwisspace pwisspace  4096 Dec 13 09:42 src
 4 drwxrwxr-x 7 pwisspace pwisspace  4096 Dec 13 10:04 target
 4 -rw-rw-r-- 1 pwisspace pwisspace   125 Dec 13 09:42 .travis.yml
pwisspace@pwisspace-VirtualBox:~/Desktop/grammarviz2_src$ java -version
openjdk version "11.0.11" 2021-04-20
OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2.20.04)
OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2.20.04, mixed mode, sharing)
pwisspace@pwisspace-VirtualBox:~/Desktop/grammarviz2_src$ mvn -version
Apache Maven 3.6.3
Maven home: /usr/share/maven
Java version: 11.0.11, vendor: Ubuntu, runtime: /usr/lib/jvm/java-11-openjdk-amd64
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.11.0-41-generic", arch: "amd64", family: "unix"
pwisspace@pwisspace-VirtualBox:~/Desktop/grammarviz2_src$ mvn -Dhttps.protocols=TLSv1.2 package -Psingle
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
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
[INFO] Scanning for projects...
[INFO] 
[INFO] -----------------------< net.seninp:grammarviz2 >-----------------------
[INFO] Building GrammarViz2 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- jacoco-maven-plugin:0.7.9:prepare-agent (default) @ grammarviz2 ---
[INFO] argLine set to -javaagent:/home/pwisspace/.m2/repository/org/jacoco/org.jacoco.agent/0.7.9/org.jacoco.agent-0.7.9-runtime.jar=destfile=/home/pwisspace/Desktop/grammarviz2_src/target/jacoco.exec,excludes=**/tinker/**:**/util/**:**/view/**:**/cli/**
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ grammarviz2 ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/pwisspace/Desktop/grammarviz2_src/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.3:compile (default-compile) @ grammarviz2 ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ grammarviz2 ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/pwisspace/Desktop/grammarviz2_src/src/test/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.3:testCompile (default-testCompile) @ grammarviz2 ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-surefire-plugin:2.13:test (default-test) @ grammarviz2 ---
[INFO] Surefire report directory: /home/pwisspace/Desktop/grammarviz2_src/target/surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Exception in thread "main" java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:513)
	at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:525)
Caused by: java.lang.RuntimeException: Class java/util/UUID could not be instrumented.
	at org.jacoco.agent.rt.internal_8ff85ea.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:140)
	at org.jacoco.agent.rt.internal_8ff85ea.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:101)
	at org.jacoco.agent.rt.internal_8ff85ea.PreMain.createRuntime(PreMain.java:55)
	at org.jacoco.agent.rt.internal_8ff85ea.PreMain.premain(PreMain.java:47)
	... 6 more
Caused by: java.lang.NoSuchFieldException: $jacocoAccess
	at java.base/java.lang.Class.getField(Class.java:1999)
	at org.jacoco.agent.rt.internal_8ff85ea.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:138)
	... 9 more
*** java.lang.instrument ASSERTION FAILED ***: "result" with message agent load/premain call failed at src/java.instrument/share/native/libinstrument/JPLISAgent.c line: 422
FATAL ERROR in native method: processing of -javaagent failed, processJavaStart failed
Aborted (core dumped)

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  2.595 s
[INFO] Finished at: 2021-12-13T10:32:21-05:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.13:test (default-test) on project grammarviz2: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.13:test failed: The forked VM terminated without saying properly goodbye. VM crash or System.exit called ?
[ERROR] Command was/bin/sh -c cd /home/pwisspace/Desktop/grammarviz2_src && /usr/lib/jvm/java-11-openjdk-amd64/bin/java '-javaagent:/home/pwisspace/.m2/repository/org/jacoco/org.jacoco.agent/0.7.9/org.jacoco.agent-0.7.9-runtime.jar=destfile=/home/pwisspace/Desktop/grammarviz2_src/target/jacoco.exec,excludes=**/tinker/**:**/util/**:**/view/**:**/cli/**' -Xms512m -Xmx1024m -jar /home/pwisspace/Desktop/grammarviz2_src/target/surefire/surefirebooter4221544974146249873.jar /home/pwisspace/Desktop/grammarviz2_src/target/surefire/surefire7227017379266138940tmp /home/pwisspace/Desktop/grammarviz2_src/target/surefire/surefire_01322756811107584025tmp
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
pwisspace@pwisspace-VirtualBox:~/Desktop/grammarviz2_src$ 

SteveHuntsman avatar Dec 13 '21 15:12 SteveHuntsman

let take note version of JDK and maven openjdk version "1.8.0_292" OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_292-b10) $ mvn -version Apache Maven 3.8.4 (9b656c72d54e5bacbed989b64718c159fe39b537) Maven home: C:\ProgramData\chocolatey\lib\maven\apache-maven-3.8.4

tanhhkhcndn avatar Jan 01 '22 08:01 tanhhkhcndn

Hi folks -- sorry, I'm late for responding here. I just rebuilt the whole SAX chain and it builds for three java versions for three platforms as you can see in the traces here Github CI trace. If something fails to build, it is likely a local issue and you'd need to figure out whereas it's Maven dependency which fails to download or a path/permissions, etc. Thanks!

psenin-sanofi avatar Jan 02 '22 05:01 psenin-sanofi

Built and ran easily on a fresh Ubuntu 20.04 install on bare metal. Thanks! Will try a VM (as I was doing before) next and report if I encounter any problems there.

SteveHuntsman avatar Jan 10 '22 19:01 SteveHuntsman