ORA-12054: cannot set the ON COMMIT refresh attribute for the materialized view
*Cause: The materialized view did not satisfy conditions for refresh at
commit time.
*Action: Specify only valid options.

What i actually need is to create materilalized view to find an employee who joined recently and got more salary than others who joined before in the same deptartment and in same designation(role).
I have two tables one is emp_master and other one emp_details2.

Post a working Test case: create table and insert statements along with the result you want with these data then we will be able work with your table and data. Explain with words and sentences the rules that lead to this result.

Explain each line of your result and explain why they are in the result.

If in my query the only thing you don't like is that you have people from any year then restrict the result to those that have joined in the current year, no big deal to add a condition in the WHERE clause(s).

In above employee venkat who joined in 2012 and got more salary camparing others who are belong the same desigantion(ASSOCIATE) within in his department.
like this i post the result and this is what i want.
I didnt tell that you made mistake. The mistake is mine because I didnt tell my reqiurement exactly.
Help me to get the result like that.

So you want the employee with the highest salary per combination of dept_id and designation as long as that employee joined this year?
What if the dept_id/designation combo has no employees who joined this year?
What if the dept_id/designation combo has an employee(s) who joined this year but the employee with the max salary joined in a previous year?

If you change your default date format that'll break.
I suggest you use:

HAVING MAX(em.date_of_joining) > trunc(sysdate, 'YYYY')

I think its better to use greater than or equal to operator in having clause to also include the employees who are joined in '01-jan-2012',because they are also come under the conditions (employees who are joined in current year).