Weblogic wlst classpath

When I run the WLST script .sh script to set the env as follows why can't I see the updated path when I do echo?
[linbox2 bin]$ ./setWLSEnv.sh CLASSPATH=/directory/ols_wls/patch_wlss1032/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/directory/ols_wls/patch_wls1032/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/directory/ols_wls/patch_oepe1032/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/directory/ols_wls/patch_ocm1031/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/directory/ols_wls/jrockit_160_14_R27.6.5-32/lib/tools.jar:/directory/ols_wls/utils/config/10.3/config-launch.jar:/directory/ols_wls/wlserver_10.3/server/lib/weblogic_sp.jar:/directory/ols_wls/wlserver_10.3/server/lib/weblogic.jar:/directory/ols_wls/modules/features/weblogic.server.modules_10.3.2.0.jar:/directory/ols_wls/wlserver_10.3/server/lib/webservices.jar:/directory/ols_wls/modules/org.apache.ant_1.7.0/lib/ant-all.jar:/directory/ols_wls/modules/net.sf.antcontrib_1.0.0.0_1-0b2/lib/ant-contrib.jar:
PATH=/directory/ols_wls/wlserver_10.3/server/bin:/directory/ols_wls/modules/org.apache.ant_1.7.0/bin:/directory/ols_wls/jrockit_160_14_R27.6.5-32/jre/bin:/directory/ols_wls/jrockit_160_14_R27.6.5-32/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/java/j2sdk1.4.2_11/bin/bin:/home/oracle/bin:/directory/wls_olwcs/jdk160_14_R27.6.5-32/bin:/directory/ccanywhere81/bin:/directory/oracle/oracle/product/10.2.0/client_1/bin
Your environment has been set. [linbox2 bin]$ export CLASSPATH [linbox2 bin]$ export PATH [linbox2 bin]$ echo $PATH /usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/java/j2sdk1.4.2_11/bin/bin:/home/oracle/bin:/directory/wls_olwcs/jdk160_14_R27.6.5-32/bin:/directory/ccanywhere81/bin:/directory/oracle/oracle/product/10.2.0/client_1/bin [linbox2 bin]$
Also when I do java -version it doe snot show me weblogic java version but it shows this
$ java -version
java version "1.4.2"
gcj (GCC) 3.4.6 20060404 (Red Hat 3.4.6-10.0.1)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Hi,
Open a Shell prompt then please follow the Steps...
Step1). echo $CLASSPATH ... Just to see what is the current CLASSPATH value.
Step2). run the "setWLSEnv.sh" by adding two DOTs separated by a single space .....before the actual script like following : (use 'cd' command to move inside the <BEA_HOME>/wlserver_10.3/server/bin) then run the following command....
. ./setWLSEnv.sh
<font color=red>Note: the first DOT represents that set the Environment in the current Shell, AND the second ./ represents execute the script from the current directory.</font><BR>
Step3). Verify that the Classpath is Set properly or not:
echo $CLASSPATH
Thanks
Jay SenSharma
http://weblogic-wonders.com/weblogic (WebLogic Wonders Are Here)

