Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

com.sun.jdi.VMDisconnectedException on lein ritz-nrepl #52

Closed
SteffenGlueckselig opened this Issue · 7 comments

4 participants

@SteffenGlueckselig

Hello,

I get

Exception in thread "main" com.sun.jdi.VMDisconnectedException: Connection closed
at com.sun.tools.jdi.TargetVM.send(TargetVM.java:293)
at com.sun.tools.jdi.VirtualMachineImpl.sendToTarget(VirtualMachineImpl.java:1032)
at com.sun.tools.jdi.PacketStream.send(PacketStream.java:59)
at com.sun.tools.jdi.JDWP$EventRequest$Clear.enqueueCommand(JDWP.java:6824)
at com.sun.tools.jdi.JDWP$EventRequest$Clear.process(JDWP.java:6805)
at com.sun.tools.jdi.EventRequestManagerImpl$EventRequestImpl.clear(EventRequestManagerImpl.java:212)
at com.sun.tools.jdi.EventRequestManagerImpl$EventRequestImpl.setEnabled(EventRequestManagerImpl.java:164)
at com.sun.tools.jdi.EventRequestManagerImpl$EventRequestImpl.disable(EventRequestManagerImpl.java:155)
at ritz.jpda.jdi$discard_event_request.invoke(jdi.clj:479)
at ritz.jpda.jdi_vm$acquire_thread.invoke(jdi_vm.clj:145)
at ritz.jpda.jdi_vm$launch_vm.doInvoke(jdi_vm.clj:203)
at clojure.lang.RestFn.invoke(RestFn.java:425)
at ritz.nrepl$start_jpda_server.invoke(nrepl.clj:262)
at user$eval4872.invoke(NO_SOURCE_FILE:1)
at clojure.lang.Compiler.eval(Compiler.java:6511)
at clojure.lang.Compiler.eval(Compiler.java:6500)
at clojure.lang.Compiler.eval(Compiler.java:6501)
at clojure.lang.Compiler.eval(Compiler.java:6477)
at clojure.core$eval.invoke(core.clj:2797)
at clojure.main$eval_opt.invoke(main.clj:297)
at clojure.main$initialize.invoke(main.clj:316)
at clojure.main$null_opt.invoke(main.clj:349)
at clojure.main$main.doInvoke(main.clj:427)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at clojure.lang.Var.invoke(Var.java:419)
at clojure.lang.AFn.applyToHelper(AFn.java:163)
at clojure.lang.Var.applyTo(Var.java:532)
at clojure.main.main(main.java:37)

when calling lein ritz-nrepl.

I am using ritz 0.5.0, Leiningen2prev10 on java 1.7.0_07.

@hugoduncan
Owner

Which os is this on? openjdk or oracle?

@SteffenGlueckselig

Hi,

this is on Windows Vista, 64bit, Oracle:
java version "1.7.0_07"
Java(TM) SE Runtime Environment (build 1.7.0_07-b10)
Java HotSpot(TM) 64-Bit Server VM (build 23.3-b01, mixed mode)

@hugoduncan
Owner

I don't have windows to test on. Perhaps you could gist the output of running lein rtiz-nrepl --log-level trace.

@Imasius

Hello, get the same exception with roughly the same setup. The log before the exception is the following:

launch-vm C:\Users\Simon\Java\clojure\ritz-test\test:C:\Users\Simon\Java\clojure\ritz-test\src:C:\Users\Simon\Java\clojure\ritz-test\dev-resources:C:\Users\Simon\Java\clojure\ritz-test\resources:C:\Users\Simon\Java\clojure\ritz-test\target\classes:C:\Users\Simon\.m2\repository\org\clojure\clojure\1.4.0\clojure-1.4.0.jar:C:\Users\Simon\.m2\repository\org\clojure\tools.macro\0.1.1\tools.macro-0.1.1.jar:C:\Users\Simon\.m2\repository\useful\useful\0.8.3-alpha8\useful-0.8.3-alpha8.jar:C:\Users\Simon\.m2\repository\classlojure\classlojure\0.6.6\classlojure-0.6.6.jar:C:\Users\Simon\.m2\repository\ritz\ritz-repl-utils\0.5.0\ritz-repl-utils-0.5.0.jar:C:\Users\Simon\.m2\repository\ritz\ritz-debugger\0.5.0\ritz-debugger-0.5.0.jar:C:\Users\Simon\.m2\repository\org\clojure\tools.nrepl\0.2.0-beta9\tools.nrepl-0.2.0-beta9.jar:C:\Users\Simon\.m2\repository\ritz\ritz-nrepl\0.5.0\ritz-nrepl-0.5.0.jar
@(clojure.core/promise)

