I accidentally made the CMP-field in my bean class protected instead of public. Shouldn't JBoss say this is an error instead of just throwing a NullPointerException when I try to instantiate the bean with create().