Deploying applications to Web Logic production Server - oracle

I am here to get some expert advice on deploying applications to WebLogic Production Server.
Is it a best practice to use Admin Server Console for deploying and redeploying applications in production. Actually I am deploying to a cluster having two managed server instances.
I have encountered this issue while i am redeploying application in the production. When i am deleting existing .ear file and adding updated .ear file will put the updated .ear file into prepared state. I can not make it Active state using Admin Server Console. If i try it will through some exceptions. But after some time it automatically goes in to active state, but i don't know what is happening inside. Sometimes i restart the server to make it active. Could anybody explain me what is the procedure when deploying application and redeploying applications in weblogic
Thanks in advance for any Help...

Generally WLST (WebLogic Scripting Tool) is used to deploy the applications. Administration Console can also be used to deploy/upgrade the applications but if there are many environments that need to be upgraded then WLST (which works like a command line tool) is much better option.
Get an overview of WLST to know how to use it to deploy/undeploy/upgrade applications.

Check out "Understanding WebLogic Server Deployment" and the "Redeploying Applications in a Production Environment". There are different factors that affect redeployment of an application which you might be running into.
http://docs.oracle.com/cd/E23943_01/web.1111/e13702/understanding.htm#i1057116
http://docs.oracle.com/cd/E23943_01/web.1111/e13702/redeploy.htm#g1039635
Additionally, there is a WebLogic Plug-in for Maven in more recent WebLogic releases that you can use for deployments in conjunction with Maven.

Related

Solaris 11 development environment on Cloud or hosting

I got in charge to create a website based on Java. Production environment specs include Solaris 11.1, OHS 12.1.3, WebLogic 12.1.3, Java 1.7.0_51 and Oracle Database 11.2.
I want to create a server on some cloud or hosting service as Development environment with the same specs to avoid migration problems to Production. I also think this approach helps to give my team a single server where they can work and have some testers/client to visit the site.
Normally I would use a local Development environment but a lot of people is involved and differences with Production can become a problem at migration.
I checked http://www.polarhome.com/ but I don't know if it will fit all specs needed. I looked at Windows Azure and Google Cloud with no success. AWS maybe? I also checked https://cloud.oracle.com but I don't understand if they already offer what I need.
Do you know any providers to create my Development environment or another approach/suggestion to develop this project??
Thanks!
EDIT.
To clarify, the client's Production environment already exists and is running somewhere. My project will be installed on that environment when development is finished. I personally think that developing on any VM with WebLogic 12.1.X and Oracle Database 11.X should be enough, but I've never done it so I wanted to follow client's advise on having a Development environment similar to Production.
Do you think I can just create a VM on any OS and just install WebLogic 12 with Oracle Database 11?? Any suggestions to avoid migration issues if I take that route?
I think that develop a new website from scratch thinking to use the architecture proposed by you is a nonsense. I think that if you will use cloud services like PaaS you will do something better.
In any case, you can find solaris VMs on Cloudsigma , Entic and Oracle Public Cloud

Auto-deploy/reload a jar in weblogic server

I am new to Oracle SOA Suite 11.1.1.4... Currently I am working on User defined XPath Functions. As part of this, I will prepare a jar file and need to deploy into weblogic server(10.3) domain lib folder(fusionmw\soasuite\11gR1\11.1.1\sp4\user_projects\domains\DOMAIN_NAME\lib). When ever this jar is altered, I need to replace this in server domain lib and restart the server to load the changes. But I feel this is not a good practice in production server to restart.
Is there a way to auto load updated jar into server's domain so the changes will reflect immediately instead of restarting the server.
Thanks in advance,
Swamy.
Auto-deployment is a method for quickly deploying an application to a stand-alone server (Administration Server) for evaluation or testing. It is recommended that this method be used only in a single-server development environment.
You can run a WebLogic Server domain in two different modes: development and production. Only development mode allows you use the auto-deployment feature
To auto-deploy an archived application, copy its archive file to the /autodeploy directory. WebLogic Server automatically sets the application’s deployment mode to stage mode.
Few words of caution when using autodeploy
Make sure that the server is running while you are adding/replacing/deleting a jar/war/ear in the autodeploy folder. Otherwise the server goes out of sync
Make sure the server is running in development mode otherwise the autodeploy folder changes are not seen by the server instance
In case you are packaging your jar/war/ear in a windows system then deploying it to a weblogic server running in a Unix environment, the weblogic instance will fail to unpack/autodeploy the file through the following exception
java.util.zip.ZipException: Error opening file - filename.war Message - error in opening zip file
java.io.IOException: error in opening zip file with ... Message - error in opening zip file ....
Read this link

