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
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 have a war which I deployed on a productive tomcat server. Now I have made another updated war which I want to deploy on the server in the place of the old war. I know I can just replace the old war with the new war, but I was wondering if there is a way to do this without breaking the application for the users?
Note: I am using a Jenkins script for deploying the war
If you are working with Load Balance or Cluster, you can use the Blue Green deployment methodology.
what is the main different is deploying a WAR file and deploy domain folder directly in web application?
I have deployed a web application in to weblogic 12.1.2 as a WAR file it work fine. But when i try to deploy same application as a domain folder directly I'm getting the following error.
java.lang.ClassCastException: weblogic.j2ee.descriptor.wl.WeblogicApplicationBeanImpl cannot be cast to weblogic.j2ee.descriptor.wl.WeblogicWebAppBean
I even fixed name space issue in weblogic-application.xml, also i checked duplicating element in weblogic-application.xml, I can't find any duplicate element in it. Can some one help me to solve this issue? Many Thanks.
You should consider using Maven to build both the WAR and EAR files. From there you should deploy the .ear file to Weblogic with no issues. Make sure your region properties are set correctly as well.
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.
How does IntelliJ automatically deploy the webapp in tomcat?
Just wondering as after the webapp has been deployed and run, there are no traces of the web app in the tomcat folder. (Not even the servlet classes' files).
Does it create those file and delete straight after execution?
Thanks in advance.
IntelliJ is deploying the exploded WAR which exists in your compilation target directory (for my project, it's target - it could be out for yours, depends on if you're using Maven or some other dependency management application), in the process explained at this Wiki link.
So, the artifact always exists in your target or out directory. If it didn't exist, then Tomcat would pitch a fit.