cost 280 ms
Spring 數據 3.0.0 錯誤在設置 bean 屬性“entityManager”時無法解析對 bean“jpaSharedEM_entityManagerFactory”的引用

[英]Spring data 3.0.0 error Cannot resolve reference to bean 'jpaSharedEM_entityManagerFactory' while setting bean property 'entityManager'

正在進行從 2.x 到版本 3.0.1 的 Spring 引導遷移,其中包括 spring-jpa 3.0.0 我的項目有 2 個不同的數據源,在以前的版本中運行良好。 升級到版本 3 后,我的應用程序不再以設置 bean 屬性“entityManager”時無法解析對 bean“jpaShared ...

調用 init 方法失敗;嵌套異常是 org.hibernate.AnnotationException:mappedBy 引用未知的目標實體屬性:

[英]Invocation of init method failed;nested exception is org.hibernate.AnnotationException: mappedBy reference an unknown target entity property:

我有一個錯誤。 這是我的錯誤: org.springframework.beans.factory.BeanCreationException:創建名為“entityManagerFactory”的 bean 在 class 路徑資源 [org/springframework/boot/auto ...

@Resource UserTransaction utx1 和@PersistenceContex 以編程方式在 java 應用程序服務器中

[英]@Resource UserTransaction utx1 and @PersistenceContex programmatically in java application server

我正在使用帶有多個 jdbc 連接池的 glassfish 服務器。 我希望每個 jdbc 連接都有 EntityManagerFactories。 使用代碼 工作正常,但我不能將它與 UserTransation 結合起來讓事務開始並提交、回滾。 此外,entityManager.getTrasn ...

如何使用相同的持久性單元使用 EntityManager 和 EntityManagerFactory 訪問具有相同實體的不同數據源

[英]How to use same Persistence Unit to access different datasources with the same entities using EntityManager and EntityManagerFactory

我目前正在使用 Java 17、Wildfly 25.0.1 和 JPA,超過 Hibernate 5.3。 我有一個應用程序使用映射的注釋和實體來訪問單個數據庫。 我正在使用帶有數據源的 PersistenceUnit,它工作正常。 我想要實現的是以編程方式選擇具有相同 PersistenceUn ...

EntityManagerFactory 正在初始化

[英]EntityManagerFactory is initialing

我不要使用 EJB/Spring 等。 只有 Jpa + Servlet。 我正在嘗試創建公共摘要 class AbstractEntityManagerFactory { 當我運行它時 它運作良好。 但是如果使用 TomCat 9.0.58 - 我得到一個錯誤: 我的堅持.xml 我怎樣才能解決這 ...

在沒有 @PersistenceContext 的 web 應用程序中使用 EntityManagerFactory 創建 EntityManager

[英]Creating EntityManager using EntityManagerFactory in web application without @PersistenceContext

我正在使用 JPA 創建一個 web 應用程序。 我已經用連接池 c3p0 配置了 Hibernate。 在我的情況下,無法使用 @PersistenceContext 注釋注入 EntityManager。 在 Java EE 文檔中,他們說使用 EntityManagerFactory 實例同 ...

BeanCreationException:創建名為“entityManagerFactory”的bean時出錯,並且SearchException:無法寫入索引目錄:

[英]BeanCreationException: Error creating bean with name 'entityManagerFactory' And SearchException: Cannot write into index directory:

我正在使用 Hibernate 搜索和 Spring 引導。 我使用 application.properties 文件中的以下屬性指定索引位置。 應用程序屬性 我遇到的問題是,當應用程序啟動時,索引是在指定位置創建的,但隨后加載失敗,堆棧跟蹤如下: pom.xml 請任何人幫助我並糾正我。 ...


 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM