I'm working on a web based application with Spring boot and Oracle 11g. The application is split to 4 Maven Modules which are:
Model - in which are declared all Entities. Persistence - in which i have Spring data's repositories. Domain - in which i have All services. Web - in which i have MVC.
So in my persistence project I have application.properties which looks like this:
spring.data.jpa.repositories.enabled=true
spring.jpa.database-platform=org.hibernate.dialect.Oracle10gDialect
spring.jpa.generate-ddl=true
spring.jpa.hibernate.ddl-auto=create
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.Oracle10gDialect
spring.datasource.url=jdbc:oracle:thin:@//localhost:1521/xe
spring.datasource.username=MOVIE_CATALOG
spring.datasource.password=MOVIE_CATALOG
spring.datasource.driver-class-name=oracle.jdbc.OracleDriver
If the database is created it works fine but if the database is not created and i expect Hibernate to do this for me I receive an exception like this:
Caused by: org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Cannot determine embedded database driver class for database type NONE. If you want an embedded database please put a supported one on the classpath. If you have database settings to be loaded from a particular profile you may need to active it (no profiles are currently active).
I find out that if I put database configuration in Web's application.properties the project work fine too but I don't want to do this.
Any ideas why this exception occurred?