My guess is you are using an earlier version of 8i, not 8.1.7. In the later versions of 8i the need to specify purity levels was removed. Try this:
CREATE OR REPLACE TYPE PersonObj AS OBJECT (
MEMBER FUNCTION getAge RETURN NUMBER,
PRAGMA RESTRICT REFERENCES(getAge, WNDS)
This states that the member function getAge Writes No Databased State.
Check out the discussion of purity levels:
http://otn.oracle.com/docs/products/ora ... tm#2064466
http://otn.oracle.com/docs/products/ora ... tm#1014698