Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

An error occurred performing resource injection on managed bean testBean  RSS feed

 
Victor Ade
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can't seem to find what's wrong with testbean from stack trace

can anyone help?
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I cannot tell just from this information with certainty, but it appears that you are attempting to inject a DBCP Connection into the Managed Bean and it looks like the Connection factory could not provide a valid Connection object. Most likely, either it attempted to create a new Connection and failed, or it attempted to pull an existing Connection that was broken - which usually happens when the Connection's network linkage times out.

If the connection has timed out, you need to add some extra directives to your Tomcat Connection Pool definition to ensure that the Pool Manager discards old broken Connections or keeps them alive. The exact directives required for this vary depending on the database, so read the Tomcat documentation.
 
Victor Ade
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Holloway wrote:I cannot tell just from this information with certainty, but it appears that you are attempting to inject a DBCP Connection into the Managed Bean and it looks like the Connection factory could not provide a valid Connection object. Most likely, either it attempted to create a new Connection and failed, or it attempted to pull an existing Connection that was broken - which usually happens when the Connection's network linkage times out.

If the connection has timed out, you need to add some extra directives to your Tomcat Connection Pool definition to ensure that the Pool Manager discards old broken Connections or keeps them alive. The exact directives required for this vary depending on the database, so read the Tomcat documentation.

Solved this already sorry. I had two MYSQL connector jar files in tomcat lib. Remove the old one and all work fine now. Thanks Tim.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!