• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Data source problem

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Marshal
Posts: 79239
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch Lucas Ratusznei
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic