Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to delete archive log file

VaibhavDixitDec 14 2011 — edited Dec 14 2011
hii,

presently i am working on oracle 10gR2 on windows server 2003.
hard disk drive is almost full.



when i execute this command
"DELETE EXPIRED ARCHIVE LOG ALL";

it give message

"specifies does not match any archive log in the recovery catalog"



how can i delete archive log files ??

Regards
Vaibhav Dixit
This post has been answered by KanchDev on Dec 14 2011
Jump to Answer

Comments

Ashish Awasthi

I didn't read your code , Only this line

i what to call another screen if the function return status Open  

Don't write this code on validator as validator get called multiple time , put a button there that checks this validation and navigate to other page

I hope you have defined control flow to another page in taskFlow so in managed bean code you can check condition like this on your button Action

if(status.equalIgnoreCase("Open")){

return "controlFlowName";

}else{

return null;

}

Ashish

Tony007

logon.PNGI don't need to navigate using button when I navigate out of inputtext where must I write this in my code

if(status.equalIgnoreCase("Open")){

return "controlFlowName";

}else{

return null;

}

SanjeevChauhan

I think valuechange listener will be better choice.

Can valueChangeListener be used to execute task flow logic?

Thanks

Sanjeev

Ashish Awasthi

Earlier I said don't use validator

As sanjev said you can put your code in valuechange listener and to navigate drop a button and write code to naviagte in it's Action and set visible false for it

and then on VCE queue ActionEvent programmatically like this

//Code to call ActionEvent

FacesContext facesContext = FacesContext.getCurrentInstance();

UIViewRoot root = facesContext.getViewRoot();

/**Pass cb1(buttonId) */

RichCommandButton button = (RichCommandButton)root.findComponent("cb1");

ActionEvent actionEvent = new ActionEvent(button);

actionEvent.queue();


Check - http://www.awasthiashish.com/2013/04/invoking-button-action.html


Ashish

Tony007

hi this is at am trying to do

public void pwdSrc(ValueChangeEvent valueChangeEvent) {

          //  String msg =null;

    

          UIComponent c = valueChangeEvent.getComponent();

          c.processUpdates(FacesContext.getCurrentInstance());

      

                OperationBinding oBindings = getOperationBinding("ExecUsrPswd");// this is the procedure

                OperationBinding oBindingsUsr = getOperationBinding("getUsrStstus");//this I sthe function

              

                oBindings.execute();

                oBindingsUsr.execute();

            

              //how do I use both procedure and function to do the validation

            

        Object o = oBindings.getResult();

        Object o1 = oBindingsUsr.getResult();

    

     

//I what to call procedurefaion and I navigate to next inpputext iFfunction return OEPN THAN I CALL ANOTHE SCRREN

if(o1.equals("open")){

            return "controlflowName";

        }else{

            return null;

        }

        }

                              

    

        if(o != null) {

          String msg = o.toString();

                          FacesMessage fm = new FacesMessage(msg);

                          throw new ValidatorException(fm);

                  

              }

                                  }

procedure define

          procedure Pswd(p_unserid varchar2,p_pswd varchar2,out_msg out varchar2)

this is how am calling the procedure

public String ExecUsrPswd(String SignId,String Spswd) {

        DBTransactionImpl dbti = (DBTransactionImpl)getDBTransaction();

        CallableStatement statement =

          dbti.createCallableStatement(("BEGIN "+"cal.Pswd(?,?);" +

                                        "END;"), 0);

 

     

        try {

            statement.setString(1,SignId);

            statement.setString(2,Spswd);

            statement.registerOutParameter(2, Types.VARCHAR);

            statement.execute();

            return statement.getString(2);

        } catch (SQLException sqlerr) {

            throw new JboException(sqlerr);

        } finally {

            try {

                if (statement != null) {

                    statement.close();

                }

            } catch (SQLException closeerr) {

                throw new JboException(closeerr);

            }

         

        }

    }

