]
Tomaz Cerar commented on WFLY-1406:
-----------------------------------
Is this still an issue or can be closed?
Hibernate cannot process package-info.java any more
---------------------------------------------------
Key: WFLY-1406
URL:
https://issues.jboss.org/browse/WFLY-1406
Project: WildFly
Issue Type: Feature Request
Components: JPA / Hibernate
Affects Versions: 8.0.0.Alpha2
Reporter: Juergen Zimmermann
Attachments: javap.log, server.log, server.log.zip, shop2.war, tar.log
I tried the snapshot which contains Hibernate 4.3.0.Beta2. However, package-info.java
files are causing problems. For instance, the package de.shop.artikelverwaltung.domain has
a package-info.java which causes a NoClassDefFoundError:
"IllegalName: de/shop/artikelverwaltung/domain.package-info". Please see the
stacktrace below.
Here is an example for package-info.java which was working with WildFly 8.0.0.Alpha1:
@XmlAccessorType(FIELD)
@Vetoed
package de.shop.artikelverwaltung.domain;
import static javax.xml.bind.annotation.XmlAccessType.FIELD;
import javax.enterprise.inject.Vetoed;
import javax.xml.bind.annotation.XmlAccessorType;
The stacktrace:
...
09:29:53,880 WARN [org.jboss.modules] Failed to define class
de/shop/artikelverwaltung/domain.package-info in Module
"deployment.shop2.war:main" from Service Module Loader: java.lang.LinkageError:
Failed to link de/shop/artikelverwaltung/domain/package-info (Module
"deployment.shop2.war:main" from Service Module Loader)
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:427)
[jboss-modules.jar:1.2.0.Final]
at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:260)
[jboss-modules.jar:1.2.0.Final]
at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:75)
[jboss-modules.jar:1.2.0.Final]
at org.jboss.modules.Module.loadModuleClass(Module.java:526)
[jboss-modules.jar:1.2.0.Final]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:188)
[jboss-modules.jar:1.2.0.Final]
at
org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:444)
[jboss-modules.jar:1.2.0.Final]
at
org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:432)
[jboss-modules.jar:1.2.0.Final]
at
org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:374)
[jboss-modules.jar:1.2.0.Final]
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:119)
[jboss-modules.jar:1.2.0.Final]
at
org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl$AggregatedClassLoader.findClass(ClassLoaderServiceImpl.java:218)
[hibernate-core-4.3.0.Beta2.jar:4.3.0.Beta2]
at java.lang.ClassLoader.loadClass(ClassLoader.java:423) [rt.jar:1.7.0_21]
at java.lang.ClassLoader.loadClass(ClassLoader.java:356) [rt.jar:1.7.0_21]
at
org.hibernate.annotations.common.util.ReflectHelper.classForName(ReflectHelper.java:160)
[hibernate-commons-annotations-4.0.2.Final.jar:4.0.2.Final]
at
org.hibernate.annotations.common.reflection.java.JavaReflectionManager.packageForName(JavaReflectionManager.java:121)
[hibernate-commons-annotations-4.0.2.Final.jar:4.0.2.Final]
at org.hibernate.cfg.AnnotationBinder.bindPackage(AnnotationBinder.java:262)
[hibernate-core-4.3.0.Beta2.jar:4.3.0.Beta2]
at org.hibernate.cfg.Configuration.addPackage(Configuration.java:792)
[hibernate-core-4.3.0.Beta2.jar:4.3.0.Beta2]
at
org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.buildHibernateConfiguration(EntityManagerFactoryBuilderImpl.java:1174)
[hibernate-entitymanager-4.3.0.Beta2.jar:4.3.0.Beta2]
at
org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:839)
[hibernate-entitymanager-4.3.0.Beta2.jar:4.3.0.Beta2]
at
org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:836)
[hibernate-entitymanager-4.3.0.Beta2.jar:4.3.0.Beta2]
at
org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:368)
[hibernate-core-4.3.0.Beta2.jar:4.3.0.Beta2]
at
org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:835)
[hibernate-entitymanager-4.3.0.Beta2.jar:4.3.0.Beta2]
at
org.hibernate.jpa.HibernatePersistenceProvider.createContainerEntityManagerFactory(HibernatePersistenceProvider.java:142)
[hibernate-entitymanager-4.3.0.Beta2.jar:4.3.0.Beta2]
at
org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:213)
[wildfly-jpa-8.0.0.Alpha2-SNAPSHOT.jar:8.0.0.Alpha2-SNAPSHOT]
at
org.jboss.as.jpa.service.PersistenceUnitServiceImpl.access$800(PersistenceUnitServiceImpl.java:58)
[wildfly-jpa-8.0.0.Alpha2-SNAPSHOT.jar:8.0.0.Alpha2-SNAPSHOT]
at
org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:107)
[wildfly-jpa-8.0.0.Alpha2-SNAPSHOT.jar:8.0.0.Alpha2-SNAPSHOT]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[rt.jar:1.7.0_21]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[rt.jar:1.7.0_21]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_21]
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
[jboss-threads-2.1.0.Final.jar:2.1.0.Final]
Caused by: java.lang.NoClassDefFoundError: IllegalName:
de/shop/artikelverwaltung/domain.package-info
at java.lang.ClassLoader.preDefineClass(ClassLoader.java:646) [rt.jar:1.7.0_21]
at java.lang.ClassLoader.defineClass(ClassLoader.java:785) [rt.jar:1.7.0_21]
at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:344)
[jboss-modules.jar:1.2.0.Final]
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:422)
[jboss-modules.jar:1.2.0.Final]
... 28 more