Like @JustinCave suggests, you have a problem with your dynamic SQL. v_categorienaam
is a variable yet it's in the string of your SQL. Remove the dynamic SQL and your problem will go away.
In addition, you can simplify your code a lot by using a cursor for loop, something like:
create or replace trigger t_OnDeleteCategory
before delete on Categorie
for each row
declare
v_textMail varchar2(2000);
begin
--1) mailbericht verzenden
for c in (
select voornaam, achternaam, emailAdres
from MailAbonnee
where id in (
select mailAbonneeID from CategorieAbonnement where categorieNaam = :old.naam
)
) loop
v_textMail := 'Beste ' || c.voornaam || ' ' || c.achternaam || ', uw abonnement is opgeheven voor Categorie '|| c.naam || '.';
sendMailAbonnee(v_textMail, c.emailadres);
end loop;
--2) verwijder alle abonnementen
delete from CategorieAbonnement where categorieNaam = :old.naam;
--3) pas alle nieuwsberichten aan
update Nieuwsbericht set categorieNaam = '' where categorieNaam = :old.naam;
end;