this is how am calling the function

  public String getUsrStstus(String UsrId) {

            String UserSts = "No Status found";

            Object UsrStatus = callStoredFunction(Types.VARCHAR, "Calm.Usr_status(?)", new Object[] { UsrId });

            if (UsrStatus != null) {

                UserSts = UsrStatus.toString();

            }

            return UserSts;

        }

this is my jsff

<af:inputText value="#{bindings.Password.inputValue}"

                        label="#{bindings.Password.hints.label}"

                        columns="#{bindings.Password.hints.displayWidth}"

                        maximumLength="#{bindings.Password.hints.precision}"

                        shortDesc="#{bindings.Password.hints.tooltip}" id="it3"

                        styleClass="inputTextRequired" required="true"

                        valueChangeListener="#{Pswdbean.pwdSrc}">

            <f:validator binding="#{bindings.Password.validator}"/>

          </af:inputText>

Ashish Awasthi

Have you read my last comment ?

You can not return controlFlow name in ValueChange Listener , for that use Button on page and define Action and then queue that in VCL

on that button action write this code

public String buttonAction() {

   return "controlflowName";

  }

and then queue this action in VCL

  1. if(o1.equals("open")){ 
  2.          

//Code to call ActionEvent

FacesContext facesContext = FacesContext.getCurrentInstance();

UIViewRoot root = facesContext.getViewRoot();

/**Pass cb1(buttonId) */

RichCommandButton button = (RichCommandButton)root.findComponent("cb1");

ActionEvent actionEvent = new ActionEvent(button);

actionEvent.queue();

  1.         }else
  2.             return null
  3.         } 
  4.         } 
  5.                                 
  6.       
  7.         if(o != null) { 
  8.           String msg = o.toString(); 
  9.                           FacesMessage fm = new FacesMessage(msg); 
  10.                           throw new ValidatorException(fm); 
  11.                     
  12.  
  13.  
  14.               } 
  15.                                   } 

Last is set visible false for button so that user can't see it


Ashish

Tony007

Ya i read your post what do you mean I must que button in vcl

Ashish Awasthi

I have provided you sample code too, I think you should understand now

Once read and try and let me know if you face any problem

Ashish

SanjeevChauhan

Sorry for interrupting this thread but there is a difference between Ashish's solution and my solution  Can valueChangeListener be used to execute task flow logic?.

In Ashish's solution you are trying to mimic a button click by creating an ActionEvent queuing server side.

In my solution you try to call task-flow navigation from valuechangelistener programatically. You are just saying that "Hey do navigation activity which is defined in task-flow".

Creating ActionEvent will make sure that if there is any bean code written on button's action that will also fire. In my case you will only have navigation.

But if you are only interested in navigation then you just need below two links in your valuechangelistener.

FacesContext context = FacesContext.getCurrentInstance();

context.getApplication().getNavigationHandler().handleNavigation(context,"", "Go");  //Replace Go with your navigation name in task-flow


Thanks

Sanjeev.

Tony007

i did this

<af:commandButton text="commandButton 1" id="cb3"

                          action="#{pageFlowScope.SignOnValidation.buttonAction}"

                          visible="false"/>

      

  public void PswdValidator(ValueChangeEvent valueChangeEvent) {

        

      

        FacesContext facesContext = FacesContext.getCurrentInstance();

        UIViewRoot root = facesContext.getViewRoot();

      

      

        RichCommandButton button = (RichCommandButton)root.findComponent("cb3");

      

        ActionEvent actinEvent = new ActionEvent(button);

      

          UIComponent c = valueChangeEvent.getComponent();

          c.processUpdates(FacesContext.getCurrentInstance());

        

                OperationBinding oBindings = getOperationBinding("ExecUsrPswd"); // I what to navigate to next inpuuteext if the validation pass

                OperationBinding oBindingsUsr = getOperationBinding("getUsrStstus");else  if the above fail or pass and if the function return 'OPEN' THEN CALL/navigate to another page

                

                oBindings.execute();

                oBindingsUsr.execute();

              

            

              

        Object o = oBindings.getResult();

        Object o1 = oBindingsUsr.getResult();

      

      /* if (o1.equals("open")){

            return "controlflowName";

        }else{

            return null;

        }

        }*/

                                

      

        if(o != null) {

          String msg = o.toString();

                          FacesMessage fm = new FacesMessage(msg);

                          throw new ValidatorException(fm);

                    

  

  

              }

                                  }

