Unsynchronized builds between teams - java

We're working on an app where we share the UI developments with another team while "hiding" the server code from them. They'd get daily builds and deploy their server with these jars.
What's happening is:
Early in the morning, there is a build
Update their jars
They get the jars and deploy their to start their server
What would happen (and shouldn't) is that the build fails in the morning and they don't get their update. We'll have to fix it, rebuild everything and update them which can get frustrating for both teams.
Even if this didn't happen, it's still a drag to wait until the next day to get all modifications.
My question is : is there any possibility to update them constantly without having to install the servers locally on their machines and let them get svn updates?
Note: I'm not the one handeling deployement so I might have missed some points.

Related

GAE Deployment error (Need to deploy my app multiple times to work )

Just recently my GAE app stopped working and it cannot connect to cloud storage and a couple of more issues. I am using GAE and Spring Boot Rest Api.
When I deploy the app on the same version multiple times, one of them randomly works. It is just crazy.
Anytime it does not work, I get different errors like:
java.lang.NoClassDefFoundError: io/jsonwebtoken/io/SerializationException
Sometime I get another error:
NoSuchMethodError: com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;J)V
If I deploy the app multiple times using IntelliJ, magically, I do not get any error for one of the deployments. Is something going on with GAE deployment?
I have used the latest version of BOM to prevent any conflicts in my Maven libraries, and still no luck. It just happened out of blue last week without even changing the code. The version that I had online, stopped working today and I had to deploy the app multiple times until one of them worked.
The app works perfectly on my local machine.
Anyone who encounters this issue. You need to update your appengine-api-1.0-sdk and google-cloud-storage to its latest version. I used Maven to update and fix the issues.
I also got multiple errors because of using io.jsonwebtoken. The error was:
io.jsonwebtoken.security.weakkeyexception: The verification key's size is 48 bits which is not secure enough for the HS256 algorithm
I changed my JWT to auth0 library, and now it works.
Guess why all these things happened? Because Google updated some of the structure of their GAE and if you do not update your app engine you will get an unlimited number of errors with a perpetual cycle of debugging. I hope Google updates people when they make such huge changes that affect many websites.

Netbeans: debugging Java Servlet on Tomcat opens two debug consoles?

I have been developing a Java Servlet app over several years. I have recently started to have slight problems debugging the app with Netbeans. When I click "Debug Project" under the Debug-menu in Netbeans 11.1, the following happens:
Tomcat is started and the app is deployed.
A debugger console is opened that says "User program running".
The app is recompiled.
There seems to be an attempt to somehow redeploy/debug(?) the app again: a second debugger console is opened but this one says "Connection refused".
Historically only steps 1-2 have occurred. I have no idea why recently also steps 3-4 have started to occur. E.g. the only changes I have done to the project pom-file is that some dependencies have been updated to a newer version. The only other major changes have been that the underlying Java SDK is now for version 12 and Netbeans has been updated from 8.2 to 11.1.
The end result is sort of half-ok: I am able to debug (set breakpoints, view variables etc.) the app. But one annoyance is that hot redeploying does not seem to work anymore. Previously changing and saving a Java code file caused that one file to be recompiled and the updated app to be redeployed automatically. This does not happen anymore if I modify and save Java code; I have to compile and redeploy manually. And of course also the fact that the whole project is recompiled at the beginning of each debug session slows things down. I assume these problems must be related to how the extra steps 3-4 have started to occur, but have no idea what could trigger those.
I wonder if anyone has any ideas what might cause this?

(Bad) lagg on auto complete in Eclipse

Basically when I auto complete on Eclipse (By pressing CTRL+Space) the program laggs for about 5 seconds. This is getting really annoying because I use the auto complete alot. How do I fix this?
The workspace I'm working on is located on a NAS with a 1Gbit/s connection. Could this be causing it?
Thanks.
Check if problem exists with local resources too
Create a local workspace and open it with same eclipse instance. Now create a simple java project by new project wizard at your local machine inside this workapce and try code completion there. If it's still slow go to Step 2.
(by the way - I wouldn't store workspace information on remote side, but always local)
Check proposal kinds
If it's not a network issue and the problem still exists on a simple local workplace with local sources you should inspect your proposal setup as shown in next picture.Maybe one of the proposal kinds is slowing down your IDE. You can experiment with turning off proposal kinds sequential to find the problematic one.
System requirements
If you got stil the problem after doing Step 1-2 maybe your system has not enough power/memory to provide eclipse (but normally not the reason - I am using eclipse at Linux on an old T61 notebook with 4 GB Ram + SSD and it works fine!)

gwt application stopped running suddenly

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

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