Weblogic creating EAR folder in WL_User temp folder - eclipse

Trying to restart from command line weblogic server but it is picking up EAR file i deployed from Eclipse previously. Thought it was some kinda caching issue so opened/closed eclipse and cmd no help. Still picking up this EAR even when i delete it manually from the temp folder WL_User. Cant start weblogic from Eclipse as weblogic closes suddenly due to VM shutdown request and eclipse hangs on publishing state. Not sure why it does that too no error messages except BEA: VM requested Shutdown.
Very confusing how it is picking it up. Really want to understand why? Thanks for help in advance.

Your weblogic domain is in a bad state. Normally I would suggest removing a deployment by opening the weblogic admin console and navigating to Deployments and then deleting the problematic deployment. If you can't do that, try the following:
Navigate to <domain folder>/servers/<server causing problems>
Delete the tmp, data, cache, and logs folders
Restart your server.
Another option (you should only use if you are really stuck) is to edit the following file:
<domain folder>/config/config.xml
search for and remove your <app-deployment>
If it still doesn't work, you have other problems with your VM. Edit the question and add more info as necessary.

Related

FAIL - Failed to deploy application at context path

Before I explain the problem, I just want to point out that I am completely new to NetBeans and Tomcat and I am doing a school project. That being said, the problem is exactly what the title says. Here is the output when I try to run a simple Hello World jsp:
In-place deployment at
C:\Users\lostl\OneDrive\Documents\NetBeansProjects\Project3\build\web
Deployment is in progress...
deploy?config=file%3A%2FC%3A%2FUsers%2Flostl%2FAppData%2FLocal%2FTemp%2Fcontext7180600714574256491.xml&path=/Project3
FAIL - Failed to deploy application at context path [/Project3]
C:\Users\lostl\OneDrive\Documents\NetBeansProjects\Project3\nbproject\build-impl.xml:1058: The module has not been deployed.
See the server log for details.
BUILD FAILED (total time: 0 seconds)
I am using Apache NetBeans 11.2 and Tomcat 9 if it is relevant.
Here is what I tried:
I checked the server log and it displays absolutely nothing.
I tried setting the context path directly to Project3 (i.e. including the -C:/... before Project3) in the context.xml file under META-INF folder.
I tried restarting NetBeans and cleaning and building the project.
I tried running NetBeans under admin privileges.
I might seem like such an idiot for not knowing how to fix this since no one else seems to have this problem, but please help me out.
If you have installed the Apache Tomcat appart from Netbeans, maybe your apache service is already running and it conflicts with Netbeans. You may stop the apache service and then run the application in Netbeans.
Because Netbeans start the apache service in a diffent way, so you don´t need to install the aplication on apache´s folder.
Check out the Windows Services (Services App) and stop the Apache Tomcat if running, then from Netbeans menu select Run->Run Project. Netbean will start Tomcat and deploy your web app onto the Tomcat server.
I fixed it. All I had to do was restart my computer. I feel so dumb.
clean your project if clean project failed to delete some file then,
Just check there must be a java process running at background.
If you are using windows 10 then follow these steps
open command prompt and type below commands
tasklist | findstr java (hit enter now you can see a task list with pid number )
taskkill /F /PID "PID_OF_JAVA_PROCESS" (where PID_OF_JAVA_PROCESS--> task pid hit enter)
now run the project again
I faced this problem and found a solution. It is very simple. All you need to do is stop the Tomcat services or restart your computer and run your program.

JBossEAP / Wildfly error renaming temporary file

