Eclipse does not recognize my changes in src folder, throws the same error - eclipse

I'm having a hard time using eclipse because of the following issue.
It goes like this. I'll code and try to run it. Then, it will throw some errors (of any kind). And so, after I have changed a part of the code, comment out which codes I suspect makes the error, or delete something, I then restart the websphere application server in order to republish my work. Next is to test my work using SoapUI then all of a sudden eclipse throws an error which is the same as before. I've tried to search in here answers to this questions but it involves codes which don't need in my project and also answers that I can't understand well (since I am very new to programming). However, I have found a way to resolve this but it's very inconvenient. To be able for eclipse to detect changes in the src folder, I should restart eclipse after editing my codes then remove my project in the server, start the server and then publish my work in websphere all over again. It solves my problem but I do all of these stuff every now and then even if I only comment out a single line in the code. What I want is to avoid doing this process of resolving the issue since it consumes so much of my time whenever I republish the project in the server.
Can somebody help me with this? Any suggestions would be very helpful. Thanks a lot!

It is a bit strange that you need to restart eclipse. The normal way would be to just re run your application server.
Try only he 3 second steps you mentioned (remove my project in the server, start the server and then publish my work in websphere) and if that works try again without removing the project. Just restart the servers.
And let us know if that worked!

Related

service fabric local cluster exception from 0x80071BFF

