Deleting the applications using WLST

Hi Gurus,
I have been trying to delete the my application by using the command like this
delete(“TestApp”,”AppDeployments”);
But get an error every time I run this command saying
WLSTException: ‘Error occured while performing delete : Cannot delete MBean of type AppDeployment with name TestApp. You can only delete MBeans children to the current cmo. \nTo view the children types that you can delete, use listChildTypes().’
When i try to run this command as mentioned in the error
listChildTypes()
I do not see any MBeans which can help in deleting my TestApp, what am i doing wrong here? How can i delete the application?
Thanks in advance.
Edited by: 853410 on 27-Apr-2011 10:29

HI,
The Indentation (The space before a statement) is very important in WLST because the control statements like if{} and Loops like for{} and while{} starts and ends based on the Indentation.
Please use the below corrected script:
url=t3://localhost:8001
username=weblogic
password=weblogic
app.1=MyApp1
app.2=MyApp2
app.3=MyApp3And following will be your WLST Script:
from java.io import FileInputStream
propInputStream = FileInputStream("test.properties")
configProps = Properties()
configProps.load(propInputStream)
Url = configProps.get("url")
print 'url=', Url
User = configProps.get("username")
print 'User=', User
Password = configProps.get("password")
print 'Password = ', Password
connect(User,Password,Url)
config()
cd ('Applications')
for i in 1,2,3:
     App = configProps.get("app."+str(i))
     delete (App)
     print 'Application ',App,' has been deleted Successfully..!!!'
     i =i+1
So Now you need to just make changes in the Properties file...No need to touch anything in the WLST Script except the For Loop Count.Which is equal to the Number of applications which you want to delete ;)
Thanks
Ravish Mody

Similar Messages

  • Query in Deleting the Signature using Acrobat 9.0

    Hello Folks,
    We have used resetForm() method before removefield() in our coding
    Observed result:
      Our application uses VC++,If the document has one Digital Signature using the fix(Mentioned below) we can able to delete the signature in the document  but when the  document has many number of Digital Signatures the fix is not working.It threws an exception
    ·        “NotAllowedSecurity: Security settings prevent access to this property or method”
    ·        The exception Id for the above exception is “0x80020009”
        Note: The behavior is wrt to Acrobat 9.0, but the code is working fine for Acrobat 7.0 and 8.0 versions. 
    If we try the scenario in our application, on timestamp the document with Acrobat 9.0 and then signing the document with the same acrobat 9.0 and when deleting the signature using our application  again our fix is not working it throws the above exception.
    The code details are given below
    //Get Nth Field is done
    DISPID dispidRestet;
    OLECHAR *methodReset = { L"resetForm" };
    hr = jso->GetIDsOfNames( IID_NULL, ( OLECHAR** )&methodReset, 1, GetUserDefaultLCID(), &dispidRestet );
    if( hr != S_OK) {
      *errCode = kPSWErrIDispatchGetIDOfNames;
      return FALSE;
    dispparam.cArgs = 1;
    dispparam.rgvarg = new VARIANT[ dispparam.cArgs ];
    dispparam.rgvarg[ 0 ].vt  = VT_BSTR;
    dispparam.rgvarg[ 0 ].bstrVal = varResult.bstrVal;  
    dispparam.cNamedArgs  = 0;
    dispparam.rgdispidNamedArgs  = NULL;
    hr = jso->Invoke( dispidRestet, IID_NULL, GetUserDefaultLCID(), DISPATCH_METHOD, &dispparam, NULL, NULL, NULL );
    if ( hr != S_OK ) {
      *errCode = kPSWErrIDispatchInvoke;
      m_pAvdoc->Close(0);
      ret = FALSE;
    EXCEPINFO exceptionInfo;
    DISPID dispid2;
    OLECHAR *methodName2 = { L"removeField" };
    hr = jso->GetIDsOfNames( IID_NULL, ( OLECHAR** )&methodName2, 1, GetUserDefaultLCID(), &dispid2 );
    if ( hr != S_OK ) {
      *errCode = kPSWErrIDispatchGetIDOfNames;
      return FALSE;
    dispparam.cArgs = 1;
    dispparam.rgvarg = new VARIANT[ dispparam.cArgs ];
    dispparam.rgvarg[ 0 ].vt  = VT_BSTR;
    dispparam.rgvarg[ 0 ].bstrVal = varResult.bstrVal; 
    dispparam.cNamedArgs  = 0;
    dispparam.rgdispidNamedArgs  = NULL;
    hr = jso->Invoke( dispid2, IID_NULL, GetUserDefaultLCID(), DISPATCH_METHOD, &dispparam, NULL, &exceptionInfo, NULL );//here hr throws the exception for multiple signed documents
    if ( hr != S_OK ) {
      *errCode = kPSWErrIDispatchInvoke;
      m_pAvdoc->Close(0);
      ret = FALSE;
      //return FALSE;
    else{
    m_pPddoc->Save(1,strPDFFile);
    m_pAvdoc->Close(true);
    Plese guide us how to over come the exception
    Regards,
    DOCNet.

    Hi Leo,
                 Thanks for your reply!!!.:-)
              Both the signatures are done by me only.    
              The thing is the code works fine for one signature, but it throws an exception for documents having many signatures.
              Can you guide me how to proceed further.

  • I had Iphoto 08 and now is gone, I have under applications and is not there. Also most of the pictures are gone. Can you easily delete the application?

    I had Iphoto 08 and now is gone, I have looked under applications and is not there. Also most of the pictures are gone. Can you easily delete the application?

    Obviously you can.
    To re-install iPhoto
    1. Put the iPhoto.app in the trash (Drag it from your Applications Folder to the trash)
    2a: On 10.5:  Go to HD/Library/Receipts and remove any pkg file there with iPhoto in the name.
    2b: On 10.6: Those receipts may be found as follows:  In the Finder use the Go menu and select Go To Folder. In the resulting window type
    /var/db/receipts/
    2c: on 10.7 they're at
    /private/var/db/receipts
    A Finder Window will open at that location and you can remove the iPhoto pkg files.
    3. Re-install.
    If you purchased an iLife Disk, then iPhoto is on it.
    If iPhoto was installed on your Mac when you go it then it’s on the System Restore disks that came with your Mac. Insert the first one and opt to ‘Install Bundled Applications Only.
    If you purchased it on the App Store or have a Recent Mac you can find it in your Purchases List.

  • I accidentally deleted the applications: Mail, Safari

    I accidentally deleted the applications: Mail, Safari & iTunes from the launchpad. I also emptied the trash by accident.
    Is there a way to reinstall these applications without reinstalling the Mac OS X?
    Will upgrading to Mountain Lion resolive my problem?
    What is the best solution?
    Thank You,
    Mrs_Yu

    If Spotlight is unable to locate your apps, use the install disc that came with your computer to custom install.  On screen directions will guide you.  Once this is done, use Software Update to update Safari, iTunes and Mail if necessary.

  • My hard drive crashed on my Mac Book Pro and I just had it replaced yesterday.  After restoring my data, Safari will not open.  The error message I continue to receive is "Safari quit unexpectedly"  Should I just delete the application and download a new?

    My hard drive crashed on my Mac Book Pro and I just had it replaced yesterday.  After restoring my data, Safari will not open.  The error message I continue to receive is "Safari quit unexpectedly"  Should I just delete the application and download a new one?

    http://swcdn.apple.com/content/downloads/37/23/041-5058/lr5tynbldi18zcrqo8a8uq88 rnjushqliu/Safari6Lion.pkg 
    Here you go.....

  • How to delete the applications in the "Updates" tab at the lower right part when you open the App Store?

    Hi, I bought the new Itouch 5 recently, i'm just wondering how can i delete the applications in the "Updates" tab at the lower right part when you open the App Store? I just want to delete the applications that i've already deleted but it seems that it is still posted at the "updates" tab ad i can't delete it. Please i need your help. Thank you for those who will reply.

    Try turning off & on your iPod (sorry if that sounds dumb, but it might work)
    Or, since that's a matter of not refreshing, turn off your wifi& reconnect
    Hope this helps

  • I have league of legends music running in the background when 1. did not even open the application, and 2. i deleted the application long ago. Can someone help me fix this so it doesn't bug me!!

    For the last two months, when i am working some league of legends music (i think it is) pops up in the background and the only way i can turn it off is by restarting the computer. It is driving me nuts. Why does it do this when i've deleted the application ages ago and how do i fix my computer?

    Please help me people, im a dumb uni student after all!

  • Hide an error from the application using a servererror trigger?

    We have an application designed for an old oracle version which issues some sql which is no more supported in todays database version.
    We want to use the application unchanged with a new database server.
    Old Server Version: 7.3.4 (still in production...)
    New Server Version: 10.2 or 11.2
    The application issues an
    ALTER SESSION SET OPTIMIZER_GOAL = FIRST_ROWS ;
    which results in ORA-01986 and the application dies.
    We would like to hide the error 01986 from the application using a trigger:
    create or replace
    trigger catch01986
      after servererror
      on schema
      begin
        if (ora_is_servererror (1986)) then
          null; -- what to do here? we want clear the ora-01986 from the error stack
        end if;
      end catch01986;How to handle the error, so that the alter session set ... statement is just ignored and no error code is returned to the application?
    I asked already some days ago in Database-General Forum, but triggers belong to PL/SQL, so i repost here.
    Tnx for help in advance!

    Hi,
    hoek wrote:
    A totally weird and untested (and unable to test today) thought:
    http://technology.amis.nl/blog/447/how-to-drive-your-colleagues-nuts-dbms_advanced_rewrite-oracle-10g
    Very interesting for real dirty solution.
    Does not work for my problem, DBMS_ADVANCED_REWRITE works only for select statements.
    BEGIN
       SYS.DBMS_ADVANCED_REWRITE.DECLARE_REWRITE_EQUIVALENCE (
       'alter_session_equivalence',
       'ALTER SESSION SET OPTIMIZER_GOAL = FIRST_ROWS',
       'ALTER SESSION SET OPTIMIZER_MODE = RULE',
       FALSE);
    END;
    ORA-30389: the source statement is not compatible with the destination statement
    ORA-00903: invalid table name
    ORA-06512: at "SYS.DBMS_ADVANCED_REWRITE", line 29
    ORA-06512: at "SYS.DBMS_ADVANCED_REWRITE", line 185
    ORA-06512: at line 2
    30389. 00000 -  "the source statement is not compatible with the destination statement"
    *Cause:    The SELECT clause of the source statement is not compatible with
               the SELECT clause of the destination statement
    *Action:   Verify both SELECT clauses are compatible with each other such as
               numbers of SELECT list items are the same and the datatype for
               each SELECT list item is compatible
    hoek wrote:You already had some trigger code, catching the error and sending it to null, why didn't that work?The trigger is fired when the error occurs, but after completion of the trigger, the error code is still delivered to the client.
    I dont know how to handle the error within the trigger.
    Does the client read the error stack and does it die after reading an error from the stack?The client just checks the error code. On error it terminates.
    With the SERVERERROR TRIGGER i did the following tests:
    Test 1: trigger does nothing
    CREATE OR REPLACE
    TRIGGER CATCH01986
      AFTER SERVERERROR
      ON SCHEMA
      BEGIN
        IF (ORA_IS_SERVERERROR (1986)) THEN
          NULL;
        END IF;
      END CATCH01986;
    ALTER SESSION SET OPTIMIZER_GOAL = FIRST_ROWS;
    ORA-01986: OPTIMIZER_GOAL is obsolete
    01986. 00000 -  "OPTIMIZER_GOAL is obsolete"
    *Cause:    An obsolete parameter, OPTIMIZER_GOAL, was referenced.
    *Action:   Use the OPTIMIZER_MODE parameter.
    -- Client Application reports errorcode 1986Test 2: Trigger raises NO_DATA_FOUND
    CREATE OR REPLACE
    TRIGGER CATCH01986
      AFTER SERVERERROR
      ON SCHEMA
      BEGIN
        IF (ORA_IS_SERVERERROR (1986)) THEN
          RAISE NO_DATA_FOUND;
        END IF;
      END CATCH01986;
    ALTER SESSION SET OPTIMIZER_GOAL = FIRST_ROWS;
    ORA-04088: error during execution of trigger 'AH.CATCH01986'
    ORA-01403: no data found
    ORA-06512: at line 9
    ORA-01986: OPTIMIZER_GOAL is obsolete
    04088. 00000 -  "error during execution of trigger '%s.%s'"
    *Cause:    A runtime error occurred during execution of a trigger.
    *Action:   Check the triggers which were involved in the operation.
    -- Client Application reports errorcode 4088Test 3: Trigger raising an APPLICATION ERROR
    CREATE OR REPLACE
    TRIGGER CATCH01986
      AFTER SERVERERROR
      ON SCHEMA
      BEGIN
        IF (ORA_IS_SERVERERROR (1986)) THEN
            DBMS_STANDARD.RAISE_APPLICATION_ERROR(-20999, 'this makes no sense', true);
        END IF;
      END CATCH01986;
    ALTER SESSION SET OPTIMIZER_GOAL = FIRST_ROWS;
    ORA-00604: error occurred at recursive SQL level 1
    ORA-20999: this makes no sense
    ORA-06512: at line 10
    ORA-01986: OPTIMIZER_GOAL is obsolete
    00604. 00000 -  "error occurred at recursive SQL level %s"
    *Cause:    An error occurred while processing a recursive SQL statement
               (a statement applying to internal dictionary tables).
    *Action:   If the situation described in the next error on the stack
               can be corrected, do so; otherwise contact Oracle Support.
    -- Client Application reports errorcode 604Test 4: Adding an EXCEPTION part to the trigger does not help, this will catch only exceptions raised while the trigger executes:
    CREATE OR REPLACE
    TRIGGER CATCH01986
      AFTER SERVERERROR
      ON SCHEMA
      BEGIN
        IF (ORA_IS_SERVERERROR (1986)) THEN
            DBMS_STANDARD.RAISE_APPLICATION_ERROR(-20999, 'this makes no sense', true);
        END IF;
      EXCEPTION
        WHEN OTHERS THEN
          NULL;
      END CATCH01986;
    ALTER SESSION SET OPTIMIZER_GOAL = FIRST_ROWS;
    ORA-01986: OPTIMIZER_GOAL is obsolete
    01986. 00000 -  "OPTIMIZER_GOAL is obsolete"
    *Cause:    An obsolete parameter, OPTIMIZER_GOAL, was referenced.
    *Action:   Use the OPTIMIZER_MODE parameter.
    -- Client Application reports errorcode 1986So i do not know what to do inside the trigger to clean the error stack so that the client will receive no errorcode.

  • I can see the Safari icon on my iPhone screen, but the program doesn't run. I have checked the settings and it is on and not restricted. Can I delete the application and reinstall it?

    I can see the Safari icon on my iPhone screen, but the program doesn't run. I have checked the settings and it is on and not restricted. It seems that the application has simply stopped running. The little "searching" icon just spins and spins. Can I delete the application and reinstall it?

    You can't delete it. you will need to do a restore.
    Restore: http://support.apple.com/kb/HT1414

  • How can I reinstall iphoto for OSX 10.5.8 I had to delete the application

    How can I reinstall iphoto for OSX 10.5.8 I had to delete the application, and I can't find how to reinstall

    If your computer came with iLife pre-installed, then you will find iPhoto on one of your original installer discs.
    If you purchased iLife then you can restore it from the iLife DVD you received.

  • HI ALL SINCE TWO DAYS I AM DOWNLOADING VIBER BUT I AM NOT HAVING MY ACCESS CODE AND EVERY TIME I DELETE THE APPLICATION AND DOWNLOADING IT AGAIN BUT ALWAYS THE SAME RESULT PLEASE I NEED YOUR HELP FOR THE ACCESS CODE.MY PHONE NUMBER IS 0022996969896.THANKS

    HI ALL SINCE TWO DAYS I AM DOWNLOADING VIBER BUT I AM NOT HAVING MY ACCESS CODE AND EVERY TIME I DELETE THE APPLICATION AND DOWNLOADING IT AGAIN BUT ALWAYS THE SAME RESULT PLEASE I NEED YOUR HELP FOR THE ACCESS CODE.MY PHONE NUMBER IS 0022996969896.THANKS IN ADVANCE

    try this website this should help you http://helpme.viber.com/index.php?/Knowledgebase/List/Index/1/iphone

  • Apple address book is not responding -can i delete the application , and then reinstall it

    on my imac apple address book is not responding -can i delete the application and then reinstall it - all contacts are backed up to icloud

    If you have in mind backup, I would not count on iCloud backup, just go to ~/Library/Application Support/Address Book. In Lion, ~/Library is available by pressing Option key when selecting Go while in the finder. Backup that folder.
    Deleting that app will create further troubles. When a basic Apple app bahaves like that, you should better identify why it behaves like that, it may mean a more serious system issue. Is this the only app, which presents this problem? If yes, rather delete its associated plist file in ~/Preferences (the same location, press Option when selecting Go).
    Do regular backups of your data, choose a backup app you consider appropriate and proceed. When you are familiar with its reactions, you may then ‘play’ with deleting the partition and install/reinstall.

  • Nokia X2, how delete the applications as facebook ...

    How delete the applications as facebook and flicker? I don´t need this. It was in phone by default. How can I uninstall or delete it? I cannot find nothing about it in phone menu and nothing if I click right button on application(it works for application which I install...). I don´t see it in phone memory from PC too...

    Good afternoon.
    My mobil is Noxia x2 -05
    i have been rongly downloading the following application "nokiaXpress",and now is create a conflict on my mobil.
    i cant even acess the internet,whatcan ido?Please i need a help.
    Machava

  • Can't figure out why I can't undeploy an application using WLST

    Hi,
    I have WebLogic 9.2.2 installed locally on my WinXP machine. I am running a WLST script (through Ant 1.6) to attempt to undeploy my application. This line
    undeploy("RoutingEngine (v1.0)")
    is causing this error,
    [wlst] Undeploying application RoutingEngine (v1.0) ...
    [wlst] <Mar 4, 2009 1:04:40 PM MST> <Info> <J2EE Deployment SPI> <BEA-260121> <Initiating undeploy operation for application, RoutingEngine (v1.0) [archive: null], to AdminServer .>
    [wlst] Failed to undeploy the application with status failed
    [wlst] Current Status of your Deployment:
    [wlst] Deployment command type: undeploy
    [wlst] Deployment State : failed
    [wlst] Deployment Message : weblogic.management.ManagementException: [Deployer:149001]No application named 'RoutingEngine (v1.0)' exists for operation undeploy
    If I log in to my WebLogic admin console under "Deployments", there is an application named "RoutingEngine (v1.0)" listed. Should I be naming this something else or referencing it under another name?
    Thanks, - Dave

    Hi, something similar has happened in an oracle weblogic 10.3.5, when i tried to delete an application deployed as library, the adminserver responded with error “[Deployer:149001]No application named ‘my-web-9(9.2.1)’ exists for operation undeploy”.
    I solved this problem, using weblogic.Deployer but specifying the appversion like this:
    java weblogic.Deployer -verbose -noexit -name my-web-9 -appversion 9.2.1 -adminurl t3://192.168.40.66:7000 -user weblogic -undeploy

  • How to "Move" final cut pro to external drive.  When I drag it duplicates the application. can I just delete the application on the MacBook?

    I want to "Move" Application Final Cut X Pro to my external hard drive but when I drag it only copies it.  Can I delete it from the hard drive now.
    How do I tell Final cut X pro that I want it to use the External drive for all files?

    Keep the application on your hard drive and when you save files save them to the external

Maybe you are looking for

  • X1 20A7 Win8.1 Pro - touch screen not working

    Hi, just got my new X1 Carbon TS (i7 4450U, 8Gbyte) with Windows 8.1Pro. Unfortunatly I cannot get the touch running and ran out of ideas. I have searched all the forums but could not find a solution. The only workaround that works is the one  to rem

  • IPod not being recognized, will charge but wont sync

    i have no idea whats wrong. it was working fine until one night my computer froze and my iPod was connected. my iPod became "corrupted" i fixed it by reseting it (menu and selct button) but now whenever i plug it in it says connected for a few second

  • Super Clean re-install Question

    I have a Mac Pro 8 core tower with several internal hard drives. The one called Macintosh HD that came with it has been upgraded all the way since prior computers, migrations, etc. A newer 1TB drive was installed and a fresh OSX made it a bootable dr

  • IWeb and Adobe Dreamweaver

    Is there a way to have Adobe Dreamweaver (or any other web page creation program) input, edit, and then export back to iWeb pages? There are many times when iWeb simply will not easily what I wish, such as be able to edit the html code, create a chil

  • Can't use Analyzer 7.0, toolbar has no response.

    As the title, I have tried many solutions, including install patchs of office, windows and Gui, but issue still happen. My system configure: SAP PC VERSION INFORMATION: saplogon.exe MAIN MODULE INFORMATION:    saplogon.exe    SAP Logon for Windows