Foren

Weblogic 10.3.6 hot deploy

thumbnail
Davy Kamerbeek, geändert vor 11 Jahren.

Weblogic 10.3.6 hot deploy

New Member Beiträge: 23 Beitrittsdatum: 12.03.12 Neueste Beiträge
Hi,

I'm having issues with the Liferay autodeployment on a weblogic container.

Stack:
Linux Redhat
Oracle Weblogic Server 10.3.6
Liferay 6.1.20 EE war
Oracle Database

Content portal-ext.properties:
Internal (in WAR) portal-ext.properties:
# Liferay specific settings
liferay.home=/oracle/user_projects/domains

# Include and overrides
include-and-override=${liferay.home}/portal-setup-wizard.properties
include-and-override=${liferay.home}/portal-ext.properties

External (on container domain path) portal-ext.properties:
# Setup
schema.run.enabled=true
schema.run.minimal=true
setup.wizard.enabled=false
# Liferay specific settings
liferay.home=/oracle/user_projects/domains
# Database
jdbc.default.jndi.name=jdbc/LiferayPool
# Deployment
auto.deploy.enabled=true
auto.deploy.dest.dir=/oracle/user_projects/domains/s_xxxx01/autodeploy

For this example i use a sample war from the sample sdk (delivered with the Liferay Developer Studio). I copy the war to the $liferay_home/deploy folder. Liferay will copy the artifact to the autodeploy folder of weblogic. Weblogic installs the war and is visible and active in de deployment weblogic console.

Logging:

11:19:37,916 INFO [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner][AutoDeployDir:177] Processing sample-styled-minimal-theme-6.1.10.1.war
11:19:37,919 INFO [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner][ThemeAutoDeployListener:49] Copying themes for /oracle/user_projects/domains/deploy/sample-styled-minimal-theme-6.1.10.1.war
11:19:37,920 INFO [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner][BaseDeployer:763] Deploying sample-styled-minimal-theme-6.1.10.1.war
11:19:37,924 INFO [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner][BaseDeployer:859] Updating Sample Styled Minimal from version 6.1.10.1 to version 6.1.10.1
11:19:38,262 INFO [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner][BaseDeployer:2083] Modifying Servlet 2.4 /tmp/20120827111937924/WEB-INF/web.xml
11:19:38,409 INFO [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner][ThemeAutoDeployListener:55] Themes for /oracle/user_projects/domains/deploy/sample-styled-minimal-theme-6.1.10.1.war copied successfully. Deployment will start in a few seconds.

Nothing else will happen. Looks like liferay isn't deploying the WAR properly?

[edit] zero exceptions in logging![/edit]
thumbnail
Davy Kamerbeek, geändert vor 11 Jahren.

RE: Weblogic 10.3.6 hot deploy

New Member Beiträge: 23 Beitrittsdatum: 12.03.12 Neueste Beiträge
Any hint is welcome!
thumbnail
Davy Kamerbeek, geändert vor 11 Jahren.

RE: Weblogic 10.3.6 hot deploy

New Member Beiträge: 23 Beitrittsdatum: 12.03.12 Neueste Beiträge
Figured it out... the weblogic autodeploy always deploy's the artifacts to the admin server. The liferay instance was running on a managed server (not admin server) so the plugins were being installed on the adminserver so the liferay instance never got the callback from the container to get the acknowledge to finalize the plugin status.
S P, geändert vor 11 Jahren.

RE: Weblogic 10.3.6 hot deploy

Junior Member Beiträge: 58 Beitrittsdatum: 06.08.12 Neueste Beiträge
Hi Davy,
I am trying to install Liferay6.1.1.1GA2 on Linux5 Tikonga Server with Weblogic 10.3.6 but its not deploying liferay war file...
could you please share the steps you did for liferay deplpoyment.


Thanks in Advance.
thumbnail
Davy Kamerbeek, geändert vor 11 Jahren.

RE: Weblogic 10.3.6 hot deploy

New Member Beiträge: 23 Beitrittsdatum: 12.03.12 Neueste Beiträge
I need a little more information. Please post the server logging, portal-ext.properties, and explain what you did to deploy the liferay war on weblogic.
S P, geändert vor 11 Jahren.

