Before you can get the transaction manager and datasources via JNDI ENC (URLs starting with java:comp/), you first need to configure Jetty with support for it. See Jetty's JNDI documentation page or have a look at the appendixto get instructions to quickly enable this in the default Jetty config.