Eclipse cannot debug. Please help I tried everything - eclipse

Whenever I try to open the debug perspective, I get this message and the problem is that it disappears immediately before I can even check deny or allow. I can run the program, but I cannot debug.
I run OS X 10.8.5
Things I tried, but all failed
I have tried to uninstall and install Eclipse, but that did nothing.
I tried adding Eclipse to my firewall exceptions and checked "allow incoming connection" in Security and Privacy, but that did nothing.
I have tried following the instructions mentioned here.
But no help at all.

One "security" tempering I didn't saw in the link you reference in your question is:
removing Eclipse from the firewall list of apps
removing Eclipse from the plist files.
A plist is a special kind of text file that contains properties the application and other resources, typically the OS, use to retain and reuse information needed to run the application.
plist is a file type and has many uses, typically storing user preferences, but, essentially, it is an XML file. You can look to see if there are any caches, which are typically plist files, for the applications in question in /Library/Caches and /System/Library/Caches.

Checking on that particular error message, it seems to be caused by issues with the firewall configuration. I am not sure if it will help, but I would verify that the program is allowed to access your network. Check in System Preferences > Security & Privacy > Firewall > Firewall Options. You should be able to allow your app to access the network from there. Hope this helps!

Related

cannot load runtime-gdb.py

I'm trying to debug a program written using Go inside eclipse. I can set and hit breakpoints pretty consistently, but I cannot view the contents of my variables. When I start debugging the program, I always get the following error on my console.
warning: File "/usr/local/go/src/pkg/runtime/runtime-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
To enable execution of this file add
add-auto-load-safe-path /usr/local/go/src/pkg/runtime/runtime-gdb.py
line to your configuration file "/home/johnlawrie/.gdbinit".
To completely disable this security protection add
set auto-load safe-path /
line to your configuration file "/home/johnlawrie/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual. E.g., run from the shell:
info "(gdb)Auto-loading safe path"
Thinking that the problem might be due to the error message, I put the entry into my .gdbinit file as instructed. However, I get the same message every time I run as if I did nothing at all. This is the contents of my /home/johnlawrie/.gdbinit file
add-auto-load-safe-path /usr/local/go/src/pkg/runtime/runtime-gdb.py
Any ideas what I need to do to make this change take effect? I have tried logged off and back in.
Thanks,
John Lawrie
It did learn what was happening. When gdb is started from Eclipse/CDT, it is started with option -nx, which means it doesn't load .gdbinit in the home directory.
I was able to get this to work by creating a .gdbinit file as a peer to the src, bin, and pkg directories in my workspace and adding the following line to it
set auto-load safe-path /usr/local/go/
It should be add-auto-load-safe-path /usr/local/go/src/pkg/, not the path to the script.
Also keep in mind that gdb doesn't really work with Go, specially v1.3.
From http://golang.org/doc/gdb:
GDB does not understand Go programs well. The stack management,
threading, and runtime contain aspects that differ enough from the
execution model GDB expects that they can confuse the debugger, even
when the program is compiled with gccgo. As a consequence, although
GDB can be useful in some situations, it is not a reliable debugger
for Go programs, particularly heavily concurrent ones. Moreover, it is
not a priority for the Go project to address these issues, which are
difficult. In short, the instructions below should be taken only as a
guide to how to use GDB when it works, not as a guarantee of success.

Could not find or load main class in both Tomcat and Workspace

I have been tasked with adding some new features in a project I worked on a while back. It's been given some new features since I last worked on it, and the development environment has changed. I'm having a lot of troubles bringing my environment up to date with all the dependencies and external folders.
After solving a host of problems, when running the Tomcat 7 Server in Eclipse I was coming across a message:
Error: Could not find or load main class Path\To\Workspace\.metadata\plugins\cont
I tried deleted the Tomcat Server and then recreating it with the same settings, as well as deleting my .metadata folder from the workspace. Now I can't even get Tomcat to configure right:
Error: Could not find or load main class Files\ApacheSoftwareFoundation\apache-tomcat-7.0.26.
Why isn't this working? It worked before I added a couple of needed subdirectories but I'm stumped now.
Just was searching for the same problem in Eclipse("Could not find or load main class").
It turned out in my case that there was an extra space in launch configuration arguments tab. (In Java EE perspective go to Servers, click on Tomcat server, in Overview window select 'Open launch configuration' and then go to Arguments tab). Arguments are listed as
-Dx.y.z=1 -Da.b.c=2 ...
and so on, but as the dialog itself is small and arguments go across multiple lines it's not always clear where there is a space and where there is a new line. In my case it was
-Dx.y.z =1 -Da.b.c=2 ...
(there is a space before =1) which confused Tomcat and I got "Could not find or load main class" error.
It's not necessarily your case but somebody else can come across this and find it to be the answer.
In the .metadata folder eclipse saves it's internal configuration, so you should not affect it manually. The errors give you the clue to get that resource it's looking is not accessible what ever it exists or not. Try to find it manually to check if it exists, then try to make it accessible, fix the path, change permissions, etc. May be you have classpath issue, who knows.
In Eclipse I added a Tomcat Server and it was working fine. I stopped the server to alter the settings. Specifically, I checked the 'Enable security' box. When I tried to start, I got this error. So I unchecked the box and tried to restart the server - same error. This thread led me to check the launch configuration VM arguments. Sure enough, Eclipse had not handled the checkbox (and unchecking it) correctly. The VM arguments had two places where it repeated strings without quotes. Check there to see if it has been malformed.

