Earlier today I was able to load cffi by renaming mvn.cmd to mvn.bat.
Later on, I am unable to, and I would appreciate a fresh pair of eyes.
(ABCL/Java info: C:\Users\977315>java -jar "c:\mv-program-files\abcl-bin-1.4.0\abcl.jar" Armed Bear Common Lisp 1.4.0 Java 1.8.0_112 Oracle Corporation Java HotSpot(TM) 64-Bit Server VM Low-level initialization completed in 0.243 seconds. Startup completed in 3.812 seconds. Loading C:\Users\977315.abclrc completed in 13.729 seconds.)
The error seems to happen in abcl-cffi.lisp. mvn.bat is visible: (uiop/run-program:run-program '("where" "mvn.bat") :output :string) gives "C:\Program Files\apache-maven-3.3.9\bin\mvn.bat " NIL 0
I don't know how to narrow down the search for the culprit. It makes me think that maybe the error message is not correct - that there is a different underlying cause. Is there some direct way I can test maven+aether? I now next to nothing about Java, and looking at abcl-cffi, I did not find anything obvious.
Thanks for your help and patience,
Backtrace follows.
CL-USER(4): (asdf:load-system :cffi) ; Compiling C:/mv-program-files/my-lisp-libraries/cffi/src/cffi-abcl.lisp ... Using probed value of abcl-contrib: 'C:/mv-program-files/abcl-bin-1.4.0/abcl-contrib.jar'. Added jar:file:C:/mv-program-files/abcl-bin-1.4.0/abcl-contrib.jar!/quicklisp/ to ASDF. Added jar:file:C:/mv-program-files/abcl-bin-1.4.0/abcl-contrib.jar!/mvn/ to ASDF. Added jar:file:C:/mv-program-files/abcl-bin-1.4.0/abcl-contrib.jar!/jss/ to ASDF. Added jar:file:C:/mv-program-files/abcl-bin-1.4.0/abcl-contrib.jar!/jfli/ to ASDF. Added jar:file:C:/mv-program-files/abcl-bin-1.4.0/abcl-contrib.jar!/asdf-jar/ to ASDF. Added jar:file:C:/mv-program-files/abcl-bin-1.4.0/abcl-contrib.jar!/abcl-asdf/ to ASDF. java.lang.ExceptionInInitializerError at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at java.lang.Class.newInstance(Unknown Source) at org.armedbear.lisp.FaslClassLoader.loadFunction(FaslClassLoader.java:130) at org.armedbear.lisp.FaslClassLoader$pf_get_fasl_function.execute(FaslClassLoader.java:165) ... at org.armedbear.lisp.LispThread.execute(LispThread.java:832) at org.armedbear.lisp.Lisp.evalCall(Lisp.java:582) at org.armedbear.lisp.Lisp.eval(Lisp.java:540) at org.armedbear.lisp.Lisp.progn(Lisp.java:709) Caused by: org.armedbear.lisp.Go ; in (EVAL-WHEN (:COMPILE-TOPLEVEL :LOAD-TOPLEVEL ...) ...)
; Caught SIMPLE-WARNING: ; Unable to locate Maven executable to find Maven Aether adaptors.
jnaASDF could not load because Java exception 'java.lang.ClassNotFoundException: com.sun.jna.Native'.. #<THREAD "interpreter" {49B3491F}>: Debugger invoked on condition of type JAVA-EXCEPTION Java exception 'java.lang.ClassNotFoundException: com.sun.jna.Native'. Restarts: 0: RETRY Retry completing load for #<ASDF/SYSTEM:SYSTEM "jna">. 1: ACCEPT Continue, treating completing load for #<ASDF/SYSTEM:SYSTEM "jna"> as having been successful. 2: RETRY Retry compiling #<ASDF/LISP-ACTION:CL-SOURCE-FILE "cffi" "src" "cffi-abcl">. 3: ACCEPT Continue, treating compiling #<ASDF/LISP-ACTION:CL-SOURCE-FILE "cffi" "src" "cffi-abcl"> as having been successful. 4: RETRY Retry ASDF operation. 5: CLEAR-CONFIGURATION-AND-RETRY Retry ASDF operation after resetting the configuration. 6: TOP-LEVEL Return to top level.
More experiments with ASDF 3.1.7 clear the maven error, but now com.sun.jna.Pointer class not found. Details below.
On Wed, Jan 4, 2017 at 8:26 PM Mirko Vukovic mirko.vukovic@gmail.com wrote:
Earlier today I was able to load cffi by renaming mvn.cmd to mvn.bat.
Later on, I am unable to, and I would appreciate a fresh pair of eyes.
I did more experiments. I decided to use with ASDF 3.1.7, for which uiop/run-program:run-program runs cleanly (see my other thread https://mailman.common-lisp.net/pipermail/armedbear-devel/2017-January/00378... where I tested by doing '("where" "mvn.bat")). Now, I don't get a maven error, which is what I was hoping for by switching to asdf 3.1.7
I cleared the cache, and run asdf with :force t. I get an error about com.sun.jna.Pointer class not found when compiling cffi-abcl:
CL-USER(31): (load "c:/mv-program-files/my-lisp-libraries/cffi/src/cffi-abcl.abcl") Error loading C:/mv-program-files/my-lisp-libraries/cffi/src/cffi-abcl.abcl at line 32 (offset 2312) #<THREAD "interpreter" {53BDE61}>: Debugger invoked on condition of type ERROR Class not found: com.sun.jna.Pointer Restarts: 0: ABORT Return to debug level 1. 1: TOP-LEVEL Return to top level.
(ABCL/Java info: C:\Users\977315>java -jar "c:\mv-program-files\abcl-bin-1.4.0\abcl.jar" Armed Bear Common Lisp 1.4.0 Java 1.8.0_112 Oracle Corporation Java HotSpot(TM) 64-Bit Server VM Low-level initialization completed in 0.243 seconds. Startup completed in 3.812 seconds. Loading C:\Users\977315.abclrc completed in 13.729 seconds.)
The error seems to happen in abcl-cffi.lisp. mvn.bat is visible: (uiop/run-program:run-program '("where" "mvn.bat") :output :string) gives "C:\Program Files\apache-maven-3.3.9\bin\mvn.bat " NIL 0
I don't know how to narrow down the search for the culprit. It makes me think that maybe the error message is not correct - that there is a different underlying cause. Is there some direct way I can test maven+aether? I now next to nothing about Java, and looking at abcl-cffi, I did not find anything obvious.
Thanks for your help and patience,
Backtrace follows.
CL-USER(4): (asdf:load-system :cffi) ; Compiling C:/mv-program-files/my-lisp-libraries/cffi/src/cffi-abcl.lisp ... Using probed value of abcl-contrib: 'C:/mv-program-files/abcl-bin-1.4.0/abcl-contrib.jar'. Added jar:file:C:/mv-program-files/abcl-bin-1.4.0/abcl-contrib.jar!/quicklisp/ to ASDF. Added jar:file:C:/mv-program-files/abcl-bin-1.4.0/abcl-contrib.jar!/mvn/ to ASDF. Added jar:file:C:/mv-program-files/abcl-bin-1.4.0/abcl-contrib.jar!/jss/ to ASDF. Added jar:file:C:/mv-program-files/abcl-bin-1.4.0/abcl-contrib.jar!/jfli/ to ASDF. Added jar:file:C:/mv-program-files/abcl-bin-1.4.0/abcl-contrib.jar!/asdf-jar/ to ASDF. Added jar:file:C:/mv-program-files/abcl-bin-1.4.0/abcl-contrib.jar!/abcl-asdf/ to ASDF. java.lang.ExceptionInInitializerError at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at java.lang.Class.newInstance(Unknown Source) at org.armedbear.lisp.FaslClassLoader.loadFunction(FaslClassLoader.java:130) at org.armedbear.lisp.FaslClassLoader$pf_get_fasl_function.execute(FaslClassLoader.java:165) ... at org.armedbear.lisp.LispThread.execute(LispThread.java:832) at org.armedbear.lisp.Lisp.evalCall(Lisp.java:582) at org.armedbear.lisp.Lisp.eval(Lisp.java:540) at org.armedbear.lisp.Lisp.progn(Lisp.java:709) Caused by: org.armedbear.lisp.Go ; in (EVAL-WHEN (:COMPILE-TOPLEVEL :LOAD-TOPLEVEL ...) ...)
; Caught SIMPLE-WARNING: ; Unable to locate Maven executable to find Maven Aether adaptors.
jnaASDF could not load because Java exception 'java.lang.ClassNotFoundException: com.sun.jna.Native'.. #<THREAD "interpreter" {49B3491F}>: Debugger invoked on condition of type JAVA-EXCEPTION Java exception 'java.lang.ClassNotFoundException: com.sun.jna.Native'. Restarts: 0: RETRY Retry completing load for #<ASDF/SYSTEM:SYSTEM "jna">. 1: ACCEPT Continue, treating completing load for #<ASDF/SYSTEM:SYSTEM "jna"> as having been successful. 2: RETRY Retry compiling #<ASDF/LISP-ACTION:CL-SOURCE-FILE "cffi" "src" "cffi-abcl">. 3: ACCEPT Continue, treating compiling #<ASDF/LISP-ACTION:CL-SOURCE-FILE "cffi" "src" "cffi-abcl"> as having been successful. 4: RETRY Retry ASDF operation. 5: CLEAR-CONFIGURATION-AND-RETRY Retry ASDF operation after resetting the configuration. 6: TOP-LEVEL Return to top level.
armedbear-devel@common-lisp.net