質問編集履歴
2
修正
title
CHANGED
|
File without changes
|
body
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
25
25
|
<persistence version="2.1"
|
|
26
26
|
xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
27
|
-
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence
|
|
27
|
+
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
|
|
28
28
|
<persistence-unit name="persistenceUnit"
|
|
29
29
|
transaction-type="RESOURCE_LOCAL">
|
|
30
30
|
<provider>org.hibernate.ejb.HibernatePersistence</provider>
|
1
修正
title
CHANGED
|
File without changes
|
body
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
STS4でサーバー実行した時に下記のエラーが出ました。
|
|
2
|
+
|
|
2
3
|
```コンソール
|
|
3
4
|
javax.persistence.PersistenceException: Unable to build entity manager factory
|
|
4
5
|
at org.hibernate.jpa.HibernatePersistenceProvider.createEntityManagerFactory(HibernatePersistenceProvider.java:83)
|
|
@@ -15,4 +16,29 @@
|
|
|
15
16
|
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
|
|
16
17
|
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
|
|
17
18
|
at java.lang.Thread.run(Unknown Source)
|
|
18
|
-
```
|
|
19
|
+
```
|
|
20
|
+
実行した時だけにエラーが出ていて、実行していないときは問題にエラーは出ていません。
|
|
21
|
+
|
|
22
|
+
自分で探してみてpersistence.xmlに原因があると思って下記の記述にしてみましたがそれでも解決しませんでした。
|
|
23
|
+
```persistence.xml
|
|
24
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
25
|
+
<persistence version="2.1"
|
|
26
|
+
xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
27
|
+
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
|
|
28
|
+
<persistence-unit name="persistenceUnit"
|
|
29
|
+
transaction-type="RESOURCE_LOCAL">
|
|
30
|
+
<provider>org.hibernate.ejb.HibernatePersistence</provider>
|
|
31
|
+
<properties>
|
|
32
|
+
<property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect" />
|
|
33
|
+
<property name="javax.persistence.jdbc.driver" value="oracle.jdbc.OracleDriver" />
|
|
34
|
+
<property name="javax.persistence.ユーアールエル" value="jdbc:oracle:thin:接続詳細" />
|
|
35
|
+
<property name="名前" value="ユーザー名" />
|
|
36
|
+
<property name="javax.persistence.jdbc.password" value="パスワード" />
|
|
37
|
+
</properties>
|
|
38
|
+
</persistence-unit>
|
|
39
|
+
</persistence>
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
データベースのログイン情報はあえて変更しています。
|
|
43
|
+
|
|
44
|
+
javax.persistence.PersistenceException: Unable to build entity manager factoryのエラーの意味、または原因について教えていただけますか?
|