Ashish Awasthi
Answer

@"mm07"

In your code I see a button (Good)

and you have created an ActionEvent too (Good)

  1. RichCommandButton button = (RichCommandButton)root.findComponent("cb3"); 
  2.         
  3.         ActionEvent actinEvent = new ActionEvent(button); 

But i don't see any code that queue this ActionEvent ??

actionEvent.queue();


Ashish

Marked as Answer by Tony007 · Sep 27 2020
Sameh Nassar

Why you add commandButton with visible =false and invoke it from the code. You can use this code to navigate to the page from backbean

    FacesContext fc = FacesContext.getCurrentInstance();

    fc.getApplication().getNavigationHandler().handleNavigation(fc, null, "<page-outcome>");

In you case I expect something like this

  public void PswdValidator(ValueChangeEvent valueChangeEvent)

  {

    .

    .

    .

    oBindings.execute();

    oBindingsUsr.execute();

    Object o = oBindings.getResult();

    Object o1 = oBindingsUsr.getResult();

    if (o != null)

    {

      String msg = o.toString();

      FacesMessage fm = new FacesMessage(msg);

      throw new ValidatorException(fm);

    }

   

    if (o1.equals("open"))

    {

      FacesContext fc = FacesContext.getCurrentInstance();

      fc.getApplication().getNavigationHandler().handleNavigation(fc, null, "<page-outcome>"); // write page outcome

      return;

    }

  }

Tony007

And where do I call my procedue and function I did add the queue I miss it when posting

Ashish Awasthi

If you have queued ActionEvent then it should work definitely

@"mm07"

You have got two different working solution for your problem , Now I don't understand where you are stuck

For more reference and a sample Application you can check - Navigate to another page on value change event of ADF input component

Ashish

Tony007

Ok what is page-outcome is the name of taskflow

Ashish Awasthi

It is the name of control-flow that you have used to navigate to another page

Tony007

ok i did this

<af:inputText value="#{bindings.Password.inputValue}"

                    label="#{bindings.Password.hints.label}"

                    columns="#{bindings.Password.hints.displayWidth}"

                    maximumLength="#{bindings.Password.hints.precision}"

                    shortDesc="#{bindings.Password.hints.tooltip}" id="it3"

                    styleClass="inputTextRequired" required="true"

                    valueChangeListener="#{Pswdbean.PswdValidator1}"

                    autoSubmit="true">

        \<f:validator binding="#{bindings.Password.validator}"/>

      \</af:inputText>

public void PswdValidator1(ValueChangeEvent valueChangeEvent)

  { 

      OperationBinding oBindings = getOperationBinding("ExecUsrPswd");

      OperationBinding oBindingsUsr = getOperationBinding("getUsrStstus");

    oBindings.execute(); 

    oBindingsUsr.execute(); 

    Object o = oBindings.getResult(); 

    Object o1 = oBindingsUsr.getResult(); 

    if (o != null) 

    { 

      String msg = o.toString(); 

      FacesMessage fm = new FacesMessage(msg); 

      throw new ValidatorException(fm); 

    } 

    if (o1.equals("EXPIRED")) 

    { 

      FacesContext fc = FacesContext.getCurrentInstance(); 

      fc.getApplication().getNavigationHandler().handleNavigation(fc, null, "ResertUserPswdTaskFlow"); 

      return; 

    } 

  } 

but am geting this error msg when i navigate out of my inputtext instead dof error msg in my procedure

errormsg.PNG

Ashish Awasthi

ResertUserPswdTaskFlow is the name of contrlFlow or taskFlow ?

You have to provide controlFlow name, Not taskFlow

navigateIT1.jpg

See this image as per this you have provide "goToPage2" as parameter to navigate to Page2

Have you not checked the link i mentioned ?

Again look at- Navigate to another page on value change event of ADF input component

Ashish

1 - 18
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jan 11 2012
Added on Dec 14 2011
20 comments
301,251 views