Я использую Spring4 Hibernate4 и проект на основе оракула.Но я получил это исключение и не мог найти решение?Я поделился сообщением об ошибке и контекстом приложения.javax.persistence.PersistenceContextType должно быть исключением jpa, я использую hibernate.где я делаю не так?Я могу обновить вопрос, если вам нужна более подробная информация.
вот сообщение об ошибке.
<03.Mar.2019 15:17:02,509 EET> <Notice> <JMX> <BEA-149535> <JMX Resiliency Activity Server=All Servers : Resolving connection list DomainRuntimeServiceMBean>
<03.Mar.2019 15:17:41,625 EET> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID "3446301195013" for task "2" on [partition-name: DOMAIN]. Error is: "weblogic.application.ModuleException: java.lang.IllegalArgumentException: No enum constant javax.persistence.PersistenceContextType.TRANSACTİON"
weblogic.application.ModuleException: java.lang.IllegalArgumentException: No enum constant javax.persistence.PersistenceContextType.TRANSACTİON
at weblogic.application.internal.ExtensibleModuleWrapper.activate(ExtensibleModuleWrapper.java:123)
at weblogic.application.internal.flow.ModuleListenerInvoker.activate(ModuleListenerInvoker.java:114)
at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:212)
at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:207)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:45)
Truncated. see log file for complete stacktrace
Caused By: java.lang.IllegalArgumentException: No enum constant javax.persistence.PersistenceContextType.TRANSACTİON
at java.lang.Enum.valueOf(Enum.java:238)
at javax.persistence.PersistenceContextType.valueOf(PersistenceContextType.java:1)
at weblogic.persistence.PersistenceEnvReference.getPersistenceManagerType(PersistenceEnvReference.java:72)
at weblogic.persistence.PersistenceEnvReference.<init>(PersistenceEnvReference.java:33)
at weblogic.application.naming.EnvironmentBuilder.bindPersistenceContextRefs(EnvironmentBuilder.java:1193)
Truncated. see log file for complete stacktrace
>
<03.Mar.2019 15:17:41,632 EET> <Error> <Deployer> <BEA-149202> <Encountered an exception while attempting to commit the 7 task for the application "_auto_generated_ear_" on [partition-name: DOMAIN].>
<03.Mar.2019 15:17:41,640 EET> <Warning> <Deployer> <BEA-149004> <Failures were detected while initiating start task for application "_auto_generated_ear_".>
<03.Mar.2019 15:17:41,641 EET> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
weblogic.application.ModuleException: java.lang.IllegalArgumentException: No enum constant javax.persistence.PersistenceContextType.TRANSACTİON
at weblogic.application.internal.ExtensibleModuleWrapper.activate(ExtensibleModuleWrapper.java:123)
at weblogic.application.internal.flow.ModuleListenerInvoker.activate(ModuleListenerInvoker.java:114)
at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:212)
at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:207)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:45)
Truncated. see log file for complete stacktrace
Caused By: java.lang.IllegalArgumentException: No enum constant javax.persistence.PersistenceContextType.TRANSACTİON
at java.lang.Enum.valueOf(Enum.java:238)
at javax.persistence.PersistenceContextType.valueOf(PersistenceContextType.java:1)
at weblogic.persistence.PersistenceEnvReference.getPersistenceManagerType(PersistenceEnvReference.java:72)
at weblogic.persistence.PersistenceEnvReference.<init>(PersistenceEnvReference.java:33)
at weblogic.application.naming.EnvironmentBuilder.bindPersistenceContextRefs(EnvironmentBuilder.java:1193)
Truncated. see log file for complete stacktrace
>
вот application.context
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.2.xsd">
<!-- Enable Spring Annotation Configuration -->
<context:annotation-config />
<!-- Scan for all of Spring components such as Spring Service -->
<context:component-scan base-package="com.namvertech.atasis.service.impl"></context:component-scan>
<!-- Create Data Source bean -->
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
<property name="driverClassName" value="oracle.jdbc.OracleDriver" />
<property name="url" value="jdbc:oracle:thin:@//localhost:1521/ORACLE"/>
<property name="username" value="atasis" />
<property name="password" value="gtveren45" />
</bean>
<!-- Define SessionFactory bean -->
<bean id="sessionFactory"
class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="mappingResources">
<list>
<value>domain-classes.hbm.xml</value>
</list>
</property>
<property name="configLocation">
<value>classpath:hibernate.cfg.xml</value>
</property>
</bean>
<!-- Transaction Manager -->
<bean id="transactionManager"
class="org.springframework.orm.hibernate4.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory" />
</bean>
<!-- Detect @Transactional Annotation -->
<tx:annotation-driven transaction-manager="transactionManager" />
</beans>
спасибо