2 Replies Latest reply on Nov 30, 2010 4:00 AM by Bernd Farka

    JBoss6 CR1 - javax.persistence.TableGenerator

    Bernd Farka Newbie

      We are migrating a SEAM Project from AS 5.1 to AS 6..

       

      When i try to deploy my EAR this Exception occures

       

      16:54:48,685 ERROR [AbstractKernelController] Error installing to Start: name=persistence.unit:unitName=wision-ear.ear/persistence-3.0-SNAPSHOT.jar#wision state=Create: java.lang.IllegalArgumentException: interface javax.persistence.TableGenerator is not visible from class loader
      at java.lang.reflect.Proxy.getProxyClass(Proxy.java:353) [:1.6.0_20]
      at org.hibernate.annotations.common.annotationfactory.AnnotationFactory.create(AnnotationFactory.java:46) [:6.0.0.20101110-CR1]
      at org.hibernate.cfg.annotations.reflection.JPAOverridenAnnotationReader.buildTableGeneratorAnnotation(JPAOverridenAnnotationReader.java:1723) [:3.6.0.Final]
      at org.hibernate.cfg.annotations.reflection.JPAMetadataProvider.getDefaults(JPAMetadataProvider.java:116) [:3.6.0.Final]
      at org.hibernate.annotations.common.reflection.java.JavaReflectionManager.getDefaults(JavaReflectionManager.java:226) [:6.0.0.20101110-CR1]
      at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1355) [:3.6.0.Final]
      at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1345) [:3.6.0.Final]
      at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1477) [:3.6.0.Final]
      at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:194) [:3.6.0.Final]
      at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:1100) [:3.6.0.Final]
      at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:685) [:3.6.0.Final]
      at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73) [:3.6.0.Final]
      at org.jboss.jpa.builder.DefaultCEMFBuilder.build(DefaultCEMFBuilder.java:47) [:1.0.2-alpha-1]
      at org.jboss.as.jpa.scanner.HackCEMFBuilder.build(HackCEMFBuilder.java:49) [:6.0.0.20101110-CR1]
      at org.jboss.jpa.deployment.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:275) [:1.0.2-alpha-1]
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_20]
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_20]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_20]
      at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_20]
      at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:60) [jboss-reflect.jar:2.2.0.Alpha9]
      at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:168) [jboss-reflect.jar:2.2.0.Alpha9]
      at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66) [jboss-reflect.jar:2.2.0.Alpha9]
      at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:257) [jboss-kernel.jar:2.2.0.Alpha10]

       

      16:54:48,685 ERROR [AbstractKernelController] Error installing to Start: name=persistence.unit:unitName=wision-ear.ear/persistence-3.0-SNAPSHOT.jar#wision state=Create: java.lang.IllegalArgumentException: interface javax.persistence.TableGenerator is not visible from class loader

      at java.lang.reflect.Proxy.getProxyClass(Proxy.java:353) [:1.6.0_20]

      at org.hibernate.annotations.common.annotationfactory.AnnotationFactory.create(AnnotationFactory.java:46) [:6.0.0.20101110-CR1]

      at org.hibernate.cfg.annotations.reflection.JPAOverridenAnnotationReader.buildTableGeneratorAnnotation(JPAOverridenAnnotationReader.java:1723) [:3.6.0.Final]

      at org.hibernate.cfg.annotations.reflection.JPAMetadataProvider.getDefaults(JPAMetadataProvider.java:116) [:3.6.0.Final]

      at org.hibernate.annotations.common.reflection.java.JavaReflectionManager.getDefaults(JavaReflectionManager.java:226) [:6.0.0.20101110-CR1]

      at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1355) [:3.6.0.Final]

      at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1345) [:3.6.0.Final]

      at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1477) [:3.6.0.Final]

      at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:194) [:3.6.0.Final]

      at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:1100) [:3.6.0.Final]

      at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:685) [:3.6.0.Final]

      at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73) [:3.6.0.Final]

      at org.jboss.jpa.builder.DefaultCEMFBuilder.build(DefaultCEMFBuilder.java:47) [:1.0.2-alpha-1]

      at org.jboss.as.jpa.scanner.HackCEMFBuilder.build(HackCEMFBuilder.java:49) [:6.0.0.20101110-CR1]

      at org.jboss.jpa.deployment.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:275) [:1.0.2-alpha-1]

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_20]

      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_20]

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_20]

      at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_20]

      at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:60) [jboss-reflect.jar:2.2.0.Alpha9]

      at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:168) [jboss-reflect.jar:2.2.0.Alpha9]

      at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66) [jboss-reflect.jar:2.2.0.Alpha9]

      at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:257) [jboss-kernel.jar:2.2.0.Alpha10]

      I've configured the TableGenerator in the orm.xml
      <?xml version="1.0" encoding="UTF-8"?>
      version="2.0">
      <table-generator name="id_table" table="id_table"
      pk-column-name="tableName" value-column-name="id" allocation-size="100" />
      </entity-mappings>
      i have no idea would could be wrong, may it is a bug in 6.CR1??
      wbr
      Bernd