RE: Weblogic 10.3.6 hot deploy

Junior Member Beiträge: 58 Beitrittsdatum: 06.08.12 Neueste Beiträge
Hi Davy,
Thanks for the reply.
here i have created a query in the forum,please have a look.

http://www.liferay.com/community/forums/-/message_boards/message/16869843

Also If you have any steps particular please message me i will try it.

i am ok for both liferay6.1.1 or liferay6.1.2 war file but i am trying in linux o.s ,it will be good if liferay deployed in production mode or other than auto-deplpoy.

I am able to to do in windows both 6.1 .1 and 6.1.2 with liferay faces.

Thanks in Advance.
thumbnail
Davy Kamerbeek, geändert vor 11 Jahren.

RE: Weblogic 10.3.6 hot deploy

New Member Beiträge: 23 Beitrittsdatum: 12.03.12 Neueste Beiträge
Did you follow the steps mentioned in Weblogic 10.3 install guide ?
S P, geändert vor 11 Jahren.

RE: Weblogic 10.3.6 hot deploy

Junior Member Beiträge: 58 Beitrittsdatum: 06.08.12 Neueste Beiträge
Hi Davy,
Thanks for your reply.
Much appreciated.

I have followed the steps and i got timeout error while deploying using weblogic console browser.
refered url : https://www.liferay.com/es/documentation/liferay-portal/6.1/user-guide/-/ai/lp-6-1-ugen11-installing-liferay-on-oracle-weblogic-103-0
Here is my current enviornemnt:
Red Hat Enterprise Linux Server release 5.5 (Tikanga)
JDK : jdk160_29
WebLogic Server Version: 12.1.1.0(I tried with weblogic10.3.6 also)
Liferay:liferay-portal-6.1.0-ce-rc1-20111219113511317.war
Please find the error

