aspose file tools*
The moose likes JDBC and the fly likes Data source problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Data source problem" Watch "Data source problem" New topic
Author

Data source problem

Nikunj Aggarwal
Greenhorn

Joined: Dec 24, 2010
Posts: 2
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

Joined: Mar 17, 2011
Posts: 1
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

Joined: Oct 13, 2005
Posts: 38859
    
  23
Welcome to the Ranch Lucas Ratusznei
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Data source problem