What's wrong with my connection driver?

I'm have a jsp page that doesn't get the data from the database.
According to it's caught exception , I must implement a suitable
driver.Tha problem is: I have tried 2 type of mysql drivers ("com.mysql.jdbc.jdbc2.optional.MysqlDataSource" and
"org.gjt.mm.mysql.Driver") and i don't know what should I do, can you give any advice?Thanks in advance!!
Well that's my jsp
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %>
<b>Resultado:</b>
<sql:setDataSource var="datasource" driver="com.mysql.jdbc.jdbc2.optional.MysqlDataSource"
url="jdbc:mysql://localhost/loja" user="marcos" password="131283"/>
<sql:query dataSource="${datasource}" sql="select * livraria where codigo=1" var ="books"/>
  <c:forEach var="book" begin="0" items="${books.rows}">
    <b>${book.titulo}</b></c:forEach>this is the caught exception:
exception
javax.servlet.ServletException: Unable to get connection, DataSource invalid: "java.sql.SQLException: No suitable driver"
     org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:830)
     org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:763)
     org.apache.jsp.Resposta_jsp._jspService(Resposta_jsp.java:89)
     org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:336)
     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:251)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
     sun.reflect.GeneratedMethodAccessor147.invoke(Unknown Source)
     sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     java.lang.reflect.Method.invoke(Method.java:585)
     org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
     java.security.AccessController.doPrivileged(Native Method)
     javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
     org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
     org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
root cause
javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "java.sql.SQLException: No suitable driver"
     org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection(QueryTagSupport.java:276)
     org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(QueryTagSupport.java:159)
     org.apache.jsp.Resposta_jsp._jspx_meth_sql_query_0(Resposta_jsp.java:129)
     org.apache.jsp.Resposta_jsp._jspService(Resposta_jsp.java:70)
     org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:336)
     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:251)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
     sun.reflect.GeneratedMethodAccessor147.invoke(Unknown Source)
     sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     java.lang.reflect.Method.invoke(Method.java:585)
     org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
     java.security.AccessController.doPrivileged(Native Method)
     javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
     org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
     org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)

Try with the driver class name com.mysql.jdbc.Driver