jdi/launch -cp 'C:\Users\Simon\Java\clojure\ritz-test\test:C:\Users\Simon\Java\clojure\ritz-test\src:C:\Users\Simon\Java\clojure\ritz-test\dev-resources:C:\Users\Simon\Java\clojure\ritz-test\resources:C:\Users\Simon\Java\clojure\ritz-test\target\classes:C:\Users\Simon\.m2\repository\org\clojure\clojure\1.4.0\clojure-1.4.0.jar:C:\Users\Simon\.m2\repository\org\clojure\tools.macro\0.1.1\tools.macro-0.1.1.jar:C:\Users\Simon\.m2\repository\useful\useful\0.8.3-alpha8\useful-0.8.3-alpha8.jar:C:\Users\Simon\.m2\repository\classlojure\classlojure\0.6.6\classlojure-0.6.6.jar:C:\Users\Simon\.m2\repository\ritz\ritz-repl-utils\0.5.0\ritz-repl-utils-0.5.0.jar:C:\Users\Simon\.m2\repository\ritz\ritz-debugger\0.5.0\ritz-debugger-0.5.0.jar:C:\Users\Simon\.m2\repository\org\clojure\tools.nrepl\0.2.0-beta9\tools.nrepl-0.2.0-beta9.jar:C:\Users\Simon\.m2\repository\ritz\ritz-nrepl\0.5.0\ritz-nrepl-0.5.0.jar' clojure.main -e '(do (clojure.core/let thread__1497__auto__ (java.lang.Thread. (clojure.core/fn (throw (java.lang.Exception. (clojure.core/str (quote JDI-VM-Control-Thread)))))) (.setDaemon thread__1497__auto__ false) (.start thread__1497__auto__) nil) (clojure.core/deref (clojure.core/promise)))'
jdi/launch options
vm-stream-daemons
request-exception-for-acquire-thread
Added exception event request
Resumed vm
Acquiring thread...
jdi-vm/handle-acquire-event: event VMStartEvent in thread main
Ignoring event VMStartEvent in thread main
jdi-vm/handle-acquire-event: event VMDeathEvent
jdi-vm/handle-acquire-event: unexpected VM shutdown
Acquired thread null
vm-err: exit
vm-out: exit

@hugoduncan
Owner

I'm guessing that the -cp argument in the jdi/launch command logged above isn't in the correct format for windows. Should that be semicolon separated?

@Imasius

I forked the project and replaced the ":" separator with "File/pathSeparatorChar". Now i get the same exception, but there is another one in the log:

debug/launch-vm
launch-vm C:\Users\Simon\Java\clojure\ritz-test\test;C:\Users\Simon\Java\clojure\ritz-test\src;C:\Users\Simon\Java\clojure\ritz-test\dev-resources;C:\Users\Simon\Java\clojure\ritz-test\resources;C:\Users\Simon\Java\clojure\ritz-test\target\classes;C:\Users\Simon\.m2\repository\org\clojure\clojure\1.4.0\clojure-1.4.0.jar;C:\Users\Simon\.m2\repository\org\clojure\tools.macro\0.1.1\tools.macro-0.1.1.jar;C:\Users\Simon\.m2\repository\useful\useful\0.8.3-alpha8\useful-0.8.3-alpha8.jar;C:\Users\Simon\.m2\repository\classlojure\classlojure\0.6.6\classlojure-0.6.6.jar;C:\Users\Simon\.m2\repository\ritz\ritz-repl-utils\0.5.1-SNAPSHOT\ritz-repl-utils-0.5.1-SNAPSHOT.jar;C:\Users\Simon\.m2\repository\ritz\ritz-debugger\0.5.1-SNAPSHOT\ritz-debugger-0.5.1-SNAPSHOT.jar;C:\Users\Simon\.m2\repository\org\clojure\tools.nrepl\0.2.0-beta9\tools.nrepl-0.2.0-beta9.jar;C:\Users\Simon\.m2\repository\ritz\ritz-nrepl\0.5.1-SNAPSHOT\ritz-nrepl-0.5.1-SNAPSHOT.jar;C:\Program Files (x86)\Java\jdk1.7.0\lib\tools.jar;C:\Program Files (x86)\Java\jdk1.7.0\lib\sa-jdi.jar
@(clojure.core/promise)

jdi/launch -cp 'C:\Users\Simon\Java\clojure\ritz-test\test;C:\Users\Simon\Java\clojure\ritz-test\src;C:\Users\Simon\Java\clojure\ritz-test\dev-resources;C:\Users\Simon\Java\clojure\ritz-test\resources;C:\Users\Simon\Java\clojure\ritz-test\target\classes;C:\Users\Simon\.m2\repository\org\clojure\clojure\1.4.0\clojure-1.4.0.jar;C:\Users\Simon\.m2\repository\org\clojure\tools.macro\0.1.1\tools.macro-0.1.1.jar;C:\Users\Simon\.m2\repository\useful\useful\0.8.3-alpha8\useful-0.8.3-alpha8.jar;C:\Users\Simon\.m2\repository\classlojure\classlojure\0.6.6\classlojure-0.6.6.jar;C:\Users\Simon\.m2\repository\ritz\ritz-repl-utils\0.5.1-SNAPSHOT\ritz-repl-utils-0.5.1-SNAPSHOT.jar;C:\Users\Simon\.m2\repository\ritz\ritz-debugger\0.5.1-SNAPSHOT\ritz-debugger-0.5.1-SNAPSHOT.jar;C:\Users\Simon\.m2\repository\org\clojure\tools.nrepl\0.2.0-beta9\tools.nrepl-0.2.0-beta9.jar;C:\Users\Simon\.m2\repository\ritz\ritz-nrepl\0.5.1-SNAPSHOT\ritz-nrepl-0.5.1-SNAPSHOT.jar;C:\Program Files (x86)\Java\jdk1.7.0\lib\tools.jar;C:\Program Files (x86)\Java\jdk1.7.0\lib\sa-jdi.jar' clojure.main -e '(do (clojure.core/let thread__1550__auto__ (java.lang.Thread. (clojure.core/fn (throw (java.lang.Exception. "JDI-VM-Control-Thread")))) (.setDaemon thread__1550__auto__ false) (.start thread__1550__auto__) nil) (clojure.core/deref (clojure.core/promise)))'
jdi/launch options
vm-stream-daemons
request-exception-for-acquire-thread
Added exception event request
Resumed vm
Acquiring thread...
jdi-vm/handle-acquire-event: event VMStartEvent in thread main
Ignoring event VMStartEvent in thread main
jdi-vm/handle-acquire-event: event ExceptionEvent@clojure.main$main:430 in thread main
jdi-vm/handle-acquire-event: unexpected exception instance of clojure.lang.Compiler$CompilerException(id=1563) [["source" #] ["serialVersionUID" #] ["serialVersionUID" #] ["serialVersionUID" #] ["detailMessage" #] ["UNASSIGNED_STACK" #] ["cause" #] ["stackTrace" #] ["SUPPRESSED_SENTINEL" #] ["suppressedExceptions" #] ["NULL_CAUSE_MESSAGE" #] ["SELF_SUPPRESSION_MESSAGE" #] ["CAUSE_CAPTION" #] ["SUPPRESSED_CAPTION" #] ["EMPTY_THROWABLE_ARRAY" #] ["$assertionsDisabled" #]]
jdi-vm/handle-acquire-event: event VMDeathEvent
jdi-vm/handle-acquire-event: unexpected VM shutdown
Acquired thread null
vm-out: exit
vm-err: exit

As i'm fairly new to Clojure programming, these Stacktrace is rather cryptic for me and i wasn't able to debug any further.

@juergenhoetzel juergenhoetzel referenced this issue from a commit
@juergenhoetzel juergenhoetzel use a init file insteads of passing the clojure form as command line …
…parameter, refs #52

There seems to be an issue when using nested single/double quotes in
arguments passed to the LaunchingConnector (Windows platform only).
54a12ed
@juergenhoetzel juergenhoetzel referenced this issue from a commit
@juergenhoetzel juergenhoetzel use a init file insteads of passing the clojure form as command line …
…parameter, refs #52

There seems to be an issue when using nested single/double quotes in
arguments passed to the LaunchingConnector (Windows platform only).
11760cb
@juergenhoetzel juergenhoetzel referenced this issue
Closed

Fix #52 #57

@juergenhoetzel

There seems to be an issue when using nested single/double quotes in arguments passed to the LaunchingConnector (Windows platform only). This should be fixed by #57

@hugoduncan hugoduncan referenced this issue from a commit
@juergenhoetzel juergenhoetzel use a init file insteads of passing the clojure form as command line …
…parameter, refs #52

There seems to be an issue when using nested single/double quotes in
arguments passed to the LaunchingConnector (Windows platform only).
1d6f650
@hugoduncan hugoduncan closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.