LoginSignup
0
0

More than 5 years have passed since last update.

VSCodeにてSpringBootプロジェクト作成した時に遭遇したエラーの対象方法まとめ

Last updated at Posted at 2018-10-24

VSCodeの問題というより、SpringBootプロジェクト作成時に遭遇したエラーというべき内容です。ご了承下さい。

プロジェクト作成

VSCode の Spring Initializr でプロジェクトを作成

Dependencies
- Lombok
- JPA
- PostgreSQL

遭遇したエラー

mvn clean package 実行で2つのエラーが発生。

①entityManagerFactory

コンフィグクラスが必要なの感じのエラー

Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class]: Invocation of init method failed

対処方法

pom.xml の <dependencies> に次を追加。

<!-- https://mvnrepository.com/artifact/javax.xml.bind/jaxb-api -->
<dependency>
    <groupId>javax.xml.bind</groupId>
    <artifactId>jaxb-api</artifactId>
    <version>2.3.1</version>
</dependency>

②PgConnection.createClob() メソッドはまだ実装されていません。

見覚えのあるエラーです。

Caused by: java.sql.SQLFeatureNotSupportedException: org.postgresql.jdbc.PgConnection.createClob() メソッドはまだ実装されていません

対処方法

hibernate.properties に以下の定義を追加。

hibernate.jdbc.lob.non_contextual_creation = true

参考サイト

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0