This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Data source problem

 
Nikunj Aggarwal
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
I am new to j2ee and i am doing netbeans E-commerce tutorial . But when i reach to "Connecting the Application to the Database" topic,i unable to connect project to database. I done all the things right but still when i am running "testDataSource.jsp" page it showing error in the browser.


exception

javax.servlet.ServletException: javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "java.sql.SQLException: No suitable driver found for jdbc/affablebean"

root cause

javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "java.sql.SQLException: No suitable driver found for jdbc/affablebean"


This exception is coming. I read troubleshoot also but still no help. I want to know to add "reference resource " because in the tutorial is done differently and i am using netbeans 6.9.1
Please help me, in order to solve this problem.
 
Lucas Ratusznei
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello!

Try to remove a possible blank space after jdbc/affablebean reference in testDataSource.jsp

this:
<sql:query var="result" dataSource="jdbc/affablebean ">
SELECT * FROM category, product WHERE category.id = product.category_id
</sql:query>

should be:
<sql:query var="result" dataSource="jdbc/affablebean">
SELECT * FROM category, product WHERE category.id = product.category_id
</sql:query>

Thanks!
 
Campbell Ritchie
Sheriff
Posts: 48441
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch Lucas Ratusznei
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic