gwt application stopped running suddenly - java

first of all I am sorry on my English.
I have a problem in my Gwt application.
I build Gwt application and I work on application every day
Yesterday I want to still work on my application but is stopped worked and i do not know why and I not get errors
The application compiled and I get the Url to run on browser
I copy the Url to my Firefox browser and not happened nothing.
I put break point in my entry point class and I see the application not arrived to entry point and I do not know why.
I try to open new project to check maybe the problem in eclipse or in Gwt plug in but the new project worked excellent so I understand the problem in specific this project.
I need help
thank you everyone

Okay i have 3 possible suspicions:
You updated your Application, but for some reason some JavaScript stayed inside the Firefox cache. Solution: Go to options and "Clean cache" and always try to press CTRL+F5 instead of just reloading, this will clean the current website's cache saved in your Browser.
Your HDD is full(less likely). You said you work everyday on the app. The caching in dev-mode is very VERY bad(for me it once contained 300GB of cached data). there is a folder called <win_user>/AppData/Local/Temp - delete everything inside if you find a lot of "gwt-<something>" files and check the folder's size. There is nothing valuable inside it(if you didn't place anything inside :D)
P.S. Turns out it was a Firefox Memory-leak that has been fixed in GWT 2.6.0 :)
Your Eclipse messed up some random stuff. As always - Project > Clean...
Then right click on app and let gwt recomile your app(if you have an ant file that uses the gwt-compiler, execute that)
I can't really think of anything else...
The only thing that could be is that YOU changed something, but you said you didn't so...
Hopefully it works,
Laurenz

Related

Pivotal Tomcat Server Developer Edition v3.0-config is missing

I am trying to run a sample program in spring tool suite. I am not able to run the Pivotal server and am getting the error message shown in the attached image.
Please can someone provide some suggestions to help.
Thanks in advance.
After many weeks of frustration with this I think the answer is even easier than I thought. My workaround was to keep installing a new server every time this happens. Needless to say this clutters my workspace with many servers and wastes time.
Turns out that the darn server folder say Server7 or whatever server you are using in your STS MUST BE OPEN!!! This may seem obvious but as I open and close different projects I am working on I always click on "close unrelated projects". Well this also closes the Server folder on my workspace! I think the problem is just this simple. Now to talk to the STS people to see if we can make the server intelligent enough to auto open the folder when we click start if it is not already open because I do appreciate being able to "close all unrelated projects" often. Hope this saves some people some frustration.
Also double click your server in server view. In the overview page make sure server configuration points to the directory of the server you are using. In my example it would be Server9. You will notice that if this Server folder is closed in package explorer it will not even be an option to choose. This is when the light bulb went off for me why it could not find the server-config file. See illustrated picture for guidance
.
ps. I finally found my Skitch for Linux alternative = Hotshots
UPDATE: to keep the server from closing when I click "close unrelated projects" simply right click the project and choose properties/project references then put a check mark next to the associated server of this project. Then when you click "close unrelated projects" the server will remain open.
This is due to that fact that server project might be closed. Please keep that open before performing deployment.
delete the server and reinstall pivotal server or install tomcat 7.0 or tomcat 8.0. Tomcat is better option as the error logging better and less cache problem

Netbeans deploy on save: how is it supposed to work?

I'm trying to setup deploy on save (or compile on save, or whatever I should setup) correctly in Netbeans.
I'm trying to achieve this:
1) hot-replace some class when needed if the structure didn't change (push the button, new code replacing the old one)
2) copy my jsf pages (.xhtml) to glassfish on save
1) works most of the time; it sometimes doesn't after I deploy many times (why?), or if Netbeans decides for whatever reason that it should deploy the whole thing (it does... sometimes)
2) works in some project, not in others
Seems like black magic.
How is it supposed to work? I can't seem to have 1) and 2) working on the same time for all my projects. How should I configure that? I must have done something wrong, I just need to know what the checklist is.
I opened this some time ago: https://netbeans.org/bugzilla/show_bug.cgi?id=218806
UPDATE: this is a maven project
This update from the Jira issue should clarify it:
At the moment there are two important features:
--> Compile on Save (will be referred as CoS) which basically means that your java files are compiled immediately when you save them
(typically to the target/classes).
--> Deploy on Save (will be referred as DoS) is supplementary feature that enables you to deploy your .class file changes to the server
immediately when you save them.
So currently you have few possibilities:
1) Turn on both (CoS and DoS) --> That means your changed .java files
will be compiled on save and redeployed to the server and also your
static resources (html, jsp etc.) will be copied to the server after
the save.
2) Turn DoS off but let CoS on --> in such case you will loose
everything related to "server refresh". Which means you should have
actual class files compiled in the target/classes but you won't see
any change in the browser
3) Turn both off --> NB let you to take care of build/deployment
--> It doesn't make semantic sense to have DoS activated while CoS is disabled which is why if you disable CoS, NetBeans automatically
disables also DoS
How should I configure that?
So the conclusion here is, you are not doing anything wrong and you
can't configure it that way.. NetBeans just don't support such
possibility yet. BUT the good thing is I'm currently starting to work
on issue 218345 which is exactly what you need. There will be a new
check box (already available in Ant Web project) named "Copy static
resources on save" that allows you to copy your html/jsp/jsf pages
while having DoS disabled.
I experienced exactly the same behavior. No problems with Ant but hot deployment with maven does not work properly. So far what you just wrote.
The answer was to switch to Eclipse >= 4. You can convert your NetBeans project in a console using maven:
mvn eclipse:eclipse
All you then need is an adapter for your app server e.g. for GlassFish. Try it, it's worth a try.

