Jpa 在以下场景中获取异常(缺少描述符/未找到密钥类的[EntityType])
获取异常缺少描述符/在以下场景中找不到密钥类的[EntityType] 启动weblogic服务器 部署战争 测试应用程序“n”次 从web逻辑管理控制台删除WAR 重新部署同一场战争 基本上,如果我们重新部署,我们将得到上述例外情况。如果重新启动服务器,此问题将得到解决 Persistence.xml 处理spring事务的Bean配置Jpa 在以下场景中获取异常(缺少描述符/未找到密钥类的[EntityType]),jpa,spring-data-jpa,weblogic,eclipselink,jta,Jpa,Spring Data Jpa,Weblogic,Eclipselink,Jta,获取异常缺少描述符/在以下场景中找不到密钥类的[EntityType] 启动weblogic服务器 部署战争 测试应用程序“n”次 从web逻辑管理控制台删除WAR 重新部署同一场战争 基本上,如果我们重新部署,我们将得到上述例外情况。如果重新启动服务器,此问题将得到解决 Persistence.xml 处理spring事务的Bean配置 由于ServerSession而引发此错误的WL服务器缓存在EntityManagerSetupImpl静态中,因此在重新部署之前,在createEntit
由于ServerSession而引发此错误的WL服务器缓存在EntityManagerSetupImpl静态中,因此在重新部署之前,在createEntityManagerFactory上,旧的会与旧的描述符/类一起使用 ** 我们设法获取EntityManagerFactory对象并关闭了它 在其中一个InitializerServlet中的destroy方法中
**您如何获得您的实体经理和工厂,更重要的是,您如何关闭他们?重新部署但旧工厂仍处于打开状态时会发生此错误,从而允许在当前应用程序中使用旧工厂及其类加载器。关闭旧工厂将允许为新应用程序创建新工厂。Chris,我们使用弹簧来处理EntityManager、工厂和事务。我们认为容器本身将打开、加载和关闭EM、工厂和事务,它们的任何配置是否涉及关闭旧工厂?Chris,上面附带的spring JTA配置,您能帮助我们解决问题吗。?
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<jta-data-source>DEV</jta-data-source>
<class>com.Class1</class>
<properties>
<property name="hibernate.show_sql" value="true"/>
<property name="eclipselink.allow-zero-id" value="true"/>
<property name="eclipselink.logging.level" value="FINE" />
<property name="eclipselink.logging.parameters" value="true" />
<property name="eclipselink.target-server" value="WebLogic"/>
<property name="javax.persistence.query.timeout" value="120000"/>
<property name="javax.persistence.lock.timeout" value="120000"/>
</properties>
</persistence-unit>
<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="persistenceXmlLocation" value="classpath*:META-INF/persistence.xml"/>
<property name="persistenceUnitManager" ref="persistenceUnitManager" />
</bean>
<bean id="persistenceUnitManager" class="org.springframework.orm.jpa.persistenceunit.DefaultPersistenceUnitManager">
<property name="persistenceXmlLocations">
<list>
<value>classpath*:META-INF/persistence.xml</value>
</list>
</property>
<property name="loadTimeWeaver" ref="loadTimeWeaver"/>
</bean>
<bean id="loadTimeWeaver" class="org.springframework.instrument.classloading.weblogic.WebLogicLoadTimeWeaver"/>
<bean id="em" class="org.springframework.orm.jpa.support.SharedEntityManagerBean">
<property name="entityManagerFactory" ref="entityManagerFactory"/>
</bean>