Not sure what is wrong, but probably something related to the attach mechanism,. Perhaps you are starting JMC using a JRE instead of a JDK, or your user doesn't have read/write access to the temp directory.
As a workaround, you can use Java Discovery Protocol (JDP) to make the JVM visible to JMC. Start your application with the following system properties (ignoring security)
$ java -Dcom.sun.management.jmxremote.port=7091
-Dcom.sun.management.jmxremote.rmi.port=7091
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.autodiscovery=true ...
Besides starting the management server, it will start a JDP server that will broadcast connection details that JMC will pick up in 5-10 seconds.