View Single Post
  #8 (permalink)  
Old October 22nd, 2016, 07:59 AM
kross1300 kross1300 is offline
Registered User
Points: 3, Level: 1
Points: 3, Level: 1 Points: 3, Level: 1 Points: 3, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2016
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Updated Fix for Ch21+

Note: This fix is if the issues persist in Ch21+ examples. Ch20 has additional issues that prevent the sample code from working correctly.

Not to revive a dead thread, but this book is still the best resource for self-learning and I had an immense amount of trouble getting the JNDI datasource to work. After trying countless fixed that didn't work, I learned that the nameNotFound exception when working in eclipse was due to the fact that eclipse makes its own copy of the Tomcat configuration. Entering the JNDI datasource definition inside the context file of Tomcat isn't seen when running from within eclipse. To make the datasource visible all you need to do is open the context.xml from WITHIN eclipse and paste in the datasource as seen here:

http://www.codejava.net/servers/tomc...ling-in-tomcat

After literally hours upon hours of troubleshooting, this 5 second fix may work for you too!
Reply With Quote