[英]Unable to open JDBC Connection oracle and spring boot
Hello im using oracle database but i get some errors, with spring boot: the erors is:您好,我正在使用 oracle 数据库,但在 spring 启动时出现一些错误:错误是:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed;
org.springframework.beans.factory.BeanCreationException:在 class 路径资源 [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class] 中定义名称为“entityManagerFactory”的 bean 创建错误:调用 init 方法失败; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory;
嵌套异常是 javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.exception.JDBCConnectionException: Unable to open JDBC Connection for DDL execution
嵌套异常是 org.hibernate.exception.JDBCConnectionException: Unable to open JDBC Connection for DDL execution
my application properties is:我的应用程序属性是:
spring.jpa.database-platform=org.hibernate.dialect.Oracle10gDialect
spring.datasource.url= jdbc:oracle:thin:@localhost:1521:XE
spring.datasource.username=Sys
spring.datasource.password=admin
spring.datasource.driver-class-name=oracle.jdbc.driver.OracleDriver
spring.jpa.hibernate.ddl-auto=create
server.port = 8080
spring.jpa.show-sql=true
spring.servlet.multipart.max-file-size=-1
Which Java version you are using?您使用的是哪个 Java 版本? Can you check if you have added dependencies in your build file?
你能检查你是否在你的构建文件中添加了依赖项吗?
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.0</version>
</dependency>
Reference Link: https://www.baeldung.com/java-9-jaxbexception参考链接: https://www.baeldung.com/java-9-jaxbeexception
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.