[armedbear-devel] Trouble calling a static function

ubikation _ ubikation at gmail.com
Wed Aug 21 00:56:38 UTC 2013


I have been trying to create a static function that allows me to create an
Akka Actor so I can try to play with it from within slime, but I am running
into a very odd issue.

-----

Issue:
The static function for Java works perfectly, but the equivalent static
function for slime does not.

-----

The files for reproducing this issue are attached, and the repository that
I am using is: https://github.com/ubikation/chemicalambda

Testing requires having the correct jars, which are installable via the
pom.xml:
mvn install
mvn dependency:copy-dependencies
The second command should create a target/dependency folder that you have
to add to the classpath, along with the dir containing all of the files
I've attached to this email.

-----

Here is my calling session:
CL-USER> (load "/home/ubikation/src/lisp/chemicalambda/AkkaTest.lisp")
T
CL-USER> (my-test)

This is the error when trying to call the static function:
Java exception 'java.lang.NoClassDefFoundError: akka/actor/ActorSystem'.
   [Condition of type JAVA-EXCEPTION]

Restarts:
 0: [RETRY] Retry SLIME REPL evaluation request.
 1: [*ABORT] Return to SLIME's top level.
 2: [ABORT] Abort thread.

Backtrace:
  0: (#<FUNCTION {1E9ABE91}> #<JAVA-EXCEPTION {15883401}> #<FUNCTION
{1E9ABE91}>)
  1: (APPLY #<FUNCTION {1E9ABE91}> (#<JAVA-EXCEPTION {15883401}> #<FUNCTION
{1E9ABE91}>))
  2: (SYSTEM::RUN-HOOK SYSTEM::*INVOKE-DEBUGGER-HOOK* #<JAVA-EXCEPTION
{15883401}> #<FUNCTION {1E9ABE91}>)
  3: (INVOKE-DEBUGGER #<JAVA-EXCEPTION {15883401}>)
  4: org.armedbear.lisp.Lisp.error(Lisp.java:382)
  5: org.armedbear.lisp.Java.jstatic(Java.java:487)
  6: org.armedbear.lisp.Java$pf_jstatic.execute(Java.java:513)
  7: org.armedbear.lisp.Primitive.execute(Primitive.java:123)
  8: (JSTATIC "test" "AkkaApiSimple")
  9: (VOID-FUNCTION)
 10: (MY-TEST)
 11: (SYSTEM::%EVAL (MY-TEST))
 12: (EVAL (MY-TEST))
 13: (SWANK::EVAL-REGION "(my-test)
     ")
 14: (#<FUNCTION {210E38B2}>)
 15: (SWANK::TRACK-PACKAGE #<FUNCTION {210E38B2}>)
 16: (#<FUNCTION {2CAC3F12}>)
 17: (SWANK::CALL-WITH-RETRY-RESTART "Retry SLIME REPL evaluation request."
#<FUNCTION {2CAC3F12}>)
 18: (#<FUNCTION {6060CDA7}>)
 19: (FUNCALL #<FUNCTION {6060CDA7}>)
 20: (#<FUNCTION (LAMBDA (SWANK-BACKEND::FN)) {735DC05F}> #<FUNCTION
{6060CDA7}>)
 21: (APPLY #<FUNCTION (LAMBDA (SWANK-BACKEND::FN)) {735DC05F}> #<FUNCTION
{6060CDA7}> NIL)
 22: (SWANK-BACKEND:CALL-WITH-SYNTAX-HOOKS #<FUNCTION {6060CDA7}>)
 23: (SWANK::CALL-WITH-BUFFER-SYNTAX NIL #<FUNCTION {6060CDA7}>)
 24: (SWANK::REPL-EVAL "(my-test)
     ")
 25: (SWANK:LISTENER-EVAL "(my-test)
     ")
 26: (SYSTEM::%EVAL (SWANK:LISTENER-EVAL "(my-test)
     "))
 27: (EVAL (SWANK:LISTENER-EVAL "(my-test)
     "))
 28: (#<FUNCTION {1000D825}>)
 29: (JRUN-EXCEPTION-PROTECTED #<FUNCTION {1000D825}>)
 30: (SWANK:EVAL-FOR-EMACS (SWANK:LISTENER-EVAL "(my-test)
     ") "COMMON-LISP-USER" 12)
 31: (APPLY #<EVAL-FOR-EMACS {4FAC1D53}> ((SWANK:LISTENER-EVAL "(my-test)
     ") "COMMON-LISP-USER" 12))
 32: (SWANK::PROCESS-REQUESTS NIL)
 33: (#<FUNCTION {276E6D58}>)
 34: (EVAL (SWANK:LISTENER-EVAL "(test)
     "))
 35: (#<FUNCTION {42CCC0A1}>)
 36: (JRUN-EXCEPTION-PROTECTED #<FUNCTION {42CCC0A1}>)
 37: (SWANK:EVAL-FOR-EMACS (SWANK:LISTENER-EVAL "(test)
     ") "COMMON-LISP-USER" 9)
 38: (APPLY #<EVAL-FOR-EMACS {4FAC1D53}> ((SWANK:LISTENER-EVAL "(test)
     ") "COMMON-LISP-USER" 9))
 39: (SWANK::PROCESS-REQUESTS NIL)
 40: (#<FUNCTION {107AAC4A}>)
 41: (#<FUNCTION {65C536B9}>)
 42: (FUNCALL #<FUNCTION {65C536B9}>)
 43: ((FLET SWANK-BACKEND:CALL-WITH-DEBUGGER-HOOK) #<SWANK-DEBUGGER-HOOK
{773F0D3A}> #<FUNCTION {65C536B9}>)
 44: (APPLY #<(FLET CALL-WITH-DEBUGGER-HOOK) {768BDFE1}>
#<SWANK-DEBUGGER-HOOK {773F0D3A}> #<FUNCTION {65C536B9}> NIL)
 45: (SWANK-BACKEND:CALL-WITH-DEBUGGER-HOOK #<SWANK-DEBUGGER-HOOK
{773F0D3A}> #<FUNCTION {65C536B9}>)
 46: (#<FUNCTION {59176994}>)
 47: (SWANK::CALL-WITH-BINDINGS ((*STANDARD-OUTPUT* .
#S(SLIME-OUTPUT-STREAM)) (*STANDARD-INPUT* . #S(SLIME-INPUT-STREAM))
(*TRACE-OUTPUT* . #S(SLIME-OUTPUT-STREAM)) (*ERROR-OUTPUT* .
#S(SLIME-OUTPUT-STREA..
 48: (#<FUNCTION {3A65F5B1}>)
 49: (JRUN-EXCEPTION-PROTECTED #<FUNCTION {3A65F5B1}>)
 50: (#<FUNCTION {7BE5556A}>)
 51: (JRUN-EXCEPTION-PROTECTED #<FUNCTION {7BE5556A}>)
 52: (SWANK::HANDLE-REQUESTS #S(SWANK::MULTITHREADED-CONNECTION :SOCKET
#<java.net.ServerSocket ServerSocket[addr=0.0.0.0/0.0.0..... {6BC6FEA9}>
:SOCKET-IO #<TWO-WAY-STREAM {55794086}> :DEDICATED-OUTPUT NI..
 53: (SWANK::REPL-LOOP #S(SWANK::MULTITHREADED-CONNECTION :SOCKET
#<java.net.ServerSocket ServerSocket[addr=0.0.0.0/0.0.0..... {6BC6FEA9}>
:SOCKET-IO #<TWO-WAY-STREAM {55794086}> :DEDICATED-OUTPUT NIL :USE..
 54: (#<FUNCTION {B7B4941}>)
 55: (SWANK::CALL-WITH-BINDINGS NIL #<FUNCTION {B7B4941}>)
 56: (#<FUNCTION {4B06504A}>)
 57: (FUNCALL #<FUNCTION {4B06504A}>)
 58: (#<FUNCTION (LAMBDA ()) {B8150C1}>)
 59: (THREADS::THREAD-FUNCTION-WRAPPER #<FUNCTION (LAMBDA ()) {B8150C1}>)



I've tried to be very clear but I'm sure I've missed something. I don't
know what's causing this error, and I can't tell if I'm going about this in
some stupid manner or if this is a symptom of a more complex issue.

If you need any help reproducing this issue please email me, I'm desperate
for any input.

Thank you very much for your time!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/armedbear-devel/attachments/20130821/0cdffb0d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: AkkaTest.lisp
Type: application/octet-stream
Size: 469 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/armedbear-devel/attachments/20130821/0cdffb0d/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TESTING.md
Type: application/octet-stream
Size: 534 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/armedbear-devel/attachments/20130821/0cdffb0d/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: AkkaApiSimple.java
Type: application/octet-stream
Size: 2741 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/armedbear-devel/attachments/20130821/0cdffb0d/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pom.xml
Type: text/xml
Size: 1426 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/armedbear-devel/attachments/20130821/0cdffb0d/attachment.xml>


More information about the armedbear-devel mailing list