WLST Script to modify a XQuery Resource

I am attempting to write a WLST Script for OSB 11.1.1.4 to the modify the contents of an XQuery Transformation. I have searched the Oracle Docs and various other internet sites and not found any means of using WLST to achieve this goal. Does anyone have an example or pointers? Thanks

It is not possible.

Similar Messages

  • Modify the contents of xquery resource using customization file

    I have a xquery resource that stores constants that are environment specific.
    Is there a way to use the 'customization file' feature in OSB to replace the contents of the file instead of having separate xquery resources for each environment ?

    You cannot do this using the customization feature..

  • 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>^A

    Hi,
    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??

  • How to parse a xml file within a WLST script

    Hi all,
    I'm using ALSB2.6 and I'm writing a WLST script that should read config info from a xml file and create an ALSB prj.
    I got an error when I call:
    xmldoc = minidom.parse(sock).documentElement
    The code:
    print '#### IPEventConfigFile: ', IPEventConfigFile
    IPEventConfig = loadXML(IPEventConfigFile)
    where
    def loadXML(source):
    sock = open(source)
    xmldoc = minidom.parse(sock).documentElement
    sock.close()
    return xmldoc
    The error:
    [java] #### IPEventConfigFile: /products/software/terraferma/release3/EventBus/repository/events/DummyEvent/resource/DummyEvent-IPEventConfig.xml
    [java] ===============================================================
    [java] Unexpected error: exceptions.AttributeError
    [java] ===============================================================
    [java] No stack trace available.
    [java] Unexpected error: exceptions.AttributeError
    [java] No stack trace available.
    [java] Problem invoking WLST - Traceback (innermost last):
    [java] File "/products/software/terraferma/release3/EventBus/scripts/cloning.py", line 198, in ?
    [java] File "/products/software/terraferma/release3/EventBus/scripts/cloning.py", line 102, in cloning
    [java] File "/products/software/terraferma/release3/EventBus/scripts/cloning.py", line 178, in loadXML
    [java] File "Lib/xml/dom/minidom.py", line 908, in parse
    [java] File "Lib/xml/dom/minidom.py", line 900, in _doparse
    [java] File "Lib/xml/dom/pulldom.py", line 251, in getEvent
    [java] AttributeError: feed
    Line 178 is:
    xmldoc = minidom.parse(sock).documentElement
    I'm trying to understand where I'm wrong.
    Thanks in advance
    ferp

    Using the SAXParser in JAXP the parsing of the XML file is event driven.
    Instantiate the parser:
    SAXParserFactory factory = SAXParserFactory.newInstance();
    SAXParser parser = factory.newSAXParser();
    InputSource is = new InputSource(new FileReader(theXML));call the parse method:
    parser.parse(is, this);The following events are fired as the parser works through the XML public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws org.xml.sax.SAXException
    public void endElement(String namespaceURI, String localName, String qName) throws org.xml.sax.SAXException
    characters(char[] ch, int start, int length)etc.
    You write what you want within each of these sections to handle the structure of your data. Keep in mind SAX is useful only when you know the structure of your XML.

  • OSB: WLST script using setPreserveExistingOperationalValues has no effect

    Hi,
    I have a WLST script which imports a sbconfig.jar into OSB and executes the file customization.xml. In this script I use the following options (although I know that "false" is the default value here):
    alsbImportPlan.setPreserveExistingEnvValues(false)
    alsbImportPlan.setPreserveExistingOperationalValues(false)
    The idea behind is to overwrite the existing operational settings in OSB with the settings from the file sbconfig.jar.
    But when I execute my WLST script, the operational settings are unchanged. What am I doing wrong?
    Best regards,
    Katja

    Hi,
    thanks for your help. Now, I tried everything again from scratch and it worked!
    I exported the sbconfig.jar from OSB and checked, that my settings were in the xml files. Then I modified the settings in OSB (that I can see a difference). I executed my WLST script with the new sbconfig.jar and checked the values in OSB. Now the values were changed as expected. I do not know what was wrong before, but maybe I mixed my versions of sbconfig.jar and used a wrong one...
    So everything works fine.
    Thanks,
    Katja

  • Create Customization File in OSB 10g with WLST script

    Is it possible to create a customization file the same as created from the OSB console with a WLST script?
    Can someone show me the syntax to do this? I need to turn this request around quickly and don't have time for a lot of trial and error.
    Edited by: DoubleT on Sep 29, 2009 6:44 PM

    I resolved my problem. The solution is follow (Java language):
    Set<Ref> domainRefs = alsbConfMB.getRefs(businessServiceQuery);
         EnvValueQuery evquery = new EnvValueQuery(null, // search across all
                   // resource types
                   envValueTypesToSearch, domainRefs, // search only in found refs.
                   false, // Search all resources
                   null, // the string we want to replace
                   false // not a complete match of URI.
    Collection<QualifiedEnvValue> founds = alsbConfMB.findEnvValues(evquery);
         List<QualifiedEnvValue> qualifiedEnvValueList = new ArrayList<QualifiedEnvValue>();
         for (QualifiedEnvValue qev : founds) {
              if (qev.getEnvValueType().equals(EnvValueTypes.SERVICE_URI)) {
                   qualifiedEnvValueList.add(qev);
         EnvValueCustomization projectEnvValsCustomization = new EnvValueCustomization("Customizations File for businss services ", qualifiedEnvValueList);
         List<Customization> customizationList = new ArrayList<Customization>();
         customizationList.add(projectEnvValsCustomization);
         OutputStream fileOutputStream = new FileOutputStream("testCustomization.xml");
         Customization.toXML(customizationList, fileOutputStream);
         fileOutputStream.close();

  • Configuring Credential mapper using WLST script

    Is it possible to use a wlst script to define a new credential mapper.i.e.to [perform the following steps:
    Check Use cross-domain protocol.
    And then fill in the the values of the attributes which follow like remote host remote user and remote password.
    I tried using the wlst recording for the same.However got the following message.
    A security change to a role, policy, user, group or credential mapping was made, but this change was not recorded.
    I was wondering if we can access the security MBeans using WLST.
    Please advise.
    Thanks in advance.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    It is possible if you export the properties with:
    connect(url='t3://localhost:7001',adminServerName='AdminServer',timeout=60000)
    serverConfig()
    cd('/')
    currentDomainName=cmo.getName()
    cd('serverConfig:/SecurityConfiguration/' + currentDomainName + '/Realms/myrealm/CredentialMappers/DefaultCredentialMapper')
    prop=Properties()
    cmo.exportData('DefaultCreds','/tmp/credentialmapper_properties.txt',prop)Edit them, then import them with:
    cmo.importData('DefaultCreds','/tmp/credentialmapper_properties.txt',prop)You can list the Credential Mapper configuration with:
    connect(url='t3://localhost:7441',adminServerName='AdminServer',timeout=60000)
    serverConfig()
    cd('/')
    currentDomainName=cmo.getName()
    cd('serverConfig:/SecurityConfiguration/' + currentDomainName + '/Realms/myrealm/CredentialMappers/DefaultCredentialMapper')
    cursor=cmo.listMappingsByPattern('*',10)
    while cmo.haveCurrent(cursor):
        # A resource ID looks like:  'type=<remote>, protocol=cross-domain-protocol, remoteHost=testDomain'
        current_mapping_resource_id=cmo.getCurrentMappingResourceID(cursor)  
        cmo.getRemoteUserName(current_mapping_resource_id,'cross-domain')
        cmo.advance(cursor)
    cmo.close(cursor)See also: [url http://download.oracle.com/docs/cd/E12839_01/web.1111/e13707/security_data_migration.htm]Securing WebLogic Server 11g Release 1 (10.3.1) - Migrating Security Data
    Edited by: Mircea Vutcovici on Jun 22, 2011 3:49 PM

  • WLST Scripting and interating through a propertiy file

    Hello,
    I need to create over 100 JMS queues for a specific applicaiton. Is it possible to iterate through a property file and create these JMS resources using WLST?
    I am not sure whether this has been discussed before, but a search didn't render much. Please let me know if you have the link to something similar. I am sure this must have popped up before.
    Thanks so much,

    Cross-posting : WLST Scripting and interating through a propertiy file

  • Creation of Customisation file from WLST Script in OSB

    Hi,
    Please help in creating Customisation file in OSB from WLST Scripts

    Hi,
    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

  • Error While running WLST script to create SOA Domain in Clustered Environme

    Hi,
    I am trying to run WLST script to create SOA Domain in clustered environment.The script is as follows.
    import sys
    print "@@@ Starting the script ..."
    global props
    from wlstModule import *#@UnusedWildImport
    from java.io import FileInputStream
    from java.io import File
    #=======================================================================================
    # Create Boot Properties File
    #=======================================================================================
    def createBootPropertiesFile(directoryPath, username, password):
    adminserverDir = File(directoryPath)
    bool = adminserverDir.mkdirs()
    fileNew=open(directoryPath + '/boot.properties', 'w')
    fileNew.write('username=%s\n' % username)
    fileNew.write('password=%s\n' % password)
    fileNew.flush()
    fileNew.close()
    def createNodeManagerPropertiesFile(directoryPath, username, password):
    adminserverDir = File(directoryPath)
    bool = adminserverDir.mkdirs()
    fileNew=open(directoryPath + '/nm_password.properties', 'w')
    fileNew.write('username=%s\n' % username)
    fileNew.write('password=%s\n' % password)
    fileNew.flush()
    fileNew.close()
    def createAdminStartupPropertiesFile(directoryPath, args):
    adminserverDir = File(directoryPath)
    bool = adminserverDir.mkdirs()
    fileNew=open(directoryPath + '/startup.properties', 'w')
    args=args.replace(':','\\:')
    args=args.replace('=','\\=')
    fileNew.write('Arguments=%s\n' % args)
    fileNew.flush()
    fileNew.close()
    I am getting the error :
    Problem invoking WLST - Traceback (innermost last):
    (no code object) at line 0
    File "D:\Oracle\Middleware\Oracle_SOA1\bin\SOADomainScript.py", line 11
    adminserverDir = File(directoryPath)
    ^
    SyntaxError: invalid syntax
    Do i need to set any jar in the classpath? Already jython.jar is available in the classapath.
    Thanks in advance.
    Regards,
    Subha

    Hi,
    I am trying to run WLST script to create SOA Domain in clustered environment.The script is as follows.
    import sys
    print "@@@ Starting the script ..."
    global props
    from wlstModule import *#@UnusedWildImport
    from java.io import FileInputStream
    from java.io import File
    #=======================================================================================
    # Create Boot Properties File
    #=======================================================================================
    def createBootPropertiesFile(directoryPath, username, password):
    adminserverDir = File(directoryPath)
    bool = adminserverDir.mkdirs()
    fileNew=open(directoryPath + '/boot.properties', 'w')
    fileNew.write('username=%s\n' % username)
    fileNew.write('password=%s\n' % password)
    fileNew.flush()
    fileNew.close()
    def createNodeManagerPropertiesFile(directoryPath, username, password):
    adminserverDir = File(directoryPath)
    bool = adminserverDir.mkdirs()
    fileNew=open(directoryPath + '/nm_password.properties', 'w')
    fileNew.write('username=%s\n' % username)
    fileNew.write('password=%s\n' % password)
    fileNew.flush()
    fileNew.close()
    def createAdminStartupPropertiesFile(directoryPath, args):
    adminserverDir = File(directoryPath)
    bool = adminserverDir.mkdirs()
    fileNew=open(directoryPath + '/startup.properties', 'w')
    args=args.replace(':','\\:')
    args=args.replace('=','\\=')
    fileNew.write('Arguments=%s\n' % args)
    fileNew.flush()
    fileNew.close()
    I am getting the error :
    Problem invoking WLST - Traceback (innermost last):
    (no code object) at line 0
    File "D:\Oracle\Middleware\Oracle_SOA1\bin\SOADomainScript.py", line 11
    adminserverDir = File(directoryPath)
    ^
    SyntaxError: invalid syntax
    Do i need to set any jar in the classpath? Already jython.jar is available in the classapath.
    Thanks in advance.
    Regards,
    Subha

  • 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

  • Example WLST scripts for creating clustered domain for soa suite 11.1.1.4?

    Hello,
    does anyone know sample wlst scripts for creating domain for soa suite 11.1.1.4 on top of weblogic 10.3.4?
    I try to create a domain having a cluster with two managed servers in two linux machines.
    Any help appreciated.
    regards, Matti

    Please refer -
    http://download.oracle.com/docs/cd/E17904_01/web.1111/e13715/domains.htm
    http://download.oracle.com/docs/cd/E17904_01/web.1111/e13715/intro.htm#WLSTG112
    Regards,
    Anuj

  • 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

  • Does anybody have a WLST script for step-by-step cluster restart?

    Does anybody have a WLST script for step-by-step "smart" cluster restart?

    Dear SAM,
    are you looking for exchange 2013 installation. Please follow below link. I have done the same scenario as yours
    1. install first VM - 2012
    2. Static IP / loopback as primary DNS
    3. install ADDS /DNS (forwarder to ISP)
    4. install second VM - Static IP again
    5. DNS of second VM to be the IP of first VM
    6. this will join the domain
    7. installation of exchange will be simple, configuration from this link : http://www.techieshelp.com/exchange-2013-step-by-step-configuration/
    MARK AS USEFUL/ANSWER IF IT DID
    Thanks
    Happiness Always
    Jatin

  • Eclipse XQuery expression validation failed: The current configuration is out of sync with the XQuery resource in the repository.

    I created a wsdl based on a dbadapter in jdeveloper, imported into eclipse and created the biz and the proxy and uploaded to oracle service bus, it works fine,
    but happens now that i need to have a xsd and wsdl with business names and not table names, invented to create a xsd and wsdl file in jdeveloper
    and then went to eclipse and tried t xquery tranformation, but when i add the replace in the message flow in the filed in Variable : body and Expression i look for the xquery and in the binding trying to put
    $body/input parameter, get the following error [RouteNode1, Replace action] XQuery expression validation failed: The current configuration is out of sync with the XQuery resource in the repository.
    what im doing wrong or its configuration
    thanks in advance sonia

    thanks
    ok have created a table with only in column varchar2(1)
    then the type object and the procedure to insert it works the proxy in the osb if i test it inserts
    now in jdeveloper i created an xml file with
    <?xml version="1.0" encoding="windows-1252" ?>
    <vessel>
    <barco>a</barco>
    </vessel>
    then i created a xsd based on this xml, and a wsdl based on the xsd
    in eclipse created a xquery transformation and selected source as the xsd created in adf and target the xsd input parameter, dont know why in the purple ball of the input parameter it puts a ?, an a f.
    then in the proxy xpath not writing anything in variable body and in the expression select the xquery and in binding select the parameter

Maybe you are looking for