Eclipse [Desktop NO-HEAD]

Beside my project name says [Desktop NO-HEAD] in eclipse. I am developing an android application, and was wondering if there is anything wrong with this, why it might be saying that, and if it makes a difference to anything, though everything seems to compile and debug normally. Surprisingly, I have found literally nothing online about this. I was just wondering if anybody knew, thanks!
You apparently have some type of version control going on. Right click on yoir project and go to Team. If you don't want to see it and/or don't want to have any version control at the moment there should be an option somewhere there in Team to disconnect.
In my case, for git, in Eclipse Team settings, I had to Disconnect and then Share Project (Right-click project -> Team -> Disconnect / Share Project...) with the following settings:
Checking any other permutation of those check boxes caused the NO-HEAD for me.

JRebel with web-fragments giving 404 errors after modification

I have been trying to get JRebel to work with a web project which contains web fragments. However, after I change the code and JRebel deploys the changes, the web application starts giving 404 errors for all pages and requests.
Can someone indicate what might be the issue please?
NB: I am using Tomcat 7.0.21 and maven
I think it's a bug in jrebel. You can solve it this way if you are using Eclipse:
Enter a space in your code, delete the space, and press Ctrl+S to save your code. Then refresh your browser.
Sometimes it doesn't work. And you can try it again. Sometimes I try it for 4 times and it works.
I suggest you to use other software to help you to do this thing.

Why does GWT sometimes successfully compile and other times just stall?

I am working on a demo for a client of what's possible with GWT-Ext for GWT. After browsing for the simplest way to get up and running, I decided on installing the Google Plugin for Eclipse and using the New Web Application Wizard.
First time around, I followed these steps for create the default application:
Selected File > New > Web Application Project from the Eclipse menu.
In the New Web Application Project wizard, entered a name for the project (ExtDemo) and a java package name, com.extdemo.
Unchecked the "Use Google App Engine" check box.
Clicked Finish.
Right clicked it in package explorer and selected Run As > Run Configurations
Put a check in the Automatically Select Unused Port checkbox.
Clicked Run to see the default GWT 1.7 application
This worked fine... it launched GWT's hosted browser and the app worked as supposed to.
(I then continued to import GWT-Ext and add all sorts of widgets building up a nice little demo app)
However at some point when relaunching the app in hosted mode, the hosted browser displays an empty iframe. I even reverted the code to a point where everything was working as supposed to and... same thing, an empty iframe with the surrounding static content.
Now what is really strange is when I go through the process of creating the default application again by following the steps above, the hosted browser launches with an empty iframe again.
However when I click on Compile/Browse, this sometimes allows the app to launch in Firefox.
Anyone have this happen to them?
I have seen some odd behaviors occasionally. Here are some basic suggestions (some are dumb and you might have tried them already):
Use a new workspace
I do not know if GWT plugin somehow caches stuff in the embedded Jetty. If you are re-creating the default app/project, try and use a different name for the project.
Try and re-use a fixed port so that there is no possibility of having multiple servers running.
Update: Found a new "classic" solution:
Delete the cache in IE and possibly Firefox too. Apparently the 'script' tag content tends to be cached by IE. If this works, we can all try tearing our hair out!
Found the updated answer at this link:
I have had the same problem in the past and found it is much more likely to happen if limited CPU is available. For example if my older laptop was running on battery and had stepped down the CPU speed to save power it frequently happened. When running on mains in max performance mode it only happened occasionally. Now I have a much newer and more powerful laptop and the problem has gone away.
Another cause I found was too many breakpoints set up in eclipse and removing breakpoints would often clear the problem.
I've had issues with the browser caching.
Try clearing your browser cache, refresh a few times after a failed load, etc.
You can also try using a different port so the URL is different.
It takes some time to download and run the GWT app, particularly if you are using extra libraries, so wait for a few seconds to see if the app finally loaded.
What makes the app loading to fail randomly is something I don't know yet, but I suspect, as stated by Daniel Vaughan, that is related with a lack of computer resources, CPU, memory, etc.

Categories