WebLogic 11 WLST redeploy behavior - java

I am trying to setup production redeployment on WebLogic 11 using WLST.
Applications, that I am using for that are standard oracle simple applications:
http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/wls/12c/14-Redeployment--4465/redeploy.htm
As first, I've deployed simple.war from /tmp/deployversion1/simple.war, and it was deployed successfully.
That simple.war has MANIFEST.MF:
Manifest-Version: 1.0
Class-Path:
Created-By: Bill Bell
Weblogic-Application-Version: v1
Then, I've tried to deploy simple.war with v2 version. It has manifest:
Manifest-Version: 1.0
Class-Path:
Created-By: Bill Bell
Weblogic-Application-Version: v2
From the Oracle documentation, if manifest has a version inside of it, I may not provide versionIdentifier parameter for deploy/redeploy.
And it works for WebLogic 12.
My WLST code, thar doing the redeployment is:
redeploy(appName = 'Simple', appPath = '/tmp/deployversion2/simple.war')
After it I found, that application wasn't deployed, and in weblogic log:
<Dec 21, 2016 3:11:07 PM PST> <Error> <Deployer> <BEA-149091> <An attempt was made to deploy application 'Simple' with specified archive version 'v1'. However, the application archive as specified in the source has version 'v2'.>
But if I doing redeploy this way(versionIdentifier provided), it works fine:
redeploy(appName = 'Simple', appPath = '/tmp/deployversion2/simple.war', versionIdentifier='v2')
Also, it works if I doing deploy again, even without version:
deploy(appName = 'Simple', appPath = '/tmp/deployversion2/simple.war')
And, finally, it works if application is being deployed with weblogic.Deployer:
java weblogic.Deployer -adminurl http://localhost:7001 -user weblogic -password ******** -redeploy -source /tmp/deployversion2/simple.war -name Simple
So, I have few questions about it.
1) How can I do production redeployment using WLST for WebLogic 11 and WebLogic 12 with one script?
2) Why WLST redeploy fails, but weblogic.Deployer -redeploy works fine, if parameters are the same?
3) What the difference between deploy and redeploy, if deploy result for WebLogic 12 is exactly the same as redeploy result?
4) Can I use for WebLogic 11 deploy() instead of redeploy() to avoid BEA-149091 error?
Thanks.

Related

Cannot link tomcat-native library with Tomcat 9

I am trying to link tomcat native libraries with my tomcat 9 server in a CentOS machine. In order to do so, I have installed APR version v1.6.5, openssl v1.1.1 and then installed tomcat-native v1.2.19 with apr and openssl. I am passing the library path of libtomcatnative-1.so to tomcat through command line option -Djava.library.path=LIB_PATH_OF_TOMCAT_NATIVE. The library got loaded but when i use the native method SSL.version(), its throwing the following exception. What could be the reason?
""com.test.myservice.boot.ObjectStoreService"" ""start"" ""WARNING"" ""06-01-2019 10:55:33:108"" ""62"" ""Cannot load library"" ""java.lang.UnsatisfiedLinkError: org.apache.tomcat.jni.SSL.version()I
at org.apache.tomcat.jni.SSL.version(Native Method)
at org.apache.tomcat.jni.SSL.<clinit>(SSL.java:80)
at com.test.myservice.boot.ObjectStoreService.start(ObjectStoreService.java:59)

java -jar tomcat install reports success but doesn't unpack war file

I have an application which I took over recently. It is a web app running in Tomcat 7 in a Windows environment (Windows Server 2008 R2). The install unpacks to its own folder structure [appName][version number]\tomcat... and then I uninstall and re-install the service to point to the new version. This is how it was handed over to me and I am no expert on Tomcat.
Up until about a week or 2 ago when I did my last install on UAT all has been well. I ran java - jar [appname]-installer-[version].jar and the application installed to a new folder in the structure. Yesterday we put the latest version live and the war file did not unpack. The final message is a success message but although the new folder structure is created the E:[appname][version number]\tomcat\webapps folder contains an unpacked ROOT.war.
I am now convinced the problem is in the environment as it now happens on a test server which was fine before and also I tried it with a previous version of the app and this is also suffering the same issue.
I'm sure there have been no changes to the configuration of Tomcat, which makes me wonder if it may be a Windows update issue which has caused a problem ?
Does anyone have any ideas ? I've copied the output of the false success below in case it helps ... I will try and get details of what updates have been installed recently but I'm hoping someone may have had the same issue (or be able to point to the obvious missing ingredient, wave a magic want or ...!)
Many thanks if you can help
----
thisclass: Installer
installerFileName: /E:/Install/0.6.6/[appname]-installer-0.6.6.jar
Adding environment hostname: [SERVERNAME]
Reading installation manifest:
==============================
Manifest Key:Installation-Replacement-Files, value:tomcat/lib/app.properties
Manifest Key:Installation-Property-Order, value:java,env,file
Manifest Key:Installation-Name, value:[appcode]
Manifest Key:Build-Jdk, value:1.7.0_60
Manifest Key:Built-By, value:username
Manifest Key:Manifest-Version, value:1.0
Manifest Key:Installation-Version, value:0.6.6
Manifest Key:Created-By, value:Apache Maven
Manifest Key:Installation-Codebase-Files, value:
Manifest Key:Build-Date, value:20150309-1120
Manifest Key:Main-Class, value:Installer
Manifest Key:Archiver-Version, value:Plexus Archiver
Starting installation:
======================
Installation dir: E:\[appname]\0.6.6\
Installing: tomcat/webapps/ROOT.war
Installing: tomcat/lib/logback.xml
Installing: tomcat/lib/app.properties
Updating tomcat/lib/app.properties
+ Installation changed:
product.name=##product.name##
to:
product.name=[appname]
+ Installation changed:
product.version=##product.version##
to:
product.version=0.6.6
+ Installation changed:
install.date=##install.date##
to:
install.date=Fri Apr 10 09:45:51 BST 2015
Installing: service.bat
Installing: startup.bat
Installing: shutdown.bat
Installing: tomcat/conf/server.xml
Installing: tomcat/conf/web.xml
Congratulations, installation has been successful
tomcat needs the flag unpackWARs = true and also autoDeploy = true this is done in the server.xml.
That log file is that the output of the "installer" (not tomcat), which seems mighty overblown btw.
What do the tomcat logs say ? I don't think this is a windows conf issue, most likely the installer has changed.

How to know Jboss EAP version

I am using JBoss5.1.0.GA.
How to know whether is this a EAP version or normal? Actually I am stuck in this issue. So trying to solve it by seeing comments.
Assuming you have the required permissions to execute the command
$JBOSS_HOME/bin/jboss-cli.sh --connect
# next two lines to enter in the JBoss command line interface
/:read-attribute(name=product-name)
/:read-attribute(name=product-version)
Or you can use JConsole and explore the jboss.as:server MBean the attributes have the names
productName
productVersion
Or (might not work with 5.1.0 GA, was tested with a newer version)
cat $JBOSS_HOME/modules/system/layers/base/org/jboss/as/product/eap/dir/META-INF/MANIFEST.MF
The JBoss EAP 5.1 is provided as a bundle, which contains not only the application server but also other components:
jboss-eap-5.1/
jboss-as/
mod_cluster/
picketlink/
resteasy/
seam/
All JAR files are signed in the EAP. You can find the information about signatures in META-INF folder:
$ unzip -l jboss-eap-5.1/jboss-as/lib/concurrent.jar
Archive: jboss-eap-5.1/jboss-as/lib/concurrent.jar
Length Date Time Name
--------- ---------- ----- ----
25286 2010-05-04 17:19 META-INF/MANIFEST.MF
25376 2010-09-14 21:10 META-INF/JBOSSCOD.SF
2826 2010-09-14 21:10 META-INF/JBOSSCOD.RSA
....
The EAP contains production server profile:
$ ls jboss-eap-5.1/jboss-as/server/
all default minimal production standard web

Weblogic upgrade wizard - security provider

I am upgrading weblogic 10.3.5 to 12.1.1, and to d so, I am using weblogic upgrade wizard.
I started with upgrading security providers using command - java -classpath /localdata/weblogic/server/lib/weblogic.jar weblogic.Upgrade -type securityproviders
But it displays "Upgrading old security providers to new 10.3 providers", while I am running it from weblogic 12.1.1 and want to upgrade to this version.
Logs printed are :
Calling Wizard framework for upgrade: args2: [-mode=gui, -file=wcf/plugin_gui_wizard.xml, -log=stdout, -p:plugin:plugin.executionPlan.file=weblogic/upgrade/upgradesecurityproviders/execplan.xml, -p:plugin:I18N_PLUGIN=weblogic/upgrade/i18n_upgrade, -p:plugin:TARGET_VERSION=12.1.1.0]
I cross verified, on which version I am running upgrade wizard using java -classpath /localdata/weblogic/server/lib/weblogic.jar weblogic.version and it shows,
WebLogic Server 12.1.1.0 Wed Dec 7 08:40:57 PST 2011 1445491
Snapshot is :
And snapshot from doc provided by Oracle (where it shows 12.1 wizard) is :
Note : If I proceed and select source directory as 10.3 mbeantypes and destination directory as 12.1 mbeantypes, wizard shows error as below for all jars (not showing all line) :
Not upgrading commo.dtd because either this is an out-of-the-box Oracle security provider JAR or this security provider JAR is already upgraded or this is not a valid archive file (may not be a .jar).
No security provider JARs have been upgraded.
and similar for other jars too.
Any idea what I would have missed? Am i following wrong approach?

BeanLocator has not been set (Installing Liferay on Tomcat 7.0)

I'm looking to install the Liferay portal on Tomcat without using the bundle.
Here a link to the tutorial I'm following:
https://www.liferay.com/documentation/liferay-portal/6.1/user-guide/-/ai/lp-6-1-ugen11-installing-liferay-on-tomcat-7-0
Tomcat is running at localhost:8080 as expected, but the Liferay portal is throwing an error. I've followed these directions twice now and can't find a way around it:
HTTP Status 500 - com.liferay.portal.kernel.bean.BeanLocatorException: BeanLocator has not been set
When I navigate to index.jsp (in the webapps/root folder) the line at fault is line #57.
56 else {
57 redirect = PortalUtil.getHomeURL(request);
58 }
According to the Liferay forums, I'm not the first to run into this error, but I wasn't able to find a solution. Thoughts?
Additional Notes:
Operating System: Windows 7
Liferay Portal Source: liferay-portal-src-6.2-ce-ga2
Liferay Portal War: liferay-portal-6.2.0-ce-ga1-20131101192857659.war
Apache Tomcat Version 7.0.53: apache-tomcat-7.0.53

Categories

Resources