jdee-emacs / jdee

The JDEE is an add-on software package that turns Emacs into a comprehensive system for creating, editing, debugging, and documenting Java applications.
GNU General Public License v2.0
424 stars 55 forks source link

jdee-complete on any JVMClass leads to "jdee-read-class: Not match for <JVMClass>" #30

Closed liar666 closed 8 years ago

liar666 commented 8 years ago

Like the title says, when I attempt a "jdee-complete" on any class from the JVM (List, Map, HashMap, etc.) I get the error: "jdee-read-class: Not match for ".

I've attempted to add "/usr/local/openjdk8/jre/lib/rt.jar" to jdee-global-classpath, but that does not solve the problem.

pwojnowski commented 8 years ago

I cannot reproduce it. This is too little information to do anything with it.

Could you create the simplest project (jdee conf + java class) that shows the issue?

liar666 commented 8 years ago

With the simplest configuration: setting only "jdee-server-dir" and a simple class: public class test { public static final void main(final String[] args) { HashMap<String,String> m = new HashMap(); m.p(); } } When I attempt "jdee-complete" on m.p, I get: Starting the BeanShell. Please wait... [45 times] Could not find type of m Attempt to import HashMap? (y or n) y Starting the BeanShell. Please wait... [6 times] Error: could not find HashMap. Starting the BeanShell. Please wait... [45 times] Could not find type of m Attempt to import HashMap? (y or n) y [<--- this loops for ever whatever I type (y/n). Stops only if I use C-g] Starting the BeanShell. Please wait... [6 times] Error: could not find HashMap. Starting the BeanShell. Please wait... [45 times]

liar666 commented 8 years ago

Same behaviour when I configure:

liar666 commented 8 years ago

I tried just running the beanshell with jdee-bsh-run and got an error.

Thus, I added the bsh.jar to my global-classpath.

I can now run the beanshell with jdee-bsh-run. And this solves https://github.com/jdee-emacs/jdee/issues/31 and https://github.com/jdee-emacs/jdee/issues/32

However, when I try jdee-complete, I still get: Starting the BeanShell. Please wait... Could not find type of m Attempt to import HashMap? (y or n) y Error: could not find HashMap.

