Eclipse Workspace - Project is missing required libraries - eclipse

I was using this Workspace (Workspace A) for my team's main web application. I was using it last week & everything was fine, logged back into this Workspace to work on something & suddenly this error pops up. I didn't update the project (externally via file explorer, command line, etc.) or even internally via Eclipse...
Any idea why this error happened? And any tips/action items on preventing such errors from happening again in the future?
I've noticed this is a recurring issue with Eclipse, where errors will just appear overnight in a workspace, even when I had seemingly not made any changes to the workspace/project's configuration
Appreciate any insight into the matter, cheers!

no idea what exactly caused the issue, but i reset up my workspace again (created a new workspace called "Workspace A - 2") & got everything back up & running again.

Related

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.

Endless NullPointerExceptions in Flash Builder 4.5

I've been using Flash Builder 4.5 with Flex SDK 3.5B on Mac OS X 10.8.2 for a couple months. It hasn't been a perfect experience—the software has quite a few bugs—but in general it has been working until recently.
Our application includes two Flash Builder "projects", one of which references the other. Whenever we clone the repository, it is necessary to update the .project file of the primary project to include the new path of the secondary project.
The last thing I did before everything broke was move the folder containing the projects to a new location. As expected, when I opened Flash Builder, it complained that it couldn't find my project files, and they were all marked as inaccessible in the "Package Explorer" view. I did not remove the inaccessible projects from my workspace, but I attempted to re-import the primary project from its new location. This marked the first time I saw a dialog that has haunted me ever since:
The "Problems" view told me to refer to the error log...
...but the error log was empty!
The "Package Explorer" view didn't change (the new project wasn't listed) so I decided to just try the import again. When I selected the project directory, Flash Builder said I couldn't import it because the project was already in the workspace. "But the Package Explorer says it isn't... maybe it'll let me try again if I restart Flash Builder," I thought. I thought wrong. When I restarted, this is what I saw:
java.lang.NullPointerException
at com.adobe.flexbuilder.util.PathUtils.resolveLocaleInSourcePath(PathUtils.java:297)
at com.adobe.flexbuilder.project.actionscript.internal.ActionScriptProject.getProjectPath(ActionScriptProject.java:713)
at com.adobe.flexbuilder.project.actionscript.internal.ActionScriptProject.getSourceContainers(ActionScriptProject.java:681)
at com.adobe.flexbuilder.as.editor.ui.packageexplorer.content.FlexPackageExplorerContentManager.getSourceRoot(FlexPackageExplorerContentManager.java:644)
at com.adobe.flexbuilder.as.editor.ui.packageexplorer.FlexPackageExplorerContentProvider.getWorkspaceRootChildren(FlexPackageExplorerContentProvider.java:152)
at com.adobe.flexbuilder.as.editor.ui.packageexplorer.FlexPackageExplorerContentProvider.getChildren(FlexPackageExplorerContentProvider.java:80)
at com.adobe.flexbuilder.as.editor.ui.packageexplorer.FlexPackageExplorerContentProvider.inputChanged(FlexPackageExplorerContentProvider.java:449)
[...]
It couldn't even display the list of projects so I could remove the one that was causing the issue. A similar message was displayed in the "Editor" view. Deleting all of the project's files didn't help either. I was unable to fix the workspace, and the only way I could continue to use Flash Builder was by creating a new workspace.
Since then, I have tried many different things:
Reinstalled Flash Builder 4.5.
Reinstalled Flex SDK 3.5B.
Checked out a six-month-old version of the project.
Upgraded to Flash Builder 4.6.
Created a new user profile on my computer.
Tried to remove whatever trace files might have broken things:
Used Instruments to monitor all files the Flash Builder process touches.
Uninstalled Flash Builder.
Used find to locate any files that included builder or eclipse in their name.
Deleted all files found in (1) or (3) that seemed possibly related to Flash Builder.
Reinstalled Flash Builder.
Installed Flash Builder 4.5 on another Mac running Mac OS X 10.6.8.
Checked out a two-year-old version of the project with Flex SDK 3.5 on the other Mac.
Tried in a new workspace on another Mac that already had the project working in an existing workspace. (Yes, it broke when we tried to import it into the new workspace, even though it continues to work fine in the existing workspace.)
Installed Flash Builder 4.5 in a Windows 7 VM.
None have made any difference. That seems impossible.
Other members of my team have been working on this project for a couple years without running into this particular issue, yet now versions of the project from before I started appear to be broken, and even using brand new installations of Flash Builder on entirely different systems also breaks.
I contacted Adobe's phone support for help with this issue. I waited on hold for over an hour after being told it would be fifteen minutes, only to have them tell me that they no longer offer phone support for the product. (Sadly, their phone tree couldn't figure that out before I waited on hold.) However, I was told that "tier 2 email support" was available at platformt2-noida#adobe.com. I should have known better than to get my hopes up the address was invalid and my messages all bounced!
I have no idea what's going on. It seems like I must have done something else and forgotten about it, because the current situation makes no sense. Has anybody encountered this issue before? Do you have any idea what might be causing it, or what I might do to fix it?
We finally found a solution. It's rather anticlimactic.
Ignore all of the errors.
Import your project files and activate the correct SDK version in whatever order you want. If you end up with a messed up "Project Explorer" view, just close the view and reopen it, or restart Flash Builder.
Once the "Project Explorer" view is available, select your primary project and run it. It should work!
Nothing was actually permanently broken. The "Project Explorer" view may be in a temporarily unusable state if you import the primary project first, or use the wrong SDK version, but as long as you eventually fix those things then the "Project Explorer" view will also be fixed the next time it's opened.
make a backup copy of all the projects in your workspace, then delete all the files (including the hidden ones) in your workspace.
Next point Flashbuilder at the now empty workspace directory (forces it to recreate all the workspace files).
now import the project folders that you had backed up.

