users@glassfish.java.net

problem deploying SFSB with BMT

From: <glassfish_at_javadesktop.org>
Date: Thu, 08 Apr 2010 04:08:44 PDT

Hello,

I'm trying to deploy the following ejb3 stateful bean with bean managed transaction :

interface :

package com.mg.dictionaries.action;

import javax.ejb.Local;
import javax.ejb.TransactionAttribute;
import javax.ejb.TransactionAttributeType;

@Local
public interface Test {

        @TransactionAttribute(TransactionAttributeType.MANDATORY)
        public void test();

}

bean :

package com.mg.dictionaries.action;

import javax.ejb.Stateful;
import javax.ejb.TransactionAttribute;
import javax.ejb.TransactionAttributeType;
import javax.ejb.TransactionManagement;
import javax.ejb.TransactionManagementType;

import org.jboss.seam.annotations.JndiName;

@Stateful
@TransactionManagement(TransactionManagementType.BEAN)
public class TestBean implements Test {

        @TransactionAttribute(TransactionAttributeType.MANDATORY)
        public void test() {
                // do something
        }
}

but Glassfish throws the exception :

[#|2010-04-08T12:49:24.953+0200|SEVERE|sun-appserver2.1|javax.enterprise.system.tools.deployment|_ThreadID=15;_ThreadName=Timer-7;_RequestID=4ecdc528-3f6d-40e2-9e95-2d6cb4bf42ca;|Exception occured in J2EEC Phasejava.lang.IllegalStateException: Method level transaction attributes may not be specified on a bean with transaction type [Bean]at com.sun.enterprise.deployment.annotation.AnnotationInfo_at_dbd887
com.sun.enterprise.deployment.backend.IASDeploymentException: Error loading deployment descriptors for module [ge_dicts] -- Method level transaction attributes may not be specified on a bean with transaction type [Bean]at com.sun.enterprise.deployment.annotation.AnnotationInfo_at_dbd887
        at com.sun.enterprise.deployment.backend.Deployer.loadDescriptors(Deployer.java:406)
        at com.sun.enterprise.deployment.backend.AppDeployerBase.loadDescriptors(AppDeployerBase.java:359)
        at com.sun.enterprise.deployment.backend.AppDeployer.explodeArchive(AppDeployer.java:303)
        at com.sun.enterprise.deployment.backend.AppDeployer.deploy(AppDeployer.java:207)
        at com.sun.enterprise.deployment.backend.AppDeployer.doRequestFinish(AppDeployer.java:148)
        at com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:208)
        at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:108)
        at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:966)
        at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:280)
        at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:298)
        at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.deploy(ApplicationsConfigMBean.java:584)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:390)
        at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:373)
        at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:477)
        at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
        at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
        at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:90)
        at $Proxy1.invoke(Unknown Source)
        at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:304)
        at com.sun.enterprise.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:170)
        at com.sun.enterprise.deployment.autodeploy.AutoDeployer.invokeDeploymentService(AutoDeployer.java:583)
        at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deployJavaEEArchive(AutoDeployer.java:564)
        at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:495)
        at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:270)
        at com.sun.enterprise.deployment.autodeploy.AutoDeployControllerImpl$AutoDeployTask.run(AutoDeployControllerImpl.java:374)
        at java.util.TimerThread.mainLoop(Timer.java:512)
        at java.util.TimerThread.run(Timer.java:462)
Caused by: java.lang.IllegalStateException: Method level transaction attributes may not be specified on a bean with transaction type [Bean]at com.sun.enterprise.deployment.annotation.AnnotationInfo_at_dbd887
        at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:363)
        at com.sun.enterprise.deployment.archivist.Archivist.readDeploymentDescriptors(Archivist.java:318)
        at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:213)
        at com.sun.enterprise.deployment.archivist.ApplicationArchivist.readModulesDescriptors(ApplicationArchivist.java:365)
        at com.sun.enterprise.deployment.backend.Deployer.loadDescriptors(Deployer.java:354)
        ... 33 more
Caused by: Method level transaction attributes may not be specified on a bean with transaction type [Bean]at com.sun.enterprise.deployment.annotation.AnnotationInfo_at_dbd887
        at com.sun.enterprise.deployment.annotation.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:360)
        at com.sun.enterprise.deployment.annotation.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:368)
        at com.sun.enterprise.deployment.annotation.impl.AnnotationProcessorImpl.processAnnotations(AnnotationProcessorImpl.java:282)
        at com.sun.enterprise.deployment.annotation.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:210)
        at com.sun.enterprise.deployment.annotation.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:129)
        at com.sun.enterprise.deployment.archivist.Archivist.processAnnotations(Archivist.java:445)
        at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:346)
        ... 37 more
Caused by: java.lang.IllegalArgumentException: Method level transaction attributes may not be specified on a bean with transaction type [Bean]
        at com.sun.enterprise.deployment.EjbDescriptor.setContainerTransactionFor(EjbDescriptor.java:815)
        at com.sun.enterprise.deployment.annotation.handlers.TransactionAttributeHandler.processAnnotation(TransactionAttributeHandler.java:105)
        at com.sun.enterprise.deployment.annotation.handlers.AbstractAttributeHandler.processAnnotation(AbstractAttributeHandler.java:186)
        at com.sun.enterprise.deployment.annotation.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:337)
        ... 43 more

Could anybody tell me what is wrong with my bean ?

Regards,
Michal
[Message sent by forum member 'gajos']

http://forums.java.net/jive/thread.jspa?messageID=395874