This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Caused by: javax.naming.NameNotFoundException: B2B2Mail not bound
It looks like the code expects some resource to be bound in JNDI and it's not finding it, either because it's using a wrong JNDI name or a wrong JNDI context or the resource is indeed not bound. You'll have to check the JNDI tree (different application servers have different tools to do that) to ensure that resource really exists.