Jython JMX vs vs WLST Script


Hello

Can someone explain to me please the interior design of these three approaches.

Prices even jython WLST script?

Thanks and greetings

Nitish Kumar

Hi Laurent,.

JMX: Specifications of Java to extend your application management service. The most important here are the managed Beans, or MBeans, which contains attributes and methods to configure and monitor your system. You can use JMX for a Java application to connect to your WebLogic resources and configure them or watch them.

WLST: is a JMX client. WLST is a command-line scripting environment based on Jython. You can use it to access a field, to create servers, create resources and so on.

Jython: Is a Java script interpreter. In other words, are a high level and a dynamic programming language based on Python and implemented with Java.

I recommend using WLST to perform a typical task as creating resources or to monitor your system. If you want to create a custom application to access and edit specific objects of JMX, I think that a single JMX with Java Client is the best option. Don't forget with WLST you can access a field in three ways: online, offline and Embedded (from Java).

JMX docs: http://docs.oracle.com/middleware/1212/wls/JMXCU/accesswls.htm

WLST tutorial: http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/wls/12c/06-WLST--4474/cmdline.htm

Jython web site: The Jython Project

Kind regards

Jorge

Tags: Fusion Middleware

Similar Questions

  • Standard Python with WLST scripts modules using, I have to use Jytho

    I want to import standard modules in my WLST scripts, but I wonder if the WLST interpreter will be able to accomplish this?
    For example, I want to import os, string, sys in my WLST script.

    I have to use Jython for this?

    The version of WLS is 10 MP1

    Certainly, you can import standard Python modules in WLST scripts. Jython is just a Python running in a JVM interpreter which maps of Java to Python classes. All code that runs in WLST is valid Python code.

    An example is my [blog | http://davidmichaelkarr.blogspot.com/2008/10/make-wlst-scripts-more-flexible-with.html] on the importation of the Python Getopt module.

    So it is clear, WLST is not an interpreter, it simply represents the infrastructure to link to the tree of WebLogic JMX in Jython.

    Published by: david.karr on January 6, 2009 14:01

  • Record WLST scripts for the card settings

    Hello

    I'm new to the WLST Script recording tool.

    I am trying to save my settings for JmsAdapter create a new Pool of outbound connections, but the registration tool does not seem to be able to capture changes in the settings of the map file is empty after the changes have been made.

    Anyone know why this is?

    Is there a way make the folder working tool for the card settings?

    If this is not the case, if anyone knows the necessary functions/directories in a WLST to create outbound connections Pools in the JMSAdapter settings?

    Any help will be very appreciated!

    Thank you

    Al

    JMS adapter uses the deployment plan where wlst can't save this.

    The recording feature intercepts calls JMX and translated into corresponding WLST scripts, as well as features that use deployment plans fall outside the coverage area of the "Record" feature.

    Best regards

    Vivek Vishal

  • WLST script - how to configure clientID for factory connections?

    We are on Oracle weblogic 10.1.3.6 and WLST script to create the new queue, subjects and connection factory. Here is excerpt from node by us using

    def createCF (cfname, cfjndiname, xaEnabled):

    print 'START createCF() '.

    CD ('/JMSSystemResources/' + '/JMSResource/' + ModuleName + ModuleName)

    CF = create (cfname, "ConnectionFactory")

    FC. JNDIName = cfjndiname

    cf.setDefaultTargetingEnabled (true)

    # Set enabled XA transactions

    If (xaEnabled is "true"):

    cf.transactionParams.setXAConnectionFactoryEnabled (1)

    cf.transactionParams.setTransactionTimeout (3600)

    CD ('/JMSSystemResources/' + ModuleName + '/JMSResource/' + ModuleName + '/ConnectionFactories/' + cfname + '/ClientParams/' + cfname)

    # Define the strategy of the customer ID.

    cmo.setClientIdPolicy ('Unrestricted')

    # Set subscription sharing policy

    cmo.setSubscriptionSharingPolicy ("feature")

    Print "END createCF()".

    The code above works perfectly well. In addition, we would like the ClientId value for the connection factory. We tried with the following and both failed with "AttributeError: setClientID.

    cf.setClientID ('myClientID')
    cmo.setClientID ('myClientID')

    Pointers to the right function, would be a great help. Thank you

    Connect ("weblogic', ' passwd ',' t3: / /: 7001'")

    Edit()

    Try:

    startEdit()

    module = cmo.createJMSSystemResource ('testModule')

    resource = module.getJMSResource)

    print 'creating connection factories. "

    resource.createConnectionFactory ('Test_CF')

    ConnectionFactory = resource.lookupConnectionFactory ('Test_CF')

    connectionfactory.setJNDIName('jms/aia/Test_CF')

    connectionfactory.setDefaultTargetingEnabled (true)

    connectionfactory.getClientParams (.setClientId('12345'))

    # connectionfactory.getTransactionParams (.setTransactionTimeout) (3600)

    # connectionfactory.getTransactionParams () .setXAConnectionFactoryEnabled (true)

    # connectionfactory.getLoadBalancingParams () .setLoadBalancingEnabled (true)

    # connectionfactory.getLoadBalancingParams () .setServerAffinityEnabled (false)

    Print "Test_CF Created"

    Save()

    Activate (Block = 'true')

    Print "JMS configuration made all the changes enabled."

    except Exception, e:

    dumpStack()

    print ' Exception occurred while creating JMS resources:, e. Report this error to the team of Directors integration AIA'

    Undo('true','y')

    stopEdit('y')

    Disconnect()

    Exit()

    Best regards

    Vivek Vishal

  • WLST Script to create the domain weblogic for IOM and OAM

    Hello

    I intend to set up PS3 IOM - OAM in the new environment. We intend to perform the installation in silent mode. Does anyone have example WLST to create the domain weblogic for IOM or OAM?

    Thank you

    Here is an example of OUD. I post this one since it's the simplest and shortest, but it is the same for OAM and IOM except that the script is much longer because they ask a lot more questions. You will need to export the variables used or replace them with the appropriate values for your system.

    wait-<>

    the value of timeout 600

    spawn ${OUD_BASE}/${WLS_NAME}/common/bin/config.sh mode = console

    # Create a WebLogic domain

    wait {}

    {"Enter the index number to select GOLD *" {send "1\n"}}

    # Choose the components of the Weblogic Platform

    wait {}

    {"Enter the index number to select GOLD *" {send "1\n"}}

    # | ___Oracle directory Services Manager - 11.1.2.3.0 [Oracle_OUD1] [3]

    wait {}

    {"Enter number exactly as it appears in the media *" {send "3\n"}}

    wait {}

    {"Enter number exactly as it appears in the media *" {send "n"}}

    # Change the domain information

    wait {}

    "" Enter the value of * "{send" ${OUD_DOMAIN_NAME} \n "}}"

    wait {}

    {"Enter the number of the option to select GOLD *" {send "n\n"}}

    # Select the target area for this domain directory

    wait {}

    {'Enter' new target location GOLD * {send "${OUD_BASE} / user_projects/domains\n"}}

    wait {}

    {'Enter' new target location GOLD * {send "n\n"}}

    # Configure password and username administrator

    wait {}

    {"Enter the number of the option to select GOLD *" {send "2\n"}}

    wait {}

    "" Enter new * "{send" ${WLS_PASS} \n "}}"

    wait {}

    {"Enter the number of the option to select GOLD *" {send "3\n"}}

    wait {}

    "" Enter new * "{send" ${WLS_PASS} \n "}}"

    wait {}

    {"Enter the number of the option to select GOLD *" {send "n\n"}}

    # Configuration mode field-> 1 | Development mode

    wait {}

    {"Enter the index number to select GOLD *" {send "1\n"}}

    # Java SDK selection

    wait {}

    {"Enter the index number to select GOLD *" {send "2\n"}}

    wait {}

    {'Enter' new JVM Directory GOLD * {send "${JAVA_HOME} \n"}}

    wait {}

    {'Enter' new JVM Directory GOLD * {send "n\n"}}

    # Select Optional Configuration

    wait {}

    {"Enter the index number to select GOLD *" {send "1\n"}}

    wait {}

    {"Enter the index number to select GOLD *" {send "n"}}

    # Configure the Administration Server

    # Change "Listen port.

    wait {}

    {"Enter the number of the option to select GOLD *" {send "3\n"}}

    wait {}

    "" Enter the value of * "{send" ${ODSM_PORT} \n "}}"

    # Change 'SSL enabled.

    wait {}

    {"Enter the number of the option to select GOLD *" {send "4\n"}}

    wait {}

    {"Enter the index number to select GOLD *" {send "1\n"}}

    # Change 'SSL listening Port.

    wait {}

    {"Enter the number of the option to select GOLD *" {send "4\n"}}

    wait {}

    "" Enter the value of * "{send" ${ODSM_SPORT} \n "}}"

    # Then

    wait {}

    {"Enter the number of the option to select GOLD *" {send "n\n"}}

    # wait for install

    wait {}

    {"Successfully created * field *" {send "\n"}}

    EXPRESSIONS OF FOLKLORE

  • WLST script to stop the managed server takes 30 mins

    Hello

    I have a setup where I use Node Manager and WLST to stop a managed server. The script is simply:

    nmConnect('weblogic;,'password','123.456.78.9','5556','soa_domain','/u01/soa_domain','plain')

    Connect('weblogic','password','t3://123.2456.78.9:8001')

    Shutdown ('soa_ms1', 'Server', 'true ', 3000,' force = true')

    Exit()

    It takes usually more than 30 minutes for the server managed to stop using this method. However, if I use the console and select the managed server and select to FORCE SHUTDOWN NOW, the action is completed in less than 2 minutes.

    Why is there such a difference in time?

    Thank you very much

    Andy

    Hello

    Have you tried running the command shutdown() WLST directly and not the script created... ? If so the results were the same... ?

    In addition, in your script, I think it would be advisable to print the output for each line text using the command 'Print', just to see where exactly it takes all this time...

    [EDIT: now I noticed in the shutdown command, you use a timeout of 3000 seconds value, which, according to the wlst command Manual is "Duration (in seconds) during which WLST waiting for subsystems to complete ongoing work and to hang before you stop the server".] Try to reduce this value to, say, 30. If the shutdown command would look like this:

    Shutdown ('soa_ms1', 'Server', 'true ', 30,' force = true')

    Or, you can completely remove > shutdown('soa_ms1','Server','true','force=true')

    [/ END EDIT]

    Kind regards

    White

  • using wlst script

    Hi all

    I am using the following script to create a managed server and try to lead a cluster named "dizzyCluster" and a "Machine_1" machine, please see the following script: -.

    -------------------------------------

    from java.util import *.
    javax.Management import *.
    import javax.management.Attribute
    Print "from the script... '
    Connect ('weblogic1', 'barbie @135', ' http://smart:7001'))

    Edit()
    startEdit()

    Print "CREATING a MANAGED SERVER: Test_Server'"
    Test_Server1 = cmo.createServer ('TestServer1')
    Test_Server1.setListenPort (7090)
    Test_Server1.setAutoRestart (true)
    Test_Server1.setAutoKillIfFailed (true)
    Test_Server1.setRestartMax (2)
    Test_Server1.setRestartDelaySeconds (10)
    Test_Server1.getServerStart().setJavaHome('c:\oracle\Middleware\jdk160_24')
    Test_Server1.getServerStart () .setJavaVendor ('Oracle')
    Test_Server1.getServerStart (.setArguments('-Xms128m-Xmx256m-Xns64m-Xgcprio:pausetime'))

    Print "Add MANAGED SERVERS to MACHINE"
    Test_Server1.setMachine(*Machine_1*)
    print 'Add MANAGED SERVERS IN CLUSTER'
    Test_Server1.setCluster(*dizzyCluster*)




    Save()
    Activate (Block = "true")
    Disconnect()
    print the «end of the script...» »
    Exit()

    -----------------------------------------

    Here, I use Machine_1 and dizzyCluster their names in the functions setMachine and setCluster... script is however creater a managed server, but which gives an exception name for cluster and machine. Please suggest what the problem...

    Published by: Sharad Jain 17 Sep 2011 08:45

    Published by: Sharad Jain Sep 19, 2011 10:51

    You can get a machine as follows:

    wls:/offline> connect('username','password');
    
    wls:/base_domain/serverConfig> machines = cmo.getMachines();
    wls:/base_domain/serverConfig> print machines;
    array(weblogic.management.configuration.MachineMBean,[[MBeanServerInvocationHandler]com.bea:Name=Machine,Type=UnixMachine]) 
    
    # Note that cmo.getMachines obtain all the machines in the domain as an array
    # to get a particular instance you can use for example
    
    wls:/base_domain/serverConfig> machine = machines[0];
    wls:/base_domain/serverConfig> print machine
    [MBeanServerInvocationHandler]com.bea:Name=Machine,Type=UnixMachine
    

    When you got the machine, you can use managed_server.setMachine (machine)

    «Give me the methods that return instances for other modules too...» »

    When you use the ls() command a list of all the mbeans available are displayed, i.e.,.

    wls:/base_domain/serverConfig> ls();
    dr--   AdminConsole
    dr--   AppDeployments
    dr--   BridgeDestinations
    dr--   Clusters
    dr--   CoherenceClusterSystemResources
    dr--   CoherenceServers
    dr--   CustomResources
    dr--   DeploymentConfiguration
    dr--   Deployments
    dr--   EmbeddedLDAP
    dr--   ErrorHandlings
    dr--   FileStores
    dr--   ForeignJNDIProviders
    dr--   InternalAppDeployments
    dr--   InternalLibraries
    dr--   JDBCDataSourceFactories
    dr--   JDBCStores
    dr--   JDBCSystemResources
    dr--   JMSBridgeDestinations
    dr--   JMSInteropModules
    dr--   JMSServers
    dr--   JMSSystemResources
    dr--   JMX
    dr--   JPA
    dr--   JTA
    dr--   JoltConnectionPools
    dr--   Libraries
    dr--   Log
    dr--   LogFilters
    dr--   Machines
    dr--   MailSessions
    dr--   MessagingBridges
    dr--   MigratableTargets
    dr--   RemoteSAFContexts
    dr--   SAFAgents
    dr--   SNMPAgent
    dr--   SNMPAgentDeployments
    dr--   Security
    dr--   SecurityConfiguration
    dr--   SelfTuning
    dr--   Servers
    dr--   ShutdownClasses
    dr--   SingletonServices
    dr--   StartupClasses
    dr--   SystemResources
    dr--   Targets
    dr--   VirtualHosts
    dr--   WLDFSystemResources
    dr--   WLECConnectionPools
    dr--   WSReliableDeliveryPolicies
    dr--   WTCServers
    dr--   WebAppContainer
    dr--   WebserviceSecurities
    dr--   XMLEntityCaches
    dr--   XMLRegistries
    
    -r--   AdminServerName                              AdminServer
    -r--   AdministrationMBeanAuditingEnabled           false
    -r--   AdministrationPort                           9002
    -r--   AdministrationPortEnabled                    false
    -r--   AdministrationProtocol                       t3s
    -r--   ArchiveConfigurationCount                    0
    -r--   ClusterConstraintsEnabled                    false
    -r--   ConfigBackupEnabled                          false
    -r--   ConfigurationAuditType                       none
    -r--   ConfigurationVersion                         10.3.5.0
    -r--   ConsoleContextPath                           console
    -r--   ConsoleEnabled                               true
    -r--   ConsoleExtensionDirectory                    console-ext
    -r--   DomainVersion                                10.3.5.0
    -r--   ExalogicOptimizationsEnabled                 false
    -r--   GuardianEnabled                              false
    -r--   InternalAppsDeployOnDemandEnabled            true
    -r--   LastModificationTime                         0
    -r--   Name                                         base_domain
    -r--   Notes                                        null
    -r--   Parent                                       null
    -r--   ProductionModeEnabled                        false
    -r--   RootDirectory                                /home/oracle/weblogic/user_projects/domains/base_domain
    -r--   Type                                         Domain
    
    -r-x   freezeCurrentValue                           Void : String(attributeName)
    -r-x   isSet                                        Boolean : String(propertyName)
    -r-x   unSet                                        Void : String(propertyName)
    

    For all clusters, you can use cmo.getClusters () and then the same that in the case of machines Gets the right cluster in getting to the table.

  • WLST Script throws errors under loop for

    I'm new to wlst and get below errros during execution of the script. the variable name in the command cd not replaced at fair value and give the error. I would take place if some can point me to the right direction.

    Cat serverName2.py
    Connect('test','test123','t3://test-App-dev-a:12619')
    domainRuntime()
    DVS = adminHome.getMBeansByType ('Server')
    DVS s to:
    name = s.getName)
    CD ('/ServerRuntimes/' + 'name')
    ls()
    Disconnect()


    Java weblogic. WLST serverName2.py


    getting the below errors

    Now to the tree of domainRuntime. It is a tree read-only with DomainMBean as the root.
    For further assistance, use the help (domainRuntime)

    No available stack trace.
    Problem call WLST - Traceback (innermost last):
    .......
    .......

    File '< iostream >", line 170 in cd
    WLSTException: "error cding to the MBean.

    You must remove the quotes for the name.

    Cat serverName2.py
    Connect('test','test123','t3://test-App-dev-a:12619')
    domainRuntime()
    DVS = adminHome.getMBeansByType ('Server')
    DVS s to:
    name = s.getName)
    CD ('/ ServerRuntimes /' + name)
    ls()
    Disconnect()

    Thank you
    Krishna.

  • WLST Script to create the field of OSB with Oracle XE

    I installed oracle Service bus 10.3 with Oracle XE on a CentOS linux distribution. Everything went well. I created a default domain with the Wizard (so with Pointbase). Now, I want to go a little further. So I want to automatically create a domain OSB for Oracle XE. I used the following script (I borrowed from another thread ;-))):

    -----
    import sys

    Print "@ from the script...» »

    Try:
    domaintarget = "/ apps/bea/user_projects/domains/test2.
    domainUser = "weblogic.
    wl_home='/apps/BEA/wlserver_10.3'
    workshop_home='/apps/BEA/workshop_10.3'
    osb_home='/apps/BEA/osb_10.3'


    def configOraDB (dataSource):
    CD (DataSource)
    URL = "jdbc:oracle:thin:@localhost:1521:XE".
    Set ('URL', URL)
    Set('DriverName','oracle.) JDBC. OracleDriver')
    cmo.setPasswordEncrypted (domainUser)
    CD (' Properties/NO_NAME_0/Property/user')
    Set ('Value', domainUser)
    CD ('. /.. /.. /.. /.. /.. /.. / JdbcConnectionPoolParams/NO_NAME_0 ')
    cmo.setTestTableName ('dual')


    # Open a field template.
    readTemplate (wl_home + ' / common/templates/domains/wls.jar')

    CD (' Servers/AdminServer')
    together ('ListenPort', 7002)
    Set('ListenAddress','')


    CD('/')
    CD (' Security/base_domain/user/weblogic')
    cmo.setName ('weblogic')
    cmo.setPassword ('weblogic')
    setOption ('OverwriteDomain', 'true')
    writeDomain (domaintarget)
    closeTemplate()

    readDomain (domaintarget)


    addTemplate (workshop_home + ' / common/templates/applications/workshop_wl.jar')
    addTemplate (wl_home + ' / common/templates/applications/wls_webservice.jar')
    addTemplate (osb_home + ' / common/templates/applications/wlsb.jar')

    configOraDB('/JdbcSystemResources/wlsbjmsrpDataSource/JdbcResource/wlsbjmsrpDataSource/JdbcDriverParams/NO_NAME')
    configOraDB('/JdbcSystemResources/cgDataSource/JdbcResource/cgDataSource/JdbcDriverParams/NO_NAME')
    configOraDB('/JdbcSystemResources/cgDataSource-nonXA/JdbcResource/cgDataSource-nonXA/JdbcDriverParams/NO_NAME')



    updateDomain()
    closeDomain()


    except:
    dumpStack()
    Print "unexpected error:", sys.exc_info () [0]
    lift
    -----

    This creates a pretty empty field, as I have not yet created a real database. The command I found was

    loadDB ('10g ','wlsbjmsrpDataSource ')

    that will load the appropriate tables (of OSB/dbscripts /..)

    The problem is that I have no schema/user created in Oracle XE. So, I can manually create this but is not what I want to do. I also want to be scripted. So, how can I do this or is this not the way to go. You always manually create users on the database for three data sources (cgDataSource, wlsbjmsrpDatasrouce, cgDataSource-nonXA) before running a script to make a loadDB. Or do I run some kind of script create_user.sql or something.

    A second issue is that I can't find the scripts for the databases for cgDataSource and cgDataSource-nonXA data sources. They should be somewhere in workshop_10.3 but I can't find them. So, what is the problem here, I have to do a loadDB('10g','cgDataSource') or that eventually an error?

    My last question is I want to change the ALSB_DEBUGPORT (7 something) and debugging of the FMV of port (8453) in my script, how can I do this? I had another instance that already use these ports, so this won't work...

    My preference would be to invoke wslt by ant. This way Weblogic specific configurations can be addressed using WSLT and generic configurations (create DB users) can be done using ant.

    The files SQL to create tables required for the OSB are present in/MiddlewareHome/Oracle_OSB1/dbscripts/oracle. Try to run manually by using the Ant sql task. Create DB users is also possible using the same Ant SQL task http://ant.apache.org/manual/CoreTasks/sql.html.

    There are several ways you can do. I use http://ant.apache.org/manual/CoreTasks/replace.html as shown below in an Ant macro. Similarly, you can replace the ALSB_DEBUGPORT debug port and jvm debugging.

              
         



              
         


              
         


              
         


              
         


              
         


    Maury

  • Using the script, Jython in ODI

    Hello
    I have a requirement where I want to exploit a jython script to solve a business problem (break a string of semicolon separated into tokens). I'll call this script of ODI.

    Do I need to download the jython interpreter to test my script before I use it in ODI?

    How to call the script of ODI?

    N ° the Jython interpreter is built into ODI. You can simply create an ODI procedure, step, assign technology as "Jython" and paste your script in the command on the target. You can then use this procedure as part of a package.

  • Capture the output of command Unix in WLST

    I'm trying to write a Python/WLST script that connects to a particular area based on the machine on which the script is run. My thought was to issue the command of Unix 'hostname' get the name of the machine operating systems, test against it and connect to the output of the base. My first thought was to do something like


    Import os
    HR = os.system ('hostname')

    If HR == "name":
    ConnectToAS()

    It does not of coarse because the os.system () command returns the Boolean output from the statement code and not the output. I then tried to watch using the mod 'subprocess' but who returns the following:

    Problem call WLST - Traceback (innermost last):
    File "/ home/beaadmin/bin/scripts/wlst/wip/checkMachine.py", line 1, in?
    ImportError: no module named subprocess

    Anyone know of another way to run a Python/WLST script which get the name of the machine on which it will run and make the name available for the rest of the calling script?


    Any help would be greatly appreciated.

    I came across your post looking to solve this same problem. I found a solution myself. Since jython, you are allowed to use a java class in your python code. So to get your local host name, use:

    HR = java.net.InetAddress.getLocalHost () .getHostName ();

  • set minimum password length using wlst

    CD('/SecurityConfiguration/base_domain/Realms/MYREALM/AuthenticationProviders/DefaultAuthenticator')
    cmo.setMinimumPasswordLength (5)

    Gives me this error message. How to solve this?

    Connected to the Server Admin "AdminServer" that belongs to the domain "base_domain"

    WARNING: A non-secure protocol was used to connect to the
    Server. To ensure the safety of on-the-wire, the SSL port or
    Admin port should be used instead.

    Already in Runtime Config

    / SecurityConfiguration/base_domain/areas/myrealm/AuthenticationProviders/DefaultAuthenticator
    Problem call WLST - Traceback (innermost last):
    File "/ admin/Oracle/Middleware/user_projects/domains/base_domain/scripts/createUsers.py", line 20, in?
    at weblogic.management.jmx.ExceptionMapper.matchJMXException(ExceptionMapper.java:74)
    at weblogic.management.jmx.MBeanServerInvocationHandler.doInvoke(MBeanServerInvocationHandler.java:506)
    at weblogic.management.jmx.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:380)
    to $Proxy17.setMinimumPasswordLength (Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)

    java.lang.RuntimeException: java.lang.RuntimeException: the requested attribute is not exposed via JMX: setMinimumPasswordLength

    Hello

    Seems that your WLST Script a startEdit() the missing function:

    http://middlewaremagic.com/WebLogic/?p=5234#comment-2916

    .
    .
    Thank you
    Jay SenSharma

  • WLST fails to createDomain on Mac with SDK version error

    I'm trying to use WLST scripts that rely on a local development field. Currently, the scripts fail when run on WLS 10.3 on Macintosh, default on what seems to be a problem of detection of the SDK software. The details of the error are listed below, with some advice from platform.

    Clues, hacks or tips to fix this would be very useful.

    Mac OS X 10.6.3

    * % java-version *.
    Java version "1.6.0_17".
    Java (TM) SE Runtime Environment (build 1.6.0_17 - b04-248 - 10 M 3025)
    Java 64-Bit Server VM (build 14, 3-b01-101, mixed mode)

    Error
    ...
    ...
    Model read
    Error: writeDomain() failed. Do dumpStack() for more details.
    com.bea.plateng.domain.script.jython.WLSTException: com.bea.plateng.domain.script.ScriptException: need Java SDK version 1.4 or higher
    at com.bea.plateng.domain.script.jython.CommandExceptionHandler.handleException(CommandExceptionHandler.java:51)
    at com.bea.plateng.domain.script.jython.WLScriptContext.handleException(WLScriptContext.java:1464)
    at com.bea.plateng.domain.script.jython.WLScriptContext.writeDomain(WLScriptContext.java:803)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:160)
    at org.python.core.PyMethod.__call__(PyMethod.java:96)
    at org.python.core.PyObject.__call__(PyObject.java:270)
    at org.python.core.PyInstance.invoke(PyInstance.java:261)
    to org.python.pycode._pyx3.writeDomain$14(/private/tmp/WLSTOfflineIni6042307889753572219.py:71)
    to org.python.pycode._pyx3.call_function(/private/tmp/WLSTOfflineIni6042307889753572219.py)
    at org.python.core.PyTableCode.call(PyTableCode.java:208)
    at org.python.core.PyTableCode.call(PyTableCode.java:267)
    at org.python.core.PyFunction.__call__(PyFunction.java:172)
    to org.python.pycode._pyx16.f$0(/private/tmp/Mac/createDomain.py:219)
    to org.python.pycode._pyx16.call_function(/private/tmp/Mac/createDomain.py)
    at org.python.core.PyTableCode.call(PyTableCode.java:208)
    at org.python.core.PyCode.call(PyCode.java:14)
    at org.python.core.Py.runCode(Py.java:1135)
    at org.python.util.PythonInterpreter.execfile(PythonInterpreter.java:167)
    at weblogic.management.scripting.WLST.main(WLST.java:129)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    in weblogic. WLST.main (WLST.java:29)
    Caused by: com.bea.plateng.domain.script.ScriptException: need Java SDK version 1.4 or higher
    at com.bea.plateng.domain.script.ScriptExecutor.saveJDKInfo(ScriptExecutor.java:3789)
    at com.bea.plateng.domain.script.ScriptExecutor.saveDomainCreationOptions(ScriptExecutor.java:2757)
    at com.bea.plateng.domain.script.ScriptExecutor.writeDomain(ScriptExecutor.java:556)
    at com.bea.plateng.domain.script.jython.WLScriptContext.writeDomain(WLScriptContext.java:795)
    ... 25 more

    Hi javafueled,

    I also had this problem and just discovered that if I remove the "jre" hack was necessary to install the server, then my scripts begin to work.

    (i.e. reverse the jre actions described here: http://samuraism.jp/blog/2008/09/20/running_weblogic_server_10g_release_3_on_a_mac.html)

    Hope this helps,

    Tim.

  • WLST getSecurityConfiguration() failed. Returns a null value

    Hi, I was doing a wlst script to create a new Weblogic domain. The script below stuck to the cmo.getSecurityConfiguration ().

    Any help is appreciated.

    The error messages are:


    Error: getSecurityConfiguration() failed. Do dumpStack() for more details.
    Unexpected error: java.lang.reflect.UndeclaredThrowableException
    com.bea.plateng.domain.script.jython.WLSTException: com.bea.plateng.domain.script.ScriptException: java.lang.NullPointerException
    at com.bea.plateng.domain.script.jython.CommandExceptionHandler.handleException(CommandExceptionHandler.java:51)
    at com.bea.plateng.domain.script.jython.WLScriptContext.handleException(WLScriptContext.java:1464)
    at com.bea.plateng.domain.script.jython.ScriptInvocationHandler.invoke(ScriptInvocationHandler.java:141)
    to $Proxy0.getSecurityConfiguration (Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:160)
    at org.python.core.PyMethod.__call__(PyMethod.java:96)
    at org.python.core.PyObject.__call__(PyObject.java:258)
    at org.python.core.PyInstance.invoke(PyInstance.java:244)
    to org.python.pycode._pyx16.createJcashDomain$2(/cash-as1/cashadm/jcash7_0_0/wlstscripts/qa2/createDomain.py:85)
    to org.python.pycode._pyx16.call_function(/cash-as1/cashadm/jcash7_0_0/wlstscripts/qa2/createDomain.py)
    at org.python.core.PyTableCode.call(PyTableCode.java:208)
    at org.python.core.PyTableCode.call(PyTableCode.java:256)
    at org.python.core.PyFunction.__call__(PyFunction.java:169)
    to org.python.pycode._pyx16.f$0(/cash-as1/cashadm/jcash7_0_0/wlstscripts/qa2/createDomain.py:273)
    to org.python.pycode._pyx16.call_function(/cash-as1/cashadm/jcash7_0_0/wlstscripts/qa2/createDomain.py)
    at org.python.core.PyTableCode.call(PyTableCode.java:208)
    at org.python.core.PyCode.call(PyCode.java:14)
    at org.python.core.Py.runCode(Py.java:1135)
    at org.python.util.PythonInterpreter.execfile(PythonInterpreter.java:167)
    at weblogic.management.scripting.WLST.main(WLST.java:129)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    in weblogic. WLST.main (WLST.java:29)
    Caused by: com.bea.plateng.domain.script.ScriptException: java.lang.NullPointerException
    at com.bea.plateng.domain.script.jython.WLScriptContext.getProxy(WLScriptContext.java:1515)
    at com.bea.plateng.domain.script.jython.ScriptInvocationHandler.convertType(ScriptInvocationHandler.java:308)
    at com.bea.plateng.domain.script.jython.ScriptInvocationHandler.invoke(ScriptInvocationHandler.java:89)
    ... more than 26
    Caused by: java.lang.NullPointerException
    at com.bea.plateng.domain.script.jython.CmoMapKey.hashCode(CmoMapKey.java:32)
    at java.util.HashMap.get(HashMap.java:300)
    at com.bea.plateng.domain.script.jython.ScriptProxyFactory.findCmo(ScriptProxyFactory.java:260)
    at com.bea.plateng.domain.script.jython.ScriptProxyFactory.findCmoByName(ScriptProxyFactory.java:254)
    at com.bea.plateng.domain.script.jython.ScriptProxyFactory.getProxy(ScriptProxyFactory.java:94)
    at com.bea.plateng.domain.script.jython.WLScriptContext.getProxy(WLScriptContext.java:1511)
    ... 28 more


    ================================
    CD("/")
    from weblogic.management.configuration import SecurityConfigurationMBean
    SC = cmo.getSecurityConfiguration)
    sc.setNodeManagerUserName ("nmUser")
    sc.setNodeManagerUserPassword ("nmPwd")

    Steven,

    Why do you not write another script once the domain is created for updating the nodemanager properties file. I sent you my scripts.
    Thank you.

    Naour Vijay.

  • A good resource to learn the Web script logic

    I need a good resource with examples.

    The first step is reading [http://edocs.bea.com/wls/docs103/pdf/config_scripting.pdf].

    It is the totality of all the WLST documentation. Beyond that, it is useful to know that the WLST scripts use Jython and Python to make things happen, therefore, more that know you about these two is useful. The warning that is WLST does not use the latest version of one of those.

    I wrote a blog post on how to use getopt with WLST: [http://davidmichaelkarr.blogspot.com/2008/10/make-wlst-scripts-more-flexible-with.html]

Maybe you are looking for

  • Portege R500 is not running on battery power - flashing orange indicator

    I have a Porterge R500 with Windows Vista to my work. I was going on a trip, so I bought an extra battery.Before the plane everything worked fine. Both batteries worked and they were fully charged. After I entered the plane, out of the blue, the lapt

  • Error code 670

    Hello In vain I tried at least a dozen times to get the update for Microsoft Silverlight (KB979202). (See below for more information) Any help is greatly appreciated! Thank you Deanna UPDATE INFORMATION: "Download size: 4.7 MB. Update type: Important

  • Microsoft streets &amp; trips?

    I tried to download free streets & trips and it won't let me download I've been on the phone for an hour and apparently the last person I spoke told me to post here? There is telephone support online for a purchased version, but since this is a free

  • Windows update error '8007050A '.

    I continue to have problems to install the updates. I recently did a system restore and since then have not been able to update correctly. Eveyr time I do to update a window appears sayinfg Windows Update Module has stopped working and will now close

  • X930D Major problem with HDR content

    Hello I'm having a major problem with my new X930D and frankly, that's a deal breaker for me. When you play any HDR content on Amazon or Netflix TV goes to the HDR mode automatically and there is no way to return home (my favorite display mode). Pict