1 2 Previous Next 16 Replies Latest reply on Apr 27, 2016 4:28 PM by marks1900

    Wildfly 10: @TransactionAttribute exception on startup

    icaro56

      I found a problem to startup my application. I have a method with a annotation @TransactionAttribute. When I was using the Jboss Eap 6.4 the annotation was working.

       

      @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
        public T findByPrimaryKey_NotManaged(Long key) {
        return (T) em.find(entityClass, key);
      }
      

       

       

      My log:

       

      15:28:04,596 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.deployment.unit."zumpy3.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."zumpy3.war".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of deployment "zumpy3.war"
        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:154)
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
      Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYEJB0264: Could not merge data for UserDao
        at org.jboss.as.ejb3.deployment.processors.merging.AbstractMergingProcessor.deploy(AbstractMergingProcessor.java:76)
        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:147)
        ... 5 more
      Caused by: java.lang.RuntimeException: WFLYEE0034: Could not resolve method Method findByPrimaryKey_NotManaged(java.lang.Long) on class class com.visualvirtual.zumpy.base.dao.BaseDao with annotations [NOT_SUPPORTED]
        at org.jboss.as.ee.metadata.MethodAnnotationAggregator.runtimeAnnotationInformation(MethodAnnotationAggregator.java:79)
        at org.jboss.as.ejb3.deployment.processors.merging.TransactionAttributeMergingProcessor.processTransactionAttributeAnnotation(TransactionAttributeMergingProcessor.java:90)
        at org.jboss.as.ejb3.deployment.processors.merging.TransactionAttributeMergingProcessor.handleAnnotations(TransactionAttributeMergingProcessor.java:73)
        at org.jboss.as.ejb3.deployment.processors.merging.AbstractMergingProcessor.processComponentConfig(AbstractMergingProcessor.java:92)
        at org.jboss.as.ejb3.deployment.processors.merging.AbstractMergingProcessor.deploy(AbstractMergingProcessor.java:74)
        ... 6 more
      
      
      15:28:04,599 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "zumpy3.war")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"zumpy3.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"zumpy3.war\".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of deployment \"zumpy3.war\"
          Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYEJB0264: Could not merge data for UserDao
          Caused by: java.lang.RuntimeException: WFLYEE0034: Could not resolve method Method findByPrimaryKey_NotManaged(java.lang.Long) on class class com.visualvirtual.zumpy.base.dao.BaseDao with annotations [NOT_SUPPORTED]"}}
      
        • 1. Re: Wildfly 10: @TransactionAttribute exception on startup
          jaikiran

          That looks like some kind of a bug. Can you attach an application which reproduces this?

          • 2. Re: Wildfly 10: @TransactionAttribute exception on startup
            icaro56

            Ok, It is a Wildfly 10 project with 2 persistence-unit. The first is a postgresql persistence-unit and the other is a mongodb (hibernate ogm) persistence-unit. I created two package for test: user (postgresql) and usermongo (mongodb). The annotation @TransactionAtributte was add on BaseDao extends by UserDao (Postgresql).

             

            Get the maven project in this link: https://mega.nz/#!T94yzZJa!8LR6i9FJswIj4CPO_E5R5h1kMh8i47m3UCBKnum3dIw

             

            Import Maven Project in Eclipse Mars and run on server Wildfly 10.

             

            Ps: I have used hibernate ogm provide by a module in wildfly, but you can take off this provide tag or put the module there.

            • 3. Re: Wildfly 10: @TransactionAttribute exception on startup
              icaro56

              Jaikiran pai?

               

              Could you help me?

              • 4. Re: Wildfly 10: @TransactionAttribute exception on startup
                jonesbusy

                Hello,

                 

                I have the same issue with Wildfly 10.

                 

                I'm trying to deploy an EAR with 2 persitences units.

                 

                We are in the process of migrating from Glassfish 4 to Wildfly.

                 

                Any update of that issue ?

                 

                Thanks in advance.

                • 5. Re: Wildfly 10: @TransactionAttribute exception on startup
                  icaro56

                  I am wating Jaikiran pai answer us.

                   

                   

                  • 6. Re: Wildfly 10: @TransactionAttribute exception on startup
                    tllo

                    I have the same problem using the WildFly10. But, in my case, i have only one persistence unity.

                     

                    Erro:

                    Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYEJB0264: Could not merge data for CartaoEJBBean

                    at org.jboss.as.ejb3.deployment.processors.merging.AbstractMergingProcessor.deploy(AbstractMergingProcessor.java:76)

                    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:147)

                    ... 5 more

                    Caused by: java.lang.RuntimeException: WFLYEE0034: Could not resolve method Method criar(java.lang.Object) on class class com.nery.ejb.session.SIRCCrudFacadeAb with annotations [REQUIRED]

                     

                    Persistence XML:

                    <?xml version="1.0" encoding="UTF-8"?>

                    <persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">

                      <persistence-unit name="dataSource_nery" transaction-type="JTA">

                        <exclude-unlisted-classes>false</exclude-unlisted-classes>

                        <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>

                        <jta-data-source>java:/dataSource_nery</jta-data-source>

                        <class>com.nery.core.entity.Perfil</class>

                        <class>com.nery.core.entity.PerfilTelaAcao</class>

                        <class>com.nery.core.entity.Acao</class>

                        <class>com.nery.core.entity.Menu</class>

                        <class>com.nery.core.entity.Tela</class>

                        <class>com.nery.core.entity.TelaAcao</class>

                        <class>com.nery.core.entity.Usuario</class>

                        <class>com.nery.core.entity.Lancamento</class>

                        <class>com.nery.core.entity.Fatura</class>

                        <class>com.nery.core.entity.Cartao</class>

                        <properties>

                          <property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect"/>

                          <property name="eclipselink.target-server" value="JBoss"/>

                          <property name="eclipselink.weaving" value="false"/>

                          <property name="eclipselink.logging.level" value="SEVERE"/>

                          <property name="eclipselink.cache.type.default" value="SoftWeak"/>

                        </properties>

                      </persistence-unit>

                    </persistence>

                    • 7. Re: Wildfly 10: @TransactionAttribute exception on startup
                      smarlow

                      I set a breakpoint at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.getMethod(ClassReflectionIndex.java:257 and see that paramsMap has one entry with key="com.visualvirtual.zumpy.base.model.BaseEntity".  However, methodIdentifier .getReturnType() is "java.lang.Object".  I'm not exactly sure of what this code should be doing but maybe "java.lang.Object" should be checked for and considered as a match for "com.visualvirtual.zumpy.base.model.BaseEntity"

                       

                      Call stack is:

                      {quote}

                            at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.getMethod(ClassReflectionIndex.java:257)

                            at org.jboss.as.ee.metadata.MethodAnnotationAggregator.runtimeAnnotationInformation(MethodAnnotationAggregator.java:70)

                            at org.jboss.as.ejb3.deployment.processors.merging.TransactionAttributeMergingProcessor.processTransactionAttributeAnnotation(TransactionAttributeMergingProcessor.java:90)

                            at org.jboss.as.ejb3.deployment.processors.merging.TransactionAttributeMergingProcessor.handleAnnotations(TransactionAttributeMergingProcessor.java:73)

                            at org.jboss.as.ejb3.deployment.processors.merging.AbstractMergingProcessor.processComponentConfig(AbstractMergingProcessor.java:92)

                            at org.jboss.as.ejb3.deployment.processors.merging.AbstractMergingProcessor.deploy(AbstractMergingProcessor.java:74)

                            at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:147)

                            - locked <0x20df> (a org.jboss.as.server.deployment.DeploymentUnitPhaseService)

                            at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)

                            at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)

                            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

                            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

                            at java.lang.Thread.run(Thread.java:745)

                      {quote}

                       

                      Could you please create a WFLY jira to report this issue.  Be sure to set the component to EJB.  Please attach your test case as well.

                      • 8. Re: Wildfly 10: @TransactionAttribute exception on startup
                        jonesbusy

                        Same here. The method that cause the issue use generic parameter T

                         

                        @Override

                            @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)

                            public void persistInNewTransaction(T entity) {

                           super.persist(entity);

                            }

                         

                        Instead of matching the correct entity of child classes, it matches "Object", probable due to the way Java Generics are working...

                         

                        I don't have other issue with @TransactionAttribute for other business methods.

                        • 9. Re: Wildfly 10: @TransactionAttribute exception on startup
                          icaro56

                          I am create a example project for register a jira issue. In a moment I submit

                          • 10. Re: Wildfly 10: @TransactionAttribute exception on startup
                            icaro56

                            I create the jira issue: https://issues.jboss.org/browse/WFLY-6430

                             

                            I discover that problem only appears on BaseDao, maybe because T class.

                             

                            I add attachment in jira issue.

                             

                             

                            PS: The annotation @TransactionAttribute in JBoss Eap works as on the BaseDao as on the UserDao.

                            • 11. Re: Wildfly 10: @TransactionAttribute exception on startup
                              lyuben.milev

                              I deployed a .war that was working on wf8 to wf10 and I see similar error.

                              • 12. Re: Wildfly 10: @TransactionAttribute exception on startup
                                rodrigo1503

                                I have the same issue here... I could not view the Jira issue, it shows a "Permission violation", did you delete it? is there a workaround?

                                • 13. Re: Wildfly 10: @TransactionAttribute exception on startup
                                  icaro56

                                  It is strange. The jira issue disappeared.

                                   

                                  The solution is upgrade Jandex. But I prefer to wait the new Wildfly version.

                                  • 14. Re: Wildfly 10: @TransactionAttribute exception on startup
                                    smarlow

                                    I still see the jira here.

                                    1 2 Previous Next