Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7016113
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:44:32+00:00 2026-05-27T22:44:32+00:00

The error No suitable driver found for jdbc:mysql://localhost:3306/mazedb The complete error INFO: [EL Info]:

  • 0

The error

No suitable driver found for jdbc:mysql://localhost:3306/mazedb

The complete error

INFO: [EL Info]: 2012-01-03
23:27:35.522--ServerSession(11375975)--EclipseLink, version: Eclipse
Persistence Services - 2.3.0.v20110604-r9504

INFO: [EL Severe]: 2012-01-03
23:27:35.528--ServerSession(11375975)--Local Exception Stack: 
Exception [EclipseLink-4002] (Eclipse Persistence Services -
2.3.0.v20110604-r9504): org.eclipse.persistence.exceptions.DatabaseException Internal
Exception: java.sql.SQLException: No suitable driver found for
jdbc:mysql://localhost:3306/mazedb Error Code: 0    at
org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:324)
    at
org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:319)
    at
org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:138)
    at
org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)
    at
org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:582)
    at
org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:206)
    at
org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:472)
    at
org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getDatabaseSession(EntityManagerFactoryDelegate.java:188)
    at
org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:277)
    at
org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:290)
    at
org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:268)
    at
com.maze.service.AccountService.validateLogin(AccountService.java:18)
    at
com.maze.controller.AccountController.performLogin(AccountController.java:31)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)     at
com.sun.el.parser.AstValue.invoke(AstValue.java:234)    at
com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:297)
    at
com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
    at
javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
    at
com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
    at javax.faces.component.UICommand.broadcast(UICommand.java:315)    at
javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)
    at
javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)
    at
com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)    at
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)   at
org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1539)
    at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281)
    at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
    at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)   at
com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
    at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
    at
org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:330)
    at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
    at
com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:174)
    at
com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:828)
    at
com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:725)
    at
com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1019)
    at
com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
    at
com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
    at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
    at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
    at
com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
    at
com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
    at
com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
    at com.sun.grizzly.ContextTask.run(ContextTask.java:71)     at
com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
    at
com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
    at java.lang.Thread.run(Thread.java:662) Caused by:
java.sql.SQLException: No suitable driver found for
jdbc:mysql://localhost:3306/mazedb  at
java.sql.DriverManager.getConnection(DriverManager.java:602)    at
java.sql.DriverManager.getConnection(DriverManager.java:154)    at
org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:98)
    ... 51 more

WARNING: #{accountController.performLogin}:
javax.persistence.PersistenceException: Exception [EclipseLink-4002]
(Eclipse Persistence Services - 2.3.0.v20110604-r9504):
org.eclipse.persistence.exceptions.DatabaseException Internal
Exception: java.sql.SQLException: No suitable driver found for
jdbc:mysql://localhost:3306/mazedb Error Code: 0
javax.faces.FacesException: #{accountController.performLogin}:
javax.persistence.PersistenceException: Exception [EclipseLink-4002]
(Eclipse Persistence Services - 2.3.0.v20110604-r9504):
org.eclipse.persistence.exceptions.DatabaseException Internal
Exception: java.sql.SQLException: No suitable driver found for
jdbc:mysql://localhost:3306/mazedb Error Code: 0    at
com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:118)
    at javax.faces.component.UICommand.broadcast(UICommand.java:315)    at
javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)
    at
javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)
    at
com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)    at
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)   at
org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1539)
    at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281)
    at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
    at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)   at
com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
    at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
    at
org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:330)
    at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
    at
com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:174)
    at
com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:828)
    at
com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:725)
    at
com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1019)
    at
com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
    at
com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
    at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
    at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
    at
com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
    at
com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
    at
com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
    at com.sun.grizzly.ContextTask.run(ContextTask.java:71)     at
com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
    at
com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
    at java.lang.Thread.run(Thread.java:662) Caused by:
javax.faces.el.EvaluationException:
javax.persistence.PersistenceException: Exception [EclipseLink-4002]
(Eclipse Persistence Services - 2.3.0.v20110604-r9504):
org.eclipse.persistence.exceptions.DatabaseException Internal
Exception: java.sql.SQLException: No suitable driver found for
jdbc:mysql://localhost:3306/mazedb Error Code: 0    at
javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102)
    at
com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
    ... 32 more Caused by: javax.persistence.PersistenceException:
Exception [EclipseLink-4002] (Eclipse Persistence Services -
2.3.0.v20110604-r9504): org.eclipse.persistence.exceptions.DatabaseException Internal
Exception: java.sql.SQLException: No suitable driver found for
jdbc:mysql://localhost:3306/mazedb Error Code: 0    at
org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:501)
    at
org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getDatabaseSession(EntityManagerFactoryDelegate.java:188)
    at
org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:277)
    at
org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:290)
    at
org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:268)
    at
com.maze.service.AccountService.validateLogin(AccountService.java:18)
    at
com.maze.controller.AccountController.performLogin(AccountController.java:31)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)     at
com.sun.el.parser.AstValue.invoke(AstValue.java:234)    at
com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:297)
    at
com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
    at
javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
    ... 33 more Caused by: Exception [EclipseLink-4002] (Eclipse
Persistence Services - 2.3.0.v20110604-r9504):
org.eclipse.persistence.exceptions.DatabaseException Internal
Exception: java.sql.SQLException: No suitable driver found for
jdbc:mysql://localhost:3306/mazedb Error Code: 0    at
org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:324)
    at
org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:319)
    at
org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:138)
    at
org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)
    at
org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:582)
    at
org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:206)
    at
org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:472)
    ... 47 more Caused by: java.sql.SQLException: No suitable driver