Similar Messages

  • Could not find or load main class weblogic.WLST

    Hi,
    I am trying to run a python script to create JMS components for use with iHub and i got the following error message when i try to run the script:
    C:\ihub\bin>java weblogic.WLST omipmihubwlscript.py weblogicjms Welcome1 http://<servername>:7111 OMIPMIHUBServer
    Error: Could not find or load main class weblogic.WLST
    I have run the setWLSEnv.cmd file and got the following output
    C:\oracle\Middleware2\wlserver_10.3\server\bin>setWLSEnv.cmd
    CLASSPATH="C:\oracle\MIDDLE~2\patch_wls1036\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\oracle\MIDDLE~2\patch_ocp371\profiles\default\sys_manifest_classpath\weblogic_p
    atch.jar;C:\PROGRA~1\Java\JDK17~1.0_1\lib\tools.jar;C:\oracle\MIDDLE~2\WLSERV~1.3\server\lib\weblogic_sp.jar;C:\oracle\MIDDLE~2\WLSERV~1.3\server\lib\weblogic.jar;C:\oracle\MIDDLE~2\mod
    ules\features\weblogic.server.modules_10.3.6.0.jar;C:\oracle\MIDDLE~2\WLSERV~1.3\server\lib\webservices.jar;C:\oracle\MIDDLE~2\modules\ORGAPA~1.1/lib/ant-all.jar;C:\oracle\MIDDLE~2\modu
    les\NETSFA~1.0_1/lib/ant-contrib.jar;C:\oracle\MIDDLE~2\patch_wls1036\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\oracle\MIDDLE~2\patch_ocp371\profiles\default\sys_man
    ifest_classpath\weblogic_patch.jar;C:\PROGRA~1\Java\JDK17~1.0_1\lib\tools.jar;C:\oracle\MIDDLE~2\WLSERV~1.3\server\lib\weblogic_sp.jar;C:\oracle\MIDDLE~2\WLSERV~1.3\server\lib\weblogic.
    jar;C:\oracle\MIDDLE~2\modules\features\weblogic.server.modules_10.3.6.0.jar;C:\oracle\MIDDLE~2\WLSERV~1.3\server\lib\webservices.jar;C:\oracle\MIDDLE~2\modules\ORGAPA~1.1/lib/ant-all.j
    ar;C:\oracle\MIDDLE~2\modules\NETSFA~1.0_1/lib/ant-contrib.jar;C:\oracle\MIDDLE~2\patch_wls1036\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\oracle\MIDDLE~2\patch_ocp37
    1\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\PROGRA~1\Java\JDK17~1.0_1\lib\tools.jar;C:\oracle\MIDDLE~2\WLSERV~1.3\server\lib\weblogic_sp.jar;C:\oracle\MIDDLE~2\WLSER
    V~1.3\server\lib\weblogic.jar;C:\oracle\MIDDLE~2\modules\features\weblogic.server.modules_10.3.6.0.jar;C:\oracle\MIDDLE~2\WLSERV~1.3\server\lib\webservices.jar;C:\oracle\MIDDLE~2\module
    s\ORGAPA~1.1/lib/ant-all.jar;C:\oracle\MIDDLE~2\modules\NETSFA~1.0_1/lib/ant-contrib.jar;"
    PATH="C:\oracle\MIDDLE~2\patch_wls1036\profiles\default\native;C:\oracle\MIDDLE~2\patch_ocp371\profiles\default\native;C:\oracle\MIDDLE~2\WLSERV~1.3\server\native\win\x64;C:\oracle\MIDD
    LE~2\WLSERV~1.3\server\bin;C:\oracle\MIDDLE~2\modules\ORGAPA~1.1\bin;C:\PROGRA~1\Java\JDK17~1.0_1\jre\bin;C:\PROGRA~1\Java\JDK17~1.0_1\bin;C:\oracle\MIDDLE~2\patch_wls1036\profiles\defa
    ult\native;C:\oracle\MIDDLE~2\patch_ocp371\profiles\default\native;C:\oracle\MIDDLE~2\WLSERV~1.3\server\native\win\x64;C:\oracle\MIDDLE~2\WLSERV~1.3\server\bin;C:\oracle\MIDDLE~2\module
    s\ORGAPA~1.1\bin;C:\PROGRA~1\Java\JDK17~1.0_1\jre\bin;C:\PROGRA~1\Java\JDK17~1.0_1\bin;C:\oracle\MIDDLE~2\patch_wls1036\profiles\default\native;C:\oracle\MIDDLE~2\patch_ocp371\profiles\
    default\native;C:\oracle\MIDDLE~2\WLSERV~1.3\server\native\win\x64;C:\oracle\MIDDLE~2\WLSERV~1.3\server\bin;C:\oracle\MIDDLE~2\modules\ORGAPA~1.1\bin;C:\PROGRA~1\Java\JDK17~1.0_1\jre\bi
    n;C:\PROGRA~1\Java\JDK17~1.0_1\bin;C:\app\paul.currie\product\11.2.0\client_2\bin;C:\app\paul.currie\product\11.2.0\dbhome_3\bin;C:\Program Files (x86)\PC Connectivity Solution\;C:\Wind
    ows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Java\jdk1.7.0_13\jre\bin;;C:\oracle\MIDDLE~2\WLSERV~1.3\server\native\win\x
    64\oci920_8;C:\oracle\MIDDLE~2\WLSERV~1.3\server\native\win\x64\oci920_8;C:\oracle\MIDDLE~2\WLSERV~1.3\server\native\win\x64\oci920_8"
    Your environment has been set.
    I am totally stuck at this point so any help would be much appreciated.
    Cheers
    Paul

    I have just tested both on a Windows and a Linux server and it works fine.
    D:\oracle\product\Middleware\wlserver_10.3\server\bin>setWLSEnv.cmd
    CLASSPATH=D:\oracle\product\MIDDLE~1\patch_wls1035\profiles\default\sys_manifest_classpath\weblogic_patch.jar;D:\oracle\
    product\MIDDLE~1\patch_jdev1111\profiles\default\sys_manifest_classpath\weblogic_patch.jar;D:\oracle\product\JAVA_C~1\li
    b\tools.jar;D:\oracle\product\MIDDLE~1\WLSERV~1.3\server\lib\weblogic_sp.jar;D:\oracle\product\MIDDLE~1\WLSERV~1.3\serve
    r\lib\weblogic.jar;D:\oracle\product\MIDDLE~1\modules\features\weblogic.server.modules_10.3.5.0.jar;D:\oracle\product\MI
    DDLE~1\WLSERV~1.3\server\lib\webservices.jar;D:\oracle\product\MIDDLE~1\modules\ORGAPA~1.1/lib/ant-all.jar;D:\oracle\pro
    duct\MIDDLE~1\modules\NETSFA~2.0_1/lib/ant-contrib.jar;D:\oracle\product\MIDDLE~1\patch_wls1035\profiles\default\sys_man
    ifest_classpath\weblogic_patch.jar;D:\oracle\product\MIDDLE~1\patch_jdev1111\profiles\default\sys_manifest_classpath\web
    logic_patch.jar;D:\oracle\product\JAVA_C~1\lib\tools.jar;D:\oracle\product\MIDDLE~1\WLSERV~1.3\server\lib\weblogic_sp.ja
    r;D:\oracle\product\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.jar;D:\oracle\product\MIDDLE~1\modules\features\weblogic.ser
    ver.modules_10.3.5.0.jar;D:\oracle\product\MIDDLE~1\WLSERV~1.3\server\lib\webservices.jar;D:\oracle\product\MIDDLE~1\mod
    ules\ORGAPA~1.1/lib/ant-all.jar;D:\oracle\product\MIDDLE~1\modules\NETSFA~2.0_1/lib/ant-contrib.jar;
    PATH=D:\oracle\product\MIDDLE~1\patch_wls1035\profiles\default\native;D:\oracle\product\MIDDLE~1\patch_jdev1111\profiles
    \default\native;D:\oracle\product\MIDDLE~1\WLSERV~1.3\server\native\win\x64;D:\oracle\product\MIDDLE~1\WLSERV~1.3\server
    \bin;D:\oracle\product\MIDDLE~1\modules\ORGAPA~1.1\bin;D:\oracle\product\JAVA_C~1\jre\bin;D:\oracle\product\JAVA_C~1\bin
    ;D:\oracle\product\MIDDLE~1\patch_wls1035\profiles\default\native;D:\oracle\product\MIDDLE~1\patch_jdev1111\profiles\def
    ault\native;D:\oracle\product\MIDDLE~1\WLSERV~1.3\server\native\win\x64;D:\oracle\product\MIDDLE~1\WLSERV~1.3\server\bin
    ;D:\oracle\product\MIDDLE~1\modules\ORGAPA~1.1\bin;D:\oracle\product\JAVA_C~1\jre\bin;D:\oracle\product\JAVA_C~1\bin;C:\
    Program Files\Legato\nsr\bin;C:\PROGRA~2\CA\SHARED~1\ETPKI\lib;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C
    :\Windows\System32\WindowsPowerShell\v1.0\;D:\oracle\Java\current\jre\bin;C:\PROGRA~2\CA\IDENTI~1\PROVIS~1\BIN;C:\Progra
    m Files (x86)\CA\SharedComponents\CAM\bin;D:\oracle\product\MIDDLE~1\WLSERV~1.3\server\native\win\x64\oci920_8;D:\oracle
    \product\MIDDLE~1\WLSERV~1.3\server\native\win\x64\oci920_8
    Your environment has been set.
    D:\oracle\product\Middleware\wlserver_10.3\server\bin>java weblogic.WLST
    Initializing WebLogic Scripting Tool (WLST) ...
    Welcome to WebLogic Server Administration Scripting Shell
    Type help() for help on available commands
    wls:/offline>

  • Where Is weblogic.WLST Installed? (Version 10.3)

    I've installed Weblogic Server 10.3 (Oracle WebLogic Server 11gR1 (10.3.1) - Package Installer). I want to use weblogic.WLST but it does not seem like it got installed? What am I missing.
    Thank you

    This was helpful, thank you.
    I read through the cited example however I was unable to find a 'weblogic.WLST' anywhere under $WL_HOME. Then I stumbled across a $WL_HOME/wlserver_10.3/common/bin/*wlst.sh*. I found that I can invoke that script and be placed at a WLST prompt. I was then able to start the node manager and Admin Server using WLST.
    I wonder what happened to 'weblogic.WLST', maybe this wlst.sh is it's replacement in version 10.3?
    In the end, I had problems starting a Managed Server, and I've been reading through the doc a good part of the day so I think I'm going to start a new thread on that problem.
    Thank you!

  • Error while running command: "java weblogic.WLST"

    I am using Web Logic Server Version: 10.3.3.0.
    I have created a script file.when I gave command “java weblogic.WLST”, I get below error:
    Exception in thread "main" java.lang.NoClassDefFoundError: weblogic.WLS at gnu.java.lang.MainThread.run(libgcj.so.7rh)
    Caused by: java.lang.ClassNotFoundException: weblogic.WLST not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:./], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}} at java.net.URLClassLoader.findClass(libgcj.so.7rh)
    at gnu.gcj.runtime.SystemClassLoader.findClass(libgcj.so.7rh)
    at java.lang.ClassLoader.loadClass(libgcj.so.7rh)
    at java.lang.ClassLoader.loadClass(libgcj.so.7rh)
    at gnu.java.lang.MainThread.run(libgcj.so.7rh)
    I have created a boot.properties file in the location where my domain is, but that didn’t help.
    Contents of boot.properties file:
    Password=weblogic1
    Username=weblogic

    Hello User,
    I am a novice weblogic admin.
    I am trying to enroll domain (created before installation of Node Manager) to Node Manager, in the process I got to use:
    user_projects/domains/test_domain/bin$ ./setDomainEnv.sh
    java weblogic.WLST
    but when I use so I am getting the following err
    "Exception in thread "main" java.lang.NoClassDefFoundError: weblogic/WLST
    Caused by: java.lang.ClassNotFoundException: weblogic.WLST
         at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
    Could not find the main class: weblogic.WLST. Program will exit. "
    I did ./setWLSEnv.sh, and I got my environment has been set, after that I used java weblogic.WLST still ended up with the above error.
    Please help me .
    Thanks in advance.

  • wlst vs java classname="weblogic.WLST" which one is preferred?

    Hi,
    I have recently started working with weblogic 10gR3 and came across examples to invoke wlst scripts from ANT.
    Since there are two approaches i would like to know the difference and which one is preferred. I have so far seen more examples of <java classname="weblogic.WLST"> then <wlst>. In my personal experience i find it more convenient to invoke python script using weblogic.WLST option.
    any comments?
    thanks
    salman

    Hello Lance,
    I will try to reproduce it on my side and see if I can reproduce, until then use the shutdown() method on the server runtime MBean as workaround.
    Thanks,
    -satya

  • WLST classpath

    I have created an ini file with writeIniFile() in wlst. Now I want to import wlst as a jython module. The problem is that it is not seeing everything in the environment. I have sourced both setDomainEnv.sh and commEnv.sh. I called jython with 'java -jar jython2.5.0/jython.jar -Dpython.path=$CLASSPATH'. But when I import the ini file I get this error message:
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "wlst_ini.py", line 16, in <module>
    theInterpreter = WLSTUtil.ensureInterpreter();
         at weblogic.Home.getInstance(Home.java:90)
         at weblogic.Home.getPath(Home.java:96)
         at weblogic.Home.getFile(Home.java:101)
         at weblogic.management.scripting.utils.WLSTInterpreter.<init>(WLSTInterpreter.java:81)
         at weblogic.management.scripting.utils.WLSTUtil.ensureInterpreter(WLSTUtil.java:131)
         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:585)
    java.lang.RuntimeException: java.lang.RuntimeException: error in finding weblogic.Home
    I have tried this manually step by step to see where it fails. I can import WLSTUtil no problem. I can also import weblogic.Home. But when I call WLSTUtil.ensureInterpreter(), I get the stack trace. Why can it not find weblogic.Home when calling ensureInterpreter, even after I have imported it?

    It looks like you are using Jython 2.5. We also ran into very similar issues when trying to use this version of Jython. Through a lot of digging and reading, we discovered that WLST was only certified on the version of Jython that is bundled with WL (for us that is WL 10.0 MP1 which ships with Jython 2.1). When we switched to using Jython 2.1 (specifically we use the bundled Jython JAR files from WL), sourced $WLS_HOME/server/bin/setWLSEnv.sh, and added $BEA_HOME/modules/com.bea.cie.config_5.1.3.0.jar to the CLASSPATH to pickup some com.bea.plateng required classes used by the WLST library, everything started to work as expected. We have had no issues with Jython v2.1 (except for missing features that are available in newer Jython releases).
    Hope this helps.

  • WebLogic WLST Install question cgDataSource.

    I'm trying to script out a WebLogic 10.3g install on a Windows 2003 Server using JRockit and Oracle 10.3g as the cgDataSource and cgDataSource-nonXA. All of the samples for a silent install using a silent.xml parameter file don't allow you to change the Java SDK being used. When I get into the wlst.py script files I can't see any way to tell cgDataSource or cg..XA to point to Oracle until after the install has been completed.
    So, what is the best practice? Do I install using the defaults and then manually update to use the latest version of JRockit? After that, do I manually or script the cgDataSource from PointBase to use Oracle? I'm trying to make this a click once type of install.
    Thanks.

    All of the samples for a silent install using a silent.xml parameter file don't allow you to change the Java SDK being usedhttp://download.oracle.com/docs/cd/E15051_01/common/docs103/install/scripts/silent.xml
    <!--
    <data-value name="LOCAL_JVMS"     value="D:\jrockit_160_05|D:\jdk160_05"/>
    -->

  • WebLogic - WLST Server start question

    If I have an Admin Server and nodemanager on ServerA and a nodemanager on ServerB with a full WLS install can I connect to the nodemanager on ServerB from ServerA and stop and start managed servers via WLST? Is that possible or do I need to be on the remote box to do it?

    Hi,
    You can connect to the nodemanager on ServerB from ServerA and stop and start managed servers via WLST / Admin-Console however in both the cases the node-manager has to up and running and make sure you have done Enrolled ServerB's node-manger to ServerA's node-manger.
    To get step-by-step instructions you can have a look at the following link:
    http://weblogic-wonders.com/weblogic/2010/04/28/weblogic-clustering-in-remote-boxes
    Hope above information helped you.
    Regards,
    Ravish Mody

  • Weblogic WLST for starting weblogic server

    I have created a domain with a single server running Admin Server, SOA and BAM server in the same port.
    I would like to start this Server from node manager.
    I have started ii with the command nmStart(...), within WLST, I can connect to the ADmin server using connect() command.
    But I cannot access the url.
    If I start the AdminServer by using startWeblogic.sh then the URL works.
    Has anybody tried it?

    Hi,
    Try this...
    [Starting Admin and Managed Servers using Node Manager and WLST | http://neeraj-soa-tips.blogspot.com/2010/06/starting-admin-and-managed-servers.html ]
    Regards,
    Neeraj Sehgal

  • Clean libraries not referencing in weblogic, WLST

    Hi,
    How can I do to clean all libraries that they are not referencing to any application in WLST?
    Thanks!

    I solved in this way:
    domainRuntime()
    cd('ServerRuntimes')
    servers = domainRuntimeService.getServerRuntimes()
    for server in servers:
      print('')
      print '--------------------------------------------------'
      print '--------------- ServerName -----------------------'
      print '--------------------------------------------------'
      print('')
      print('')
      print 'SERVER NAME: ' + server.getName()
      print 'SERVER STATE: ' + server.getState()
      print 'SERVER HEALTH STATE: ' + str(server.getHealthState())
      print('')
      libraries = server.getLibraryRuntimes()
      for library in libraries :
      libName = library.getLibraryName()
      libIdentifier = library.getLibraryIdentifier()
      if libName.startswith('com.edisa.libra.'):
      referencingNames = library.getReferencingNames()
      if referencingNames != 'null' and  len(referencingNames) > 0:
      print('libName ' + libName+' libIdentifier '+libIdentifier)
      for ref in referencingNames:
      print(' ---> Referenced in : '+ ref)
      print('')
      else:
      print('libName ' + libName + ' is not referenced')
      status = undeploy(libName)
      print(status)
      print('')

  • WebLogic.WLST question

    I am trying to create a python script to use with WLST to deploy applications into our BEA environment without having to go thru the console. I am not a python developer but I tried to take a stab at it. Here is what I came up with.
    # Prompt user for input
    name = raw_input("Enter username:")
    password = raw_input("Enter password:")
    protocol = raw_input("Enter URL(ex.t3://adminAddress:adminPort)?")
    app = raw_input("Archive: ")
    appPath = "/beadev/wls920/applications/" + app
    Server = raw_input("Managed/Cluster: ")
    # Output user input to stdout
    print name
    print password
    print protocol
    print app[:-4]
    print appPath
    print Server
    # Format parameters to the deploy() method
    # based on user input
    cmd = "deploy(" +"\"" + app[:-4] + "\"" + "," "\"" \
    + appPath + "\"" + "," "\"" + Server \
    + "\"" + "," + "securityModel=" \
    + "\"DDOnly\"" + "," + "block=" + "\"true\"" ")"
    # Output parameters to stdout
    print "Command sent to deploy(): " + cmd
    # Define method
    def deploy_myApp(cmd):
    try:
    #deploy(app,appPath , Server ,securityModel="DDOnly",block="true")
    #deploy("Operations","/beadev/wls920/applications/Operations.war","dstDevMS3",securityModel="DDOnly",block="true")
    #deploy(cmd)
    cmd
    print "Command inside the deploy_myApp() function: " + cmd
    except:
    print "Could not deploy application ", app
    dumpStack()
    # Connect to the administration server
    connect(name, password, protocol)
    # Open and start edit session
    edit()
    startEdit()
    # Call method
    deploy_myApp(cmd)
    # Save and activate changes
    save()
    activate(block="true")
    # End edit session and exit WLST.
    stopEdit()
    exit()
    I am trying to make the script as generic a possible. The problem I am facing is that the deploy method inside the deploy_myApp() function does not work or to be more accurate, it doesn't look like it even runs. The rest of the scripts seems to run fine. Anyone have any ideas? My initial thought was that the deploy() method does not like variables passed thru it but that seemed odd since the connect() method had no problems with it. Any help would be greatly appreciated.
    Edited by wellscx at 01/24/2008 11:58 AM

    I was able to fix this in the below method
    # Define method
    def deploy_myApp(cmd):
    try:
    #deploy(app,appPath , Server ,securityModel="DDOnly",block="true")
    #deploy("Operations","/beadev/wls920/applications/Operations.war","dstDevMS3",securityModel="DDOnly",block="true")
    #deploy(cmd)
    cmd # Old call
    print "Command inside the deploy_myApp() function: " + cmd
    exec(cmd) # New call
    except:
    print "Could not deploy application ", app
    dumpStack()
    I had to use the exec() method to actually run the contents of the "cmd" variable.

  • WLST Ant task not working -- error in finding weblogic.Home

    I am attempting to set up a WLST script to automatically set up my domain. The following is a minimal version of the Ant task I'm using:
    <wlst debug="true" failOnError="true">
        <classpath>
            <pathelement location="${weblogic10.home}/server/lib/weblogic.jar"/>
        </classpath>
        <script>
            connect('weblogic','weblogic','t3://localhost:5000')
        </script>
    </wlst>When I run the target, I get the following error:
    java.lang.RuntimeException: error in finding weblogic.Home
         at weblogic.ant.taskdefs.management.WLSTTask.execute(WLSTTask.java:168)
         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
         at org.apache.tools.ant.Task.perform(Task.java:364)
         at org.apache.tools.ant.Target.execute(Target.java:301)
         at org.apache.tools.ant.Target.performTasks(Target.java:328)
         at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
         at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:383)
         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
         at org.apache.tools.ant.Task.perform(Task.java:364)
         at org.apache.tools.ant.Target.execute(Target.java:301)
         at org.apache.tools.ant.Target.performTasks(Target.java:328)
         at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
         at org.apache.tools.ant.Project.executeTargets(Project.java:1063)
         at org.apache.tools.ant.Main.runBuild(Main.java:632)
         at org.apache.tools.ant.Main.startAnt(Main.java:183)
         at org.apache.tools.ant.launch.Launcher.run(Launcher.java:197)
         at org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)
         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:585)
         at com.intellij.rt.ant.execution.AntMain2.main(AntMain2.java:17)My weblogic10.home property (referenced in the ant target) points to the weblogic installation directory (C:/bea_10/wlserver_10.0). Weblogic.jar exists in the path specified, and contains the class weblogic.Home.
    What am I missing? Any help would be greatly appreciated. I'm using Ant 1.6.5 and Weblogic 10.0 on Windows XP, if that makes a difference.
    Thanks in advance!
    -Jake
    Edited by jakerobb at 07/12/2007 1:52 PM

    Hi,
    I too have this problem. I am trying to use my own ant installation. The docs say that we can do that. However, if i try to set the domain env then the ant command will point to bea's ant. Anyway I have defined the task using a taskdef as follows
    <path id="wl_classpath">
              <pathelement location="${BEA_HOME}/patch_weblogic922/profiles/default/sys_manifest_classpath/weblogic_patch.jar" />
              <pathelement location="${env.JAVA_HOME}/lib/tools.jar" />
              <pathelement location="${WL_HOME}/server/lib/weblogic_sp.jar" />
              <pathelement location="${WL_HOME}/server/lib/weblogic.jar" />
              <pathelement location="${WL_HOME}/server/lib/webservices.jar" />
         </path>
    <taskdef name="wlst" classname="weblogic.ant.taskdefs.management.WLSTTask">
              <classpath refid="wl_classpath" />
         </taskdef>
         <target name="start_appinstance" description="--> Starts the Appinstance"
              <wlst debug="true">
                   <script>
                        connect('weblogic','weblogic','t3://localhost:7001')
                   </script>
              </wlst>
         </target>there is no weblogichome or beahome attribute for this task.
    My objective is to control a server using the node manager. I believe the only way to do this is to use wlst and not wlserver.
    Thanks
    Shaival
    PS: i am using version 9.2MP2 for weblogic and ant 1.7

  • WLST offline while trying to create domain in Weblogic 81

    Guys,
    Was able to invoke weblogic.WLST via ant to setup and custom WLS90 domain .
    I tried to do the same for WL81 with no luck. Looks like I am unable to import getopt module.
    [java] ImportError: no module named getopt
    [java] Java Result: -1
    Pretty much followed WLST_offline documentation to setup the classpath in ant.
    any thoughts or does anyone have a sample ant script to drive jython script.

    Satya,
    Thanks for your response. sys.path didn't help but python.home made a difference.
    Now I am unable to get hold of the command line options.
    ex: create-domain.py -d basic_domain -p 7001
    Again This worked fine in WL90
    ant macro used ..
    <java classname="com.bea.plateng.domain.script.jython.WLST_offline" fork="true" classpathref="@{script-classpath-ref}" >
              <jvmarg line="-Dpython.home=D:/tools/jython/jython-2.1"/>
              <arg line="@{script-file} @{cmd-line-options}" />
              </java>

  • Problem invoking WLST - java.lang.NoClassDefFoundError: weblogic.management

    Hi Guys!
    I want craete the new user 'jdoe' for domain 'tst2_domain' (WebLogic Server Version: 10.3.5.0)
    For it I have script 'create_user.sh':
    # Set the Environment Variables
    /home/testuser/Oracle/Middleware/user_projects/domains/tst2_domain/bin/setDomainEnv.sh
    export JAVA_HOME=/home/testuser/Oracle/Middleware/jdk160_24/
    export PATH=$PATH:$JAVA_HOME/bin/
    export CLASSPATH=/home/testuser/Oracle/Middleware/wlserver_10.3/server/lib/weblogic.jar:/home/testuser/Oracle/Middleware/Oracle_OSB1/modules/com.bea.common.configfwk_1.5.0.0.jar:/home/testuser/Oracle/Middleware/Oracle_OSB1/lib/sb-kernel-api.jar:/home/testuser/Oracle/Middleware/Oracle_OSB1/lib/sb-kernel-impl.jar:/home/testuser/Oracle/Middleware/Oracle_OSB1/lib/sb-kernel-common.jar:/home/testuser/Oracle/Middleware/Oracle_OSB1/lib/sb-kernel-resources.jar
    # Execute the WLST script..
    cd resources
    java weblogic.WLST createUsers.py.../resources/createUsers.py:
    url = 'localhost:7001'
    username = 'weblogic'
    password = 'welcome1'
    print 'Adding users to DefaultAuthenticator.'
    connect(username, password, url)
    # Check if user already exists
    cd('/')
    authProvider = cmo.getSecurityConfiguration().getDefaultRealm().lookupAuthenticationProvider("DefaultAuthenticator")
    if authProvider.userExists('jdoe'):
         print 'User jdoe already exists'
         exit()
    else:
         # Create users
         print 'Creating new user: jdoe'
         authProvider.createUser('jdoe','welcome2','a sample service bus administrator')
         authProvider.addMemberToGroup('Administrators','jdoe')
    print 'Users created successfully.'
    exit()Domain 'tst2_domain' is running...
    I started the create_user.sh and then i had the error:
    $ ./create_user.sh
    Initializing WebLogic Scripting Tool (WLST) ...
    Problem invoking WLST - java.lang.NoClassDefFoundError: weblogic.management.scripting.WLScriptContext
    Could you please help me? Which the problem in the script?
    $ ./setWLSEnv.sh
    CLASSPATH=/home/testuser/Oracle/Middleware/patch_wls1035/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/testuser/Oracle/Middleware/patch_oepe1050/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/testuser/Oracle/Middleware/patch_ocp360/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/testuser/Oracle/Middleware/jrockit_160_24_D1.1.2-4/lib/tools.jar:/home/testuser/Oracle/Middleware/wlserver_10.3/server/lib/weblogic_sp.jar:/home/testuser/Oracle/Middleware/wlserver_10.3/server/lib/weblogic.jar:/home/testuser/Oracle/Middleware/modules/features/weblogic.server.modules_10.3.5.0.jar:/home/testuser/Oracle/Middleware/wlserver_10.3/server/lib/webservices.jar:/home/testuser/Oracle/Middleware/modules/org.apache.ant_1.7.1/lib/ant-all.jar:/home/testuser/Oracle/Middleware/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar:
    PATH=/home/testuser/Oracle/Middleware/wlserver_10.3/server/bin:/home/testuser/Oracle/Middleware/modules/org.apache.ant_1.7.1/bin:/home/testuser/Oracle/Middleware/jrockit_160_24_D1.1.2-4/jre/bin:/home/testuser/Oracle/Middleware/jrockit_160_24_D1.1.2-4/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/testuser/bin
    Your environment has been set.
    $ java weblogic.WLST
    Exception in thread "main" java.lang.NoClassDefFoundError: weblogic.WLST
       at gnu.java.lang.MainThread.run(libgcj.so.7rh)
    Caused by: java.lang.ClassNotFoundException: weblogic.WLST not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:./], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
       at java.net.URLClassLoader.findClass(libgcj.so.7rh)
       at gnu.gcj.runtime.SystemClassLoader.findClass(libgcj.so.7rh)
       at java.lang.ClassLoader.loadClass(libgcj.so.7rh)
       at java.lang.ClassLoader.loadClass(libgcj.so.7rh)
       at gnu.java.lang.MainThread.run(libgcj.so.7rh)

    But if run script as $ ./wlst.sh /home/testuser/create_user/resources/createUsers.py - its ok!
    $ ./wlst.sh /home/testuser/labs/Practice_05/create_user/resources/createUsers.py
    CLASSPATH=/home/testuser/Oracle/Middleware/patch_wls1035/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/testuser/Oracle/Middleware/patch_oepe1050/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/testuser/Oracle/Middleware/patch_ocp360/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/testuser/Oracle/Middleware/jrockit_160_24_D1.1.2-4/lib/tools.jar:/home/testuser/Oracle/Middleware/wlserver_10.3/server/lib/weblogic_sp.jar:/home/testuser/Oracle/Middleware/wlserver_10.3/server/lib/weblogic.jar:/home/testuser/Oracle/Middleware/modules/features/weblogic.server.modules_10.3.5.0.jar:/home/testuser/Oracle/Middleware/wlserver_10.3/server/lib/webservices.jar:/home/testuser/Oracle/Middleware/modules/org.apache.ant_1.7.1/lib/ant-all.jar:/home/testuser/Oracle/Middleware/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar:
    PATH=/home/testuser/Oracle/Middleware/wlserver_10.3/server/bin:/home/testuser/Oracle/Middleware/modules/org.apache.ant_1.7.1/bin:/home/testuser/Oracle/Middleware/jrockit_160_24_D1.1.2-4/jre/bin:/home/testuser/Oracle/Middleware/jrockit_160_24_D1.1.2-4/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/testuser/bin
    Your environment has been set.
    CLASSPATH=/home/testuser/Oracle/Middleware/patch_wls1035/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/testuser/Oracle/Middleware/patch_oepe1050/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/testuser/Oracle/Middleware/patch_ocp360/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/testuser/Oracle/Middleware/jrockit_160_24_D1.1.2-4/lib/tools.jar:/home/testuser/Oracle/Middleware/wlserver_10.3/server/lib/weblogic_sp.jar:/home/testuser/Oracle/Middleware/wlserver_10.3/server/lib/weblogic.jar:/home/testuser/Oracle/Middleware/modules/features/weblogic.server.modules_10.3.5.0.jar:/home/testuser/Oracle/Middleware/wlserver_10.3/server/lib/webservices.jar:/home/testuser/Oracle/Middleware/modules/org.apache.ant_1.7.1/lib/ant-all.jar:/home/testuser/Oracle/Middleware/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar::/home/testuser/Oracle/Middleware/utils/config/10.3/config-launch.jar::/home/testuser/Oracle/Middleware/wlserver_10.3/common/derby/lib/derbynet.jar:/home/testuser/Oracle/Middleware/wlserver_10.3/common/derby/lib/derbyclient.jar:/home/testuser/Oracle/Middleware/wlserver_10.3/common/derby/lib/derbytools.jar::
    Initializing WebLogic Scripting Tool (WLST) ...
    Welcome to WebLogic Server Administration Scripting Shell
    Type help() for help on available commands
    Adding users to DefaultAuthenticator.
    Connecting to t3://localhost:7001 with userid weblogic ...
    Successfully connected to Admin Server 'tst2_as_server' that belongs to domain 'tst2_domain'.
    Warning: An insecure protocol was used to connect to the
    server. To ensure on-the-wire security, the SSL port or
    Admin port should be used instead.
    Creating new user: jdoe
    Users created successfully.
    Exiting WebLogic Scripting Tool.

  • WLST and WebLogic Integration

    Hi all,
    I have installed WebLogic Integration 8.5 bundle. Meaning i have also installed weblogic server 8.1. on Windows XP
    I am now trying to use Weblogic Scripting Tool WLST. But there is no tools on the menu(tools->weblogic scripting tool) this was added in the 9.1 installation...
    How do I configure my installation weblogic server 8.1 with WLI8.5 to run WLST?
    after i run setELSEnv.cmd to set the environment. Then i try java weblogic.WLST and the error is "java.lang.NoClassDefFoundError: weblogic/WLST"
    Where are the libs, how do i configure WLST to run.
    I also tried starting the WLST from the 9.1 installation, but it cannot connect to 8.1 installation, tough connecting to 9.1 installation is no problem. If i try i get this error: "weblogic.management.ManagementRuntimeException: java.lang.NoSuchMethodError: isCachable"
    (I installed weblogic 9.1 and there the WLST was installed during installation and all works just fine. unfortenatly my system must run on 8.1->wli8.5)

    Hi
    I am trying to use WLST tool for configuring Weblogic domain in 9.1 OFFLINE.
    I have done with almost all except JTA configuration.
    Can you please give me smaples for the same.
    The following is part iof my script...
    readTemplate('F:/AuctionDoc/Installer/inDomain.jar')
    cd('/JDBCSystemResource/localNonTxPool/JdbcResource/localNonTxPool')
    create('myJdbcDataSourceParams','JDBCDataSourceParams')
    cd('JDBCDataSourceParams/NO_NAME_0')
    set('JNDIName', 'jdbc/NonTxDataSource')
    #JDBC settings and other JMS settings worked
    But the JTA settings dint work
    #=======================================================================================
    # Set JTA timeout
    #=======================================================================================
    cd("/JTA/inInstDomain")
    set("TimeoutSeconds", "1200")
    set("AbandonTimeoutSeconds", "1200")
    I have to do the above OFFLINE.
    I could not locate the JTA folder or any thing related with JTA configuration to do offline using WLST
    Can you please give an example of JTA settings
    Thanks
    Binu

Maybe you are looking for

  • Problem in  vendor invoice creation through BAPI

    I am trying to create vendor invoice using bapi_acc_document_post but what value have be passed to obj_key and obj_typ fields of header is not clear to me. regards, anu

  • Problem with installing

    hi every one i'am trying to install the application firsti couldn't find afile called config.txt on c:\windwos\temp but i found 2 files called chcfo.exe and chcfo i choosed one of them then the process srarted for seconds then it stopped and atable a

  • Compression in Process Chain BI-7.0

    Hello Forum. I have integrated a process to compress the last 7 days of a cube in BI-7.0 environment. The chain gets completed sucessfully but request does not get compress in the cube. However,when I create an aggreagate and include a step to rollup

  • Solman_setup not calling and open browser

    Dear Experts, I recently upgrde my solution manager 7.1 sp11 . after upgrade I run transaction solman_setup , or LMDB etc ( which calling browser ) not open give me following error 500 SAP Internal Server Error ERROR: Access via 'NULL' object referen

  • What apps are included in the Creative Cloud Photography plan?

    I see that Photoshop CC and Lightroom 5 are included, but what about Bridge CC?