Closed NobodyXu closed 3 years ago
I also created a issue in Shougo/deoplete.nvim #1133
Please, can you pack minimal gradle powered project for me, so I can start debug straight away.
Well, it's actually very easy to create a simple project using gradle.
First, make sure that you are using gradle 6.6.1, that is the gradle that causes the bug for me.
Then run gradle init
, select '2'(application), '3' (Java), '1' (Groovy), 1 (JUnit 4) and give it any project name.
If everything goes well, you then already has a minimal gradle powered project.
I have a project created via gradle init
, and under src/main/java/project_name/submodule
, there's a submodule.
When I imported a class from the parent module, I sometimes experience unknown error from vim-javacomplete2
when it is auto completeing my input.
can you try this branch: hotfix/issue-443, and paste here shown errors?
Sure
On Mon, 12 Oct 2020 at 16:05, Artur Shaik notifications@github.com wrote:
can you try this branch: https://github.com/artur-shaik/vim-javacomplete2/tree/hotfix/issue-443, and paste here shown errors?
— You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/artur-shaik/vim-javacomplete2/issues/443#issuecomment-706862537, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHIGZK522KI5I4NKTBPZL7DSKKFDHANCNFSM4SJXXYXA .
I will give you feedback once I get any error.
I just got the error again when I am typing, and mistakenly press space to continue typing xD
This time I get part of it:
[deoplete] Traceback (most recent call last):
File "/home/nobodyxu/.local/share/nvim/plugged/deoplete.nvim/rplugin/python3/deoplete/child.py", line 194, in _gather_
result = self._get_result(context, source)
File "/home/nobodyxu/.local/share/nvim/plugged/deoplete.nvim/rplugin/python3/deoplete/child.py", line 254, in _get_res
ctx['candidates'] = source.gather_candidates(ctx)
File "/home/nobodyxu/.local/share/nvim/plugged/vim-javacomplete2/rplugin/python3/deoplete/sources/javacomplete2.py", l
raise er
File "/home/nobodyxu/.local/share/nvim/plugged/vim-javacomplete2/rplugin/python3/deoplete/sources/javacomplete2.py", l
return self.vim.call('javacomplete#complete#complete#Complete',
File "/usr/lib/python3/dist-packages/pynvim/api/nvim.py", line 299, in call
return self.request('nvim_call_function', name, args, **kwargs)
File "/usr/lib/python3/dist-packages/pynvim/api/nvim.py", line 182, in request
res = self._session.request(name, *args, **kwargs)
File "/usr/lib/python3/dist-packages/pynvim/msgpack_rpc/session.py", line 104, in request
raise self.error_wrapper(err)
pynvim.api.common.NvimError: Vim(echoerr):javacomplete error: {}
Error from javacomplete2: Vim(echoerr):javacomplete error: {}. Use :messages / see above for error details.
@NobodyXu hm, actually, there is nothing usefull, I thought it should print much more information on error. I've merged that branch to master, so you can switch to latest version.
Thx.
If the errors occur again, I will try to get a more complete log next time.
Or is there any nvim/deoplete function that can show log that I wasn't aware of?
[deoplete] Traceback (most recent call last):
File "/home/nobodyxu/.local/share/nvim/plugged/deoplete.nvim/rplugin/python3/deoplete/child.py", line 194, in _gather_results
result = self._get_result(context, source)
File "/home/nobodyxu/.local/share/nvim/plugged/deoplete.nvim/rplugin/python3/deoplete/child.py", line 254, in _get_result
ctx['candidates'] = source.gather_candidates(ctx)
File "/home/nobodyxu/.local/share/nvim/plugged/vim-javacomplete2/rplugin/python3/deoplete/sources/javacomplete2.py", line 27, in gather_candidates
raise er
File "/home/nobodyxu/.local/share/nvim/plugged/vim-javacomplete2/rplugin/python3/deoplete/sources/javacomplete2.py", line 23, in gather_candidates
return self.vim.call('javacomplete#complete#complete#Complete',
File "/usr/lib/python3/dist-packages/pynvim/api/nvim.py", line 299, in call
return self.request('nvim_call_function', name, args, **kwargs)
File "/usr/lib/python3/dist-packages/pynvim/api/nvim.py", line 182, in request
res = self._session.request(name, *args, **kwargs)
File "/usr/lib/python3/dist-packages/pynvim/msgpack_rpc/session.py", line 104, in request
raise self.error_wrapper(err)
pynvim.api.common.NvimError: Vim(echoerr):javacomplete error: {}
Error from javacomplete2: Vim(echoerr):javacomplete error: {}. Use :messages / see above for error details.
Output from :message
immediately follows the error:
error: class MenuTest is public, should be declared in a file named MenuTest.java
error: class MenuTest is public, should be declared in a file named MenuTest.java
error: class MenuTest is public, should be declared in a file named MenuTest.java
error: class MenuTest is public, should be declared in a file named MenuTest.java
error: class MenuTest is public, should be declared in a file named MenuTest.java
error: class MenuTest is public, should be declared in a file named MenuTest.java
error: class oTest is public, should be declared in a file named oTest.java
error: class oTest is public, should be declared in a file named oTest.java
"OptionalTest.java" 5L, 63C written
"OptionalTest.java" 8L, 122C written
error: cannot find symbol: Test
error: ';' expected
error: ';' expected
error: ';' expected
error: ';' expected
error: ';' expected
error: ';' expected
[deoplete] Traceback (most recent call last):
File "/home/nobodyxu/.local/share/nvim/plugged/deoplete.nvim/rplugin/python3/deoplete/child.py", line 194, in _gather_results
result = self._get_result(context, source)
File "/home/nobodyxu/.local/share/nvim/plugged/deoplete.nvim/rplugin/python3/deoplete/child.py", line 254, in _get_result
ctx['candidates'] = source.gather_candidates(ctx)
File "/home/nobodyxu/.local/share/nvim/plugged/vim-javacomplete2/rplugin/python3/deoplete/sources/javacomplete2.py", line 27, in gather_candidates
raise er
File "/home/nobodyxu/.local/share/nvim/plugged/vim-javacomplete2/rplugin/python3/deoplete/sources/javacomplete2.py", line 23, in gather_candidates
return self.vim.call('javacomplete#complete#complete#Complete',
File "/usr/lib/python3/dist-packages/pynvim/api/nvim.py", line 299, in call
return self.request('nvim_call_function', name, args, **kwargs)
File "/usr/lib/python3/dist-packages/pynvim/api/nvim.py", line 182, in request
res = self._session.request(name, *args, **kwargs)
File "/usr/lib/python3/dist-packages/pynvim/msgpack_rpc/session.py", line 104, in request
raise self.error_wrapper(err)
pynvim.api.common.NvimError: Vim(echoerr):javacomplete error: {}
Error from javacomplete2: Vim(echoerr):javacomplete error: {}. Use :messages / see above for error details.
[deoplete] Traceback (most recent call last):
File "/home/nobodyxu/.local/share/nvim/plugged/deoplete.nvim/rplugin/python3/deoplete/child.py", line 194, in _gather_results
result = self._get_result(context, source)
File "/home/nobodyxu/.local/share/nvim/plugged/deoplete.nvim/rplugin/python3/deoplete/child.py", line 254, in _get_result
ctx['candidates'] = source.gather_candidates(ctx)
File "/home/nobodyxu/.local/share/nvim/plugged/vim-javacomplete2/rplugin/python3/deoplete/sources/javacomplete2.py", line 27, in gather_candidates
raise er
File "/home/nobodyxu/.local/share/nvim/plugged/vim-javacomplete2/rplugin/python3/deoplete/sources/javacomplete2.py", line 23, in gather_candidates
return self.vim.call('javacomplete#complete#complete#Complete',
File "/usr/lib/python3/dist-packages/pynvim/api/nvim.py", line 299, in call
return self.request('nvim_call_function', name, args, **kwargs)
File "/usr/lib/python3/dist-packages/pynvim/api/nvim.py", line 182, in request
res = self._session.request(name, *args, **kwargs)
File "/usr/lib/python3/dist-packages/pynvim/msgpack_rpc/session.py", line 104, in request
raise self.error_wrapper(err)
pynvim.api.common.NvimError: Vim(echoerr):javacomplete error: {}
Error from javacomplete2: Vim(echoerr):javacomplete error: {}. Use :messages / see above for error details.
error: <identifier> expected
error: <identifier> expected
I've already switched the latest commit in master.
Just got the error again:
search hit BOTTOM, continuing at TOP
/jtermios [1/6] W
/jtermios [2/6]
/jtermios [3/6]
/jtermios [4/6]
/jtermios [5/6]
/jtermios [6/6]
[deoplete] Traceback (most recent call last):
File "/home/nobodyxu/.local/share/nvim/plugged/deoplete.nvim/rplugin/python3/deoplete/child.py", line 194, in _gather_results
result = self._get_result(context, source)
File "/home/nobodyxu/.local/share/nvim/plugged/deoplete.nvim/rplugin/python3/deoplete/child.py", line 254, in _get_result
ctx['candidates'] = source.gather_candidates(ctx)
File "/home/nobodyxu/.local/share/nvim/plugged/vim-javacomplete2/rplugin/python3/deoplete/sources/javacomplete2.py", line 27, in gather_candidates
raise er
File "/home/nobodyxu/.local/share/nvim/plugged/vim-javacomplete2/rplugin/python3/deoplete/sources/javacomplete2.py", line 23, in gather_candidates
return self.vim.call('javacomplete#complete#complete#Complete',
File "/usr/lib/python3/dist-packages/pynvim/api/nvim.py", line 299, in call
return self.request('nvim_call_function', name, args, **kwargs)
File "/usr/lib/python3/dist-packages/pynvim/api/nvim.py", line 182, in request
res = self._session.request(name, *args, **kwargs)
File "/usr/lib/python3/dist-packages/pynvim/msgpack_rpc/session.py", line 104, in request
raise self.error_wrapper(err)
pynvim.api.common.NvimError: Vim(echoerr):javacomplete error: {}
Error from javacomplete2: Vim(echoerr):javacomplete error: {}. Use :messages / see above for error details.
message: packages still empty, try later. indexing...
message: packages still empty, try later. indexing...
[deoplete] Traceback (most recent call last):
File "/home/nobodyxu/.local/share/nvim/plugged/deoplete.nvim/rplugin/python3/deoplete/child.py", line 194, in _gather_results
result = self._get_result(context, source)
File "/home/nobodyxu/.local/share/nvim/plugged/deoplete.nvim/rplugin/python3/deoplete/child.py", line 254, in _get_result
ctx['candidates'] = source.gather_candidates(ctx)
File "/home/nobodyxu/.local/share/nvim/plugged/vim-javacomplete2/rplugin/python3/deoplete/sources/javacomplete2.py", line 27, in gather_candidates
raise er
File "/home/nobodyxu/.local/share/nvim/plugged/vim-javacomplete2/rplugin/python3/deoplete/sources/javacomplete2.py", line 23, in gather_candidates
return self.vim.call('javacomplete#complete#complete#Complete',
File "/usr/lib/python3/dist-packages/pynvim/api/nvim.py", line 299, in call
return self.request('nvim_call_function', name, args, **kwargs)
File "/usr/lib/python3/dist-packages/pynvim/api/nvim.py", line 182, in request
res = self._session.request(name, *args, **kwargs)
File "/usr/lib/python3/dist-packages/pynvim/msgpack_rpc/session.py", line 104, in request
raise self.error_wrapper(err)
pynvim.api.common.NvimError: Vim(echoerr):javacomplete error: []
Error from javacomplete2: Vim(echoerr):javacomplete error: []. Use :messages / see above for error details.
[deoplete] Too many errors from "javacomplete2". This source is disabled until Neovim is restarted.
message: packages still empty, try later. indexing...
[deoplete] Too many errors from "javacomplete2". This source is disabled until Neovim is restarted.
"Termios.java" 91L, 2703C written
It happened again when I was writing javafx
code.
[deoplete] Traceback (most recent call last):
File "/home/nobodyxu/.local/share/nvim/plugged/deoplete.nvim/rplugin/python3/deoplete/child.py", line 194, in _gather_results
result = self._get_result(context, source)
File "/home/nobodyxu/.local/share/nvim/plugged/deoplete.nvim/rplugin/python3/deoplete/child.py", line 254, in _get_result
ctx['candidates'] = source.gather_candidates(ctx)
File "/home/nobodyxu/.local/share/nvim/plugged/vim-javacomplete2/rplugin/python3/deoplete/sources/javacomplete2.py", line 27, in gather_candidates
raise er
File "/home/nobodyxu/.local/share/nvim/plugged/vim-javacomplete2/rplugin/python3/deoplete/sources/javacomplete2.py", line 23, in gather_candidates
return self.vim.call('javacomplete#complete#complete#Complete',
File "/usr/lib/python3/dist-packages/pynvim/api/nvim.py", line 299, in call
return self.request('nvim_call_function', name, args, **kwargs)
File "/usr/lib/python3/dist-packages/pynvim/api/nvim.py", line 182, in request
res = self._session.request(name, *args, **kwargs)
File "/usr/lib/python3/dist-packages/pynvim/msgpack_rpc/session.py", line 104, in request
raise self.error_wrapper(err)
pynvim.api.common.NvimError: Vim(echoerr):javacomplete error: []
Error from javacomplete2: Vim(echoerr):javacomplete error: []. Use :messages / see above for error details.
Press ENTER or type command to continue
Ok, lets try one more time on this branch: hotfix/issue-443
OK
After I got on that branch, I found out that all dependencies I specified in build.gradle
cannot be found by vim-javacomplete2.
All my import
s to these modules gives me error.
I tried to reinstall the plugin from the bran hotfix, but only got more error:
Error detected while processing function <SNR>59_JobNeoVimResponseHandler[3]..javacomplete#server#CompilationJobHandler:
line 10:
Note: /home/nobodyxu/.local/share/nvim/plugged/vim-javacomplete2/libs/javavi/src/main/java/kg/ash/javavi/readers/Reflection.java uses unchecked or unsafe operations.
:e P
Note: Recompile with -Xlint:unchecked for details.
Switching back to master gives me the same error:
Error detected while processing function <SNR>59_JobNeoVimResponseHandler[3]..javacomplete#server#CompilationJobHandler:
line 10:
Note: /home/nobodyxu/.local/share/nvim/plugged/vim-javacomplete2/libs/javavi/src/main/java/kg/ash/javavi/readers/Reflection.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details.
Press ENTER or type command to continue
Error detected while processing function <SNR>59_JobNeoVimResponseHandler[3]..javacomplete#server#CompilationJobHandler:
line 10:
Press ENTER or type command to continue
Javavi compilation finished
Press ENTER or type command to continue
And import
still doesn't work in gradle project.
I just verified that the "unable to import
" part isn't caused by this package.
It's more likely there is something wrong with the specific git branch I was working on.
Sorry for the false alarm.
BTW, I also received strange error message when I tried to save my file:
"Sqlite3Test.java" 215L, 7830C written
could not open socket, try again
could not open socket, try again
could not open socket, try again
Not sure whether this is caused by vim-javacomplete2.
Just confirmed this is a vim-javacomplete2 problem.
After I removed it, nothing goes wrong.
Can you try to clear jc2 cache by doing: rm ~/.cache/javacomplete2/
?
I tried, but still got the could not open socket, try again
error when saving the file.
Full error:
"App.java" 207L, 7931C written
could not open socket, try again
could not open socket, try again
could not open socket, try again
Error detected while processing function <SNR>59_JobNeoVimResponseHandler[3]..javacomplete#server#CompilationJobHandler:
line 10:
Note: /home/nobodyxu/.local/share/nvim/plugged/vim-javacomplete2/libs/javavi/src/main/java/kg/ash/javavi/readers/Reflection.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details.
Error detected while processing function <SNR>59_JobNeoVimResponseHandler[3]..javacomplete#server#CompilationJobHandler:
line 10:
Pull last commit, please.
OK, I will have a try
I got some errors once again:
"FloorTileFactoryTest.java" 56L, 2007C written
error: generic array creation
error: generic array creation
error: generic array creation
error: generic array creation
error: generic array creation
[deoplete] Traceback (most recent call last):
File "/home/nobodyxu/.local/share/nvim/plugged/deoplete.nvim/rplugin/python3/deoplete/child.py", line 194, in _gather_results
result = self._get_result(context, source)
File "/home/nobodyxu/.local/share/nvim/plugged/deoplete.nvim/rplugin/python3/deoplete/child.py", line 254, in _get_result
ctx['candidates'] = source.gather_candidates(ctx)
File "/home/nobodyxu/.local/share/nvim/plugged/vim-javacomplete2/rplugin/python3/deoplete/sources/javacomplete2.py", line 27, in gather_candidates
raise er
File "/home/nobodyxu/.local/share/nvim/plugged/vim-javacomplete2/rplugin/python3/deoplete/sources/javacomplete2.py", line 23, in gather_candidates
return self.vim.call('javacomplete#complete#complete#Complete',
File "/usr/lib/python3/dist-packages/pynvim/api/nvim.py", line 299, in call
return self.request('nvim_call_function', name, args, **kwargs)
File "/usr/lib/python3/dist-packages/pynvim/api/nvim.py", line 182, in request
res = self._session.request(name, *args, **kwargs)
File "/usr/lib/python3/dist-packages/pynvim/msgpack_rpc/session.py", line 104, in request
raise self.error_wrapper(err)
pynvim.api.common.NvimError: Vim(let):E117: Unknown function: TypeArguments
Error from javacomplete2: Vim(let):E117: Unknown function: TypeArguments. Use :messages / see above for error details.
error: illegal start of type
"FloorTileFactoryTest.java" 56L, 1996C written
error: illegal start of type
error: illegal start of type
error: ';' expected
error: ';' expected
Seems like a different kind of error.
Yeah, you are right, something new, after what action it happened?
It happened when I was changing the following code:
import javafx.util.Pair;
for (Pair<Path, String> pair: new Pair<Path, String>[](
Path.A, "A",
Path.B, "B",
Path.C, "C",
Path.D, "D",
Path.E, "E",
Path.F, "F"})
{
To:
import javafx.util.Pair;
import java.util.Arrays;
for (Pair<Path, String> pair: Arrays.asList(
new Pair<Path, String>(Path.A, "A"),
new Pair<Path, String>(Path.B, "B"),
new Pair<Path, String>(Path.C, "C"),
new Pair<Path, String>(Path.D, "D"),
new Pair<Path, String>(Path.E, "E"),
new Pair<Path, String>(Path.F, "F")))
{
I recalled that I have already added new Pair<Path, String>(
when it happened.
NOTE that Path
is an enum.
Pushed some changes, looks like the bug.
Since last update, I haven't yet experienced one error.
Ok, let's merge it, and if any will thrown again, please reopen this issue. And thanks for participation.
Warning: I will close the issue without the minimal init.vim and the reproduction instructions.
Problems summary
After I installed artur-shaik/vim-javacomplete2,
nvim
often stops me in the middle of editing file due to an exception in python.Expected
No exception should happen.
Environment Information
git commit
7c781f4a887719e1785b3f0c4d8087d99d201e06
:version
output::checkhealth
or:CheckHealth
result(neovim only):Provide a minimal init.vim/vimrc with less than 50 lines (Required!)
How to reproduce the problem from neovim/Vim startup (Required!)
Use
nvim
to edit java managed bygradle
, withbuild.gradle
like this:Output of
nvim
(when I was typing)