I am trying to connect to an oracle DB with myBatis and it gives me the following error:
GRAVE: ERROR.nested exception is org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: Cannot create JDBC driver of class '' for connect URL 'null'
### The error may exist in com/iberdrola/persistence/dao/BusquedaDao.java (best guess)
### The error may involve com.iberdrola.persistence.dao.BusquedaDao.getResultadosBusqueda
### The error occurred while executing a query
### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: Cannot create JDBC driver of class '' for connect URL 'null'
I have the DB configuration in the tomcat server.xml
<Resource auth="Container" driverClassName="oracle.jdbc.driver.OracleDriver" maxIdle="1" maxTotal="20" maxWaitMillis="-1" name="jdbc/nombreBD" password="pass" removeAbandonedOnBorrow="true" removeAbandonedTimeout="60" type="javax.sql.DataSource" url="jdbc:oracle:thin:@//IP:PUERTO/AWDD" username="user"/>
I don't understand why it tells me that class is equal to "" and url 'null' when it looks like, if I have those configurations added.
I don't know what I might be missing or what I might be doing wrong.
Any missing info, I add it without problems.
Thanks in advance.
I have achieved it!
I have added the resource that I had in server.xml to the META-INF/context.xml file and I have also added the ojdbc7.jar connector in the local path of tomcat / lib