<oct 18, 2012 9:33:27 pm bst> <warning> <j2ee> <bea-160188> <unresolved webapp library references defined in weblogic.xml, of module 'liferay-portal-6.1.0-ce-rc1-20111219113511317.war' [extension-name: jsf, specification-version: 1.2, implementation-version: exact-match: false].> 
<oct 18, 2012 9:42:37 pm bst> <error> <console> <bea-240003> <administration console encountered the following error: java.lang.runtimeexception: timed out waiting for completion at weblogic.management.provider.internal.activatetaskimpl.waitforcompletion(activatetaskimpl.java:402) weblogic.management.provider.internal.activatetaskimpl.waitfortaskcompletion(activatetaskimpl.java:377) weblogic.management.provider.internal.editaccessimpl.activatechangesandwaitforcompletion(editaccessimpl.java:963) weblogic.management.mbeanservers.edit.internal.configurationmanagermbeanimpl.activate(configurationmanagermbeanimpl.java:398) sun.reflect.nativemethodaccessorimpl.invoke0(native method) sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:39) sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:25) java.lang.reflect.method.invoke(method.java:597) weblogic.management.jmx.modelmbean.wlsmodelmbean.invoke(wlsmodelmbean.java:437) com.sun.jmx.interceptor.defaultmbeanserverinterceptor.invoke(defaultmbeanserverinterceptor.java:836) com.sun.jmx.mbeanserver.jmxmbeanserver.invoke(jmxmbeanserver.java:761) weblogic.management.jmx.mbeanserver.wlsmbeanserverinterceptorbase$16.run(wlsmbeanserverinterceptorbase.java:449) java.security.accesscontroller.doprivileged(native weblogic.management.jmx.mbeanserver.wlsmbeanserverinterceptorbase.invoke(wlsmbeanserverinterceptorbase.java:447) weblogic.management.mbeanservers.internal.jmxcontextinterceptor.invoke(jmxcontextinterceptor.java:263) weblogic.management.mbeanservers.edit.internal.recordinginterceptor.invoke(recordinginterceptor.java:199) weblogic.management.mbeanservers.internal.securitymbeanmgmtopsinterceptor.invoke(securitymbeanmgmtopsinterceptor.java:65) weblogic.management.mbeanservers.edit.internal.editlockinterceptor.invoke(editlockinterceptor.java:112) weblogic.management.mbeanservers.internal.securityinterceptor.invoke(securityinterceptor.java:444) weblogic.management.jmx.mbeanserver.wlsmbeanserver.invoke(wlsmbeanserver.java:323) weblogic.management.mbeanservers.internal.jmxconnectorsubjectforwarder$11$1.run(jmxconnectorsubjectforwarder.java:663) < code></administration></bea-240003></console></error></oct></unresolved></bea-160188></j2ee></warning></oct>
S P, geändert vor 11 Jahren.

RE: Weblogic 10.3.6 hot deploy

Junior Member Beiträge: 58 Beitrittsdatum: 06.08.12 Neueste Beiträge
I have increased weblogic time out ,now liferay is running fine.
I am not sure ,till now why it was not working.
Anyways thanks very much for your reply.
Now i will try to deploy liferay bridges and customs portlets.

Thanks.emoticon
thumbnail
Siva Reddy, geändert vor 10 Jahren.

RE: Weblogic 10.3.6 hot deploy

New Member Beiträge: 8 Beitrittsdatum: 22.12.10 Neueste Beiträge
Hi Davy and SP,
This post saved lot of my time to deploy the liferay on weblogic server and apprecited both of you for the good work being done.

My requirement is slightly different though related to hot deploy.
Weblogic admin server - deployed liferay and plug-in wars successfully through hot deployment. As the hot deployment works only on admin server.
Weblogic manage server - deployed the liferay.war through console but weblogic auto deployment is not working on manage server.

I just see the message like "deployment will start shortly" but it never deploys.

Appreciated your inputs to resolve it.
thumbnail
Davy Kamerbeek, geändert vor 10 Jahren.

RE: Weblogic 10.3.6 hot deploy

New Member Beiträge: 23 Beitrittsdatum: 12.03.12 Neueste Beiträge
Hi,

I'm driving in my car so I will anwser very short ;-)
Hot deploy will not work on a managed server. You'll have to create a wls script to deploy the artifacts.

Good luck!
thumbnail
Siva Reddy, geändert vor 10 Jahren.

RE: Weblogic 10.3.6 hot deploy

New Member Beiträge: 8 Beitrittsdatum: 22.12.10 Neueste Beiträge
Thanks Davy for the qucik reply.

If possible can you pls share wls scripts? any inputs to start the wls scripts are highly appreciated.
thumbnail
Mathew Anderson, geändert vor 10 Jahren.

RE: Weblogic 10.3.6 hot deploy

Junior Member Beiträge: 29 Beitrittsdatum: 22.04.13 Neueste Beiträge
I have a job that looks in a stage directory, $STAGE below. If it sees a file in it, it runs the shell script below with the name of the portlet as the only argument. Granted this is not wlst, but it does the job.

It should be mostly the same for 10.3.6.


#!/bin/sh
STAGE="/path/to/stage/folder"
ORACLE_PATH="/path/to/weblogic/install"
ORACLE_DOMAIN="${ORACLE_PATH}/user_projects/domains/liferay"

#echo "APP IS: $1"
APP=$1

# put the app in the Liferay Hotdeploy Directory

echo "Deploying ${APP} ... "
cp ${STAGE} /${APP} ${ORACLE_DOMAIN}/../deploy/.
sleep 10

# Now that the app is in the deploy directory, liferay needs to read it and stage it to the applications directory.
# for above, need to set in portal-ext.properties file : auto.deploy.weblogic.dest.dir=ORACLE_DOMAIN/applications
# also I found that auto.deploy.unpack.war=false works great
# it will be staged as a war file.

# Undeploy the app if it exists
strLength=`expr length ${APP}`
let myLength=`expr ${strLength}-4`
appName=${APP:0:${myLength}}
${JAVA_HOME}/bin/java  -classpath ${ORACLE_PATH}/wlserver_12.1/server/lib/weblogic.jar:${JAVA_HOME}/j2se/lib/tools.jar weblogic.Deployer -adminurl t3://localhost:7001  -userconfigfile ${ORACLE_DOMAIN}/configfile.secure -userkeyfile ${ORACLE_DOMAIN}/keyfile.secure -verbose -undeploy -targets CLUSTER_NAME -name  ${appName}

# Deploy the app
${JAVA_HOME}/bin/java -classpath ${ORACLE_PATH}/wlserver_12.1/server/lib/weblogic.jar:${JAVA_HOME}/j2se/lib/tools.jar weblogic.Deployer -adminurl t3://localhost:7001  -userconfigfile ${ORACLE_DOMAIN}/configfile.secure -userkeyfile ${ORACLE_DOMAIN}/keyfile.secure -verbose -stage -deploy -targets CLUSTER_NAME -upload ${ORACLE_DOMAIN}/applications/${APP}
thumbnail
Ehsan Rashidy, geändert vor 10 Jahren.

RE: Weblogic 10.3.6 hot deploy

New Member Beiträge: 17 Beitrittsdatum: 24.04.13 Neueste Beiträge
Mathew Anderson:
I have a job that looks in a stage directory, $STAGE below. If it sees a file in it, it runs the shell script below with the name of the portlet as the only argument. Granted this is not wlst, but it does the job.

It should be mostly the same for 10.3.6.


#!/bin/sh
STAGE="/path/to/stage/folder"
ORACLE_PATH="/path/to/weblogic/install"
ORACLE_DOMAIN="${ORACLE_PATH}/user_projects/domains/liferay"

#echo "APP IS: $1"
APP=$1

# put the app in the Liferay Hotdeploy Directory

echo "Deploying ${APP} ... "
cp ${STAGE} /${APP} ${ORACLE_DOMAIN}/../deploy/.
sleep 10

# Now that the app is in the deploy directory, liferay needs to read it and stage it to the applications directory.
# for above, need to set in portal-ext.properties file : auto.deploy.weblogic.dest.dir=ORACLE_DOMAIN/applications
# also I found that auto.deploy.unpack.war=false works great
# it will be staged as a war file.

# Undeploy the app if it exists
strLength=`expr length ${APP}`
let myLength=`expr ${strLength}-4`
appName=${APP:0:${myLength}}
${JAVA_HOME}/bin/java  -classpath ${ORACLE_PATH}/wlserver_12.1/server/lib/weblogic.jar:${JAVA_HOME}/j2se/lib/tools.jar weblogic.Deployer -adminurl t3://localhost:7001  -userconfigfile ${ORACLE_DOMAIN}/configfile.secure -userkeyfile ${ORACLE_DOMAIN}/keyfile.secure -verbose -undeploy -targets CLUSTER_NAME -name  ${appName}

# Deploy the app
${JAVA_HOME}/bin/java -classpath ${ORACLE_PATH}/wlserver_12.1/server/lib/weblogic.jar:${JAVA_HOME}/j2se/lib/tools.jar weblogic.Deployer -adminurl t3://localhost:7001  -userconfigfile ${ORACLE_DOMAIN}/configfile.secure -userkeyfile ${ORACLE_DOMAIN}/keyfile.secure -verbose -stage -deploy -targets CLUSTER_NAME -upload ${ORACLE_DOMAIN}/applications/${APP}


Mathew,
Can I use this script in weblogic 12c?
when I deploy my portlet through admin console into a weblogic managed server, it's not showed up in liferay,
I guess this script can do the job!!
thumbnail
Mathew Anderson, geändert vor 10 Jahren.

RE: Weblogic 10.3.6 hot deploy

Junior Member Beiträge: 29 Beitrittsdatum: 22.04.13 Neueste Beiträge
Yes, I wrote it on my 12c system.
Ram b, geändert vor 7 Jahren.

RE: Weblogic 10.3.6 hot deploy

New Member Beiträge: 11 Beitrittsdatum: 02.07.16 Neueste Beiträge
Hi

I am also facing same issue when liferay 6.2 deployed to weblogic 12.2.1 server. Will u please advice how can i deploy liferay plugins(themes/portlets) to managed server. my environment is windows. where should i place this script and how can i run that script ?

Thanks
Ram