2 Replies Latest reply on Nov 29, 2010 3:38 PM by Viggo Navarsete

    fail to deploy persistence unit under jboss 6

    Harry Yan Newbie

      Hi,

      any guys out there can kindly help me.

      Recently I was trying to deploy a hibernate project under jboss 6 which worked fine in jboss 4. It kept throwing exception java.lang.IllegalArgumentException: Expecting collection type [[I], I googled it but without any results.

      I will paste my config files belows:

      persistence.xml

       

      {quote}

      <persistence-unit name="HUnit">
              <jta-data-source>java:/HibernateTestXADB</jta-data-source>
              <mapping-file>META-INF/orm.xml</mapping-file>
              <properties>
                  <property name="hibernate.archive.autodetection" value="class" />
                  <property name="hibernate.show_sql" value="false" />
                  <property name="hibernate.format_sql" value="true" />
                  <property name="use_sql_comments" value="true" />
                  <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect" />
                  <property name="jboss.entity.manager.factory.jndi.name" value="java:/TestEMF" />
                  <property name="hibernate.hbm2ddl.auto" value="create-drop" />
                  <property name="hibernate.ejb.event.post-insert" value="org.hibernate.ejb.event.EJB3PostInsertEventListener,org.hibernate.envers.event.AuditEventListener" />
                  <property name="hibernate.ejb.event.post-update" value="org.hibernate.ejb.event.EJB3PostUpdateEventListener,org.hibernate.envers.event.AuditEventListener" />
                  <property name="hibernate.ejb.event.post-delete" value="org.hibernate.ejb.event.EJB3PostDeleteEventListener,org.hibernate.envers.event.AuditEventListener" />
                  <property name="hibernate.ejb.event.pre-collection-update" value="org.hibernate.envers.event.AuditEventListener" />
                  <property name="hibernate.ejb.event.pre-collection-remove" value="org.hibernate.envers.event.AuditEventListener" />
                  <property name="hibernate.ejb.event.post-collection-recreate" value="org.hibernate.envers.event.AuditEventListener" />
                  <property name="org.hibernate.envers.versionsTableSuffix" value="_V" />
                  <property name="org.hibernate.envers.revisionFieldName" value="ver_rev" />
              </properties>
          </persistence-unit>

      {quote}

      Datasource-ds.xml

       

      {quote}

      <datasources>
          <xa-datasource>
              <jndi-name>HibernateTestXADB</jndi-name>
              <track-connection-by-tx>true</track-connection-by-tx>
              <isSameRM-override-value>false</isSameRM-override-value>
              <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
              <xa-datasource-property name="URL">jdbc:oracle:thin:@192.168.111.111:1521:test</xa-datasource-property>
              <xa-datasource-property name="User">test</xa-datasource-property>
              <xa-datasource-property name="Password">test</xa-datasource-property>
              <!-- Checks the Oracle error codes and messages for fatal errors -->
                  <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
              <no-tx-separate-pools>true</no-tx-separate-pools>

       

            <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
            <metadata>
               <type-mapping>Oracle9i</type-mapping>
            </metadata>
          </xa-datasource>

       

        <mbean code="org.jboss.resource.adapter.jdbc.vendor.OracleXAExceptionFormatter"
               name="jboss.jca:service=OracleXAExceptionFormatter">
          <depends optional-attribute-name="TransactionManagerService">jboss:service=TransactionManager</depends>
        </mbean>
      </datasources>


      {quote}

       

       

      Following is the full stacktrace.

      {quote}

      10:40:50,894 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to Start: name=persistence.unit:unitName=HibernateTest.ear/Hi
      bernateTest.jar#HUnit state=Create: java.lang.IllegalArgumentException: Expecting collection type [[I]
              at org.hibernate.ejb.metamodel.AttributeFactory.determineCollectionType(AttributeFactory.java:867) [:3.5.0-CR-1]
              at org.hibernate.ejb.metamodel.AttributeFactory$PluralAttributeMetadataImpl.<init>(AttributeFactory.java:731) [:3.5.0-CR-1]
              at org.hibernate.ejb.metamodel.AttributeFactory$PluralAttributeMetadataImpl.<init>(AttributeFactory.java:712) [:3.5.0-CR-1]
              at org.hibernate.ejb.metamodel.AttributeFactory.determineAttributeMetadata(AttributeFactory.java:507) [:3.5.0-CR-1]
              at org.hibernate.ejb.metamodel.AttributeFactory.buildAttribute(AttributeFactory.java:84) [:3.5.0-CR-1]
              at org.hibernate.ejb.metamodel.MetadataContext.wrapUp(MetadataContext.java:179) [:3.5.0-CR-1]
              at org.hibernate.ejb.metamodel.MetamodelImpl.buildMetamodel(MetamodelImpl.java:66) [:3.5.0-CR-1]
              at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:83) [:3.5.0-CR-1]
              at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:850) [:3.5.0-CR-1]
              at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73) [:3.5.0-CR-1]
              at org.jboss.jpa.builder.DefaultCEMFBuilder.build(DefaultCEMFBuilder.java:47) [:1.0.2-alpha-1]
              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_11]
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_11]
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_11]
              at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_11]
              at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59) [jboss-reflect.jar:2.2.0.Alpha4]
              at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:168) [jboss-reflect.jar:2.2.0.Alpha4]
              at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66) [jboss-reflect.jar:2.2.0.Alpha4]
              at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:257) [jboss-ker
      nel.jar:2.2.0.Alpha9]
              at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47) [jboss-kernel.jar:2.2.0.Alpha9]
              at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:125) [jboss-kernel.jar:
      2.2.0.Alpha9]
              at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:72) [jboss-kernel.jar:2.2.0.Al
      pha9]
              at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:202) [jboss-kernel.jar:2.2.0.Alpha9]
              at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54) [jboss-kernel.jar:2.2.0.Alpha9]
              at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42) [jboss-kernel.jar:2.2.0.Alpha9]
              at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62) [jboss-dependency.jar:2.
      2.0.Alpha9]
              at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71) [jboss-dependency.jar:2.2.0.Alpha9]
              at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51) [jboss-dependency.jar:2.2.0.Alpha9]
              at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:377) [jboss-dependency.jar:2.2.0.Alpha9]
              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2042) [jboss-dependency.jar:2.2.0.Alpha9]
              at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1081) [jboss-dependency.jar:2.2.0.Alpha9]
              at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1320) [jboss-dependency.jar:2.2.0.Alpha9]
              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1244) [jboss-dependency.jar:2.2.0.Alpha9]
              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1137) [jboss-dependency.jar:2.2.0.Alpha9]
              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:892) [jboss-dependency.jar:2.2.0.Alpha9]
              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:639) [jboss-dependency.jar:2.2.0.Alpha9]
              at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:180) [:2.2.0.Alpha4]
              at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:58) [:2.2.0.Alpha4]
              at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62) [:2.2.0.Alpha4]
              at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:55) [:2.2.0.Alpha4]
              at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179) [:2.2.0.Alpha4]
              at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1857) [:2.2.0.Alpha4]
              at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1575) [:2.2.0.Alpha4]
              at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1596) [:2.2.0.Alpha4]
              at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1628) [:2.2.0.Alpha4]
              at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1516) [:2.2.0.Alpha4]
              at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:377) [jboss-dependency.jar:2.2.0.Alpha9]
              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2042) [jboss-dependency.jar:2.2.0.Alpha9]
              at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1081) [jboss-dependency.jar:2.2.0.Alpha9]
              at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1320) [jboss-dependency.jar:2.2.0.Alpha9]
              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1244) [jboss-dependency.jar:2.2.0.Alpha9]
              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1137) [jboss-dependency.jar:2.2.0.Alpha9]
              at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:937) [jboss-dependency.jar:2.2.0.Alpha9]
              at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:652) [jboss-dependency.jar:2.2.0.Alpha9]
              at org.jboss.deployers.plugins.deployers.DeployersImpl.change(DeployersImpl.java:2008) [:2.2.0.Alpha4]
              at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:1101) [:2.2.0.Alpha4]
              at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:679) [:2.2.0.Alpha4]
              at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117) [:6.0.0.20100429-M3]
              at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:409) [:6.0.0.20100429-M3]
              at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:294) [:6.0.0.20100429-M3]
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [:1.6.0_11]
              at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) [:1.6.0_11]
              at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) [:1.6.0_11]
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) [:1.6.0_11]
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181) [:1.6.0_11]
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205) [:1.6.0_11]
              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_11]
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_11]
              at java.lang.Thread.run(Thread.java:619) [:1.6.0_11]

      {quote}

      I appreciate it if anyone can help.

      Thank you in advance.

       

      Harry