Oracle JDBC web service in Apache Tomcat 5.5 can't authenticate with DB

I installed a java web service on a machine that accesses an Oracle DB via JDBC on the same network. The service was functioning fine for several months until this morning when I installed another applicaiton that access the database using ODP.NET. I'm trying to figure out what went wronge to cause the ORA-01017 exceptions that I'm getting. This generally means that the login credentials are invalid, but the login credentials haven't changed. I also verified it the service's log4j output that it is indeed still trying to connect to the DB correctly.
I realize I don't have much to go off of here, but I'm trying to figure out what other dependencies that. The web service came packaged with ojdbc14.jar, so that tells me that it targets java1.4, but presumably would work fine in later java versions. Not too sure about it working with later java versions, however, it was working fine until today.
Does OJDBC rely on tnsnames.ora. If it depends on how the service uses OJDBC, then I'm not sure which it is doing. I suppose it's possible I deleted the tnsnames.ora, but that is a bit of a longshot. I also tried manging Apache Tomcat (running on Win Server 2003 x64) to target different java jvm versions, but to no avail. It was initially targeting the default jvm.
Are there other dependencies that I've missed here, or any diagnostic measures I could try? THe same web service is running on another machine on the same network which I am pretty sure is configured exactly the same. Again, it was working on both machines until today, and is now just working on the one.
Tomcat targets JDK 7.
Looks like replacing ojdbc14.jar with ojdbc6_g.jar did the trick. No idea why it was the case only for 1 of the 2 machines. ojdbc6 targets JDK 6, but ojdbc14 did, and should have continued to work. If anyone has any additional insight here, let me know.

A good strategy for knowing the versions of deployed applications?

In order to know which revision number the application is built from, we use to give the ears we deploy to Glassfish names like myapp_2012-01-20_rev22123.ear. Then we can simply login to Glassfish and see what version is deployed in the web interface (as the appname is the name of the ear file). A downside of this approach is that we need to do a manual undeploy/redeploy to update the name...
But I would like to script the undeploy/deploy process, and having each version of an ear get a different name is not very suitable to scripting this redeployment process. Glassfish 2 does not support the "list applications" goal that Glassfish 3 has, which I could have used to retrieve the application name to undeploy.
So is there any good strategy that will easily allow us to see what version is deployed of an application, and that does not suffer from the above fault?
It would be preferable if this meant we did not have to change the existing applications (like add a jsp page or something to show the current scm revision), but a change in a Maven build script would be acceptable.
I faced a similar issue, I finally came around it by using maven-buildnumber-plugin and writing a simple servlet to get build information. You can find the details in the blog post I made.
Why not use the built-in GlassFish Server versioning to assign a version number at deploy time? This will also enable you to rollback to prior versions. For example:
asadmin deploy --name MyApplication:2012-01-20_rev22123 MyApplication.ear
There is more information on application versioning here:
http://docs.oracle.com/cd/E18930_01/html/821-2417/gihzx.html#gkhhv
Hope this helps.

Two Hudson Masters on the same Windows Server

I want to setup two Hudson Masters on the same Hardware. This will make administering Hudson easier, since both servers are used by two different (and independent) teams.
So far I tried to install one server as a service. I verified the installation and it is running ok. I than copied the installation into another path and changed the service information (different service Name and description) and the httpPort. I then create the service, once using sc.exe create and once using hudson.exe install. In both cases the server started. However, the configuration page acted goofy. So this approach is either not working at all or I missed another configuration file.
Does anyone has an idea how to accomplish this?
I tried the same approach as documented in the question but avoided the copying of the original installation. So I created two folders and put a copy of hudson.war in it. Then I performed the following steps for both folders.
Start Hudson with java -jar hudson.war
Installed Hudson as a service using the web UI
went into the Hudson Base Dir and ran hudson uninstall
modified the port and the Service information in hudson.xml
installed the service through command line hudson install
Now I have two services and the first quick test looks promising.
May I suggest:
run two instances of Tomcat
have each Tomcat running on its own HTTP port
deploy HUDSON.WAR in each Tomcat
set CATALINA_OPTS for each Tomcat to point to a different HUDSON_HOME

Resources