Wlst bug ??

I created a class in Python (Cluster) that has the properties name, and servers ( a list of Server classes). The server class has appropriate properties as well (name, port, etc.)
when i loop through the class and call the
create(_cluster.name, "Cluster") my cluster is created but i cannot access it using the wlst gui mode. in fact it displays as an infinite loop of clusters:
Cluster
|
Cluster1
|
Cluster1
and so on. However, it looks just fine in wlshell and in the normal server console. also i don't see this if i create the cluster by looping over a list of strings (only as a class). Can anyone make any sense out of this one?

resolved...
looks like I had some special characters (\n) in my string that were not properly stripped when parsing my properties file that cause this strange behavior. still might be a bug but is only related to invalid string data (presumably)

Similar Messages

  • WLST - bug? - undeploy command

    Hi,
    We're using WebLogic 10.0 MP1. Environment is Red Hat Linux. We've got an application deployed to a cluster of two managed severs. I'm attempting to write a WLST script to which, in part, undeploys the application from each server one at a time. I referred to the documentation on the "undeploy" command which states the "targets" parameter specifies which managed servers to undeploy the application from. However, the WLST tool seems to ignore the "targets" parameter altogether and just undeploys from all managed servers it is deployed on regardless. The setup looks something like this:
    undeploy(appName='myapp', targets='my-server-1')
    Undeploying application myapp ...
    <Sep 28, 2009 3:07:19 PM PDT> <Info> <J2EE Deployment SPI> <BEA-260121> <Initiating undeploy operation for application, myapp [archive: null], to my-server-1 my-server-2 .>
    Can somebody tell me what I'm doing wrong here? Or if it is a bug as i suspect what is the fix/workaround.
    Thanks,
    -Jordan
    Edited by: user10342668 on Sep 28, 2009 4:20 PM

    Hi,
    I used the below command to undeploy an application from a managed node.
    undeploy(appName, targets='myserver01')
    But I get the below message:
    <12-May-2011 15:30:11 o'clock BST> <Info> <J2EE Deployment SPI> <BEA-260121> <Initiating undeploy operation for application, myBusinessApp[archive: null], to AdminServer .>
    Failed to undeploy the application with status failed
    Current Status of your Deployment:
    Deployment command type: undeploy
    Deployment State : failed
    Deployment Message : weblogic.management.ManagementException: [Deployer:149118]'myBusinessApp' is not targeted to 'AdminServer'.
    In spite of explicitly mentioning the target, it still looks for admin server.
    Can you pls help me in fixing this.
    Regards,
    Naveen
    Edited by: 858498 on 12-May-2011 22:31

  • Cannot catch a WLSTException

    Why I can't catch WLSTException using WLST OFFLINE
    on set(),create(),cd() operations?
    When I use WLST ONLINE everything works fine.
    Please answer

    I guess it is an off-line WLST bug.
    BTW, how do you start the WLST? Do you start jython first then import WLST as jython module? Or do you simply start WLST using java "weblogic.WLST"?
    Jason Zheng
    BEA Systems

  • WLST undeploy BUG??

    We use WLST to undeploy applications from specified targets.
    Per the documentation undeploy command is undeploy('appname',targets)
    However when we specify target, it undeploys from all managed servers the application is deployed to.
    undeploy('Tapplication','Server1')
    Undeploying application Tapplication
    <Oct 2, 2006 8:40:33 PM EDT> <Info> <J2EE Deployment SPI> <BEA-260121> <Initiating undeploy operation for application, Tapplication [archive: null], to Server1 Server2 .>
    Completed the undeployment of Application with status completed
    Current Status of your Deployment:
    Deployment command type: undeploy
    Deployment State : completed
    Is this a bug?

    This does look like a bug, you need to file a support case.
    -satya
    BEA Blog:
    http://dev2dev.bea.com/blog/sghattu/
    Get Involved in CodeShare:
    https://wls-console-extensions.projects.dev2dev.bea.com/
    https://wlnav.projects.dev2dev.bea.com/
    https://eclipse-wlst.projects.dev2dev.bea.com/
    https://wlst.projects.dev2dev.bea.com/

  • WLST deploy bug

    There seems to be a bug in the deploy method in the WebLogic scripting tool (WLST) on WebLogic Server 9.2.
    When deploying to a remote server using an upload parameter of "false", the path parameter indicates a path on the remote server. The deploy method erroneously checks to see if the path is valid on the local system before proceeding.
    A workaround is to create a file having that path on the local system before calling the deploy method. It can be empty as it is not used for the deployment.
    Example:
    open(path, "w").close()
    deploy(appName=myApplication, path=path, upload="false")
    Edited by crogers at 04/24/2007 3:23 PM

    This does look like a bug, you need to file a support case.
    -satya
    BEA Blog:
    http://dev2dev.bea.com/blog/sghattu/
    Get Involved in CodeShare:
    https://wls-console-extensions.projects.dev2dev.bea.com/
    https://wlnav.projects.dev2dev.bea.com/
    https://eclipse-wlst.projects.dev2dev.bea.com/
    https://wlst.projects.dev2dev.bea.com/

  • "assign" bug in wlst 9

    Hi all, we are using wlst offline to configure domain and its resources. While doing it, we came across interesting situation.
    For one of our applications, we needed to configure JMS resources and mail session in a domain. This combination produced interesting situation. While assigning target(s) to mail session mbean using "assign", it would re-assign the target(s) of jms sub deploy module from jms server(s) to list of target for mail session. We were using "assign" for setting up target.
    I spent considerable to time to figure it out and resolved it by using "setTarget" for mail session instead of "assign".
    Is it a bug or lack of documentation on wlst? A little insight on this would really help us and others in future.
    Thanks much,
    hardeep
    Edited by reehalhs at 07/24/2007 10:07 AM
    Edited by reehalhs at 07/24/2007 10:08 AM

    See this -> Don’t Panic
    "Yesterday (09/09/09, by the way) Apple released iTunes 9. Unfortunately it has a nasty bug that prevents iVolume from analyzing songs that have been imported from a file. All other songs – that is purchased, ripped or converted songs – will still be processed fine by iVolume.
    We put highest priority on this issue. All other projects have been interrupted in order to restore full compatibility with iTunes 9 as soon as possible. We already found a solution and are currently busy implementing it. Things look good so far.
    So please be patient, a new version of iVolume will be released very soon"

  • WLST create bug for JDBCDataSourceParams

    using WLST 9.2 with MP2 patch (allows for catch of WLSTExceptions)....
    why is the WLST create statement not applying a name to the MBean obejct only with JDBCDataSourceParams? instead NO_NAME_0 is created (ie. JDBCDataSourceParams/NO_NAME_0).
    what is really insane is that Bea has published a script (http://edocs.bea.com/wlp/docs92/db/appx_oracle_rac_scripts.html) showing the creation of JDBCDataSourceParams with a specific name then they path through the NO_NAME_0. this isn't documented in the WLST Command & Variable Reference as a special case and thus ought to be a bug.

    WLST creates a directory hierarchy for displaying MBeans. I.e.
    wls:/mydomain/serverConfig/Servers/myserver>
    There are two parts, the first is the attribute name (Servers), and the
    second is the name (myserver).
    This works for the majority of MBeans as most have a Name attribute
    (Servers, JDBCSystemResources, etc.). However, some MBeans do not have a
    name attribute (i.e.
    JDBCDataSourceParams). In this case, WLST can not store the MBean name as
    there is no attribute called Name. It allows the MBean to be created and use
    the NO_NAME_0 notation to keep the attribute name / name display consistent.
    At this point, it may be difficult to add a Name and maintain backwards
    compatibility with existing scripts. But, I will forward this to the JDBC
    folks to see what they think.
    <Matthew Young> wrote in message news:[email protected]..
    using WLST 9.2 with MP2 patch (allows for catch of WLSTExceptions)....
    why is the WLST create statement not applying a name to the MBean obejct
    only with JDBCDataSourceParams? instead NO_NAME_0 is created (ie.
    JDBCDataSourceParams/NO_NAME_0).
    what is really insane is that Bea has published a script
    (http://edocs.bea.com/wlp/docs92/db/appx_oracle_rac_scripts.html) showing
    the creation of JDBCDataSourceParams with a specific name then they path
    through the NO_NAME_0. this isn't documented in the WLST Command & Variable
    Reference as a special case and thus ought to be a bug.

  • OIM Installn :java.lang.RuntimeException: Could not find OffLine WLST class

    Installation of OIM On weblogic.
    oracle/oim/xellerate/setup/setup.xml:443: The following error occurred while executing this line:
    /oracle/oim/xellerate/setup/weblogic-setup.xml:196: java.lang.RuntimeException: Could not find the OffLine WLST class
         at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:539)
         at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:384)
         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
         at org.apache.tools.ant.Task.perform(Task.java:364)
         at org.apache.tools.ant.Target.execute(Target.java:341)
         at org.apache.tools.ant.Target.performTasks(Target.java:369)
         at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
         at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
         at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
         at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
         at org.apache.tools.ant.Main.runBuild(Main.java:668)
         at org.apache.tools.ant.Main.startAnt(Main.java:187)
         at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
         at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
    Tried to run this command ./wlst.sh
    shows
    CLASSPATH=/home/oracle/bea/patch_wls1030/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/oracle/bea/patch_cie660/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/oracle/jdk/lib/tools.jar:/oracle/weblogic/server/server/lib/weblogic_sp.jar:/oracle/weblogic/server/server/lib/weblogic.jar:/home/oracle/bea/modules/features/weblogic.server.modules_10.3.0.0.jar:/oracle/weblogic/server/server/lib/webservices.jar:/home/oracle/bea/modules/org.apache.ant_1.6.5/lib/ant-all.jar:/home/oracle/bea/modules/net.sf.antcontrib_1.0.0.0_1-0b2/lib/ant-contrib.jar:
    PATH=/oracle/weblogic/server/server/bin:/home/oracle/bea/modules/org.apache.ant_1.6.5/bin:/oracle/jdk/jre/bin:/oracle/jdk/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/oracle/bin:/home/oracle/bin:/oracle/jdk/bin
    Your environment has been set.
    CLASSPATH=/home/oracle/bea/patch_wls1030/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/oracle/bea/patch_cie660/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/oracle/jdk/lib/tools.jar:/oracle/weblogic/server/server/lib/weblogic_sp.jar:/oracle/weblogic/server/server/lib/weblogic.jar:/home/oracle/bea/modules/features/weblogic.server.modules_10.3.0.0.jar:/oracle/weblogic/server/server/lib/webservices.jar:/home/oracle/bea/modules/org.apache.ant_1.6.5/lib/ant-all.jar:/home/oracle/bea/modules/net.sf.antcontrib_1.0.0.0_1-0b2/lib/ant-contrib.jar::/oracle/weblogic/server/common/eval/pointbase/lib/pbembedded57.jar:/oracle/weblogic/server/common/eval/pointbase/lib/pbtools57.jar:/oracle/weblogic/server/common/eval/pointbase/lib/pbclient57.jar
    Initializing WebLogic Scripting Tool (WLST) ...
    Problem invoking WLST - java.lang.RuntimeException: Could not find the OffLine WLST class
    Edited by: user10213645 on Mar 9, 2010 3:37 PM

    There is an existing Bug 8431390 - WLST NOT WORKING IF WE USE NON-DEFAULT INSTALLATION (WL_HOME OUTSIDE BEA_HOME)
    As per this bug, the issue can be reproduced as follows:
    Steps to reproduce:
    1. Install WLS 10.3GA (essex) kit in a non-default fashion (WL_HOME outside BEA_HOME)
    2. Go to ur $WL_HOME/common/bin directory and execute wlst.cmd
    3. It exits with the following exception:
    java.lang.RuntimeException:could not find the OffLine WLST class
    Hope this helps.
    For more details, refer: http://idm-oracle.blogspot.com/2010/03/javalangruntimeexception-could-not-find.html

  • Problem setting the PoolList attribute in a WLST script

    Hello !
    I ran the configToScript command over config.xml which has a JDBCMultipool composed of two JDBCpools. It threw the next script to create the JDBC Multipool:
    print 'configuring resource: JDBCMultiPool/MyJDBC MultiPool '
    try:
    myResource = create("MyJDBC MultiPool","JDBCMultiPool")
    except Exception:
    # print 'This resource JDBCMultiPool with name MyJDBC MultiPool failed to be created. The script will try to get it anyways.'
    myResource = (getTarget("JDBCMultiPool/MyJDBC MultiPool"))
    myResource.setPoolList("poolCatalogos01,poolCatalogos02")
    #cmo.addTarget(clusterTarget2)
    # If this fails you will have to add this target manually from the console
    from java.lang import Exception
    from java.lang import Throwable
    try:
    myResource.addTarget(clusterTarget2)
    except Throwable, th:
    print 'Problem in adding target '+clusterTarget2+ ' due to '+th.toString()
    However when the script is executed it fails at the line:
    myResource.setPoolList("poolCatalogos01,poolCatalogos02")
    and shows this error message:
    TypeError: setPoolList(): 1st arg can't be coerced to weblogic.management.configuration.JDBCConnectionPoolMBean[]
    I have tried some other ways to set this attribute, however I hadn't had any success. If some one can provide some advice, I will be grateful.
    By the way:
    I am using a WLST version downloaded last April, of 2004.
    Thanks !

    There is a bug in configToScript that is not generating the right script for setting the Pool list. This will be fixed in the next version of wlst. Here's a workaround.
    try:
    myResource = create("MyJDBC MultiPool","JDBCMultiPool")
    except Exception:
    # print 'This resource JDBCMultiPool with name MyJDBC MultiPool failed to be created. The script will try to get it anyways.'
    myResource = (getTarget("JDBCMultiPool/MyJDBC MultiPool"))
    p1 = getTarget("JDBCConnectionPool/poolCatalogos02")
    p2 = getTarget("JDBCConnectionPool/poolCatalogos02_BEA")
    plist = jarray.array([p1,p2], weblogic.management.configuration.JDBCConnectionPoolMBean)
    myResource.setPoolList(plist)
    let me know if u see any other problems, thanks,
    -satya

  • File seek in wlst fails for lines longer than 8091 characters

    For a CSV file generated in WLST i want to update the header, the first line of the output file, when new metrics have been detected. This works fine by using seek to go to the first line and overwriting the line. But it fails when the number of characters of the first line exceeds 8091 characters.
    I made simplified script which does reproduce the issue i am facing here.
        #!/usr/bin/python
        import sys
        global maxheaderlength
        global initheader
        maxheaderlength=8092
        logFilename = "test.csv"
        # Create (overwrite existing) file
        logfileAppender = open(logFilename,"w",0)
        logfileAppender.write("." * maxheaderlength)
        logfileAppender.write("\n")
        logfileAppender.close()
        # Append some lines
        logfileAppender = open(logFilename,"a",0)
        logfileAppender.write("2nd line\n")
        logfileAppender.write("3rd line\n")
        logfileAppender.write("4th line\n")
        logfileAppender.write("5th line\n")
        logfileAppender.close()
        # Seek back to beginning of file and add data
        logfileAppender = open(logFilename,"r+",0)
        logfileAppender.seek(0) ;
        header = "New Header Line" + "." * maxheaderlength
        header = header[:maxheaderlength]
        logfileAppender.write(header)
        logfileAppender.close()
    When maxheaderlength is 8091 or lower i do get the results as expected. The file test.csv starts with “New Header Line" followed by 8076 dots and followed by the lines 2nd line 3rd line 4th line 5th line
    When maxheaderlength is 8092> the test.csv results as a file starting with 8092 dots followed by "New Header Line" and then followed by 8077 dots. The 2nd ... 5th line are now show, probably overwritten by the dots.
    Any idea how to work around or fix this ?

    For the benefit of others, i got a workaround from Jeremy Gosling on a crosspost on stackoverflow.
    I too was able to reproduce this extremely odd behaviour and indeed it works correctly in Jython 2.5.3 so I think we can safely say this is a bug in 2.2.1 (which unfortunately you're stuck with for WLST).
    My usual recourse in these circumstances is to fall back to using native Java methods. Changing the last block of code as follows seems to work as expected :-
    # Seek back to beginning of file and add data
    from java.io import RandomAccessFile
    logfileAppender = RandomAccessFile(logFilename, "rw")
    logfileAppender.seek(0) ;
    header = "New Header Line" + "." * maxheaderlength
    header = header[:maxheaderlength]
    logfileAppender.writeBytes(header)
    logfileAppender.close()

  • WLST Offline and Replacement Variables

    Hello.
    I'm having a problem where when I'm using WLST to create a domain from a template with an application in it, it writes the application out to the default <BEA_HOME>/user_projects/... as opposed to under the domain directory specified in the wl.writeDomain("/mydomains_dir/mynewdomain" ) command.
    The /AppDeployment/mystdapp/SourcePath is set to $APPLICATIONS_DIRECTORY$/myappsdir/mystdapp.war
    I even tried to change the $APPLICATIONS_DIRECTORY$ to $DOMAIN_HOME$
    but to no avail.
    Can you not use the tags?
    Is there an API I'm not finding the docs on that tell you how to set those tags to something other than the default before writing out the domain to get it to work???
    Any help at all would be very much appreciated. I've been searching the docs for days.
    tia,
    Ed Ludke
    Bank of America
    [email protected]
    (delete NOSPAM from above email address for valid address)

    Satya,
    Thanks so much for responding!
    I don't believe the problem is in the script because all I'm doing is loading a template and then writting it out as a domain to my own target dir.
    Regardless, below is a working sample of what I'm talking about.
    To use this script with the medrec template for example (found in $WL_HOME/common/templates/applications/medrec.jar), use the following entries in a show_rpl_var.properties file:
    ----Start of file----
    template=<your_wl_home>/common/templates/applications/medrec.jar
    appname=MedRecEAR
    domain_home=/some/target/dir/other/than/bea-user_projects/medrec
    ----End of file----
    Do this with a a clean installation (one where no samples have been run) or delete/rename the $BEA_HOME/user_projects/applications/medrec directory. Once you run it, look in $BEA_HOME/user_projects to see a brand new applications/medrec dir containing everything that was under the apps dir of the medrec.jar (if you look inside it).
    I believe this may be a bug, but I'm hoping that maybe there's something I should/could be doing in the wlst script prior to writting out the domain that just isn't documented anywhere (that I can find) to change what $APPLICATIONS_DIRECTORY$ defaults to.
    I know I can probably explicitly set the SourcePath to the fully qualified dir but you shouldn't really have too.
    Thanks again!
    Ed
    show_rpl_var.py (please note that the proper indentation is lost when posted so you'll have to manually add it back in):
    ----Start of Script----
    from java import util
    import wl
    #=======================================================================================
    # This Script loads a specified template that contains at least one app and then
    # displays (prints) the "SourcePath" for the specified app.
    # This script relies upon an acompaning properties file, named show_rpl_var.properties
    # that is in the following format:
    # template=./yourdomaintmpl.jar
    # appname=your_app
    # domain_home=/your_alt_domain_hom
    # Usage:
    # . $WL_HOME/server/bin/setWLSEnv.sh
    # java org.python.util.jython domainBuilder.py
    #=======================================================================================
    def main():
    buildProps = loadProperties()
    buildDomain( buildProps )
    #=======================================================================================
    #=======================================================================================
    def buildDomain( props ):
    #// Read in the template
    source = props[ "template" ]
    print "Reading from template " + source
    wl.readTemplate( source )
    print "Template read"
    #// Configure the default application.
    wl.cd( "/AppDeployment/" + props[ "appname" ] )
    print "App source path is: ", wl.get( "SourcePath" )
    #// Write the Domain.
    wl.setOption("OverwriteDomain", "true")
    target = props[ "domain_home" ]
    print "Writting domain to " + target
    wl.writeDomain( target )
    print "Domain written."
    #=======================================================================================
    #=======================================================================================
    def loadProperties():
    properties = {}
    #load domain instance vars
    prb = util.PropertyResourceBundle.getBundle( "show_rpl_var" )
    prbKeys = prb.getKeys()
    while( prbKeys.hasMoreElements() ):
    key = prbKeys.nextElement()
    properties[ key ] = prb.getString( key )
    #prb = util.PropertyResourceBundle.getBundle( "pd_simple_seed_wl900" )
    return properties
    main()
    -----End of Script-----

  • Permissions needed to create a WLST session and deploy OSB

    Hi,
    Can anyone tell me what Weblogic permissions are needed to create a session with the OSB Configuration SessionManagementMBean?
    It appears you need to have administrators privilege because in my environment I only have Deployers privileges which si enough for me to do an OSB deployment from the OSB Console (and apply a Customisation file etc)
    but when I do it via WLST I get the exception below when I try to create a session:
    weblogic.management.NoAccessRuntimeException: Access not allowed for subject: principals=[30maro, IntegrationAdministrators, Monitors, Deployers], on ResourceType: com.bea.wli.sb.management.configuration.SessionManagementMBean Action: execute, Target: createSession
    The Javadoc for the SessionManagementMBean and Oracle examples and indeed docuemtnation appears to be silent on this matter.
    This is a pain because it suggests I need to have full Administrator privileges to perfor a deployment via a script but only Deployers privilege if I do it manually.
    If anyone can shed light on this (or how to grant someone with Deployers privilege to create a session via the MBean) that would be much appreciated.

    I ended up answering this myself. It turns out this is a bug (that exists in OSB at least to Version 11.1.1.5) for which Oracle can provide a version specific patch that allows someone in the Deployers group to deploy via WLST.
    regards

  • Anyone tried the new Weblogic Scripting Tool (WLST)?

    Has anyone tried using the new WebLogic Scripting Tool (WLST) that was recently
    posted on the dev2dev WebLogic Utilities site: http://dev2dev.bea.com/resourcelibrary/utilitiestools/adminmgmt.jsp
    It looks to be a handy tool that is built upon jython and enables you to easily
    navigate, inspect and manipulate the WebLogic MBean tree on a running server.
    It also has a nice scripting tool which allows you to convert a config.xml file
    into a script that can be run to recreate a domain or specific resources within
    the domain. This is exactly something I have been looking for because we occasionally
    recreate domains or subsets of a domain for testing and POC purposes.
    The utility is fairly well documented and works well for the most part. The only
    issue I have run into so far is that is does not seem to understand JMS Distributed
    Destinations. When I try to convert a config.xml that contains a DD to a script
    it throws a null pointer exception. I have not tried a cluster yet.
    I noticed the utility was authored by someone at BEA. Is there potential that
    BEA will support this in the future if it catches on? Has anyone had experience
    with WLST or jython that would cause you to reccomend (or not) using it?
    Thanks.

    Darryl,
    Thanks for the valuable feedback. My comments are inline.
    Darryl Stoflet wrote:
    As a fairly long time wlshell user who recently started testing wlst there are
    few features I have found lacking in wlst.
    1. For monitoring purposes I am frequently using the -g and -r options to wlshell's
    get command for graphing and repeating respectivelyI haven't looked at -g and -r options in wlshell, but will do so.
    Although there is no graphical monitoring of attributes in wlst, but
    there is certainly some monitoring capability (which will be enhanced
    further in the coming version). Please take a look at the
    monitorAttribute() function.
    wls:/(offline)> help('monitorAttribute')
    Description:
    Monitors the specified attribute every by polling every interval.
    Syntax:
    monitorAttribute(attributeName, interval, monitorFile)
    attributeName = Name of the attribue that you would like to monitor.
    interval = Time (in seconds) to wait before the next fetch
    monitorFile=[optional] File path where the monitored data will be
    written to.
    Example:
    wls:/mydomain/runtime/ServerRuntimes/myserver/ExecuteQueueRuntimes/weblogic.kernel.Default>
    monitorAttribute("ServicedRequestTotalCount",10)
    Press Return to quit monitoring
    Monitoring started for attribute ServicedRequestTotalCount
    wls:/(offline)>
    >
    2. wlshell 2.0 adds the option when connecting to the admin server to also connect
    to all managed servers in that domain. This is a nice feature for monitoring because
    you then have access to all the runtime mbeans in each managed serverYes, this indeed seems to be a very nice feature. We will consider this
    for our next release.
    >
    3. There is not a good way to pass cmd line options(variables) to wlst. In wlshell
    I can send cmd line options via -v. I have tried something similar with wlst using
    -loadProperties but this is a little laborious because I do not necessarily want
    to create a properties file when a passing in only one or two variables. Also
    I find loadProperties lacking somewhat (see 4 below)ok, I just realised that there is indeed a bug in wlst where the command
    line arguments are not being honored. In Jython one can access the
    command line arguments from the sys.argv variable. For example,
    java weblogic.WLST -i foo.py var1 var2 var3
    Initializing WebLogic Scripting Tool (WLST) ...
    Welcome to Weblogic Server Administration Scripting Shell
    Type help() for help on available commands
    wls:/offline> print sys.argv
    ['foo.py', 'var1', 'var2', 'var3']
    wls:/offline>
    But this isn't working properly, please keep using the loadProperties
    untill this has been fixed.
    >
    4) loadProperties treats all created variables as strings. While this is understandable
    from the perspective that getProperty returns a string, it would be nice if wlst
    was smart enough that when a property is numbers only its an int, otherwise a
    string etc.
    wlshell does this logic/conversion for you which really simplifies calling methods
    that expect the particular datatype. To get around this problem you can create a script file say,
    variables.py which would look like,
    # variables that will be used
    theInterpreter.set('var1',10)
    theInterpreter.set('var2','i am a string')
    java weblogic.WLST variables.py
    Initializing WebLogic Scripting Tool (WLST) ...
    Welcome to Weblogic Server Administration Scripting Shell
    Type help() for help on available commands
    wls:/(offline)> print var1
    10
    wls:/(offline)> print var2
    'i am a string'
    >
    5. I'd like to be able to send cmd output etc to a file while running within wlst.
    In wlshell its a simple as adding >> filename to the end of the command. In wlst it is not as simple as doing >>, it is more than that. You can
    choose any output stream to direct your output to. In your case you can
    create a FileOutputStream and route the output to this stream for any
    particular command.
    Example,
    # create a file output stream say fos
    from java.io import FileOutputStream
    fos = FileOutputStream("output.txt")
    # save the default output stream to a variable to
    # switch it back
    sys.stdout=fos
    # Now all output for any function will go to output.txt
    ls()
    cd('foo')
    # after done with your functions switch it back
    sys.stdout=origOutput
    This is the right Jython way to do it. This works for all output streams
    , very useful when you embed an interpreter in a servlet and would like
    to display the output via a PrintStream etc.
    >
    >
    All in all wlst is a nice tool. Personally if the above features were added it
    would be much easier to transistion to wlst for good.
    Also I really like the wlst offline tool. Its nice to be able to do the whole
    create and configure domain process with one tool. Will this be supported. Yes indeed. We are working on merging both the tools into one.
    I do
    not want to rely on it too much if it will not work in future weblogic versions.It will be supported in future release of weblogic.
    Thanks,
    -satya
    >
    Thanks,
    Darryl
    "Steve Hess" <[email protected]> wrote:
    Hello,
    I am the BEA Product Manager behind WLST.
    WLST, as it appears today on dev2dev, is an early release version of
    a tool that
    BEA does intend to support as part of our next major release. We decided
    to issue
    early versions of the tool because of the demand for a supported scripting
    solution,
    and to generate feedback from our user community. I encourage you to
    work with
    WLST, and assure you that this tool represents our current direction
    in management
    scripting.
    Also note, this newsgroup can be used to issue questions, concerns and
    feedback
    about WLST. The engineering and PM team will monitor this group and
    respond to
    your questions as quickly as we can. While we will not be able to respond
    to
    every feature request, we really value your suggestions, and will endeavor
    to
    improve the tool in ways that meet your real-world needs.
    Cheers,
    Steve Hess
    Director, WLS PM
    "George Lupanoff" <[email protected]> wrote:
    Has anyone tried using the new WebLogic Scripting Tool (WLST) that was
    recently
    posted on the dev2dev WebLogic Utilities site: http://dev2dev.bea.com/resourcelibrary/utilitiestools/adminmgmt.jsp
    It looks to be a handy tool that is built upon jython and enables you
    to easily
    navigate, inspect and manipulate the WebLogic MBean tree on a running
    server.
    It also has a nice scripting tool which allows you to convert a config.xml
    file
    into a script that can be run to recreate a domain or specific resources
    within
    the domain. This is exactly something I have been looking for because
    we occasionally
    recreate domains or subsets of a domain for testing and POC purposes.
    The utility is fairly well documented and works well for the most part.
    The only
    issue I have run into so far is that is does not seem to understandJMS
    Distributed
    Destinations. When I try to convert a config.xml that contains a DDto
    a script
    it throws a null pointer exception. I have not tried a cluster yet.
    I noticed the utility was authored by someone at BEA. Is there potential
    that
    BEA will support this in the future if it catches on? Has anyone had
    experience
    with WLST or jython that would cause you to reccomend (or not) using
    it?
    Thanks.

  • OSB 11.1.1.7 - CANNOT EXTEND WLS DOMAIN TO OSB USING WLST

    Hi ,
    Need the help in creating the OSB clustered domain.
    Followed the below documentation. But not getting the required results.
    http://docs.oracle.com/cd/E21764_01/web.1111/e14138/fmw_templates.htm#CJAIDFCA
    Domain that created after using the wlst by using the given templates IS configured with "osb_server1" managed server. The managed servers that we defined those are in cluster does not have any OSB product deployment.
    After doing the research got that that there was bug and has been fixed in 11.1.1.6. But I am not able to figure out the solution.
    Created the Oracle support ticket but no help so far.
    I am using the below templates and in the below sequence
    Var.MIDDLEWAREHOME=/opt/oracle/middleware
    Var.WLSTEMPLATESDIR=/opt/oracle/middleware/wlserver_10.3/common/templates
    Var.ORACLETEMPLATESDIR=/opt/oracle/middleware/Oracle_OSB1/common/templates
    Template.1=<Var.WLSTEMPLATESDIR>/domains/wls.jar
    Template.2=<Var.WLSTEMPLATESDIR>/applications/wls_webservice.jar
    Template.3=<Var.WLSTEMPLATESDIR>/applications/wls_webservice_jaxws.jar
    Template.4=<Var.MIDDLEWAREHOME>/oracle_common/common/templates/applications/jrf_template_11.1.1.jar
    Template.5=<Var.MIDDLEWAREHOME>/oracle_common/common/templates/applications/oracle.jrf.ws.async_template_11.1.1.jar
    Template.6=<Var.ORACLETEMPLATESDIR>/applications/oracle.soa.common.adapters_template_11.1.1.jar
    Template.7=<Var.MIDDLEWAREHOME>/oracle_common/common/templates/applications/oracle.emas_template_11.1.1.jar
    Template.8=<Var.MIDDLEWAREHOME>/oracle_common/common/templates/applications/oracle.emai_template_11.1.1.jar
    Template.9=<Var.MIDDLEWAREHOME>/oracle_common/common/templates/applications/oracle.em_11_1_1_0_0_template.jar
    Template.10=<Var.ORACLETEMPLATESDIR>/applications/wlsb_base.jar
    Template.11=<Var.ORACLETEMPLATESDIR>/applications/wlsb.jar
    Template.12=<Var.ORACLETEMPLATESDIR>/applications/wlsb_owsm.jar
    Below is the      Oracle Service Bus - 11.1.1.7
    http://docs.oracle.com/cd/E28280_01/web.1111/e14138/fmw_templates.htm#CJACDGDI
    Edited by: user12019269 on Apr 19, 2013 11:12 AM

    The upgrade steps involved are described here: http://download.oracle.com/docs/cd/E17904_01/doc.1111/e15032/toc.htm

  • Using Ant to execute WLST setAppMetadataRepository command

    I am having a problem using Ant to execute the setAppMetadataRepository WLST command. This command puts an entry in adf-config.xml that points to the MDS datasource.
    This is the ant task that I'm using. These commands work from the WLST tool, but when using them with Ant, I get the error below.
       <target name="setAppMetadataRepositoryUsingWlst">
          <wlst debug="true" failonerror="true">
             <script>
                archive = getMDSArchiveConfig(fromLocation='C:/ADE/michande_platSavedSearch/commsplatform/ri/dist/comms-ri.ear')
                archive.setAppMetadataRepository(repository='mds-commsRepository',partition='riPartition', type='DB', jndi='jdbc/mds/commsRepository')
                archive.save()
            </script>
          </wlst>
       </target>Here is the error that I get (NameError: getMDSArchiveConfig). This is saying that getMDSArchiveConfig isn't a recognized command. Other commands (like connect(...)) work ok from ant, but not these MDS commands. Is this a bug or am I doing something wrong here?
    [wlst] <WLSTTask> All lines will be trimmed by 12
    [wlst] <WLSTTask> Line: archive = getMDSArchiveConfig(fromLocation='C:/ADE/michande_platSavedSearch/commsplatform/ri/dist/comms-ri.ear'). Final trim length: 12, String length: 124
    [wlst] <WLSTTask> Line: archive.setAppMetadataRepository(repository='mds-commsRepository',partition='riPartition', type='DB', jndi='jdbc/mds/commsRepository') . Final trim length: 12,
    String length: 147
    [wlst] <WLSTTask> Line: archive.save(). Final trim length: 12, String length: 26
    [wlst] <WLSTTask> The script that will be executed
    [wlst] archive = getMDSArchiveConfig(fromLocation='C:/ADE/michande_platSavedSearch/commsplatform/ri/dist/comms-ri.ear')
    [wlst] archive.setAppMetadataRepository(repository='mds-commsRepository',partition='riPartition', type='DB', jndi='jdbc/mds/commsRepository')
    [wlst] archive.save()
    [wlst]
    [wlst] Error: Error executing the script snippet
    [wlst] archive = getMDSArchiveConfig(fromLocation='C:/ADE/michande_platSavedSearch/commsplatform/ri/dist/comms-ri.ear')
    [wlst] archive.setAppMetadataRepository(repository='mds-commsRepository',partition='riPartition', type='DB', jndi='jdbc/mds/commsRepository')
    [wlst] archive.save()
    [wlst]
    [wlst] due to:
    [wlst] Traceback (innermost last):
    [wlst] File "<string>", line 1, in ?
    {color:red} [wlst] NameError: getMDSArchiveConfig{color}
    Thanks,
    Mike

    Not all WLST installations are equivalent. Have a read of [http://www.oracle.com/technetwork/articles/adf/part10-085778.html]this, specifically the paragraph right after Figure 13 for something to try. Bottom line - the WLST that comes with the base WLS server install cannot do the MDS operations.
    John

Maybe you are looking for