Обновление Jboss eap 6.4 до версии 7.2. Ошибка развертывания
{"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"WLS_DOM_SPS.ear\".FIRST_MODULE_USE" => "WFLYSRV0153: Failed to process phase FIRST_MODULE_USE of deployment \"WLS_DOM_SPS.ear\"
Caused by: java.util.ServiceConfigurationError: javax.persistence.spi.PersistenceProvider: Provider org.eclipse.persistence.jpa.PersistenceProvider not a subtype"}}
config модуля связи eclipse:
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.1" name="org.eclipse.persistence">
<resources>
<resource-root path="javax.persistence_1.1.0.0_2-0.jar"/>
<resource-root path="eclipselink-2.1.2_TMSModified1.jar">
<filter>
<exclude path="javax/**" />
</filter>
</resource-root>
</resources>
<dependencies>
<module name="asm.asm"/>
<module name="javax.api"/>
<module name="javax.annotation.api"/>
<module name="javax.enterprise.api"/>
<module name="javax.persistence.api"/>
<module name="javax.transaction.api"/>
<module name="javax.validation.api"/>
<module name="javax.xml.bind.api"/>
<module name="org.antlr"/>
<module name="org.apache.commons.collections"/>
<module name="org.dom4j"/>
<module name="org.javassist"/>
<module name="org.jboss.as.jpa.spi"/>
<module name="org.jboss.logging"/>
<module name="org.jboss.vfs"/>
</dependencies>
</module>
jboss eap 6.4 может успешно развернуться. Не знаю, где проблема.
javax.persistence.jar-javax.persistence.spi.PersistenceProvider
package javax.persistence.spi;
import java.util.Map;
import javax.persistence.EntityManagerFactory;
public interface PersistenceProvider {
EntityManagerFactory createEntityManagerFactory(String var1, Map var2);
EntityManagerFactory createContainerEntityManagerFactory(PersistenceUnitInfo var1, Map var2);
ProviderUtil getProviderUtil();
}
eclipselink-org.eclipse.persistence.jpa.PersistenceProvider
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package org.eclipse.persistence.jpa;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import javax.persistence.EntityManagerFactory;
import javax.persistence.spi.ClassTransformer;
import javax.persistence.spi.LoadState;
import javax.persistence.spi.PersistenceUnitInfo;
import javax.persistence.spi.ProviderUtil;
import org.eclipse.persistence.exceptions.PersistenceUnitLoadingException;
import org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl;
import org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider;
import org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl;
import org.eclipse.persistence.internal.jpa.deployment.JPAInitializer;
import org.eclipse.persistence.internal.jpa.deployment.PersistenceInitializationHelper;
import org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor;
import org.eclipse.persistence.internal.jpa.deployment.SEPersistenceUnitInfo;
import org.eclipse.persistence.internal.weaving.PersistenceWeaved;
public class PersistenceProvider implements javax.persistence.spi.PersistenceProvider, ProviderUtil {
protected PersistenceInitializationHelper initializationHelper = null;
public PersistenceProvider() {
this.initializationHelper = new PersistenceInitializationHelper();
}
public EntityManagerFactory createEntityManagerFactory(String emName, Map properties) {
ClassLoader classloader = this.initializationHelper.getClassLoader(emName, properties);
return this.createEntityManagerFactory(emName, properties, classloader);
}
protected EntityManagerFactory createEntityManagerFactory(String emName, Map properties, ClassLoader classLoader) {
Map nonNullProperties = properties == null ? new HashMap() : properties;
String name = emName;
if (emName == null) {
name = "";
}
JPAInitializer initializer = this.initializationHelper.getInitializer(classLoader, (Map)nonNullProperties);
EntityManagerSetupImpl emSetupImpl = null;
boolean isNew = false;
String uniqueName;
String sessionName;
SEPersistenceUnitInfo factory;
try {
factory = initializer.findPersistenceUnitInfo(name, (Map)nonNullProperties, this.initializationHelper);
if (factory == null) {
return null;
}
if (initializer.isPersistenceUnitUniquelyDefinedByName()) {
uniqueName = name;
} else {
uniqueName = initializer.createUniquePersistenceUnitName(factory);
}
sessionName = EntityManagerSetupImpl.getOrBuildSessionName((Map)nonNullProperties, factory, uniqueName);
synchronized(EntityManagerFactoryProvider.emSetupImpls) {
emSetupImpl = EntityManagerFactoryProvider.getEntityManagerSetupImpl(sessionName);
if (emSetupImpl == null) {
if (EntityManagerFactoryProvider.initialEmSetupImpls != null) {
emSetupImpl = (EntityManagerSetupImpl)EntityManagerFactoryProvider.initialEmSetupImpls.remove(uniqueName);
if (emSetupImpl != null) {
emSetupImpl.changeSessionName(sessionName);
factory.setClassLoader(classLoader);
}
}
if (emSetupImpl == null) {
emSetupImpl = initializer.callPredeploy(factory, (Map)nonNullProperties, this.initializationHelper, uniqueName, sessionName);
}
emSetupImpl.predeploy(emSetupImpl.getPersistenceUnitInfo(), (Map)nonNullProperties);
EntityManagerFactoryProvider.addEntityManagerSetupImpl(sessionName, emSetupImpl);
isNew = true;
}
}
} catch (Exception var18) {
throw PersistenceUnitLoadingException.exceptionSearchingForPersistenceResources(classLoader, var18);
}
if (!isNew) {
if (!uniqueName.equals(emSetupImpl.getPersistenceUnitUniqueName())) {
throw PersistenceUnitLoadingException.sessionNameAlreadyInUse(sessionName, uniqueName, emSetupImpl.getPersistenceUnitUniqueName());
}
boolean undeployed = false;
synchronized(emSetupImpl) {
if (emSetupImpl.isUndeployed()) {
undeployed = true;
}
emSetupImpl.predeploy(emSetupImpl.getPersistenceUnitInfo(), (Map)nonNullProperties);
}
if (undeployed) {
return this.createEntityManagerFactory(emName, properties, classLoader);
}
}
factory = null;
try {
EntityManagerFactoryImpl factory = new EntityManagerFactoryImpl(emSetupImpl, (Map)nonNullProperties);
if (emSetupImpl.shouldGetSessionOnCreateFactory((Map)nonNullProperties)) {
factory.getServerSession();
}
return factory;
} catch (RuntimeException var15) {
if (factory != null) {
factory.close();
} else {
emSetupImpl.undeploy();
}
throw var15;
}
}
public EntityManagerFactory createContainerEntityManagerFactory(PersistenceUnitInfo info, Map properties) {
Map nonNullProperties = properties == null ? new HashMap() : properties;
EntityManagerSetupImpl emSetupImpl = null;
boolean isNew = false;
ClassTransformer transformer = null;
String uniqueName = PersistenceUnitProcessor.buildPersistenceUnitName(info.getPersistenceUnitRootUrl(), info.getPersistenceUnitName());
String sessionName = EntityManagerSetupImpl.getOrBuildSessionName((Map)nonNullProperties, info, uniqueName);
synchronized(EntityManagerFactoryProvider.emSetupImpls) {
emSetupImpl = EntityManagerFactoryProvider.getEntityManagerSetupImpl(sessionName);
if (emSetupImpl == null) {
emSetupImpl = new EntityManagerSetupImpl(uniqueName, sessionName);
isNew = true;
emSetupImpl.setIsInContainerMode(true);
transformer = emSetupImpl.predeploy(info, (Map)nonNullProperties);
EntityManagerFactoryProvider.addEntityManagerSetupImpl(sessionName, emSetupImpl);
}
}
if (!isNew) {
if (!uniqueName.equals(emSetupImpl.getPersistenceUnitUniqueName())) {
throw PersistenceUnitLoadingException.sessionNameAlreadyInUse(sessionName, uniqueName, emSetupImpl.getPersistenceUnitUniqueName());
}
boolean undeployed = false;
synchronized(emSetupImpl) {
if (emSetupImpl.isUndeployed()) {
undeployed = true;
}
transformer = emSetupImpl.predeploy(emSetupImpl.getPersistenceUnitInfo(), (Map)nonNullProperties);
}
if (undeployed) {
return this.createContainerEntityManagerFactory(info, properties);
}
}
if (transformer != null) {
info.addTransformer(transformer);
}
EntityManagerFactoryImpl factory = new EntityManagerFactoryImpl(emSetupImpl, (Map)nonNullProperties);
if (emSetupImpl.shouldGetSessionOnCreateFactory((Map)nonNullProperties)) {
factory.getServerSession();
}
return factory;
}
public ProviderUtil getProviderUtil() {
return this;
}
public LoadState isLoadedWithoutReference(Object entity, String attributeName) {
return entity instanceof PersistenceWeaved ? this.isLoadedWithReference(entity, attributeName) : LoadState.UNKNOWN;
}
public LoadState isLoadedWithReference(Object entity, String attributeName) {
Iterator setups = EntityManagerFactoryProvider.getEmSetupImpls().values().iterator();
while(setups.hasNext()) {
EntityManagerSetupImpl setup = (EntityManagerSetupImpl)setups.next();
if (setup.isDeployed()) {
Boolean isLoaded = EntityManagerFactoryImpl.isLoaded(entity, setup.getSession());
if (isLoaded != null) {
if (isLoaded && attributeName != null) {
isLoaded = EntityManagerFactoryImpl.isLoaded(entity, attributeName, setup.getSession());
}
if (isLoaded != null) {
return isLoaded ? LoadState.LOADED : LoadState.NOT_LOADED;
}
}
}
}
return LoadState.UNKNOWN;
}
public LoadState isLoaded(Object entity) {
return entity instanceof PersistenceWeaved ? this.isLoadedWithReference(entity, (String)null) : LoadState.UNKNOWN;
}
}
Выше представлен интерфейс и реализация PersistenceProvider. Не вижу никакого несоответствия