[
https://issues.jboss.org/browse/WFCORE-209?page=com.atlassian.jira.plugin...
]
Antoine Rey commented on WFCORE-209:
------------------------------------
I've got the same Issue with JBoss 6.4 EAP.
The workarround 1 works fine but this is non-portable.
The workarround 2 works with WAR but not EAR. Do you have any idea?
do not export api if excluded within jboss-deployment-structure.xml
-------------------------------------------------------------------
Key: WFCORE-209
URL:
https://issues.jboss.org/browse/WFCORE-209
Project: WildFly Core
Issue Type: Bug
Components: Server
Environment: JBoss EAP 6.3 + Spring 3.2.11.RELEASE
Reporter: Mathieu Lachance
I'm currently trying to upgrade JPA 2.0 to JPA 2.1 in JBoss EAP 6.3 by leveraging the
jboss-deployment-structure.xml:
{code:xml}
<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure>
<deployment>
<exclude-subsystems>
<subsystem name="jpa" />
<subsystem name="webservices" />
<subsystem name="weld" />
</exclude-subsystems>
<exclusions>
<module name="javax.persistence.api" />
<module name="org.hibernate" />
</exclusions>
</deployment>
</jboss-deployment-structure>
{code}
When trying to deploy my war (containing all hibernate 4.3.6 jars) I get the following
error:
{quote}
Caused by: java.lang.NoSuchMethodError:
javax.persistence.Table.indexes()[Ljavax/persistence/Index;
at
org.hibernate.cfg.annotations.EntityBinder.processComplementaryTableDefinitions(EntityBinder.java:936)
[hibernate-core-4.3.6.Final.jar:4.3.6.Final]
at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:824)
[hibernate-core-4.3.6.Final.jar:4.3.6.Final]
at
org.hibernate.cfg.Configuration$MetadataSourceQueue.processAnnotatedClassesQueue(Configuration.java:3788)
[hibernate-core-4.3.6.Final.jar:4.3.6.Final]
at
org.hibernate.cfg.Configuration$MetadataSourceQueue.processMetadata(Configuration.java:3742)
[hibernate-core-4.3.6.Final.jar:4.3.6.Final]
at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1410)
[hibernate-core-4.3.6.Final.jar:4.3.6.Final]
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1844)
[hibernate-core-4.3.6.Final.jar:4.3.6.Final]
at
org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:850)
[hibernate-entitymanager-4.3.6.Final.jar:4.3.6.Final]
at
org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:843)
[hibernate-entitymanager-4.3.6.Final.jar:4.3.6.Final]
at
org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:398)
[hibernate-core-4.3.6.Final.jar:4.3.6.Final]
at
org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:842)
[hibernate-entitymanager-4.3.6.Final.jar:4.3.6.Final]
at
org.hibernate.jpa.HibernatePersistenceProvider.createContainerEntityManagerFactory(HibernatePersistenceProvider.java:152)
[hibernate-entitymanager-4.3.6.Final.jar:4.3.6.Final]
at
org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:290)
[spring-orm-3.2.11.RELEASE.jar:3.2.11.RELEASE]
at
org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:310)
[spring-orm-3.2.11.RELEASE.jar:3.2.11.RELEASE]
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1573)
[spring-beans-3.2.11.RELEASE.jar:3.2.11.RELEASE]
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1511)
[spring-beans-3.2.11.RELEASE.jar:3.2.11.RELEASE]
... 23 more
{quote}
{{Index}} was introduced with JPA 2.1 and even though:
1. my application bundle the correct JPA jar
2. my application excluded the javax.persistence.api
3. my application excluded the jpa subsystem
I get a conflict.
The only way I made it possible to upgrade the JPA version was to explicitely state to
not export the javax.persistence.api (see workaround). This way of doing thing though is
not portable (as it impacts all other war deployed in the JBoss server) and is critical in
our situation.
The issue might/is probably not be related to jboss-modules component but I was not able
to find within the jboss sources the explicit line of code responsible of reading the
jboss-deployment-structure.xml.
If you can point me out the correct component it will be a pleasure to help resolve the
issue.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)