WLST script to deploy an app to a cluster?
Hi,
I'm using WL 9.2.2. Does anyone have a script that deploys an app, "myApp" to a cluster "myCluster"?
Seems like a simple thing, but I'm hitting a wall when trying to search on Google. - Dave
Dave, try my old blog:
http://blogs.oracle.com/jamesbayer/2007/10/automate_wls_console_tasks_wit.html
Instead of the target being the admin server for the deploy command, it could be "myCluster".
Also, for trying to get the syntax, you could also use server 10.0 or 10.3 and use the "Record" feature in the console. That syntax should be mostly backward compatible with 9.2 for main use cases.
Similar Messages
-
WLST scripts for deploying and migrating OSB project required
Hi,
I need sample/reusable WLST scripts for the following requirements:
1. deploying OSB project developed on workbench to the remote server.
2. migrating OSB project from Remote Server A to Remote Server B.
I know other mechanisms to register an OSB project with the server but appreciate if some one can share the above scripts and associated documentation with me.
Regards,
CChttp://download.oracle.com/docs/cd/E13171_01/alsb/docs21/deploy/config_appx.html
http://www.oracle.com/technology/sample_code/products/osb/samples/PARAMETERIZE.zip (other samples here : http://www.oracle.com/technology/sample_code/products/osb/index.html ) -
Creating SessionMBean error while deploying OSB through WLSt script
Hi All,
I am trying to deploy my OSB by using WLST scripts.
After setting the required properties in files,I ran the import.py script.But I got an error while creating an session bean
I have pasted the whole stcak here.It is going fine till creating a session.After that it is failing:
Any pointers in this regard will be helpful.
****************************the stack************************88
Your environment has been set.
CLASSPATH=E:\Oracle\Middleware\patch_wls1033\profiles\default\sys_manifest_class
path\weblogic_patch.jar;E:\Oracle\Middleware\patch_oepe1033\profiles\default\sys
manifestclasspath\weblogic_patch.jar;E:\Oracle\Middleware\patch_ocp353\profile
s\default\sys_manifest_classpath\weblogic_patch.jar;E:\Oracle\Middleware\jrockit
_160_17_R28.0.0-679\lib\tools.jar;E:\Oracle\Middleware\wlserver_10.3\server\lib\
weblogic_sp.jar;E:\Oracle\Middleware\wlserver_10.3\server\lib\weblogic.jar;E:\Or
acle\Middleware\modules\features\weblogic.server.modules_10.3.3.0.jar;E:\Oracle\
Middleware\wlserver_10.3\server\lib\webservices.jar;E:\Oracle\Middleware\modules
\org.apache.ant_1.7.1/lib/ant-all.jar;E:\Oracle\Middleware\modules\net.sf.antcon
trib_1.1.0.0_1-0b2/lib/ant-contrib.jar;;E:\Oracle\Middleware/Oracle_OSB1/lib/sb-
kernel-api.jar;E:\Oracle\Middleware/Oracle_OSB1/modules/com.bea.common.configfwk
_1.3.0.0.jar;E:\Oracle\Middleware/modules/com.bea.common.configfwk.wlinterop_10.
3.1.0
Apache Ant version 1.7.1 compiled on June 27 2008
Buildfile: ..\scripts\build.xml
Detected Java version: 1.6 in: E:\Oracle\Middleware\jrockit_160_17_R28.0.0-679\j
re
Detected OS: Windows XP
parsing buildfile C:\osb\build\scripts\build.xml with URI = file:/C:/osb/build/s
cripts/build.xml
Project base dir set to: C:\osb\build\scripts
[antlib:org.apache.tools.ant] Could not load definitions from resource org/apach
e/tools/ant/antlib.xml. It could not be found.
[property] Loading Environment env.
[property] Loading C:\osb\build\dev\ant.properties
Build sequence for target(s) `import' is [import]
Complete build sequence is [import, ]
import:
[echo] importscript: c:/osb/build/scripts/import.py
[echo] importconfig: c:/osb/build/dev/import.properties
dropping E:\Oracle\Middleware\patch_wls1033\profiles\default\sys_manifest_classp
ath\weblogic_patch.jar from path as it doesn't exist
dropping E:\Oracle\Middleware\patch_oepe1033\profiles\default\sys_manifest_class
path\weblogic_patch.jar from path as it doesn't exist
dropping E:\Oracle\Middleware\patch_ocp353\profiles\default\sys_manifest_classpa
th\weblogic_patch.jar from path as it doesn't exist
dropping E:\Oracle\Middleware\wlserver_10.3\server\lib\weblogic_sp.jar from path
as it doesn't exist
dropping E:\Oracle\Middleware\modules\com.bea.common.configfwk.wlinterop_10.3.1.
0 from path as it doesn't exist
dropping E:\Oracle\Middleware\patch_wls1033\profiles\default\sys_manifest_classp
ath\weblogic_patch.jar from path as it doesn't exist
dropping E:\Oracle\Middleware\patch_oepe1033\profiles\default\sys_manifest_class
path\weblogic_patch.jar from path as it doesn't exist
dropping E:\Oracle\Middleware\patch_ocp353\profiles\default\sys_manifest_classpa
th\weblogic_patch.jar from path as it doesn't exist
dropping E:\Oracle\Middleware\wlserver_10.3\server\lib\weblogic_sp.jar from path
as it doesn't exist
dropping E:\Oracle\Middleware\modules\com.bea.common.configfwk.wlinterop_10.3.1.
0 from path as it doesn't exist
[wlst] <WLSTTask> Executing the command line :
[wlst] E:\Oracle\Middleware\jrockit_160_17_R28.0.0-679\jre\bin\java.exe -Dd
ebug=true -DfailOnError=true -DexecuteScriptBeforeFile=true -DpropertiesFile=c:/
osb/build/dev/import.properties -DfileName=c:/osb/build/scripts/import.py -class
path E:\Oracle\Middleware\modules\org.apache.ant_1.7.1\lib\ant-launcher.jar;E:\O
racle\Middleware\jrockit_160_17_R28.0.0-679\lib\tools.jar;E:\Oracle\Middleware\w
lserver_10.3\server\lib\weblogic.jar;E:\Oracle\Middleware\modules\features\weblo
gic.server.modules_10.3.3.0.jar;E:\Oracle\Middleware\wlserver_10.3\server\lib\we
bservices.jar;E:\Oracle\Middleware\modules\org.apache.ant_1.7.1\lib\ant-all.jar;
E:\Oracle\Middleware\modules\net.sf.antcontrib_1.1.0.0_1-0b2\lib\ant-contrib.jar
;E:\Oracle\Middleware\Oracle_OSB1\lib\sb-kernel-api.jar;E:\Oracle\Middleware\Ora
cle_OSB1\modules\com.bea.common.configfwk_1.3.0.0.jar;E:\Oracle\Middleware\modul
es\org.apache.ant_1.7.1\lib\ant-antlr.jar;E:\Oracle\Middleware\modules\org.apach
e.ant_1.7.1\lib\ant-apache-bcel.jar;E:\Oracle\Middleware\modules\org.apache.ant_
1.7.1\lib\ant-apache-bsf.jar;E:\Oracle\Middleware\modules\org.apache.ant_1.7.1\l
ib\ant-apache-log4j.jar;E:\Oracle\Middleware\modules\org.apache.ant_1.7.1\lib\an
t-apache-oro.jar;E:\Oracle\Middleware\modules\org.apache.ant_1.7.1\lib\ant-apach
e-regexp.jar;E:\Oracle\Middleware\modules\org.apache.ant_1.7.1\lib\ant-apache-re
solver.jar;E:\Oracle\Middleware\modules\org.apache.ant_1.7.1\lib\ant-commons-log
ging.jar;E:\Oracle\Middleware\modules\org.apache.ant_1.7.1\lib\ant-commons-net.j
ar;E:\Oracle\Middleware\modules\org.apache.ant_1.7.1\lib\ant-jai.jar;E:\Oracle\M
iddleware\modules\org.apache.ant_1.7.1\lib\ant-javamail.jar;E:\Oracle\Middleware
\modules\org.apache.ant_1.7.1\lib\ant-jdepend.jar;E:\Oracle\Middleware\modules\o
rg.apache.ant_1.7.1\lib\ant-jmf.jar;E:\Oracle\Middleware\modules\org.apache.ant_
1.7.1\lib\ant-jsch.jar;E:\Oracle\Middleware\modules\org.apache.ant_1.7.1\lib\ant
-junit.jar;E:\Oracle\Middleware\modules\org.apache.ant_1.7.1\lib\ant-netrexx.jar
;E:\Oracle\Middleware\modules\org.apache.ant_1.7.1\lib\ant-nodeps.jar;E:\Oracle\
Middleware\modules\org.apache.ant_1.7.1\lib\ant-starteam.jar;E:\Oracle\Middlewar
e\modules\org.apache.ant_1.7.1\lib\ant-stylebook.jar;E:\Oracle\Middleware\module
s\org.apache.ant_1.7.1\lib\ant-swing.jar;E:\Oracle\Middleware\modules\org.apache
.ant_1.7.1\lib\ant-testutil.jar;E:\Oracle\Middleware\modules\org.apache.ant_1.7.
1\lib\ant-trax.jar;E:\Oracle\Middleware\modules\org.apache.ant_1.7.1\lib\ant-web
logic.jar;E:\Oracle\Middleware\modules\org.apache.ant_1.7.1\lib\ant.jar;E:\Oracl
e\Middleware\modules\org.apache.ant_1.7.1\lib\xercesImpl.jar;E:\Oracle\Middlewar
e\modules\org.apache.ant_1.7.1\lib\xml-apis.jar weblogic.management.scripting.WL
STInterpreterInvoker
dropping E:\Oracle\Middleware\patch_wls1033\profiles\default\sys_manifest_classp
ath\weblogic_patch.jar from path as it doesn't exist
dropping E:\Oracle\Middleware\patch_oepe1033\profiles\default\sys_manifest_class
path\weblogic_patch.jar from path as it doesn't exist
dropping E:\Oracle\Middleware\patch_ocp353\profiles\default\sys_manifest_classpa
th\weblogic_patch.jar from path as it doesn't exist
dropping E:\Oracle\Middleware\wlserver_10.3\server\lib\weblogic_sp.jar from path
as it doesn't exist
dropping E:\Oracle\Middleware\modules\com.bea.common.configfwk.wlinterop_10.3.1.
0 from path as it doesn't exist
dropping E:\Oracle\Middleware\patch_wls1033\profiles\default\sys_manifest_classp
ath\weblogic_patch.jar from path as it doesn't exist
dropping E:\Oracle\Middleware\patch_oepe1033\profiles\default\sys_manifest_class
path\weblogic_patch.jar from path as it doesn't exist
dropping E:\Oracle\Middleware\patch_ocp353\profiles\default\sys_manifest_classpa
th\weblogic_patch.jar from path as it doesn't exist
dropping E:\Oracle\Middleware\wlserver_10.3\server\lib\weblogic_sp.jar from path
as it doesn't exist
dropping E:\Oracle\Middleware\modules\com.bea.common.configfwk.wlinterop_10.3.1.
0 from path as it doesn't exist
[wlst] Executing 'E:\Oracle\Middleware\jrockit_160_17_R28.0.0-679\jre\bin\j
ava.exe' with arguments:
[wlst] '-Ddebug=true'
[wlst] '-DfailOnError=true'
[wlst] '-DexecuteScriptBeforeFile=true'
[wlst] '-DpropertiesFile=c:/osb/build/dev/import.properties'
[wlst] '-DfileName=c:/osb/build/scripts/import.py'
[wlst] '-classpath'
[wlst] 'E:\Oracle\Middleware\modules\org.apache.ant_1.7.1\lib\ant-launcher.
jar;E:\Oracle\Middleware\jrockit_160_17_R28.0.0-679\lib\tools.jar;E:\Oracle\Midd
leware\wlserver_10.3\server\lib\weblogic.jar;E:\Oracle\Middleware\modules\featur
es\weblogic.server.modules_10.3.3.0.jar;E:\Oracle\Middleware\wlserver_10.3\serve
r\lib\webservices.jar;E:\Oracle\Middleware\modules\org.apache.ant_1.7.1\lib\ant-
all.jar;E:\Oracle\Middleware\modules\net.sf.antcontrib_1.1.0.0_1-0b2\lib\ant-con
trib.jar;E:\Oracle\Middleware\Oracle_OSB1\lib\sb-kernel-api.jar;E:\Oracle\Middle
ware\Oracle_OSB1\modules\com.bea.common.configfwk_1.3.0.0.jar;E:\Oracle\Middlewa
re\modules\org.apache.ant_1.7.1\lib\ant-antlr.jar;E:\Oracle\Middleware\modules\o
rg.apache.ant_1.7.1\lib\ant-apache-bcel.jar;E:\Oracle\Middleware\modules\org.apa
che.ant_1.7.1\lib\ant-apache-bsf.jar;E:\Oracle\Middleware\modules\org.apache.ant
_1.7.1\lib\ant-apache-log4j.jar;E:\Oracle\Middleware\modules\org.apache.ant_1.7.
1\lib\ant-apache-oro.jar;E:\Oracle\Middleware\modules\org.apache.ant_1.7.1\lib\a
nt-apache-regexp.jar;E:\Oracle\Middleware\modules\org.apache.ant_1.7.1\lib\ant-a
pache-resolver.jar;E:\Oracle\Middleware\modules\org.apache.ant_1.7.1\lib\ant-com
mons-logging.jar;E:\Oracle\Middleware\modules\org.apache.ant_1.7.1\lib\ant-commo
ns-net.jar;E:\Oracle\Middleware\modules\org.apache.ant_1.7.1\lib\ant-jai.jar;E:\
Oracle\Middleware\modules\org.apache.ant_1.7.1\lib\ant-javamail.jar;E:\Oracle\Mi
ddleware\modules\org.apache.ant_1.7.1\lib\ant-jdepend.jar;E:\Oracle\Middleware\m
odules\org.apache.ant_1.7.1\lib\ant-jmf.jar;E:\Oracle\Middleware\modules\org.apa
che.ant_1.7.1\lib\ant-jsch.jar;E:\Oracle\Middleware\modules\org.apache.ant_1.7.1
\lib\ant-junit.jar;E:\Oracle\Middleware\modules\org.apache.ant_1.7.1\lib\ant-net
rexx.jar;E:\Oracle\Middleware\modules\org.apache.ant_1.7.1\lib\ant-nodeps.jar;E:
\Oracle\Middleware\modules\org.apache.ant_1.7.1\lib\ant-starteam.jar;E:\Oracle\M
iddleware\modules\org.apache.ant_1.7.1\lib\ant-stylebook.jar;E:\Oracle\Middlewar
e\modules\org.apache.ant_1.7.1\lib\ant-swing.jar;E:\Oracle\Middleware\modules\or
g.apache.ant_1.7.1\lib\ant-testutil.jar;E:\Oracle\Middleware\modules\org.apache.
ant_1.7.1\lib\ant-trax.jar;E:\Oracle\Middleware\modules\org.apache.ant_1.7.1\lib
\ant-weblogic.jar;E:\Oracle\Middleware\modules\org.apache.ant_1.7.1\lib\ant.jar;
E:\Oracle\Middleware\modules\org.apache.ant_1.7.1\lib\xercesImpl.jar;E:\Oracle\M
iddleware\modules\org.apache.ant_1.7.1\lib\xml-apis.jar'
[wlst] 'weblogic.management.scripting.WLSTInterpreterInvoker'
[wlst]
[wlst] The ' characters around the executable and arguments are
[wlst] not part of the command.
dropping E:\Oracle\Middleware\patch_wls1033\profiles\default\sys_manifest_classp
ath\weblogic_patch.jar from path as it doesn't exist
dropping E:\Oracle\Middleware\patch_oepe1033\profiles\default\sys_manifest_class
path\weblogic_patch.jar from path as it doesn't exist
dropping E:\Oracle\Middleware\patch_ocp353\profiles\default\sys_manifest_classpa
th\weblogic_patch.jar from path as it doesn't exist
dropping E:\Oracle\Middleware\wlserver_10.3\server\lib\weblogic_sp.jar from path
as it doesn't exist
dropping E:\Oracle\Middleware\modules\com.bea.common.configfwk.wlinterop_10.3.1.
0 from path as it doesn't exist
dropping E:\Oracle\Middleware\patch_wls1033\profiles\default\sys_manifest_classp
ath\weblogic_patch.jar from path as it doesn't exist
dropping E:\Oracle\Middleware\patch_oepe1033\profiles\default\sys_manifest_class
path\weblogic_patch.jar from path as it doesn't exist
dropping E:\Oracle\Middleware\patch_ocp353\profiles\default\sys_manifest_classpa
th\weblogic_patch.jar from path as it doesn't exist
dropping E:\Oracle\Middleware\wlserver_10.3\server\lib\weblogic_sp.jar from path
as it doesn't exist
dropping E:\Oracle\Middleware\modules\com.bea.common.configfwk.wlinterop_10.3.1.
0 from path as it doesn't exist
[wlst] Using input " "
[wlst] <WLSTTask> Loaded and set the properties from c:/osb/build/dev/impor
t.properties
[wlst] <WLSTTask> sys.argv is ['c:/osb/build/scripts/import.py']
[wlst] Connecting to server: t3://localhost:7001
[wlst] Connecting to t3://localhost:7001 with userid weblogic ...
[wlst] Successfully connected to Admin Server 'AdminServer' that belongs to
domain 'base_domain'.
[wlst]
[wlst] Warning: An insecure protocol was used to connect to the
[wlst] server. To ensure on-the-wire security, the SSL port or
[wlst] Admin port should be used instead.
[wlst]
[wlst] Location changed to domainRuntime tree. This is a read-only tree wit
h DomainMBean as the root.
[wlst] For more help, use help(domainRuntime)
[wlst]
[wlst] Starting import of: c:/osb/configuration/sbconfig.jar on ALSB Admin
Server: t3://localhost:7001
[wlst] Read import jar file
[wlst] Import file read successfully c:/osb/configuration/sbconfig.jar
[wlst] Creating unique session name
[wlst] Created session name : ALSBImportScript-1279101189649
[wlst] Creating SessionMBean
[wlst] Unexpected error: java.lang.RuntimeException
[wlst] Unexpected error: java.lang.RuntimeException
[wlst] No stack trace available.
[wlst] Traceback (innermost last):
[wlst] File "c:\osb\build\scripts\import.py", line 179, in ?
[wlst] File "c:\osb\build\scripts\import.py", line 47, in importToALSBDom
ain
[wlst] File "c:\osb\build\scripts\import.py", line 167, in getSessionMBea
n
[wlst] File "<iostream>", line 1162, in findService
[wlst] at weblogic.management.jmx.MBeanServerInvocationHandler.newProxy
Instance(MBeanServerInvocationHandler.java:621)
[wlst] at weblogic.management.jmx.MBeanServerInvocationHandler.invoke(M
BeanServerInvocationHandler.java:418)
[wlst] at $Proxy11.findService(Unknown Source)
[wlst] at weblogic.management.scripting.WLScriptContext.findService(WLS
criptContext.java:209)
[wlst] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[wlst] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
sorImpl.java:39)
[wlst] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
hodAccessorImpl.java:25)
[wlst] at java.lang.reflect.Method.invoke(Method.java:597)
[wlst]
[wlst] java.lang.RuntimeException: java.lang.RuntimeException: java.lang.Cl
assNotFoundException: com.bea.wli.sb.management.configuration.DelegatedSessionMa
nagementMBean
[wlst]
[wlst] Exception in thread "Main Thread" java.lang.IllegalStateException: T
raceback (innermost last):
[wlst] File "c:\osb\build\scripts\import.py", line 179, in ?
[wlst] File "c:\osb\build\scripts\import.py", line 47, in importToALSBDom
ain
[wlst] File "c:\osb\build\scripts\import.py", line 167, in getSessionMBea
n
[wlst] File "<iostream>", line 1162, in findService
[wlst] at weblogic.management.jmx.MBeanServerInvocationHandler.newProxy
Instance(MBeanServerInvocationHandler.java:621)
[wlst] at weblogic.management.jmx.MBeanServerInvocationHandler.invoke(M
BeanServerInvocationHandler.java:418)
[wlst] at $Proxy11.findService(Unknown Source)
[wlst] at weblogic.management.scripting.WLScriptContext.findService(WLS
criptContext.java:209)
[wlst] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[wlst] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
sorImpl.java:39)
[wlst] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
hodAccessorImpl.java:25)
[wlst] at java.lang.reflect.Method.invoke(Method.java:597)
[wlst]
[wlst] java.lang.RuntimeException: java.lang.RuntimeException: java.lang.Cl
assNotFoundException: com.bea.wli.sb.management.configuration.DelegatedSessionMa
nagementMBean
[wlst]
[wlst] at weblogic.management.scripting.WLSTInterpreterInvoker.printErr
or(WLSTInterpreterInvoker.java:110)
[wlst] at weblogic.management.scripting.WLSTInterpreterInvoker.executeP
yScript(WLSTInterpreterInvoker.java:103)
[wlst] at weblogic.management.scripting.WLSTInterpreterInvoker.main(WLS
TInterpreterInvoker.java:27)
BUILD FAILED
C:\osb\build\scripts\build.xml:13: Java returned: 1
at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
at weblogic.ant.taskdefs.management.WLSTTask.execute(WLSTTask.java:115)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
at org.apache.tools.ant.Project.executeTarget(Project.java:1307)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1191)
at org.apache.tools.ant.Main.runBuild(Main.java:758)
at org.apache.tools.ant.Main.startAnt(Main.java:218)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Total time: 16 seconds
C:\osb\build\dev>^AHi,
I tried debugging it and i am still getting the same error. I used the script provided byoracle and the script which is given here.
Below is the error i am getting :
[java] ImportError: cannot import name SessionManagementMBean
I am getting an error at
def getSessionManagementMBean(sessionName):
SessionMBean = findService("SessionManagement", "com.bea.wli.sb.management.configuration.SessionManagementMBean")
SessionMBean.createSession(sessionName)
return SessionMBean
Its able to create a unique session , after that for creating session name its throwing error.
C:\Development\Build\scripts\build.xml:31: Java returned: 1
at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
at weblogic.ant.taskdefs.management.WLSTTask.execute(WLSTTask.java:115)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
at org.apache.tools.ant.Main.runBuild(Main.java:758)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Any help on this?? -
WLST script deploy EAR File in Weblogic Server
Hi,
Can any one help me providing the steps to deploy EAR file using WLST Script.
Thanks in Advance.
Regards
Balaji SYou can use the deploy command, for example,
deploy('DeploymentName', path=LocationOfYourEARFile, targets='A Cluster or a Server');A complete example can be found here: http://middlewaremagic.com/weblogic/?p=6329
And the reference: http://download.oracle.com/docs/cd/E17904_01/web.1111/e13813/reference.htm#i1024284 -
Deploying an app from export script stored in the database.
I am in the situation where I want to deploy a copy of an application programatically into the current workspace, but each against a separate schema. The end game would be to have many copies of the same App in the same workspace (obviously with different application numbers assigned) but each app pointing to a different schema.
The workflow would be something like this:
<ol>
<li>Create a new tablespace for the new schema</li>
<li>Create the new Schema</li>
<li>create the required objects in the new schema (we're going to use DataPump for that)
</li>
<li>Assign the schema to the current workspace (make it available to use for a new APP)</li>
<li>Read the app.sql from a BLOB in the database and deploy it into the current workspace pointed to the new schema.</li>
</ol>
I was wondering if there are already API's in place that would help me do these things (especially steps 4 and 5).
I started poking around in the ApEx internals, looking specifically at the deployment of the SAMPLE apps to see if there was anything I could use, but it looks like the WWV_FLOW_SAMPLE_APP package is wrapped so I can't see what it's doing.
I also looked at the code behind the "COPY APPLICATION" function and it looks like I might be able to use wwv_flow_imp_parser.parse to install the application in the current schema, but would probably need some clarification on whether there are any "gotchas" there.
If that works, then it seems the hard part is assigning the new schema to the workspace as normally that is done from within the INTERNAL user's workspace.
Thanks in advance for the help.
DougOk... For others who may be interested in this, I have figured out part of the answer...
To complete steps 2 and 4 mentioned in my original messages (Creating the user and makeing it available to a workspace) here is what I've come up with.
DECLARE
l_username varchar2(256);
l_password varchar2(256);
l_df_ts varchar2(256);
l_tmp_ts varchar2(256);
l_PCID number;
l_workspace_name varchar2(255);
BEGIN
l_username := 'DOUG';
l_password := 'DOUG';
l_df_ts := 'USERS';
l_tmp_ts := 'TEMP';
l_workspace_name := 'HAAS';
-- CREATE THE USER AND THEN ADD THAT USER TO THE CORRECT WORKSPACE.
-- First make sure that
-- 1. The name you're trying to create is not a "reserved" name like INTERNAL
-- 2. We're not working in an installation that is "RUNTIME ONLY"
-- 3. We're not working with a schema that is already in place or restricted.
IF flows_030100.wwv_flow_provisioning.reserved_schema(p_schema => l_username) = false
and not (flows_030100.wwv_flow_provisioning.site_admin_is_restricted
and
flows_030100.wwv_flow_provisioning.restricted_schema(p_schema => l_username, p_workspace_name => l_worlkspace_name)
THEN
-- CREATE THE USER
flows_030100.wwv_flow_provision.create_user(
p_username => l_username,
p_password => l_password);
-- ASSIGN THE TABLESPACEs
flows_030100.wwv_flow_provision.set_user_tablespace(
p_username => l_username,
p_default_ts => l_df_ts,
p_temp_ts => l_tmp_ts);
-- Grant the appropriate roles and privs to the user
flows_030100.wwv_flow_provision.grant_initial_privs(l_username);
-- Create the link between the workspace and the schema name.
BEGIN
-- FIRST get the Workspace ID (known as the PROVISIONING_COMPANY_ID) from the APEX Dictionary.
-- This assumes that the workspace we're working in is HAAS
select provisioning_company_id
into l_PCID
from flows_030100.wwv_flow_companies
where short_name = l_workspace_name;
-- Now insert a row into the company_schema table to line the schema to a workspace.
insert into flows_030100.wwv_flow_company_schemas (security_group_id, schema)
values (l_pcid, upper(l_username));
commit;
EXCEPTION
WHEN NO_DATA_FOUND then
--IF things fail then we need to kill to drop the user that we created.
flows_030100.wwv_flow_provision.drop_user(p_username => l_username);
--Then rais the application error or do whatever...
raise_application_error(-20100,'Trying to use an invalid worksapce - '|| l_workspace_name);
END;
end if;
end;I'm still trying to work on deploying the APP stored in a BLOB to the workspace and so far have the following code, but get the message :
ORA-20001: You do not have privs on the DAVID schema.
ORA-06512: at "FLOWS_030100.WWV_FLOW_IMP_PARSER", line 1599
ORA-06512: at line 29
declare
l_file_id number := 2113831202674379;
l_parse_as_schema varchar2(4000) := 'DAVID';
l_new_ap_ID number;
l_orig_ap_id number;
l_workspace_name varchar2(255) := 'HAAS';
l_PCID number;
begin
execute immediate 'alter session set current_schema = FLOWS_030100';
flows_030100.wwv_flow_security.g_security_group_id := 10;
flows_030100.wwv_flow_security.g_user := 'ADMIN';
-- Import copy from application with new application ID and name
-- First get the new Application ID
l_new_ap_id := flows_030100.wwv_flow_utilities.minimum_free_flow;
BEGIN
select flow_id
into l_orig_ap_id
from flows_FILES.wwv_flow_file_objects$
where id = l_file_id;
end;
flows_030100.wwv_flow_imp_parser.parse (
p_file_id => l_file_id,
p_parse_as_schema => l_parse_as_schema,
p_install_as_flow => l_new_ap_id,
p_original_flow_id => l_orig_ap_id,
p_adjust_offset => TRUE
-- Get the Security group ID
select provisioning_company_id
into l_PCID
from flows_030100.wwv_flow_companies
where short_name = l_workspace_name;
-- reset name with new application name
update flows_030100.wwv_flows
set name = 'TEST_NAME'
where id = l_new_ap_id
and security_group_id = l_PCID;
end; -
ALSB Deployment using WLST scripts
Hi
Any body can help me with WLST scripts for Deployments on ALSB ?Also, for ALSB particular questions, you should use the SOA Suite forum:
SOA Suite -
Creation of Customisation file from WLST Script in OSB
Hi,
Please help in creating Customisation file in OSB from WLST ScriptsHi,
Please refer -
Create Customization File in OSB 10g with WLST script
http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/deploy/config_appx.html
http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/javadoc/com/bea/wli/config/customization/Customization.html
Regards,
Anuj -
Using variables in WLST Script ant task
I have multiple scipts that are run using ant tasks, however, I do not want to have to enter the password every time one of these scripts is executed. Instead I would like to use the following ant task to store the password in a variable/property:
<target name="getPassword" >
<echo message="Domain: ${domain}" />
<echo message="Username: system" />
<input message="Please enter password:" addproperty="password" />
</target>
I would then like to use that variable/property everytime a script is executed like this:
<target name="deploy4x">
<echo message="***** Copying 4X.ear *****" />
<copy file="${build.path}\jar\4X.ear" todir="${apps.dir}" preservelastmodified="true"/>
<echo message="***** Updating 4X.ear on ${domain} *****"/>
<wlst debug="true" fileName="Deploy4X.py" executeScriptBeforeFile="true" failonerror="true" >
<script>
connect('system','%s' % ${password},'%s' % $url)
</script>
</wlst>
</target>
However, the script blows up every time I try to run it b/c of the connect() line. I have also tried connect('system','%s' % password, '%s' % url).
Has anyone else successfully used variables in an Ant WLST Script task?
Thanks.Hi,
when I use *XDIM_MEMBERSET ACCOUNT AS %TEST% = BAS(REVENUE) - it work fine.
BUT ! after my first commit, it seems like the variable value is lost. And the *Xdim_memberset takes all.....
Fortunately enough, *select still contains the variable value after *commit.
Thanks,
Joergen
*Correction !
It actually works, it still contains the variable value after commit !!
Edited by: Jørgen Dalby Andersen on Dec 30, 2011 1:33 PM -
Migrating from ICM scripts to CVP-VXML Apps
Good day all.
Currently we are running on:
ICM 7.2
CVP 4.1
CUCM 6.
Call flow: using ICM-Script Editor
Applications: Using apps deployed on CVP-VXML server. they are called in ICM scripts.
Well my dilemma is this. We have planned to move all call flows from ICM-Scripts to Call Studio based apps/Scripts.
Now I have studied Call studio and VXML flows, and know that CallStudio/VXML scripts can be run directly from Gateway->ICM->CVP/VXML or in the traditional way called in ICM script.
If we deploy a full Standalone model with ICM lookup (no ICM scripts involved) then how is call queing for SkillGroups/agent transfers handled? do call studio based scripts have the capability, or will we have to include ICM scripts for this?
Secondly, when migrating from ICM scripts to Standalone+ICm lookup model, the current gateway configurations (ie apps, Dial plan and Dial plan to script matching for EACH dialed number) will have to be reconfigured? So as the Dialled number will directly translate to the IVR menu on VXML script?
Need expert inputs on this.
Regards,
AAK.Hi Asif,
When you use the CVP as Standalone model, its purely for SelfService, Queuing is not possible even if you use Standalone with ICM Lookup. There is no concept of SkillGroups using CVP as Standalone
After the self service treatment is done, you can either transfer the call to CUCM or TDMACD
If you need queuing, you have to go for Comprehensive model.
If you want to go for a StandAlone Model, You will need to configure the Application Name, VxmlServer everything in the Gateway. Have a look at the config guide for CVP Standalone section
http://www.cisco.com/en/US/docs/voice_ip_comm/cust_contact/contact_center/customer_voice_portal/cvp4_1/configuration/guide/cvp41cfg.pdf
Regards,
Senthil -
Automatic Generation of JMS event generator using WLST script
is there any way to create and deploy JMS event generator using WLST script. i am using weblogic server 10.3.1
You could see this informantion here:
http://docs.oracle.com/cd/E14981_01/wli/docs1031/deploy/cluster.html#wp1519038 -
Need Help regarding wlst script
Hi
I am new to wlst scripting, I need to know how to add error handling in below script and how to unlock the invoke in case of error.
below is the script
connect(userConfigFile=str(gConfigFile), userKeyFile=str(gKeyFile), url=str(gAdminHost) + ':' + str(gAdminPort));
print 'Connecting to Domain ...'
domainCustom()
cd ('oracle.biee.admin')
print 'Connecting to BIDomain MBean ...'
cd ('oracle.biee.admin:type=BIDomain,group=Service')
objs = jarray.array([], java.lang.Object)
strs = jarray.array([], java.lang.String)
invoke('lock', objs, strs)
cd ('..')
cd ('oracle.biee.admin:type=BIDomain.BIInstance.ServerConfiguration,biInstance=coreapplication,group=Service')
objs=jarray.array([newRPDlocation,newRPDpassword],Object)
strs=jarray.array(['java.lang.String', 'java.lang.String'],String)
invoke('uploadRepository', objs, strs)
cd ('..')
cd ('oracle.biee.admin:type=BIDomain,group=Service')
objs = jarray.array([], java.lang.Object)
strs = jarray.array([], java.lang.String)
invoke('commit', objs, strs)
disconnect()
exit()
Thanks
Samit BaghlaA handy link - http://docs.python.org/2/tutorial/errors.html
An example (taken from - Middleware Snippets: Automate WebLogic 12.1.2 Deployment)
def createFile(directory_name, file_name, content):
dedirectory = java.io.File(directory_name);
defile = java.io.File(directory_name + '/' + file_name);
writer = None;
try:
dedirectory.mkdirs();
defile.createNewFile();
writer = java.io.FileWriter(defile);
writer.write(content);
finally:
try:
print 'WRITING FILE ' + file_name;
if writer != None:
writer.flush();
writer.close();
except java.io.IOException, e:
e.printStackTrace(); -
Does and how osb 11g support WLST scripts
Does 11g support WLST scripts to import and export OSB configuration?
Here are the old ones (as I see, dated 03.03.2009). For old 10.3 they worked perfectly.
http://www.oracle.com/technology/products/soa/service-bus/collateral/osbsamples.html
In new release names of few libraries changed (e.g. from com.bea.common.configfwk_1.2.1.0.jar to com.bea.common.configfwk_1.3.0.0.jar), so I simply changed the names in my scripts to use them for 11g. It didn't work. Old scripts (with old libs) don't work for 11g either.
So my question is does OSB still support this kind of deploying, and how can I do that?
Thanks in advance.@ frf
Is it working for you ? The scripts are running fine for me but the values are not geting changed.
This is my custom xml which is created
<?xml version="1.0" encoding="UTF-8"?>
<cus:Customizations xmlns:cus="http://www.bea.com/wli/config/customizations" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xt="http://www.bea.com/wli/config/xmltypes">
<cus:customization xsi:type="cus:FindAndReplaceCustomizationType">
<cus:description>Update to the correct server and port number</cus:description>
<cus:query>
<xt:refsToSearch xsi:type="xt:LocationRefType">
<xt:type>Project</xt:type>
<xt:path>Test OSB Project</xt:path>
</xt:refsToSearch>
<xt:includeOnlyModifiedResources>false</xt:includeOnlyModifiedResources>
<xt:searchString>http://localhost:7001/business/ValidateCoverage/ValidateCoverageService</xt:searchString>
<xt:isCompleteMatch>false</xt:isCompleteMatch>
</cus:query>
<cus:replacement>http://192.20.51.150:7001/business/ValidateCoverage/ValidateCoverageService</cus:replacement>
</cus:customization>
</cus:Customizations>
But import.py is simply not replacing the values in the WSDL -
WLST Script for RDBMS Event Generator
Hello WLI Gurus,
I need the WLST Script for RDBMS Event Generator. There was a script in dev2dev but is no longer accessible. I need it for WLI 9.2.
Thanks in advance.
VarunIf you are using a cluster you need to make sure the connection pool and data source are deployed on the admin server. I have had this problem many times before.
-
WLST script to create DBAdapter configuration
Has anybody tried to create a DBAdapter configuration using a WLST script.
Works fine if you create it manually using the console, but you are not able to record the steps using the record functionality (Script is empty).Hello,
hopefully you have already got answer to your question from some other source, but here's any way how I update DbAdapter configuration.
I generate deployment plan for DbAdapter in development time by admin console like you have done.
Copy the deployment plan to production environment, then use wlst or weblogic.Deployer to update adapter:
source <domain location>/bin/setDomainEnv.sh
java weblogic.Deployer -adminurl t3://<admin-url>:<admin server port> -user <admin user> -password <password> -update -name DbAdapter -plan <db plan location>/DBPlan.xml
This way I can do my production environment deployment script based, no need to use GUI.
It's also possible to use wlst instead of weblogic.Deployer, but haven't tried that yet.
Hope this was helpful.
regards, Matti -
WLST script to create network channel
Hi,
I was not able to find a sample WLST script to configure network channels on the Weblogic server. Could somebody provide pointers?
HimadriHello,
hopefully you have already got answer to your question from some other source, but here's any way how I update DbAdapter configuration.
I generate deployment plan for DbAdapter in development time by admin console like you have done.
Copy the deployment plan to production environment, then use wlst or weblogic.Deployer to update adapter:
source <domain location>/bin/setDomainEnv.sh
java weblogic.Deployer -adminurl t3://<admin-url>:<admin server port> -user <admin user> -password <password> -update -name DbAdapter -plan <db plan location>/DBPlan.xml
This way I can do my production environment deployment script based, no need to use GUI.
It's also possible to use wlst instead of weblogic.Deployer, but haven't tried that yet.
Hope this was helpful.
regards, Matti
Maybe you are looking for
-
Error message in iDVD with Slide show from iPhoto 09
I have about 130 photos in a slide show with music in iPhoto 09. The slide show settings are for the whole slide show are Ken Burns effect, each slide about 8.1 seconds, random transitions, and music fit to the slide show..I Went to "Share" Send to D
-
How Do I Import A Photoshop CS4 Template into Dreamweaver CS4
Ok. Here's the deal, my friend and I spent alot of time working in Photoshop to come up with a nice template. He's even done all the coding to animate the buttons for standard, hover over, and click and all that. It's really cool, the buttons slide b
-
Having serious problems with apps on iphone 5 ios7 (have read other posts)
Hello, My daughter has an iphone 5 with ios 7.02. Ever since she updated to ios7 she has not been able to update her apps. When she tries they grey out and are stuck on waiting. We have tried everything and I think I have read every post on the subje
-
Is it possible to play sound in an iPad Keynote presentation.
I'm new to the iPad and to Keynote. I can't find an option for importing audio into my presentation. Does this version of Keynote allow the inclusion of audio, such as a song downloaded from iTunes?
-
OCCI for Oracle 9i and MS Visual Studio 2005
Hello. Where do I get OCCI *.lib and *.dll files for Oracle 9i and MS Visual Studio 2005 (VC 8)? Roman Perepelitsa.