Unable to read repository at http://download.eclipse.org/releases/indigo

I was trying to add the PDT,
Indigo - http://download.eclipse.org/releases/indigo
Unable to read repository at http://download.eclipse.org/releases/indigo.
Unable to read repository at http://download.eclipse.org/releases/indigo.
http://download.eclipse.org/releases/indigo is not a valid repository location.
So what's the correct url ? I went and looked lots of places. Can someone point me to the exact link ?
Edit :
Problem once you go to http://download.eclipse.org/releases/indigo , you will see the below error. So I guess its moved somewhere.
This software repository URL, http://download.eclipse.org/releases/indigo/ , provides access to the software repository for the Eclipse indigo release. Until its released in June 2011, it will contain milestone builds.
The repository site URL is typically pre-populated in the list of software repositories when you install the Eclipse Platform or SDK.
For more information about installing or updating software, see the Eclipse Platform Help.
There is also a collection of handy, downloadable all-in-one zip files available for many interests and platforms. Many people find these all-in-one packages the easiest way to get started.
Can you connect to internet at all through Eclipse?
Open the internal webbrowser. In Eclipse: Window -> show view -> Other -> General: Internal web browser.
Look up any normal adress, is it working?
Can you connect to another update site? Try for example Eclipse Emma:
http://update.eclemma.org/
Do you see anything there?
What are your proxy preferences? Go to Window -> preferences -> General: Network connections.
The active provider:
Specifies the settings profile to be used when opening connections. Choosing the Direct provider causes all the connections to be opened without the use of a proxy server. Selecting Manual causes settings defined in Eclipse to be used. On some platforms there is also a Native provider available, selecting this one causes settings that were discovered in the OS to be used.
If internet is working fine outside of Eclipse, try changing to Native. After that, try Direct.
I have encountered problems where an update site would not load, then I had to remove it and add it again. This forces Eclipse to reread the contents of the site even if it has a cached copy. So, if you still get no connection to the indigo update site, but everything else is working, try that. Go to Window -> Preferences -> Install/update: Available Software sites. Then remove and add the indigo site. Just remember to copy the adress so you can add it again.
As suggested in a comment below by #lostiniceland, this is a simpler way to achieve the above:
Goto Window -> Preferences -> Install Update -> Available Software Sites => select the entry and click the "Reload" button to the right. This is sometimes also helpful when you have a local updatesite for testing custom plugins
I had the same problem and resolved it by
Deleting the cache directory \eclipse\p2\org.eclipse.equinox.p2.repository\cache
Refreshing the repositories.
Preferences -> Install Update -> Available Software Sites => select the entry
Click the "Reload"
Check if you are able to connect to eclipse market place url (http://marketplace.eclipse.org/) from browser. If its working then the issue is because of proxy server using in your network.
We have to update eclipse with proxy server details used in our network.
Go to :- Windows-> Preference -> General -> Network Connections.
And edit HTTP ,with proxy details.
Click OK
Done.
I was having this problem and it turned out to be our firewall. It has some very general functions for blocking ActiveX, Java, etc., and the Java functionality was blocking the jar downloads as Eclipse attempted them.
The firewall was returning an html page explaining that the content was blocked, which of course went unseen. Thank goodness for Wireshark :)
Another way to solve this kind of error is to start eclipse with this argument
-vmargs -Djava.net.preferIPv4Stack=true
Working fine with Eclipse (x64) 4.3.1
Had this problem in Linux, and I found that the user doesn't have permission to update the eclipse directory
change the owner of eclipse folder recursively, or run eclipse with user who has write permission to the folder
In Windows 7 32-bit version, I started the eclipse with as an administrator. This worked for me.
I had the same problem. Try to deactivate your Firewall (I had avast!), which worked for me.
(Sorry for my English I'm French :D)
Please make sure you are using correct url. If You are using url - http://download.eclipse.org/releases/indigo on your eclipse luna(v4.4) then it might be not working in this case you should use - http://download.eclipse.org/releases/luna
I have tried this and its working.
What worked for me:
Since yesterday, I have been trying to install the Eclipse plugin - "Remote System Explorer" from the Eclipse marketplace on a freshly downloaded Eclipse 4.8 as shown below,
and everytime I was getting this error:
Unable to read repository at http://download.eclipse.org/releases/kepler/.
Unable to read repository at http://download.eclipse.org/releases/kepler/201306260900/content.jar.
download.eclipse.org:80 failed to respond
which brought me to this SO post.
I tried a few solutions mentioned here in the different answers like this one and this one and this one, but none of them worked. I just gave up almost, thinking that either the corporate network here is somehow blocking the specific download requests or the 4.8 version of Eclipse is buggy.
Discovery:
I could not reload all the paths under 'Window' -> 'Preferences' -> 'Install/Update' -> 'Available Software Sites'.
Preconditions:
What did work for me from the beginning was:
I could open google.com from the internal web browser of eclipse and,
some of the update paths, I could reload even. (As was mentioned as a possible solution or test, in some of the answers here, like this one.)
Finally, this answer put me on the right track - for my specific case, at least. Just my step was to do the exact opposite of what that answer was doing.
Solution:
I had to change all the http:\\ paths to https:\\ and suddenly it started to work. I don't know who - either IE/Edge on Windows 10 or the Windows 10 firewall or the company firewall is blocking HTTP communications. But with HTTPS, I can finally install plugins from the Marketplace.
HTTPS reload works
I must say, what is strange is that not all the paths required https. Except a few, the rest seemed to have had no problem working with HTTP. But I anyways changed all to HTTPS, just for good measure.
Then reload all the repositories one by one. Press "Apply and close".
Then check for updates. Eclipse will update itself successfully now.
Restart after update.
Finally you can install whichever Plugin you would like to from the Eclipse Marketplace.
Note: In case during the update, this same error pops up again, then see in the repositories that any new paths added by eclipse during the update, are also HTTPS and not HTTP.
Kudos to #Fredrik above. His answer didn't work for me, but lead me to the resolution of my issue:
In 'Window'|'Preferences'|'Install/Update'|'Available Software Sites'. The location that I was attempting to install from the 'Marketplace' was getting inserted with an https:// URL. Editing this to http:// allowed me to then use 'Help'|Install New Software ...' to select the repository from the drop down 'Work with:' combobox instead of having the https:// one automatically inserted and used.
For eclipse, there are normally different options available:
If you want to use the PHP development environment (only), you should go with the corresponding distro of eclipse. There is a distro for PHP provided by Zend.
You may add PDT to an indigo release by doing the following steps:
Check if an update site for PDT is included in your eclipse installation:
Open the Help > Install New Software dialog.
Click there on the link Available Software Sites.
In the list, the URL http://download.eclipse.org/releases/indigo should be marked.
Close the dialog.
Select from the Work with list the site with the right URL.
Enter in the filter box PDT and search in the list for the PDT tooling you want to install.
Install the PDT tooling.
If that does not work, you may download a complete update site from the PDT project site.
Visit the site (URL above).
Click on downloads.
Search there for the string "all in one update site".
Download the zip file.
Install it in your Indigo installation. Help > Install New Software > Add... > Enter name and select from button Archive the zip file
I hope some of the installation instructions will work for you.
This is the correct URL. Chances are Eclipse cannot read it properly because of the Internet connexion.
Are you using a proxy to get Internet access? If this is the case you need to notify Eclipse via the "Preferences/General/Network Connections" menu.
That URL works fine. The message you report is normal when you look at it in a browser. My copy of Eclipse has no problems talking to it. If yours does, I suspect a proxy configuration error in your copy of eclipse.
Also try it by turning off the firewall, and similar services. It worked for me!
If you can't access https://dl-ssl.google.com/android/eclipse/ simply
try to use http://
instead of https://
I spent whole my day figuring out this and found the following. And it works great now.
This is basically an issue with your gateway or proxy, If you are under proxy network, Please go to the network settings and set the proxy server settings(server, port , user name and password). If you are under direct gateway network, your firewall may be blocking the http get request from your eclipse.
I was also unable to read the repository. Even after the disabling most of the entries under Available Software Sites things were still not working.
I had no proxy to worry about and even disabling the firewall (which I do not recommended) as a last resort did not help.
Viewing the error log, from the dialog box which Eclipse displayed, there was mention of a cache directory under .eclipse in my home directory. I deleted the two cache directories I found and Eclipse was working again.
For my setup the two directories I deleted were:
.eclipse/org.eclipse.platform_4.4.2_119745494_macosx_cocoa_x86_64/p2/org.eclipse.equinox.p2.core/cache
.eclipse/org.eclipse.platform_4.4.2_119745494_macosx_cocoa_x86_64/p2/org.eclipse.equinox.p2.repository/cache
NB: My setup is Eclipse Luna 4.4.2 running on Mac OS X Yosemite 10.10.3
In my case, I discovered that the major issue why my eclipse won't connect to internet is my Internet Service Provider. I was only able to browse some websites but unable to browse other website. Fixing the issue with the ISP worked.
My issue was the Eclipse Marketplace client needed updating.
After trying Fredriks solution of
Go to Window -> Preferences -> Install/update: Available Software sites. Then remove and add the indigo site. Just remember to copy the adress so you can add it again.
The Marketplace client wouldn't load. But I could access it via a browser.
So, I went to the Help -> Eclipse Marketplace
it loaded fine
Clicked on Installed and found the Eclipse Marketplace Client and it had so i clicked it it updated and then when I did the standard update everything worked.
Sometimes, there will be firewalls and restrictions in the network preventing the plugin to get downloaded. We can try some other network. This actually resolved my issue.
I was facing the issue while adding team explorer plugin to eclipse from https://marketplace.eclipse.org/content/team-explorer-everywhere.
Used team explorer plugin for ecplise for internal use of xamarin for mac.
Error:
unable to read repository at http://marketplace.eclipse.org/content/team-explorer-everywhere
org.eclipse.equinox.p2.core.provisionexception unable to read repository
Unknown host exception
Goto https://github.com/microsoft/team-explorer-everywhere/releases
Download: TFSEclipsePlugin-UpdateSiteArchive-14.135.0.zip
From Eclipse->Help->Install new software.
From Add Repository window select Archive select the downloaded zip file.
Continue installation.
Also try if in the eclipse paths there is some duplicated
Luna - http://download.eclipse.org/releases/luna
Luna - http://download.eclipse.org/releases/luna/1234567...
Try both of them, one may work.
In my case, with 2 eclispes installed, in one of them the path
Luna - http://download.eclipse.org/releases/luna
works, in the other one, i must select:
Luna - http://download.eclipse.org/releases/luna/123456...
In both the internal browser can access to internet. Both are Luna (but one is RCM, the other one i don't remember).
No meu caso era o anti-vírus que estava bloqueando a conexão do eclipse, desativei o anti-víruse tudo funcionou o//.
Translation:
In my case it was the anti-virus that was blocking the connection from eclipse. I disabled the anti-virus and everything worked.

Eclipse Indigo "unable to connect to repository"

I'm trying to add this repository to Eclipse (Indigo):-
http://download.eclipse.org/releases/indigo
Seems okay when checked in a browser, but I keep getting "unable to connect" in Eclipse, and when I check the URL Eclipse is apparently looking for:-
http://download.eclipse.org/releases/indigo/content.xml
in a browser, I get a "404 not found". The locations for previous releases (e.g. galileo) don't seem to be there either. Have they moved? Am I misunderstanding something?
I tried some of the suggestions in this previous thread:-
Eclipse updates not working
But they don't seem to work (and I'm not using a proxy anyway).
Hemdoar
This worked for me:
Open terminal. Navigate to Eclipse folder.
sudo nano eclipse.ini
at the bottom, add this line in:
-Djava.net.preferIPv4Stack = true
Then ctrl+O to save, ctrl+X to close (it says at bottom). IPv4/IPv6 problems? Solved.
Then delete the cache VonC said to:
<eclipse>/p2/org.eclipse.equinox.p2.repository/cache
(This can be done using "sudo rmdir /p2/org.eclipse.equinox.p2.repository/cache" or by typing "sudo nautilus" into terminal, to open a root-priveleged filesystem browser, than navigating to, selecting the folder, and pressing the delete key). Then restart eclipse, goto Help>install new software>available software sites
Make sure the repos you want (such as "http://download.eclipse.org/egit/updates/") has a "/" right at the end. If it doesn't, delete that entry, and create a new, identical one which does, because Eclipse won't just let you edit it and click ok. Then click ok, and from the combo box choose e.g. the egit link, and lo, it will find it.
Still not working? Window>show view>internal web browser; check it can access internet. Hope that helps!
Credit to:
http://drfits.com/2011/11/13/eclipse-contacting-software-sites-has-encountered-a-problem/
VonC Sep 14 '11 at 6:03
I used VonC's answer to good effect. I also uninstalled a program called webroot. I think this had something to do with it because other programs were also having network problems.
This is because windows IPV6 issue. Try adding the following VM option in the eclipse.ini
-Djava.net.preferIPv4Stack=true
Can you connect to internet at all through Eclipse?
Open the internal webbrowser. In Eclipse: Window -> show view -> Other -> General: Internal web browser.
Look up any normal adress, is it working?
Can you connect to another update site? Try for example Eclipse Emma: http://update.eclemma.org/ Do you see anything there?
What are your proxy preferences? Go to Window -> preferences -> General: Network connections.
The active provider:
Specifies the settings profile to be used when opening connections. Choosing the Direct provider causes all the connections to be opened without the use of a proxy server. Selecting Manual causes settings defined in Eclipse to be used. On some platforms there is also a Native provider available, selecting this one causes settings that were discovered in the OS to be used.
If internet is working fine outside of Eclipse, try changing to Native. After that, try Direct.
I have encountered problems where an update site would not load, then I had to remove it and add it again. This forces Eclipse to reread the contents of the site even if it has a cached copy. So, if you still get no connection to the indigo update site, but everything else is working, try that. Go to Window -> Preferences -> Install/update: Available Software sites. Then remove and add the indigo site. Just remember to copy the adress so you can add it again.
As suggested in a comment below by #lostiniceland, this is a simpler way to achieve the above:
Goto Preferences -> Install Update -> Available Software Sites => select the entry and click the "Reload" button to the right. This is sometimes also helpful when you have a local updatesite for testing custom plugins
first resolve proxy conflicts and if then too eclipse is not getting connected to internet *turnoff your firewall/antiviru*s and try again
To resolve proxy conflicts:Go to windows->prefernces-general tab->network settings
if you dont use proxy settings, cgange native to direct
if you use proxy, chenge native to manual and fill details of proxy for http and https by pressing 'edit' and clear SOCKS tab by pressing 'clear'
check if your SOCK is disabled on operating system too. or doing it open to 'Internet options' dailog box. Go to connections and press lan connection. press 'advanced' button ans clear the textboxes in front of 'socks' and uncheck the msg saying 'use same address for other network protocols'
I did this and worked for me
If you are using Fiddler2 (or any other web sniffer/debugger tool), it may be your problem, as it acts as a local proxy.
Sometimes, even if its not running, I find myself obligated to start it and disable traffic capture.
Hope that helps!

How to shutdown the UDC (usage data collection) from eclipse

I want to shutdown the UDC. It's very heavy for my pc. I already uncheck the "Enable Capture" checkbox but I have the feeling that it stay enable in the background. It constantly ask me the user and password of the proxy. I do not want an eclipse always trying to connect to internet and doing background procesing that I don't need.
There is a Preferences -> Usage Data Collector -> Preview page where you can add filters.
If you want to be sure it doesn't run at all, the simplest thing might be to just remove org.eclipse.epp.usagedata.* from the plugins directory.
If you disable the capture, it shouldn't be attempting to connect. Are there any messages from the UDC in your workspace/.metadata/.log file?
Are there any files in your workspace/.metadata/.plugins/org.eclipse.epp.usagedata.recording directory? More specifically, are there any files there that have recent modified dates?
There is actually a bug open on the UDC complaining that it doesn't use the proxy service, so I'm pretty sure that it's not the UDC that's asking for that information. Could it maybe be Mylyn that's trying to connect to something?
In 3.5 (Galileo) in the preferences there is a group named Usage Data Collector. In that category you can find a checkbox to turn off the data capture. There was a similar option in 3.4 (Ganymede), but it is not open in my computer.
Or you can try using P2 to completely uninstall the plugin. It won't harm anything.