This resolved the "Starting the BeanShell. Please wait... [repeated X time]" but did not solve the problem :(

liar666 commented 8 years ago

In fact, I was wrong in the initial statement of the issue:

pwojnowski commented 8 years ago

What is exactly your value of jdee-server-dir and content of directory it points to?

You should not add bsh.jar nor rt.jar to the classpath.

liar666 commented 8 years ago

$ grep -F 'jdee-server-dir' .emacs '(jdee-server-dir "/usr/home/user/.emacs.d/elpa/jdee-20151217.1405/jars/") $ ls /usr/home/user/.emacs.d/elpa/jdee-20151217.1405/jars/ jdee-1.0-SNAPSHOT.jar $

pwojnowski commented 8 years ago

When you build jdee-server then there are two jars in target/ directory:

You copied the first one, but it should have been the second one "jdee-bundle". It should solve the issues.

liar666 commented 8 years ago

Thanks. I didn't even notice there was several jars!

Unfortunately, now I get:

Unfortunately, now I get:

I have absolutely no idea why the code is trying to access my .wine directory! /home/gmuller/.wine/dosdevices/z:/compat/linux/proc/70889/root/compat/linux/proc/71377/root/compat/linux/proc/71377/root/compat/linux/proc/71377/root/compat/linux/proc/71377/root/compat/linux/proc/71377/root/compat/linux/proc/71377/root/compat/linux/proc/71377/root/compat/linux/proc/71377/root/compat/linux/proc/71377/root/compat/linux/proc/71377/root/compat/linux/proc/71377/root/compat/linux/proc/71377/root/compat/linux/proc/71377/root/compat/linux/proc/71377/root/compat/linux/proc/71377/root/compat/linux/proc/71377/root/compat/linux/proc/71377/root/compat/linux/proc/71377/root/compat/linux/proc/71377/root/compat/linux/proc/71377/root/compat/linux/proc/71377/root/compat/linux/proc/71377/root/compat/linux/proc/71377/root/compat/linux/proc/71377/root/compat/linux/proc/71377/root/compat/linux/proc/71377/root/compat/linux/proc/71377/root/compat/linux/proc/71377/root/compat/linux/proc/71377/root/compat/linux/proc/71476/root/compat/linux/proc/70513. Cannot read contents of /usr/home/gmuller/.wine/dosdevices/z:/compat/linux/proc/70889/root/compat/linux/proc/70889/root/compat/linux/proc/71512/root/compat/linux/proc/71512/root/compat/linux/proc/71512/root/compat/linux/proc/71512/root/compat/linux/proc/71512/root/compat/linux/proc/71512/root/compat/linux/proc/71512/root/compat/linux/proc/71512/root/compat/linux/proc/71512/root/compat/linux/proc/71512/root/compat/linux/proc/71512/root/compat/linux/proc/71512/root/compat/linux/proc/71512/root/compat/linux/proc/71512/root/compat/linux/proc/71512/root/compat/linux/proc/71512/root/compat/linux/proc/71512/root/compat/linux/proc/71512/root/compat/linux/proc/71512/root/compat/linux/proc/71512/root/compat/linux/proc/71512/root/compat/linux/proc/71512/root/compat/linux/proc/71512/root/compat/linux/proc/71512/root/compat/linux/proc/71512/root/compat/linux/proc/71512/root/compat/linux/proc/71512/root/compat/linux/proc/71512/root/compat/linux/proc/71512/root/compat/linux/proc/18. Cannot read contents of /usr/home/gmuller/.wine/dosdevices/z:/compat/linux/proc/70889/root/compat/linux/proc/70889/root/compat/linux/proc/70889/root/compat/linux/proc/71640/root/compat/linux/proc/71640/root/compat/linux/proc/71640/root/compat/linux/proc/71640/root/compat/linux/proc/71640/root/compat/linux/proc/71640/root/compat/linux/proc/71640/root/compat/linux/proc/71640/root/compat/linux/proc/71640/root/compat/linux/proc/71640/root/compat/linux/proc/71640/root/compat/linux/proc/71640/root/compat/linux/proc/71640/root/compat/linux/proc/71640/root/compat/linux/proc/71640/root/compat/linux/proc/71640/root/compat/linux/proc/71640/root/compat/linux/proc/71640/root/compat/linux/proc/71640/root/compat/linux/proc/71640/root/compat/linux/proc/71640/root/compat/linux/proc/71640/root/compat/linux/proc/71749/root. Cannot read contents of /usr/home/gmuller/.wine/dosdevices/z:/compat/linux/proc/70889/root/compat/linux/proc/70889/root/compat/linux/proc/70889/root/compat/linux/proc/70889/root/compat/linux/proc/70889/root/compat/linux/proc/70889/root/compat/linux/proc/72011/root/compat/linux/proc/72076. Cannot read contents of /usr/home/gmuller/.wine/dosdevices/z:/compat/linux/proc/70889/root/compat/linux/proc/70889/root/compat/linux/proc/70889/root/compat/linux/proc/70889/root/compat/linux/proc/70889/root/compat/linux/proc/70889/root/compat/linux/proc/70889/root/compat/linux/proc/72117/root/compat/linux/proc/72117/root/compat/linux/proc/72117/root/compat/linux/proc/72117/root/compat/linux/proc/72117/root/compat/linux/proc/72117/root/compat/linux/proc/72117/root/compat/linux/proc/72117/root/compat/linux/proc/72117/root/compat/linux/proc/72117/root/compat/linux/proc/72117/root/compat/linux/proc/72164/root. Cannot read contents of /usr/home/gmuller/.wine/dosdevices/z:/compat/linux/proc/70889/root/compat/linux/proc/70889/root/compat/linux/proc/70889/root/compat/linux/proc/70889/root/compat/linux/proc/70889/root/compat/linux/proc/70889/root/compat/linux/proc/70889/root/compat/linux/proc/70889/root/compat/linux/proc/72224/root/compat/linux/proc/72224/root/compat/linux/proc/72224/root/compat/linux/proc/72224/root/compat/linux/proc/72224/root/compat/linux/proc/72224/root/compat/linux/proc/72224/root/compat/linux/proc/72224/root/compat/linux/proc/72224/root/compat/linux/proc/72224/root/compat/linux/proc/72224/root/compat/linux/proc/72224/root/compat/linux/proc/72224/root/compat/linux/proc/72224/root/compat/linux/proc/72224/root/compat/linux/proc/72224/root/compat/linux/proc/72224/root/compat/linux/proc/72224/root/compat/linux/proc/72224/root/compat/linux/proc/72224/root/compat/linux/proc/72224/root/compat/linux/proc/72334/root/compat/linux/mnt. Cannot read contents of /usr/home/gmuller/.wine/dosdevices/z:/compat/linux/proc/70889/root/compat/linux/proc/70889/root/compat/linux/proc/70889/root/compat/linux/proc/70889/root/compat/linux/proc/70889/root/compat/linux/proc/70889/root/compat/linux/proc/70889/root/compat/linux/proc/70889/root/compat/linux/proc/70889/root/compat/linux/proc/72350/root/compat/linux/proc/72350/root/compat/linux/proc/72350/root/compat/linux/proc/72350/root/compat/linux/proc/72350/root/compat/linux/proc/72350/root/compat/linux/proc/72350/root/compat/linux/proc/72350/root/compat/linux/proc/72350/root/compat/linux/proc/72350/root/compat/linux/proc/72350/root/compat/linux/proc/72350/root/compat/linux/proc/72350/root/compat/linux/proc/72350/root/compat/linux/proc/72350/root/compat/linux/proc/72350/root/compat/linux/proc/72350/root/compat/linux/proc/72459/root/compat/linux/proc/72459/root/sbin. . Error from evaluating result as Lisp: void-variable Cannot byte-code: Error evaluating Java expresson. See Messages buffer. byte-code: Beginning of buffer [3 times] byte-code: Beginning of buffer

I have absolutely no idea why the code is trying to access my .wine directory!

pwojnowski commented 8 years ago

This is very strange. Can you post your JDEE configuration (prj.el file and/or customized vars) and your Emacs version?

liar666 commented 8 years ago

Oooops... Sorry I don't remember what I did, but it is working now (I think I didn't realize both the jars - incl. the bundle one - should be used)... I forgot to close the ticket :( Sorry