I have a RESTful service created in Netbeans that connects to a remote mysql database. In local the service works well, but when I deploy it to the remote Glassfish server I get this error:
> Error occurred during deployment: Exception while deploying the app
> [JerseyRESTfulService] : Exception [EclipseLink-4002] (Eclipse
> Persistence Services - 2.6.1.v20150605-31e8258):
> org.eclipse.persistence.exceptions.DatabaseException Internal
> Exception: java.sql.SQLException: Error in allocating a connection.
> Cause: Class name is wrong or classpath is not set for :
> com.mysql.jdbc.jdbc2.optional.MysqlDataSource Error Code: 0. Please
> see server.log for more details.
The name of the class or classpath that says it is wrong, is put by Netbeans automatically when the service is generated. To which it refers? How could I solve it? I do not really know what value I should have. It is in the glassfish-resources.xml
. Thanks.