I have EAR file (which includes a WAR file and EJB jar file) was deployed on Web-Logic(10.3.6) successful.
Now, I have updated EAR file and I redeploy again follow steps: delete old files on the server and install new EAR file without restart server. Every file have been deployed in Active state. But I got some exception related EJB injection. Then I restart Web-logic, my app is running fine.
What's wrong with the redeploy way?
Thanks in advance for any Help...
Weblogic has an lots of documentation about this topic. Sometimes it's referred to as a "hot deploy" or an "in-place" deploy. In the weblogic admin console there is an option to update an ear file rather than what you are doing with the delete->redeploy method.
Just make sure to update your Weblogic-Application-Version property in the MANIFEST.MF of your ear so that weblogic knows it's a new version. Here are some useful links:
Oracle redeploy documentation
An older but still valid list of steps to hot deploy
That said - the problem you are seeing may be something different and your question will need to be updated with more details if the Oracle docs don't help.
Related
I need to create a local environment to deploy an EAR, which is currently in production.
By documentation, it needs:
Java EE 7
Oracle WebLogic 12.1.2
Maven
Installed everything fine and configured, but this is my first time with Java Enterprise and WebLogic. I downloaded WebLogic from the official website (the 12.1.3 version, which is the only one available for a development installation). Executed all scripts to create a local domain, realm and server. It starts fine.
So, I proceeded generating the EAR within the source code, using mvn ear:ear and created the package.
Connected to localhost:7001/console and logged in, went into the Deployments Control page and clicked in install button. Browsed the EAR and deployed without changing any default configuration. It leads me to an error:
java.io.FileNotFoundException: class path resource [env.properties] cannot be opened because it does not exist
I thought it was a file missing inside the EAR package, but I opened it with both Eclipse and WinRAR and the env.properties file is present, in the right path. So I tried deploying the EAR package that is currently in production, but it still gives this error.
At this point, I think it's some WebLogic configurations I missed. Am I right? Where should I eventually check?
I can NOT share any code snippet, I'm sorry.
We still have to understand if it's like this by choice, but the WAR file inside the EAR actually didn't have the properties file. It was sufficient opening it with WinRAR, put the file in the right path and re-deploy it.
So, just to say, WebLogic had no missing configurations. The downloadable development package seems to have everything configured.
I deploy my application as ear in to weblogic. Even for a small change i need to build and restart my server. I am looking out for an easier solution where i could hot deploy my current changes.
I had already tried deploying ear as an open directory.
Can any body help me with this
weblogic uses a value in MANIFEST.MF to determine if the package to be deployed is a newer version of the current deployment. the value is 'Weblogic-Application-Version'. if you update this value, you can redeploy your ear file without stopping-starting the managed instance.
for more info: here
I am trying to integrate the monitoring tool JAMon into my current Spring application. Everything is fine except I don't know how to establish the monitoring information on UI or log file. What is more confusing, is from here
under the section "Setting up the JAMonAppender - Default Behaviour", I see this line:
Install JAMon.war in your application, so you can view your Log4J
statistics and log records.
is there anyway that I can install a war file in current application or there is something wrong with above description?
My understanding is the war file should deployed in an application server. Can I use it as a dependency?
My understanding is the war file should deployed in an application
server. Can I use it as a dependency?
Any WAR file must be deployed in an application container. It cannot be used as a dependency. For your sake, you missed point 1, where you can download the API with all its dependencies here.
I have a Java Web project (Struts + Spring) working perfectly in my localhost. I have to deploy it on my website, but the Tomcat Manager interface given by the webhost says it cannot upload a WAR file due to safety reasons. When contacting the tech support I was told it is not possible to upload a WAR and that I should try deploying my project by uploading the files directly (I have FTP access).
My problem is that no one at the tech support gave specific instructions on where I should put my project files (I don't know if it should be on de same folder the WAR would be sent to) neither how to start/stop it (Will the Tomcat Manager recognize it once I upload the files?).
You can always try to upload a war file to webapps folder of tomcat.
if tomcat is running with autoDeploy set to true it will auto deploy your application.
i think that the same will happen if you upload the exploded war to the webapps, the context will be the name of the directory you put your files in.
Just place your apllication's root folder to the Tomcat's directory webapps and configure tomcat to auto deploy. Restart the server and your application will be deployed.
You transfer the files to the same place as the war file would go - but just as an expanded war.
Whether or not tomcat will recognise that the files have changed depends on the configuration of the tomcat server. I'd just give it a go - transfer the files and see what happens. If it doesn't pick up the changes then you'll need to find out from tech support how to restart tomcat.
I need your help. I am facing unusual problem dealing with Tomcat classloader. I have a WAR and inside the WAR there's a third-party JAR that has native methods. The WAR successfully deployed in a development server for the first time and had been running for about 3 months.
Last week, I did some code refactoring and wanted to deploy the updated WAR, so I delete the old instance and deployed WAR. But now after the redeployment, I always face NoClassDefFoundError. I redeploy the WAR for several times, and the result is same, NoClassDefFoundError.
Oddly, when I deployed the updated WAR in my laptop also use Tomcat, it works fine. My co-worker also tried to deployed in his laptop using Tomcat, it works fine.
I had deleted files inside work directory, but still NoClassDefFoundError appeared. I had turn off the Tomcat, delete the instance on webapp folder, copy the updated WAR again in webapp folder, turn on Tomcat again, but still the error shows up.
What's wrong with the Tomcat in the development server?
You can only register a native library once in the lifetime of a JVM. I suspect that when you updated the WAR, it tried to register the native library again, that failed and that in turn lead to the NoClassDefFoundError. That a restart of the Tomcat server fixed it is consistent with this theory.
If you ship a WAR that contains a native library then the safest course is to restart Tomcat everytime you need to update the app.