Incorrect code: there should be userTransaction.begin(); instead of: UserTransaction.begin();
It's fine. Thanks.