Similar Messages

  • What's wrong with my hard drive?

    The Problem:
    Lately I've been noticing that my iMac has been slower to warm up, as it were. Logging in as normal I notice that the hard drive is taking a lot of time to settle down, up to 2 minutes of constant activity after the destop has appeared. It just sounds like normal access (i.e. it doesn't sound like mechanical failure or anything), but it does go on a bit and attempting to launch apps during this time results in many icon bounces, the dreaded beach ball and very, very slow apps until the disk activity dies down. Also, once said activity has died down launching apps still isn't the fastest - e.g. Safari, lots of disk activity as the app launches, lots more activity when I click on a folder link on the bookmarks bar, followed by a pause, then the folder list appears.
    Of the 250GB there is currently 90GB free.
    What I have done so far:
    Disk Utility - Verified disk, repaired disk permissions.
    Checked the SMART status - A-OK.
    Used Disk Warrior to repair disk permissions/check files & folders and rebuilt the directory.
    Even after all the above the disk still seems to be overactive at startup. Normal operation is smooth enough.
    Any ideas what could be going on? Is it a hard drive thing? An OS X thing? A memory thing? (I don't know how to test the memory).
    Notes:
    I'm a switcher (since April 06) so I'm still learning OS X.
    I do install/uninstall lots of trial apps (I use AppZapper).
    There are just 3 Login items in System Prefs > Accounts.
    iMac Intel CD 17", 1.83, 1GB, 250GB   Mac OS X (10.4.8)  

    Thanks for the link David.
    Through that site I learned that I am most likely having memory issues. The disk thrashing I'm hearing is a result of OS X making lots of use of the paging file. Using the information on this page it seems that I have quite a lot of pageins and pageouts activity. Here is a sample from my iMac:
    PhysMem: 145M wired, 400M active, 316M inactive, 863M used, 160M free
    VM: 9.67G + 72.3M 70631(0) pageins, 38365(0) pageouts
    Something as simple as scrolling through my Apps folder in Finder can produce lots of activity and I've seen the (0) figures get as high as 1000, albeit briefly. and while using an app.
    But I am at a loss as to why this should be happening, and why it has only started happening in the last few weeks. Is there any way to test the installed RAM? Any other suggestions for things to test?

  • What is wrong with my external drives??!

    I'm running Snow Leopard 10.6.2 on iMac 20 inch 2.4 ghz.
    I have two external drives, one used for media, the other for my Time Machine. They are Samsung SATA drives mounted in Icy Dock enclosures. One (media) is USB, the other (Time Machine) is FireWire 400.
    I've had one of these drives for about a year, and I just installed the second one yesterday. This machine has always played oddly with an external, ever since I got the first one when I had Leopard. The issue persists now with Snow Leopard.
    Whenever I leave the machine idle and it goes to sleep automatically, both drives begin to spin up and shut down constantly. They run for a minute or so, then spin down, then spin back up after about ten seconds... endlessly. However, if I put the computer to sleep manually (apple > sleep), they spin down and just sit, like they should. I have "Put hard disks to sleep when possible" checked. The same behavior is exhibited whether or not it's checked.
    Is there anything I can try to make these drives either stay spinning all the time (even when comp is sleeping) or to make them actually spin down when it sleeps?

    I am a little confused.
    Which drive is the new drive that you just added? If you disconnect the new drive does everything operate normally? Have you contacted the manufacturer of the Icy Dock?

  • What's wrong with my disc drive?

    It won't play or burn discs. It always spits them back out at me. If i try to watch a movie i have to keep inserting it over and over again until it takes it, if it takes it and forget backing up anything onto disc. If i finally get a cd in and it tells me it burned if i insert it into another computer it says blank like nothing copied. Is it reparable? can i fix it, and if so how?

    How old is the drive?
    It sounds like it has given up the ghost, or nearly so.
    The slot-loaders are not the most robust of devices, to say the least.  You might run your Apple Hardware Test disc on the machine, but probably a replacement of the optical is in your future.

  • It says that "there was a problem connecting to the server". What's wrong with this, and how can I deal with this problem?

    I just got my new iPad Mini2, and when I choose "sign in with your apple ID", it says that "there was a problem connecting to the server". What's wrong with this, and how can I deal with this problem?

    1. Turn router off for 30 seconds and on again
    2. Settings>General>Reset>Reset Network Settings

  • What's wrong with my macbook pro (15" early 2011) when i connect it with TV via hdmi

    What's wrong with my macbook pro (15" early 2011) when i connect it with TV via hdmi

    Hello Alex,
    It sounds like you are getting excessive CPU usage when connecting an external display via HDMI to your computer. I would try the troubleshooting steps outlined in the article named:
    Apple computers: Troubleshooting issues with video on internal or external displays
    http://support.apple.com/kb/ht1573
    When using an external display be sure to check the following:
    If you're using an Apple notebook, confirm the AC power cable or adapter is securely connected to the computer and the cable providing power to the display is also secure. It is always good to have your notebook connected to AC power when an external display is in use.
    Confirm display adapters are fully seated in their respective connections and that they are supported models and for the computer and display. Refer to these articles to assist you with adapter compatibility and further configuration information:
    Monitor and Display Adapter Table
    About Mini DisplayPort to HDMI adapters
    Apple Mini DisplayPort adapters: Frequently asked questions (FAQ)
    Thunderbolt ports and displays: Frequently asked questions (FAQ)
    Remove all display cable extenders, KVM switches, or other like devices and retest to determine if the issue is resolved.
    Try unplugging the video adapter or cable and then plug it back in.
    If more than one video adapter is in use (or "daisy-chained"), troubleshoot by using only one adapter.
    Example: A mini DisplayPort to DVI adapter connected to a DVI to HDMI adapter is an unsupported configuration because there is a series of adapters in use.
    If available, try using a different display and or adapter (or use a different connector by using DVI instead of VGA, for instance).
    Reset the systemYou can reset the Mac's parameter RAM and SMC.Reset the resolutionStart by resetting the Mac's parameter RAM. If the display does not come up, was previously set to an unsupported resolution, and still results in no video:
    Start up in Safe Mode.
    From the Apple () menu, choose System Preferences.
    Choose Displays from the View menu to open the preferences pane.
    Select any resolution and refresh rate that your display supports.
    Restart your computer.
    Thank you for using Apple Support Communities.
    Cheers,
    Sterling

  • What's wrong with the activation server? i just bought my ipad wifi celllular... and have a 3g cellular network connection... when i press the bottom to activate my ipad it says the activation server cannot be reached. what to do then?

    what's wrong with the activation server? i just bought my ipad wifi celllular... and have a 3g cellular network connection... when i press the bottom to activate my ipad it says the activation server cannot be reached. what to do then?

    Hey aries35,
    I found the following that goes over troubleshooting the same issue for the iPhone. I know you have an iPad, but the steps should still apply:
    Perform the following steps:
    Restart the iPhone.
    Try another means of reaching the activation server and attempt to activate.
    Try connecting to a known-good Wi-Fi network if you're unable to activate using a cellular data connection.
    Try connecting to iTunes if you're unable to activate using Wi-Fi.
    Restore the iPhone.
    If you receive an alert message when you attempt to activate your iPhone, try to place the iPhone in recovery mode and perform a restore. If you're still unable to complete the setup assistant due to an activation error, contact Apple for assistance.
    via: iPhone: Troubleshooting activation issues
    http://support.apple.com/kb/TS3424
    Cheers,
    Delgadoh

  • What's wrong with FaceTime I can't connect a video call to anyone

    What's wrong with FaceTime I can't connect a video call to anyone

    If you are having issues with Facetime, and your device is running iOS 7.1, and you have followed the troubleshooting procedures (http://support.apple.com/kb/TS3367), contact apple support.
    The http://www.apple.com/support/systemstatus/ page states that if you are experiencing an issue not listed, to contact support .

  • All of my apple sets (iphone, ipad and computer) cannot connect the app store since yesterday, what's wrong with the app store?

    All of my apple sets (iphone, ipad and computer) cannot connect the app store since yesterday, what's wrong with the app store? do you know? or do you have have the same experience?

    I still have access.  Must be your phone or your internet connection.

  • My I phone 5c won't connect to my wifi what's wrong with my phone?

    My iPhone 5c won't connect to my wifi. I am using my ipad connected to my woof right now. What's wrong with my phone?

    Any problem connecting your iPhone to any other wi-fi network besides your own?
    http://support.apple.com/kb/TS1398

  • My optical drive will not read any music cds now or recognize a blank cd in the drive. it might read some data discs. what is wrong with it and how do i fix it?

    My optical drive will not read any music cds or recognize a blank cd. it might read some data cds. what is wrong with it and how can i fix it?

    The optics might be dirty. Try running a cleaning CD through it and see if that makes a difference.
    If not, it will have to be replace.
    Allan

  • What is wrong with Facetime? Suddenly won't work on iPhone 4S or iPad mini. Connecting to ither iPhone 4S. Tried 4G

    What is wrong with Facetime? Suddenly won't work on iPhone 4S or iPad mini. Connecting to ither iPhone 4S. Tried 4G &amp; wifi. 4 bars. What gives? Says connecting... &amp; then times out.

    Sometimes, in a givin market, FaceTime is not available. 

  • What is wrong with Creative Cloud Connection Update

    What is wrong with Creative Cloud Connection Update?  I've tried 25 times to update but it does not work? Can you please help?

    I opened my Adobe Application Manager, and I saw there was an update for Creative Cloud Connection and pressed update. When the installation was at 49% a message came and said: Please close te following applications to continue: - Adobe Creative Cloud Connection. And a buttom: Cncel update or Retry.
    I have Retry 50 times, and it says the same.
    I have restart my computer several times, and the same happened when I come to 49% of the installation.
    What is the problem??

  • HT201210 Hi All,  Just had my iphone repaired after dropping it in a puddle but it won't now connect with iTunes. It says the iphone "iphone" could not be restored. An unknown error occurred (23).   Any thoughts on what is wrong with it?

    Hi All,  Just had my iphone repaired after dropping it in a puddle but it won't now connect with iTunes. It says the iphone "iphone" could not be restored. An unknown error occurred (23).   Any thoughts on what is wrong with it?

    https://discussions.apple.com/message/22965383#22965383
    https://discussions.apple.com/thread/4012266?tstart=0

  • I was just using my iPod this morning. I turned it off after using it, but when i opened it in the afternoon, i couldn't connect to my wifi anymore. I tried resetting the network but it still didn't work. I wonder what is wrong with it?

    My ipod 4th generation can't connect to my wifi. I was just using it this morning. I turned it off for awhile but when i opened it in the afternoon, it just won't connect to my wifi. My wifi is ok 'cause i am able to use my mac. I wonder what is wrong with it?

    - Do other devices successfully connect using your network?
    - Does the iPod successfully connect to other networks?
    - Reset the iPod . Nothing is lost
    Reset iPod touch: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Power off and then back on your router
    - Reset network settings: Settings>General>Reset>Reset Network Settings
    - iOS: Troubleshooting Wi-Fi networks and connections
    - iOS: Recommended settings for Wi-Fi routers and access points

Maybe you are looking for