0 Replies Latest reply on Jun 3, 2013 10:02 AM by Juergen Zimmermann

    Hibernate cannot process package-info.java any more

    Juergen Zimmermann Master

      I opened a JIRA issue at https://issues.jboss.org/browse/WFLY-1406 and it seems to be hard to find the bug. Any hint is appreciated.

       

      I'm using package-info.java files like this one:

      @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;

       

      When such files are processed by Hibernate I'm getting this stacktrace:

      16:00:19,500 INFO  [org.hibernate.Version] HHH000412: Hibernate Core {4.3.0.Beta3}

      16:00:19,515 INFO  [org.hibernate.cfg.Environment] HHH000206: hibernate.properties not found

      16:00:19,515 INFO  [org.hibernate.cfg.Environment] HHH000021: Bytecode provider name : javassist

      16:00:19,921 INFO  [org.hibernate.annotations.common.Version] HCANN000001: Hibernate Commons Annotations {4.0.2.Final}

      16:00:20,046 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.1.Final]

      at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:260) [jboss-modules.jar:1.2.1.Final]

      at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:75) [jboss-modules.jar:1.2.1.Final]

      at org.jboss.modules.Module.loadModuleClass(Module.java:526) [jboss-modules.jar:1.2.1.Final]

      at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:188) [jboss-modules.jar:1.2.1.Final]

      at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:444) [jboss-modules.jar:1.2.1.Final]

      at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:432) [jboss-modules.jar:1.2.1.Final]

      at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:374) [jboss-modules.jar:1.2.1.Final]

      at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:119) [jboss-modules.jar:1.2.1.Final]

      at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl$AggregatedClassLoader.findClass(ClassLoaderServiceImpl.java:218) [hibernate-core-4.3.0.Beta3.jar:4.3.0.Beta3]

      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:293) [hibernate-core-4.3.0.Beta3.jar:4.3.0.Beta3]

      at org.hibernate.cfg.Configuration.addPackage(Configuration.java:802) [hibernate-core-4.3.0.Beta3.jar:4.3.0.Beta3]

      at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.buildHibernateConfiguration(EntityManagerFactoryBuilderImpl.java:1174) [hibernate-entitymanager-4.3.0.Beta3.jar:4.3.0.Beta3]

      at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:839) [hibernate-entitymanager-4.3.0.Beta3.jar:4.3.0.Beta3]

      at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:836) [hibernate-entitymanager-4.3.0.Beta3.jar:4.3.0.Beta3]

      at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:368) [hibernate-core-4.3.0.Beta3.jar:4.3.0.Beta3]

      at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:835) [hibernate-entitymanager-4.3.0.Beta3.jar:4.3.0.Beta3]

      at org.hibernate.jpa.HibernatePersistenceProvider.createContainerEntityManagerFactory(HibernatePersistenceProvider.java:142) [hibernate-entitymanager-4.3.0.Beta3.jar:4.3.0.Beta3]

      at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:214) [wildfly-jpa-8.0.0.Alpha2-SNAPSHOT.jar:8.0.0.Alpha2-SNAPSHOT]

      at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.access$800(PersistenceUnitServiceImpl.java:59) [wildfly-jpa-8.0.0.Alpha2-SNAPSHOT.jar:8.0.0.Alpha2-SNAPSHOT]

      at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:108) [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.1.Final]

      at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:422) [jboss-modules.jar:1.2.1.Final]

      ... 28 more