Tomcat requires restart to take Jasper Reports changes - spring

I'm using Jasper Reports as part of my Spring application. I deploy my application on a Tomcat 6 server through eclipse, so my project is a WTP project. The problem I have is that when I change a Jasper Reports file (jrxml) I need to restart the server in order to get the changes published. I already checked on the deployment folder and the .jrxml is updated, but for some reason the browser keeps getting the old report, I already cleaned the cache on the browser without luck.
Any ideas on how to solve this, is super annoying when doing development.

I suppose that you use ireport to change .jrxml, when you save changes in that, the eclipse will not be immediately notified that. So you need to fresh your project in eclipse, if necessary, clean and rebuild the project, and redeploy to tomcat.
Also, you can set eclipse to auto build project (Porject-->check Build automatically) and keep refresh the project. When you see the status 'Synchronized' of your project changes to 'Republic' in the 'Server' View, you can restart the server and see the changes. Press 'ctrl+f5' to fresh the page with refreshing all the cache.

Related

Changes not reflecting on EAR in WebSphere Application Server after syncNode?

We needed to test a functionality on WebSphere.
While the dmgr had the updated code, we needed the old code.
So we stopped auto synchronization, restored the old EAR from backup and copied the EAR to the profiles/installedApps/cell/ directory while all the while having backup of the new EAR in the same directory (with a different name like EAR_bkp).
After the testing was done, we enabled auto synch again and ran a syncNode command to manually sync the EAR, but we are unable to see the new changes. We see the EAR file imported to nodeagents/cells/applications directory but changes are not reflecting on the profiles/installedApps/cell/ directory.
What could be the issue? Please suggest.
WebSphere ND has management tools for handling a variety of application updates without having to tinker in the directories on the dmgr or nodes directly, Applications > Application Types > WebSphere enterprise applications, then select the app, then click Update. There are several options described in the attached link. Also look at the Rollout Update option mentioned on the same page.
Application update from console

Alfresco: How to update repository-tier workflow files without restarting the tomcat server?

I'm currently working on developing a custom workflow with many custom behaviors and scripts. I'm using the Alfresco Maven SDK to build and test my project as I develop it. This necessitates that I restart the repository-tier tomcat server every time I want to make a change/update my workflow files. I am getting quite frustrated with how long this takes each time, and it means that I'm wasting time while waiting for the server to restart, especially when I've made a small typo in one of my files.
I'm looking for a way (if it's possible) to update my files (in particular the bpmn process file) and apply these changes to my Alfresco instance without having to restart the tomcat servers each time. I've set to true in my service-context.xml, and I have also tried to redeploy the workflow from the admin-workflow-console, but my changes do not take place unless I manually restart the server.
I am using: Alfresco Community 5.2, Maven SDK 2.2
Any tips or suggestions would be very welcome!
Yes, you can do it by
workflow admin console
URL
http://<server>:<port>/alfresco/s/admin/admin-workflowconsole
Ex :: deploy alfresco/workflow/<workflow-definition>.xml
path for your workflow definition file.
Refer this docs for more information
https://community.alfresco.com/docs/DOC-5079-workflow-console

Apache tomcat doesn't recognize git stashed and later git stash applied changes

I had a repository with code that I was testing via running a server at localhost. The standard procedure was to start Apache-Tomcat-7, re-build the project using Maven and deploy it.
After a while of coding I decided to git stash current changes, then built and deployed the old version, it ran correctly in all browsers. After that I called git stash applyand once again built and deployed the created .war file. However, despite the correct version of code both in generated war and in the deployed .war, now none of the browsers see the new applied version.
I tried Ctrl+F5, removing cached files, shutting down Tomcat & deleting the logs & starting it again. And yet the changes, despite being correctly deployed, don't appear in browsers when I navigate to localhost.
How to fix it, what am I doing wrong?
It's possible the web application with your new code built correctly but is not deploying due to an error in the web.xml, init() or classloaders.
Look for a pair of lines in the catalina.out file that looks like this:
INFO: Deploying web application archive /usr/local/tomcat/apache-tomcat-7.0.63/webapps/web-apps#uits#qr.war
INFO: Deployment of web application archive /usr/local/tomcat/apache-tomcat-7.0.63/webapps/web-apps#uits#qr.war has finished in 5,123 ms
If you see an error after the "Deploying" line and/or no "Deployment" line, that might explain the issue.

Websphere runs old code after deploying new ear file

Ear file is not getting updated after deploying on websphere 7.0. It is still running the old code.
I am not getting this issue with every project. But for the specific project it is not getting updated. I tried to clear the target. I checked the timestamp for generated classes. All showing the timestamp of when I did maven install.
I got the below post with same issue:
Duplicate Post with same issue for reference
In this, user has commented, "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"
But I could not see any checkbox in WAS 7.0. Please suggest how could I make that work.

RAD (Rational Application Developer) -- Clean vs. Publish vs Restart

I am currently using the Spring 3.0 framework in a websphere 6.1 environment. The IDE I am using is RAD (Rational Application Developer) 7.5. I was working on a problem last night and I found that my code wasn't being 100% refreshed on the server after making a change in my workspace. My question is what is the difference from websphere's perspective between the following:
Restarting the entire server with an EAR installed
Cleaning an EAR within WebSphere
Clicking on the project and selecting publish
Do other Application Server / IDEs have the same type of syning issues when developing J2EE applications?
With RAD here's the default behavior. When you 'clean' it gets rid of the compiled objects and recreates them via a 'build all' then does a 'publish'. When you 'build' it builds anything it thinks is necessary then does a 'publish'. When you 'build all' it builds all objects then does a 'publish'.
When you (or your IDE via the commands above) does a 'publish' it takes all of your compiled objects and deploys them onto the server that you've setup for this project (via a hot swap if the server is running). Hot swaps work well for some things (such as JSPs) but not as well for other things (configuration files, EJBs, etc). If unable to do a hot swap correctly you need to bounce your server.
For example, if you have RAD setup to automatically build, your server is running, and you change an EJB what will happen is:
1. The EJB will be compiled
2. If the project is OK RAD will deploy your changes
3. The server will probably not be able to pickup your hotswapped changes so the server will continue to run the old code
When this happens bounce the server and the code will be picked-up.
Restarting the server will take some time but surely reload the files if they exist on the file system. I am not sure about calling Clean from the Servers view.
If you call Publish within Servers view, RAD will restart the application on the server. Thereby changes normally get picked up.
You need to understand what kind of change you did and see what WebSphere Application Server requires to load the change. If you scroll to the bottom of the linked help entry, you can see for each JavaEE module type a link to a document which describes what needs to be done to pickup the changes.
http://publib.boulder.ibm.com/infocenter/wasinfo/v7r0/index.jsp?topic=/com.ibm.websphere.base.doc/info/aes/ae/trun_app_hotupgrade.html
Otherwise, you should understand the whole lifecycle of what happens from the change to picking it up in the browser, e.g. change on the file, file gets compiled, prepare for deployment runs, classloader sees the change, notices that application needs to be restarted, user calls Republish to restart the application on the server, user refreshes the web page, Firefox shows within Firebug that the Last-Modified timestamp in HTTP header changed.
I am not sure what hot-swap means but when debugging the server, hot code method replacement can replace a class within the debugged server if there is no reference held to the class or the class structure has not changed.
The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM

Resources