for the past several days I've been experiencing this error, while publishing to either JBoss EAP 6.3 or Wildfly 8.2 from Eclipse.
Error renaming D:\Servers\wildfly-8.2.0.Final\standalone\tmp\tmp9064011157118650757.jar
to D:\Servers\wildfly-8.2.0.Final\standalone\deployments\BusinessService.war\WEB-INF\lib\spring-web-4.2.3.RELEASE.jar.
This may be caused by incorrect file permissions, or your server's temporary deploy
directory may be on a different filesystem than the final destination. You may adjust
these settings in the server editor.
The problem occurs when I "Add and Remove..." projects from the server, then try to publish them, so the server can start.
I've experienced this issue on two different machines (home (Wildfly) and work (JBoss EAP)).
I'm using:
Windows 7 / 10
Eclipse Mars / Luna
JBoss Tools plugin 4.3 / 4.2
JDK 1.8.0.66 / 1.8.0.65
Maven
Building with maven from Eclipse and from the command line makes no difference. The server is configured to deploy projects as compressed archives. On both machines my user has administrator rights and has full rights on the server directory.
So far I've tried:
recreating the server multiple times with different configurations
using a newly created workspace
reinstalling JBoss Tools
reinstalling Eclipse
using different JDK versions
I'm really at a loss here and I don't know how to proceed in resolving this issue. Please help.
If you are using Windows, the path could get too long and can cause this error. A simple fix is to move WildFly closer to the root.
I had the same problem and solved it like this:
First of all, stop Server (Servers->WildFly(rigth click)->Stop), than clean. So you can run server again.
I had this problem several times in my new windows 10 machine that my employer gave me. Since I did not have admin rights it was a hectic process to troubleshoot this issue. Simple fix would be moving JBOSS_HOME closer to root. However, you need to do a proper restart of your eclipse. I rather recommend a complete restart of your computer because after all you are going to change JBOSS_HOME in windows environmental variables.
This is related to permissions issue on wildfly folder. Allow full control to the wildfly folder.
https://issues.jboss.org/browse/JBIDE-18697
I have moved the wildfly home to reduce the overall path length, and also removed any non-alphanumeric characters from the folder name (like "-" and "." ) . This worked for me, everything else (removing tmp, deployment, rebooting wildfly, rebooting eclipse, rebooting computer) failed.
I also suspect that the issue was stemming from running Wildfly from a ConEmu and/or git bash shell. Running from a plain CMD shell seems more robust.
I also got stuck with the same problem. I tried the below steps and it worked:
Clear the deployments and tmp folder in standalone folder in wildfly folder.
Delete the server and again add the server
Make a build of the project and start the server after successful build.
This is a terribly annoying error that either the Eclipse team or Redhat need to fix.
The solution is to close Eclipse, right click on the icon -> Run As Administrator. This solved it for me.

WebSphere Debugger not stopping at breakpoints in Eclipse

I have deployed my application on WAS 8 as debug. The server status is [Debugging, Synchronized]. When I put breakpoints and start the application, it doesn't stop at the breakpoints. I don't see the debugger thread start either.
I am using RAD 8.0.4 and JDK 1.6.0_31. I have tried cleaning the project and re-deploying but it still doesn't work.
I was able to get it working via a complete clean install of my app. Then removing it from the server via add remove. Clearing cache from the websphere/profiles/myprofile directory. and clearing all bits of my app from the profiles folder via a search for its containing file aka (myproject-folder). Then re-installed the app via add remove on the server and it worked for me.
Best guess I have is something was actually out of sync even though the server though everything was A okay.
WebSphere is a PITA and seems to get out of state too easily.
I'd restart the server and perhaps do a clean on the server (right click on the server, click "Clean...". If that doesn't work, you'll have to take a careful look at the location of your break points. They might not be on code that's getting executed. Place a break point further upstream if necessary, follow it down just to confirm the flow.

WAR doesn't get redeployed in Glassfish from autodeploy

I was able to deploy my WAR the first time I placed it under domains/domain1/autodeploy dir. However, after making some changes and redeploying the WAR to the autodeploy dir, the changes were not picked up. I even deleted domains/domain1/applications/myapp (where myapp corresponds to the myapp.jar being deployed) but the WAR was not redeployed. The server was started and stopped via asadmin:
asadmin start-domain
asadmin stop-domain
What am I doing wrong so that the app does not get redeployed?
UPDATE: I tried manually (re)deploying (also using --force option) the WAR but got the following error in server.log:
[#|2013-03-17T20:47:36.177-0400|SEVERE|glassfish3.1.2|javax.enterprise.system.tools.admin.org.glassfish.deployment.admin|_ThreadID=72;_ThreadName=Thread-2;|Application with name myprojectname is already registered. Either specify that redeployment must be forced, or redeploy the application. Or if this is a new deployment, pick a different name|#]
I do not know how to unregister/undeploy an app that's been once deployed. I tried removing all the references to my app in domain.xml but it didn't work. This seems like a very basic bug in the software.
I know this was answered long ago, but in case anyone else gets here via google like I did, I have another possible answer ...
After encountering this same issue, I found the following ... the autodeploy/.autodeploystatus directory still had a file referencing the application I was trying to redeploy by copying the war into the autodeploy directory. I had to delete the file in the autodeploy/.autodeploystatus directory, then my application was deployed when the war was copied into the autodeploy directory.
Hope that helps.
NOTE: Apparently, it is obvious to others who use glassfish that you have to delete all this stuff from the hidden .autodeploystatus directory to get your re-deploys to work. Why is it obvious to them? We may never know.
You can undeploy via asadamin with:
asadmin undeploy yourapplication
You can also visit the glassfish admin console http://localhost:4848 and undeploy via the graphical interface (look at Applications).
In general the re-autodeployment should work, but I would recommend using the normal deploy method or an incremental redeployment by some IDE like NetBeans...
Exactly the same problem reappears for an application running to be deployed in Payara 5.2021.10 (perhaps for other recent versions > 5.193) within a docker container.
The problem happens every time the docker container restarts - the deployment fails with a message:
Application with name {applicationName} is already registered. Either
specify that redeployment must be forced, or redeploy the application.
Or if this is a new deployment, pick a different name
The problem can be fixed by a forced redeploy. Place something like this into a Dockerfile of the application image:
ENV DEPLOY_PROPS="--force=true"
This environment variable allows to set custom parameters to asadmin's deploy command. How exactly is it applied can be seen in the script that generates the deploy commands, that is being run from within the container's entrypoint.

JBoss Application Server redeploy

I need a windows shell script which will redeploy my .ear file. I wrote one:
net stop "JBAS50SVC"
copy /y O:\TEMP\app.ear C:\jboss-4.2.3.GA\server\default\deploy\app.ear
net start "JBAS50SVC"
But the problem is that when I try to stop the JBoss service it does not fully unload itself (my suggestion), so when I start it there's no app deployed in JBoss.
You mentioned that JBoss becomes very slow when you use autoDeploy and keep the server running for a month or more. That's likely to be because your permanent generation memory is filling up over time. See this related question.
I think you'd be best served by using the autoDeploy feature as other suggest, and restarting the entire server periodically to clear out PermGen. There's several ways to track PermGen utilization; I add the following to JAVA_OPTS in run.conf:
-XX:+PrintGCTimeStamps -XX:+PrintHeapAtGC -XX:+PrintTenuringDistribution -Xloggc:$LOGDIR/gc.log
Typically to redeploy an application that is self-contained in an ear in jboss just requires replacing the ear. If there is more to the application (such as classes that have to go in the jboss lib directory) then it may require a restart.
In terms of how to restart it, it depends what you are using to start jboss as a service. Some service starters do not actually control the jvm after they start it, so restarting the service just starts a second instance. You can shutdown jboss with the shutdown script in the JBOSS_HOME/bin directory (shutdown.bat) and then deploy and restart the service. Be sure to pause when you do this, as the shutdown command will issue the shutdown request, the server may still be running.
You can just COPY/RENAME the EAR file to deploy directory. JBoss will automatically take care of re-deployment for you.
As mentioned earlier jboss automatically deploys everything you copy into the deploy directory by default.
If not, check if you are working on a vhost that doesnt autodeploy ear files.
<Host name="vhost2" autoDeploy="false" .... />
other than that, I feel like this is a totally different error due to the fact that jboss takes care of deployment for you. Please check the log files for startup errors of your application.
You might want to check the JBoss community wiki on this, there are undoubtedly easier and more reliable methods than a batch file.
Stopping the server should not undeploy the application - that wouldn't make much sense.