[SPRING] java.lang.NoSuchMethodError : javax / persistence / spi / PersistenceUnitInfo.getValidationMode () Ljavax / persistence / ValidationMode
SPRINGjava.lang.NoSuchMethodError : javax / persistence / spi / PersistenceUnitInfo.getValidationMode () Ljavax / persistence / ValidationMode
Weblogic에서 war 파일 (Tomcat에서 잘 작동하고 있음)을 배포 할 때 오류가 계속 발생합니다.
내 기술은 봄 3 hibernatejpawebservice (메트로) 내 라이브러리
내 오류는
#### > (BasePersistenceUnitInfoImpl.java:158) at weblogic.deployment.PersistenceUnitInfoImpl.(PersistenceUnitInfoImpl.java:39) at weblogic.deployment.AbstractPersistenceUnitRegistry.storeDescriptors(AbstractPersistenceUnitRegistry.java:349) at weblogic.deployment.AbstractPersistenceUnitRegistry.loadPersistenceDescriptors(AbstractPersistenceUnitRegistry.java:124) at weblogic.deployment.ModulePersistenceUnitRegistry.(ModulePersistenceUnitRegistry.java:58) at weblogic.servlet.internal.WebAppModule.setupPersistenceUnitRegistry(WebAppModule.java:1790) at weblogic.servlet.internal.WebAppServletContext.initClassLoader(WebAppServletContext.java:3028) at weblogic.servlet.internal.WebAppServletContext.(WebAppServletContext.java:447) at weblogic.servlet.internal.WebAppServletContext.(WebAppServletContext.java:493) at weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:418) at weblogic.servlet.internal.WebAppModule.registerWebApp(WebAppModule.java:972) at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:382) at weblogic.application.internal.flow.ScopedModuleDriver.prepare(ScopedModuleDriver.java:176) at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199) at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:517) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52) at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:159) at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:45) at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:613) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52) at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:184) at weblogic.application.internal.SingleModuleDeployment.prepare(SingleModuleDeployment.java:43) at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:154) at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:60) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:207) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:98) at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217) at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:747) at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1216) at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:250) at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:159) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:171) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:13) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:46) at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209) at weblogic.work.ExecuteThread.run(ExecuteThread.java:178) Caused By: java.lang.NoSuchMethodError: javax/persistence/spi/PersistenceUnitInfo.getValidationMode()Ljavax/persistence/ValidationMode; at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:621) at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73) at weblogic.deployment.BasePersistenceUnitInfoImpl.initializeEntityManagerFactory(BasePersistenceUnitInfoImpl.java:393) at weblogic.deployment.BasePersistenceUnitInfoImpl.initializeEntityManagerFactory(BasePersistenceUnitInfoImpl.java:386) at weblogic.deployment.BasePersistenceUnitInfoImpl.(BasePersistenceUnitInfoImpl.java:158) at weblogic.deployment.PersistenceUnitInfoImpl.(PersistenceUnitInfoImpl.java:39) at weblogic.deployment.AbstractPersistenceUnitRegistry.storeDescriptors(AbstractPersistenceUnitRegistry.java:349) at weblogic.deployment.AbstractPersistenceUnitRegistry.loadPersistenceDescriptors(AbstractPersistenceUnitRegistry.java:124) at weblogic.deployment.ModulePersistenceUnitRegistry.(ModulePersistenceUnitRegistry.java:58) at weblogic.servlet.internal.WebAppModule.setupPersistenceUnitRegistry(WebAppModule.java:1790) at weblogic.servlet.internal.WebAppServletContext.initClassLoader(WebAppServletContext.java:3028) at weblogic.servlet.internal.WebAppServletContext.(WebAppServletContext.java:447) at weblogic.servlet.internal.WebAppServletContext.(WebAppServletContext.java:493) at weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:418) at weblogic.servlet.internal.WebAppModule.registerWebApp(WebAppModule.java:972) at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:382) at weblogic.application.internal.flow.ScopedModuleDriver.prepare(ScopedModuleDriver.java:176) at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199) at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:517) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52) at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:159) at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:45) at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:613) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52) at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:184) at weblogic.application.internal.SingleModuleDeployment.prepare(SingleModuleDeployment.java:43) at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:154) at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:60) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:207) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:98) at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217) at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:747) at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1216) at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:250) at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:159) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:171) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:13) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:46) at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209) at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
아무도 몰라?
(weblogic 11g에 배포하는 동안 오류 발생) 1) 오류가 무엇입니까? 2)이 오류의 원인은 무엇입니까? 3) jar 파일이 필요한 war 파일. 받아들이지 않니? 4) 그것은 모든 항아리 갈등입니까?
해결법
-
==============================
1.weblogic.xml 파일에 다음을 추가하십시오.
weblogic.xml 파일에 다음을 추가하십시오.
<?xml version="1.0" encoding="UTF-8"?> <weblogic-web-app ...> ... <container-descriptor> <prefer-application-packages> <package-name>antlr.*</package-name> <package-name>org.hibernate.*</package-name> <package-name>javax.persistence.*</package-name> </prefer-application-packages> </container-descriptor> </weblogic-web-app>
나는
true prefer-web-inf-classes>를 사용해 보았습니다. 운이 없었습니다. 저는 Weblogic 11g (10.3.6), Hibernate 4.1.9 및 Spring 3.2.1을 사용하고 있습니다. 이것으로 끈기는 매력처럼 작동합니다! 여기 소스.
-
==============================
2.web-inf에 weblogic.xml 파일을 추가하고 다음을 배치합니다.
web-inf에 weblogic.xml 파일을 추가하고 다음을 배치합니다.
<?xml version="1.0" encoding="UTF-8"?> <weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/weblogic-web-app"> <container-descriptor> <prefer-web-inf-classes>true</prefer-web-inf-classes> </container-descriptor> </weblogic-web-app>`
-
==============================
3.또한 포함하는 종속성이 프로젝트와의 호환되지 않는 종속성에 따라 달라질 수 있음을 의미 할 수도 있습니다. 예를 들면 .. Maven에서 "exclusions"태그를 사용하면 다음과 같은 방법으로 전쟁에 문제가되는 의존성을 해결할 수 있습니다.
또한 포함하는 종속성이 프로젝트와의 호환되지 않는 종속성에 따라 달라질 수 있음을 의미 할 수도 있습니다. 예를 들면 .. Maven에서 "exclusions"태그를 사용하면 다음과 같은 방법으로 전쟁에 문제가되는 의존성을 해결할 수 있습니다.
<dependency> <groupId>com.ibm.websphere</groupId> <artifactId>wxsutils</artifactId> <version>2.5.4-SNAPSHOT</version> <exclusions> <exclusion> <groupId>org.apache.geronimo.specs</groupId> <artifactId>geronimo-jpa_3.0_spec</artifactId> </exclusion> </exclusions> </dependency>
from https://stackoverflow.com/questions/7990633/java-lang-nosuchmethoderror-javax-persistence-spi-persistenceunitinfo-getvalida by cc-by-sa and MIT license
'SPRING' 카테고리의 다른 글
[SPRING] 네트워크 프록시 뒤의 Spring-Boot (0) | 2019.02.19 |
---|---|
[SPRING] Spring 트랜잭션 : Exception 또는 Throwable에 대한 롤백 (0) | 2019.02.19 |
[SPRING] 봄, POST를 사용하여 외부 URL로 리디렉션 (0) | 2019.02.19 |
[SPRING] 정적 컨텐츠를 제공하는 Tomcat (0) | 2019.02.19 |
[SPRING] Spring 컨텍스트에 커스텀 빈을 추가한다. (0) | 2019.02.19 |