I followed a simple tutorial of how to add resource references of a custom type with its custom object factory in my web application.
The tutorial is from Tomcat's documentation: http://tomcat.apache.org/tomcat-7.0-doc/jndi-resources-howto.html#Adding_Custom_Resource_Factories
I created my app and deployed it on a plain Tomcat and it worked just fine.
However when I tried it on a TomEE 1.5.0 it couldn't even deploy...
I'm attaching both the application and the catalina logs taken from TomEE.