I created a solution with a few applications, and it worked perfectly. But a day later when I was about to debug the solution again, it suddenly cannot start.
I did have firewall and AV disabled, both when it worked and later when it didn't work.
It works fine when deployed to azure, but not locally.
The error thrown is:
Exception from HRESULT: 0x80071BFF
at System.Fabric.Interop.NativeRuntime.FabricGetNodeContext()
at System.Fabric.FabricRuntime.NativeFabricRuntimeFactory.GetNodeContextHelper()
at System.Fabric.Interop.Utility.WrapNativeSyncInvoke[TResult](Func`1 func, String functionTag, String functionArgs)
A related post register-servicefabricapplicationtype-on-a-secure-cluster-always-times-out
describes a similar thing.
However, I get this while debugging locally and with smallest possible application: I even just created 1 application, 1 actor, did no changes, hit F5 and I get this error.
So, I looked at service-fabric-troubleshoot-local-cluster-setup and while I also get the TypeInitializationException, the solution of:
Your path variable was not correctly set during installation. Please sign out of Windows and sign back in. This will fully refresh your path.
did not work at all.
Nothing else on that page seemed to be related.
Now I begin to feel that I've hit the end of what key words I can google, and still I have no idea what to do.
Any help would be greatly appreciated.
EDIT:
I've tried starting via cluster manager and apps can still not start.
I've removed apps, removed cluster, tried with new solutions, over and over. The only thing I haven't tried is reinstalling SDK and VS. I'm a bit reluctant to reinstall VS, so I'd hope to find some clues before resorting to that.
UPDATE1:
Now I reinstalled Service Fabric v. 5.3.311.9590, SDK and Tools.
Created a solution, added a stateless service. Hit F5. The exact same error is thrown.
I will now try to install on another machine with mostly the same configuration.
UPDATE2:
Installed the SDK on an identical VM, Win10, also with VS2015 Update 3. Created solution, added 1 actor, hit F5 and also on this macchine the exact error is thrown.
I tried Debug without debugging (as mentioned here) to attach later. But the application never starts. It is failed. This is the same on both the machines.
It all worked and from one day to the other it doesn't, and it's a problem that I cannot find anywhere on the net. What can this be? I found that the security updates from windows was made about the same date this happened...
I will uninstall and try again.
UPDATE3:
Uninstalling security update was not possible, but I could hide a couple of other updates. To no luck though.
From here I found this https://github.com/Azure/service-fabric-issues/issues/15 and realised I actually was very low on diskspace, and so I increased it (hyper-v manager) to 20 gigs free. But no, still the same problem.

Eclipse needs to be closed to save settings

I'm making a web app in eclipse, when i make the changes they are not reflecting on my next run.
I'm doing the below.
save changes-> Stop Server-> start server-> run program
but the error appeared before is up again.
I use Kepler 32-bit. please let me know how i can fix this.
Thanks
You need to build your app after saving. If you don't have auto build on then your changes will not be reflected also make sure you publish to server too. Although Since you are restarting the server that may not be needed.

WebSphere Debugger not stopping at breakpoints in Eclipse

I have deployed my application on WAS 8 as debug. The server status is [Debugging, Synchronized]. When I put breakpoints and start the application, it doesn't stop at the breakpoints. I don't see the debugger thread start either.
I am using RAD 8.0.4 and JDK 1.6.0_31. I have tried cleaning the project and re-deploying but it still doesn't work.
I was able to get it working via a complete clean install of my app. Then removing it from the server via add remove. Clearing cache from the websphere/profiles/myprofile directory. and clearing all bits of my app from the profiles folder via a search for its containing file aka (myproject-folder). Then re-installed the app via add remove on the server and it worked for me.
Best guess I have is something was actually out of sync even though the server though everything was A okay.
WebSphere is a PITA and seems to get out of state too easily.
I'd restart the server and perhaps do a clean on the server (right click on the server, click "Clean...". If that doesn't work, you'll have to take a careful look at the location of your break points. They might not be on code that's getting executed. Place a break point further upstream if necessary, follow it down just to confirm the flow.

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.

Service code debugging question with GWT 2.1

I recently attempted to set new breakpoints in eclipse to debug service side code in GWT. For some reason eclipse refused to see the breakpoints or the new code changes I had made. In the debugger it would open up what appeared to be an ear file from somewhere. Even though I had deleted the old ears, compiled and redeployed the new ear files. We are using GWT 2.1, JBoss 4.3, java 1.6 and Eclipse Helios. Finally, when I created a new environment with the code from scratch it started working. Any ideas as to what was holding on to the old code? BTW, I had rebooted my machine and restarted eclipse, but it also didn't make any difference.
Thanks,
James
Current state of debugging GWT apps is ... well not really good. Sometimes it's incredibly slow (development mode), sometimes lot of rubbish stays at webserver.
This might not solve your problem directly, but here are some advices from me:
Writing new client code (/client) at GWT means refreshing browser
Writing new server code means "Reloading web server". You have little yellow "refresh" button in Eclipse in "Development Mode" tab. This should reflect all the changes done at server side.
Embedded Jetty works usually well with GWT debugging. If you are not doing something jboss-server-specific, it should also work fine at production server. Just make sure your unit tests pass ;-)
You can ofcourse debug GWT application on external server, see this section of documentation (I guess you do on JBoss)
Be sure to remove all old files when reloading web server. It happened to me, that sometimes there were some weird old mixed up files (I was using Tomcat though). So you might want to write own clean script.
You must be absolutely sure that your serever code even launched! Use lot of GWT.log() at client side, that will ensure you in this. Don't worry, GWT.log are ommitted in production mode.
Be sure to inspect client-side page, it sometimes help to find out that your server code didn't manage to launch.
Log every public void onFailure(final Throwable caught) { of your AsyncCallbacks to get more info.
Don't use Google Chrome in development mode. It's MUCH slower than Firefox.
Otherwise, if you're using most recent version of your application, Eclipse must stop at breakpoint correctly.
I think JBoss was somehow caching things in it's temporary files and then I had forgotten about adding source in. This may be a JBoss thing as I don't recall seeing it with other application servers before.
So after I cleared out the cache, what got me thinking about the source was the fact that eclipse would stop on the breakpoints in the debugger that I had just set, but I couldn't see the source files.
Prior to this I was apparently hitting the breakpoints in the cached files and I couldn't alter them by setting new breakpoints. That was the root cause of the issue. Then by adding in the source from the ear, I got the debugger in sync with the code and it started working fine.