Google App Engine Eclipse Launch Local Host Multiple App Conflict?

I have two GAE projects created through pydev in eclipse 4.2 (windows 7) and the first one I had no issues running the localhost:8080 but when I created a second project, I duplicated the Run Configuration for local run adn just changed the project name to the new one.
However- when I run that config the inital HelloWorld project shows up[ in my browser, I tried completely removing the first project, but then it just ocmplains it cant fint app.yaml in the old directory (because the old directory isnt where it was).
So clearly I'm missing some setting in the launch procedure where it sets the root path.
The run config is a PyDeb Google App Run, main module points to
C:\program files (x86)\google\google_appengine\dev_appserver.py
And the arguments are
${project_loc}\src
Everything else is on the default settings.
Any help would be greatly appreciated as pushing to Google (which works fine for both) for every little debug iteration is driving me a bit crazy.
Thanks!
*EDIT: Forgot to mention I have already tried to delete all runconfigs and remake.
Have you tried Run as : PyDev Google App Engine Run, to create a new runconfig?
Turns out I'm just a bit silly. In eclipse, I wasn't properly turning off (not sure on the correct term there) the LocalHost for the first project before starting the second. To fix, I needed to go Into eclipses console window, and select "display selected console" and choose the project I wanted to stop and hit the stop all button. Then it runs fine.
Hope this helps someone in the future, that is as determined as me that "It can't be my fault".
Cheers.

Eclipse randomly stopped starting

I've been using Eclipse a lot recently, and haven't had any problems with it. Last night, I was working on it perfectly fine. However, this morning, whenever I load it up, the program stops working half way the loading splash screen (before the actual workspace opens up). The information says "Loading Workbench" and just stays there forever. When I click on it multiple times, I get a message saying that Java(TM) Platform SE binary is not responding.
Google hasn't been a ton of help, and seems to just give a lot of responses about Minecraft. I'm slightly confused as to where I need to start looking, since nothing had changed since I successfully used it last. No updates to Java or Eclipse or anything else. Thanks for the help, and let me know if you need any more information!
I was actually able to fix it by just renaming my WorkSpace to WorkSpace1. Apparently it got corrupted somehow, and with the rename Eclipse was able to recreate a new one. Here's the link that helped me out:
http://spacetech.dk/eclipse-failed-java-was-started-but-returned-exit-code-805306369.html
Two things to check when you have problems with Eclipse:
First, always check the .log file, located in the .metadata directory (<workspace path>/.metadata/.log) of your workspace (not the Eclipse installation directory). Keep in mind that this is a hidden file under Linux or Mac OS. It usually contains the exception that is causing the crash. I usually delete any existing .log file before firing up Eclipse, just to make sure I am looking at the relevant log entries (the file will be recreated at startup).
If #1 does not help, you can try deleting the .metadata directory altogether. It will be recreated on startup (this is basically what you did by changing the workspace). In my experience with Eclipse, I noticed that some files can get corrupted inside .metadata, making Eclipse act weirdly. Keep in mind that this directory contains customizations you made in Eclipse and its plugins for the workspace and you might need to make them again.
Hope this helps.
Eclipse tends to be weird sometimes. If you move stuff around outside of the directories it was initially installed in, it usually won't load. I don't know if that's what you did, but your best bet is to back up your workspace, and reinstall eclipse. I'm sure that will do the trick.
Try a reinstall if possible or else, check the eclipse error log, which would be present at'/.metadata/.plugins/org.eclipse.ui.workbench/log'.
This will help you knowing the problem.

"selection cannot be launched and there are no recent launches" when using pydev/eclipse

I am getting the above error when launching a python file that worked in the past. I think I know how this happened but not sure how to fix it. I have 2 computers dual booting different os and use dropbox to stay synced between them all. In the past I synced my eclipse workspace with my mac and windows computers this way and everything worked fine(except I would have to change the location of the python interpreter depending on what system I was using).
I started getting the above message after I added a linux(fedora) to share dropbox files. But my problem is now when I try to update my python interpreter(in windows) it doesn't save my setting. I can hit autoconfig and it'll find the python path and all the files and I hit apply/okay, but when I go back its all blank. I'm pretty sure the linux machine messaged my settings up, but I need to develop on all 3 boxes so I need them to be kind of synced.
Wondering how to fix this and if there's another way to do this so I don't have this problem in the future?
update: this def. has something to do with my workspace. When I change the default workspace to a new folder and set the python interpreter it works. Still not sure how to permanently fix this(don't want to have to copy code back and forth to new workspaces.
I think an answer of how to share workspace among other enviroments is still very helpful but if anyone is having a simlair problem and just needs to fix it to work quickly here's the solution:
go to File, switch workspaces and figure out where your workspace is located
Go to that folder and rename the .metadata folder and relaunch eclipse
In eclipse everything will be missing, so go to file-->import and import the folder with all your projects(do the root folder of all the projects so you don't have to import each one individually).
setup any customizations you had before
This is not the best solution but it works. Hopefully someone else has a way of preventing this problem from happening in multiple environments.
It seems the preferred way is through F9: http://pydev.org/manual_adv_launch.html
eclipse run as same as what it run last time.
then first time run in this way.
in package explorer (left).
doubleclick res then menu.
then rightclick main menu (name.xml).
frmo menu select run then run as application.
and you can run as default in next time(from menu or shortcut).
This problem can often be solved by exiting out of eclipse and restarting (if that happens to be convenient for you). Changing workspaces midstream can often confuse Eclipse even if PyDev is correctly configured.