Reputation: 3166
My eclipse with pydev has been working quite well without any problems for past 1-2 years until now. I don't know what caused it, but possibly it could be due to java upgrade I did (however, this is happening first time).
Problem: My eclipse pydev autocomplete hangs and doesn't work.
Logs:
java.lang.RuntimeException: The python client still hasn't connected back to the eclipse java vm (will retry...)
at org.python.pydev.core.log.Log.log(Log.java:54)
at org.python.pydev.editor.codecompletion.shell.AbstractShell.startIt(AbstractShell.java:334)
at org.python.pydev.editor.codecompletion.shell.ShellsContainer.getServerShell(ShellsContainer.java:232)
at org.python.pydev.editor.codecompletion.shell.ShellsContainer.getServerShell(ShellsContainer.java:165)
at org.python.pydev.editor.codecompletion.shell.AbstractShell.getServerShell(AbstractShell.java:222)
at org.python.pydev.editor.codecompletion.revisited.modules.CompiledModule.createInnerFromServer(CompiledModule.java:330)
at org.python.pydev.editor.codecompletion.revisited.modules.CompiledModule.getGlobalTokens(CompiledModule.java:531)
at org.python.pydev.editor.codecompletion.revisited.AbstractASTManager.internalGenerateGetCompletionsForModule(AbstractASTManager.java:715)
at org.python.pydev.editor.codecompletion.revisited.AbstractASTManager.getCompletionsForModule(AbstractASTManager.java:541)
at org.python.pydev.editor.codecompletion.revisited.AbstractASTManager.getCompletionsForModule(AbstractASTManager.java:510)
at org.python.pydev.editor.codecompletion.revisited.AbstractASTManager.getCompletionsForModule(AbstractASTManager.java:502)
at org.python.pydev.editor.codecompletion.revisited.AbstractASTManager.getCompletionsForModule(AbstractASTManager.java:493)
at org.python.pydev.editor.codecompletion.revisited.AbstractASTManager.internalGenerateGetCompletionsForModule(AbstractASTManager.java:723)
at org.python.pydev.editor.codecompletion.revisited.AbstractASTManager.getCompletionsForModule(AbstractASTManager.java:541)
at org.python.pydev.editor.codecompletion.revisited.AbstractASTManager.getCompletionsForModule(AbstractASTManager.java:510)
at org.python.pydev.editor.codecompletion.revisited.AbstractASTManager.getCompletionsForModule(AbstractASTManager.java:502)
at org.python.pydev.editor.codecompletion.revisited.modules.SourceModule.findGlobalTokDef(SourceModule.java:974)
at org.python.pydev.editor.codecompletion.revisited.modules.SourceModule.findDefinitionsFromModAndTok(SourceModule.java:923)
at org.python.pydev.editor.codecompletion.revisited.modules.SourceModule.findDefinition(SourceModule.java:905)
at org.python.pydev.editor.codecompletion.revisited.modules.SourceModule.findDefinition(SourceModule.java:664)
at org.python.pydev.editor.codecompletion.revisited.modules.SourceModule.findDefinition(SourceModule.java:1)
at org.python.pydev.editor.refactoring.PyRefactoringFindDefinition.findActualDefinition(PyRefactoringFindDefinition.java:177)
at org.python.pydev.editor.refactoring.PyRefactoringFindDefinition.findActualDefinition(PyRefactoringFindDefinition.java:79)
at com.python.pydev.refactoring.refactorer.RefactorerFindDefinition.findDefinition(RefactorerFindDefinition.java:61)
at com.python.pydev.refactoring.refactorer.Refactorer.findDefinition(Refactorer.java:114)
at com.python.pydev.refactoring.wizards.rename.PyRenameEntryPoint.checkInitialConditions(PyRenameEntryPoint.java:232)
at com.python.pydev.refactoring.markoccurrences.MarkOccurrencesJob.createRequest(MarkOccurrencesJob.java:102)
at org.python.pydev.shared_ui.mark_occurrences.BaseMarkOccurrencesJob.run(BaseMarkOccurrencesJob.java:168)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
Setup:
eclipse.buildId=4.3.2.M20140221-1700
java.version=1.7.0_10
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments: -product org.eclipse.epp.package.standard.product
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.standard.product
Eclipse Standard Kepler Service Release 2
pydev 3.5.0.201xxx
Windows 7
eclipse.ini file:
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20140116-2212
-product
org.eclipse.epp.package.standard.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms40m
-Xmx512m
-Djava.net.preferIPv4Stack=true
My Java setup:
> java -version
java version "1.7.0_55"
Java(TM) SE Runtime Environment (build 1.7.0_55-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.55-b03, mixed mode)
Java is installed at: C:\Program Files\Java (has jdk1.7.0_55 and jre7 folders)
I have tried the following things:
I believe its because, the java isn't starting (I can't find any process named java from the taskmgr)
Please help
Upvotes: 2
Views: 2550
Reputation: 349
In my case, I had accidentally edited an error into one of the core python modules (os), which broke the import of a lot of other modules, which lead to this same problem. Simply uninstalling and re-installing python fixed the problem.
Upvotes: 0
Reputation: 3166
So, after spending lot of time debugging this issue, I was able to fix my own problem.
I took the following steps to fix my problem:
Added the following line right before -vmargs in eclipse.ini (this allowed the java.exe to start all the time)
-vm
C:\Program Files\Java\jdk1.7.0_55\bin\java.exe
Added the following line at the end of the host file C:\windows\system32\drivers\etc\hosts file (this allowed \eclipse\plugins\org.python.pydev_3.5.0.201405201709\pysrc\pycompletionserver.py to connect to the java eclipse vm. NOTE: Alternatively, you can edit \eclipse\plugins\org.python.pydev_3.5.0.201405201709\pysrc\pydev_localhost.py file and replace 'localhost' with '127.0.0.1')
127.0.0.1 localhost
NOTE: I had my firewall disabled all throughout the session.
Upvotes: 1