found for jdbc:mysql://localhost:3306/mazedb    at
java.sql.DriverManager.getConnection(DriverManager.java:602)    at
java.sql.DriverManager.getConnection(DriverManager.java:154)    at
org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:98)
    ... 51 more

INFO: Exit : invoke_application 5 WARNING: StandardWrapperValve[Faces
Servlet]: PWC1406: Servlet.service() for servlet Faces Servlet threw
exception javax.faces.el.EvaluationException:
javax.persistence.PersistenceException: Exception [EclipseLink-4002]
(Eclipse Persistence Services - 2.3.0.v20110604-r9504):
org.eclipse.persistence.exceptions.DatabaseException Internal
Exception: java.sql.SQLException: No suitable driver found for
jdbc:mysql://localhost:3306/mazedb Error Code: 0    at
javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102)
    at
com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
    at javax.faces.component.UICommand.broadcast(UICommand.java:315)    at
javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)
    at
javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)
    at
com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)    at
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)   at
org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1539)
    at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281)
    at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
    at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)   at
com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
    at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
    at
org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:330)
    at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
    at
com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:174)
    at
com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:828)
    at
com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:725)
    at
com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1019)
    at
com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
    at
com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
    at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
    at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
    at
com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
    at
com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
    at
com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
    at com.sun.grizzly.ContextTask.run(ContextTask.java:71)     at
com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
    at
com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
    at java.lang.Thread.run(Thread.java:662) Caused by:
javax.persistence.PersistenceException: Exception [EclipseLink-4002]
(Eclipse Persistence Services - 2.3.0.v20110604-r9504):
org.eclipse.persistence.exceptions.DatabaseException Internal
Exception: java.sql.SQLException: No suitable driver found for
jdbc:mysql://localhost:3306/mazedb Error Code: 0    at
org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:501)
    at
org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getDatabaseSession(EntityManagerFactoryDelegate.java:188)
    at
org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:277)
    at
org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:290)
    at
org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:268)
    at
com.maze.service.AccountService.validateLogin(AccountService.java:18)
    at
com.maze.controller.AccountController.performLogin(AccountController.java:31)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)     at
com.sun.el.parser.AstValue.invoke(AstValue.java:234)    at
com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:297)
    at
com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
    at
javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
    ... 33 more Caused by: Exception [EclipseLink-4002] (Eclipse
Persistence Services - 2.3.0.v20110604-r9504):
org.eclipse.persistence.exceptions.DatabaseException Internal
Exception: java.sql.SQLException: No suitable driver found for
jdbc:mysql://localhost:3306/mazedb Error Code: 0    at
org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:324)
    at
org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:319)
    at
org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:138)
    at
org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)
    at
org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:582)
    at
org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:206)
    at
org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:472)
    ... 47 more Caused by: java.sql.SQLException: No suitable driver
found for jdbc:mysql://localhost:3306/mazedb    at
java.sql.DriverManager.getConnection(DriverManager.java:602)    at
java.sql.DriverManager.getConnection(DriverManager.java:154)    at
org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:98)
    ... 51 more

persistence.xml

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
        xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">

    <persistence-unit name="Maze" transaction-type="RESOURCE_LOCAL">
        <properties>
            <property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/mazedb"/>
            <property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver"/>
            <property name="javax.persistence.jdbc.user" value="maze"/>
            <property name="javax.persistence.jdbc.password" value="maze"/>
        </properties>

    </persistence-unit>
</persistence>

The mysql connector is included in the build path

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T22:44:33+00:00Added an answer on May 27, 2026 at 10:44 pm

    No suitable driver found for jdbc:mysql://localhost:3306/mazedb

    This exception has basically 2 possible causes.

    1. The JDBC URL is wrong (basically, Driver#acceptsURL() has returned false for all of the JDBC drivers loaded so far).
    2. The JDBC driver is not loaded at all (so it’s either missing in the runtime classpath or there’s a typo in the JDBC driver class name).

    As far, the JDBC URL and driver class name looks right. So the driver is not in the runtime classpath at all.


    The mysql connector is included in the build path

    The JDBC driver needs to be present in the webapp’s runtime classpath. In case of a local persistence unit, the JDBC driver JAR file needs to be placed in /WEB-INF/lib folder.

    This exception indicates that this is not the case. Placing the JAR file in some random location and manually adding the file to the Build Path without specifying it in the Deployment Assembly can lead to this exception. This is not right. Just drop the JAR file in the /WEB-INF/lib folder, this way Eclipse will do all the necessary magic to set the things right without the need to touch anything in the project’s properties.


    Unrelated to the concrete problem, consider container managed transactions (set transaction type to JTA instead of resource local). It will greatly reduce boilerplate code in your EJBs to manage the transactions. You only need to create a container managed JNDI datasource and place the JDBC driver in server’s /lib instead.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am getting the error: java.sql.SQLException: No suitable driver I have imported the .jar
When trying to connect to mysql I always get this error: java.sql.SQLException: No suitable
I know that if the OpenGL implementation does not find a suitable driver it
Using Java, I get this error when attempting to connect to a mysql database:
I just installed VCSCommand and I'm getting an error of No suitable plugin whenever
I am trying to connect Java code to mySQL. Here is the error that
I have a Java class that accesses a MySQL database through JDBC that I
Error message: fatal: git checkout: updating paths is incompatible with switching branches/forcing How to
Error loading script occurs under FireFox 3 if I quickly click different links on
Error : Error 1 bin\Debug\Daemon.exe.manifest;bin\Release\Daemon.exe.manifest is an invalid value for the InputManifest parameter of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.