Configuration error. Class [com.mysql.jdbc.Driver] not found

2

I have the following problem I hope you can help me. I am working with Wild Hat from Red Hat, although I have already tried it on other servers such as Apache and Galssfish. already add certain jar's to the servers and nothing, believe datasorces and neither. Thank you very much for your help.

  

Context Path:   / agendaweb

     

Servlet Path:   / webresources

     

Path Info:   / contact

     

Query String:   null

     

Stack Trace   org.jboss.resteasy.spi.UnhandledException: javax.ejb.EJBException: javax.persistence.PersistenceException: Exception [EclipseLink-4003] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions. DatabaseException Exception Description: Configuration error. Class [com.mysql.jdbc.Driver] not found.   org.jboss.resteasy.core.ExceptionHandler.handleApplicationException (ExceptionHandler.java:77)   org.jboss.resteasy.core.ExceptionHandler.handleException (ExceptionHandler.java:220)   org.jboss.resteasy.core.SynchronousDispatcher.writeException (SynchronousDispatcher.java:175)   org.jboss.resteasy.core.SynchronousDispatcher.invoke (SynchronousDispatcher.java:418)   org.jboss.resteasy.core.SynchronousDispatcher.invoke (SynchronousDispatcher.java:209)

My POM.XML file

    <dependency>
        <groupId>org.eclipse.persistence</groupId>
        <artifactId>eclipselink</artifactId>
        <version>2.5.2</version>
    </dependency>
    <dependency>
        <groupId>org.eclipse.persistence</groupId>
    <artifactId>org.eclipse.persistence.jpa.modelgen.processor</artifactId>
        <version>2.5.2</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>javax</groupId>
        <artifactId>javaee-web-api</artifactId>
        <version>7.0</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
        <version>5.1.6</version>
    </dependency>
</dependencies>

My ApplicationConfig class

  

@ javax.ws.rs.ApplicationPath ("webresources")   public class ApplicationConfig extends Application {

     

@Override      Public Set > getClasses () {           Set > resources = new java.util.HashSet < > ();          addRestResourceClasses (resources);          return resources;      }      private void addRestResourceClasses (Set & resources) {

     
    

resources.add (com.mycompany.agendaweb.services.ContactoFacadeREST.class);        }

  
     

}

If you need more information, I'll give it to you.

Thank you very much.

    
asked by Ismael Flores 05.05.2017 в 19:11
source

1 answer

1

The problem you indicate:

  

Exception Description: Configuration error. Class   [com.mysql.jdbc.Driver] not found.

may arise because your folder WEB-INF/lib can not find that library, try that and tell us

Greetings

    
answered by 05.05.2017 / 19:40
source