Empty Jboss files post removal of old application bulid file - jboss

I have a very strange situation.
My application build file was deployed in jboss and i accidentally installed the new build file without removing old build file.
Now when both the build files were present ,i removed the old build file forcefully and without stopping the jboss process.Which has resulted in following empty files with 0kb
cache-invalidation-service.xml, sqlexception-service.xml, jbossjca-service.xml. jboss-local-jdbc.rar, jboss-mx-ext.sar under server/tomcat-clustered/deploy/
i need to know,what could have triggered that has caused only these files to go empty.
Thanks..

Related

Eclipse immediately undeletes deleted file

When attempting to delete log4j.properties Eclipse undeletes in the very next moment. The file is not used at the moment, no build process is running, the project containing the file is not being deployed. Yet the file is being restored immediately. Even when the IDE and all shell (ie. Git bash) sessions are closed and the file is not open anywhere, it can be successfully deleted using Windows Explorer or Total Commander, but the moment the IDE is started the file is there again.
The intention was to replace the old properties structure with an xml, but I couldn't even overwrite it as upon saving the original content got restored. Any advice on this?

NetBeans says upload was successfull, but remote file is not changed

I created a new project from remote sources. I setup the deployment and downloaded the whole project from the FTP server via Netbeans.
I changed a file's content and uploaded it via Netbeans deployment, it says:
Summary
Succeeded: file app/design/frontend/venedor/default/template/newsletter/subscribe.phtml
Runtime: 194 ms, processed: 1 file(s), 3,062 KB
However, nothing actually changed. So I logged in to the FTP-Server and opened the file, but the file is still in it's initial state. So the upload never actually happened.
I also tried it via "synchronize" but it makes no difference.
How can I solve this?
I am using the latest version (8.2 Build 201609300101)
I solved it. It was because of the "Upload Directory" setting. I somehow thought that I have to specify the upload directory where users upload their stuff, but of course I had to change it to the root directory of my project. Now it works!

drag and drop ear file on wildfly to deploy project

I'm trying to deploy my project on wildfly using drag and drop way.
In fact, I drag and drop the ear project to wildfly server, as result, I got myProject-ear.ear.dodeploy on wildfly-10.0.0.Final\standalone\deployments.
I want to have myProject-ear.ear.deployed instead of myProject-ear.ear.dodeploy after drag and drop the ear project on the server.
Have you please any idea about solving my issue. Thanks a lot.
Whether drag&drop (or actually creating the war/jar/ear/... file in the deployments directory) is sufficient can be configured in the Wildfly configuration file (standalone.xml in your case). But since you create that file and see a ...dodeploy file popping up should tell you the deployment scanner has found your file and is acting.
Once the deployment finished, you should instead see a file named .deployed or .failed. In case of failure a log snippet inside the file could hint to the reason for failure.
But be aware of something: A drag&drop usually triggers a copy operation. Depending on the size of your file that copy may take some time. Wildfly's deployment scanner checks the directory every XXX seconds (configurable). So if your copy process started but the deployment scanner identifies the file before the copy is complete, Wildfly tries to deploy an imcomplete archive. This should result in an error message but may cause what you experience.
So it may be better to first copy the file to another directory (on the same disk), then just move/rename the file into the deployments folder - this operation is atomic, and the deployment scanner will immediately see the full file.
Another way would be to stop the deployment scanner completely and stop/start JBoss after every change to the deployments directory. This is anyway advisable if you run short on PermGen Space.

How to remove a folder created by old version of application with files during upgrade in advanced installer

Many thanks in advance, I am using advanced installer 12.1, the scenario is we have already installed application with some custom location feature and is extends the default application location, this installation creates some folders to store temporary files like "Temporary" folder, this folder is used by the application on every minute basis and hence there are some files in this folder, now issue is when i run a new build or try to install the new version of the application, i again select the another custom location, before finishing the installation the installer deleting all the folders installed with older version but not deleting the folders which contains files created by the application e.g the temporary directory above is deleted if it is empty but when it is non-empty it is not removed.
Solution i tried:
1) I used file Removal tool to remove the file, but i think it point the current location and not pointing the older application path.
2) A custom VB script, but again the same issue as #1
3) I tried uninstall cleanup wizard, result #1
Please guide me how i can delete that folder, any help would be appreciated.
Thanks

Is there a way to get the absolute path of the context root in tomcat?

I have a problem that, after a lot of reading and research, seems like tomcat is running another instance of itself and thus serving an old version of my updated app (or somehow has cached an older version of my webapp somewhere only serves that.)
I work on the app in eclipse on a windows machine and deploy it on a Linux server as a ROOT app (Renaming the war file to a ROOT.war).
What I'd like to know is if there's a way to locate the older version that tomcat is serving by getting tomcat to log an output of the context root of the servlet that's serving the older version of the app.
As it stands it the moment any files created by the updated app get created in the right directory but because the app instances are different it can't access the files shortly after they're created.
Any help/hints would be welcomed
To answer the question in the title, let your code basically do the following:
System.out.println(getServletContext().getRealPath("/"));
To solve the problem described in the question, shutdown Tomcat and delete everything in its /work directory, delete the expanded WAR in /webapps and remove the /Catalina subdirectory of /conf directory (if any) and then restart.