Updating .ear file on websphere (6.1) still runs old code - java

I have a question regarding updating a application on websphere application server. The application is already up and running and I just want to update the code which is packaged in a .ear file. Here is what I thought I should do:
stop the application server.
go to my enterprise application, select the one I am updating, and click update.
point to my .ear file in replace the entire application radio button option.
restart my application server.
After doing this and trying out my application, it is still running the old code, which makes me really confused. The only way I managed to get it to work is to use WinSCP, manually go to the cell directly/installedapps and replace the whole .ear folder. I dont think this a viable solution moving forward.

I solved it. After some intense digging it seems the binary files were expanded into dmgr profile but not my correct node. After finishing the update instead of clicking save I click review and there is a checkbox to synchronize the nodes, which then did the trick.

To update existing enterprise application we do not have to stop the application since WAS stops the application before updating the code .
Based on the update you gave i am assuming this is a network deployment manager setup , so possibly problem is with sync is not taking place after updating the app and save .
Are you explicitly invoking sync operation after application update ? If not , i would recommend that.
Still problem persists then most likely for what ever reason nodeagent process is not invoking app expansion into installedApps folder but you can take a quick look at nodeagent systemout.log file or ffdc files to see if there is any clue about expansion process.
As a work-around you can also use EARExapnder.sh/bat tool available /profile_home/bin directory to expand the application into installedApps when the app is really updated in config/cells/cell_name/applications but not under installedApps folder.
I hope this helps.
Thanks
VT
These opinions are my own.

Related

IntelliJ not updating Glassfish Deployment

IntelliJ is acting odd with its redeployment settings.
In the "updating applications" tab it has on the bottom for debugging:
,
I have tried to use all of the update options in order to update my application (update classes, update classes resources, restart), and NONE work to update my server. I have even closed and rebooted IntelliJ and the updates still don't appear.
The update is a simple alert message that is triggered when the index.html is loaded. It works when I load the html manually, but when I run the server, it does not alert, meaning it is still using a previous iteration of my server? This is really frustrating as I can't see any of my changes and don't know how to fix my server.
I am using the latest Glassfish server and latest IntelliJ IDE. It does update my resources EVENTUALLY, but not through some defined pattern as far as I can tell.
Below is the copy of my answer from your other post. I would suggest to close this one and to continue discussion in single thread (if still needed).
The expected sequence is as follows:
make a change to a resource
update the application on the server with the mentioned 'Update <> application' action: 'Update resource' choice should be enough for an exploded application, redeploy/restart may be needed for archive artifact
reload (refresh) the page, that uses the resource in browser
I suspect you're missing the last (3) step. Please note, step (2) only updates the resource on the server, and to see a change in browser (on client) you should reload the corresponding resources from server by refreshing the page manually.
Hope that helps,

How to reload resource from server after update during runtime Java web start?

I am trying to achieve the automatic update for my java web-start applicaiton. Logic: I am fetching the jnlp file from the server and comparing the timestamp with the current one. if there is difference then download the latest file and restart the application with javaws command. Now I have two problems. 1. I am not able to fetch the local jnlp file (because the location for jnlp file is different for different operating system as mentioned here 2. I am not able to find a graceful way to restart the application after killing the current running application. I would appreciate if there is any other graceful solution available. Thanks
I am trying to implement automatic update using java web start
But i am facing the following issue :
1)Not able to figure out a way to force/direct Java Web Start to check for updates in background when application is running.
2)Even,If I wrote a logic to check for updates manually in background thread , but then, I am not able to find a way to restart my application by running
my.jnlp file.
following similar questions on my issue ,I figured out Java Web Start provide some implementation as DownloadService which can be used to solve my issue.
But i didn't found any relevant example or pointer doc regarding utilisation of the DownloadService implementation.
Please Help.

Dev Machine JBoss Deploy, Quick Refresh of Webpage with Changes

I have a dev machine, which deploys a java project to a local jboss server.
I have an IntelliJ maven project that has some html/js/jsp/servlets, etc. Is there a way to edit the code of the html/js files and then do a refresh of the webpage and see the updated changes without having to redeploy?
When doing just front end apps, I can accomplish this with a node server using gulp watch.
I'm hoping for something similar with my jboss server setup (intent is to simplify architecture and try to get the same front end development speed but have it all contained within a war). If I need to some how use gulp watch with maven, I'm good with that too, as long as I can make changes in the front end code (html/js, I assume changes to jsp/servlets would require a redeploy) and refresh the webpage and see the changes right away. I've also seen people write scripts to copy files from source into an exploded war before, but nothing that was automatic like gulp watch. My googles have failed me, anyone know how to accomplish this?

track changes in eclipse

I have eclipse installed on a local computer, and am working on a project by myself. No one else is collaborating on the coding, I am doing it all myself.
Sometimes, I get ambiguous error messages in my spring mvc app when I run it on tomcat server using eclipse's run as...run on server command. For example, there is sometimes NO stack trace. In those cases, I would like to at least be able to see when each file in the app was last saved, so that I can try to figure out what I changed since the last time the app ran successfully. Ideally, I would like to also be able to see what changes I made to specific files.
Can anyone show me how to accomplish this?
Eclipse has Local History feature: try Team > Show Local History from context menu.
But I recommend you to use some version control system (svn, git) even if you work on your project alone.

Clean Working directory of Tomcat in Eclipse

When I work in on an servlet application in Eclipse, I have to choose Clean Working Directory in the server tab of Eclipse for the changes to be visible in the browser. Is there any way to make sure that I only have to build my servlet and the changes are immediately visible?
Doubleclick the Tomcat entry in Servers view, go to the Publishing section and select Automatically publish when resources change.
It by the way won't happen that "immediately". It might take around 3 seconds, you should see this activity in server logs. Although a slow starter, but Glassfish publishes in a subsecond. You may consider it instead for fast development.
Honesty, i do not think this is possible.
It is like programming in javascript and there is no way to see the result without clearing the browsers cache and reloading the page.

Categories

Resources