IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Java EE Discussion :

TransactionRequired avec des SessionBean stateless [EJB3]


Sujet :

Java EE

  1. #1
    Futur Membre du Club
    Profil pro
    Inscrit en
    Mars 2011
    Messages
    4
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2011
    Messages : 4
    Points : 6
    Points
    6
    Par défaut TransactionRequired avec des SessionBean stateless
    Bonjour,
    Je bosse sur un projet J2EE,EJB3 avec Jboss AS 5.1.
    Depuis que j'ai lié mon serveur d'application Jboss à une BD Mysql, j'obtiens cette erreur quand j'appelle des méthodes de mes sessionBean:
    TransactionRequiredException: EntityManager must be access within a transaction.




    Je n'utilise pas de transaction et toutes mes session Bean sont stateless.
    Quelqu'un pourrait m'expliquer?
    Merci


    Voila la trace de l'exception
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    javax.ejb.EJBException: javax.persistence.TransactionRequiredException: EntityManager must be access within a transaction
    	org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:77)
    	org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83)
    	org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:190)
    	org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
    	org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
    	org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
    	org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
    	org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
    	org.jboss.ejb3.security.RoleBasedAuthorizationInterceptorv2.invoke(RoleBasedAuthorizationInterceptorv2.java:201)
    	org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
    	org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:186)
    	org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
    	org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:41)
    	org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
    	org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:67)
    	org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
    	org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)
    	org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
    	org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:421)
    	org.jboss.ejb3.remoting.IsLocalInterceptor.invokeLocal(IsLocalInterceptor.java:85)
    	org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:72)
    	org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
    	org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:62)
    	$Proxy395.invoke(Unknown Source)
    	org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:207)
    	org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:164)
    	$Proxy394.createMember(Unknown Source)
    	controler.EBeanUtils.popDB(EBeanUtils.java:78)
    	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	java.lang.reflect.Method.invoke(Method.java:616)
    	bsh.Reflect.invokeMethod(Unknown Source)
    	bsh.Reflect.invokeStaticMethod(Unknown Source)
    	bsh.Name.invokeMethod(Unknown Source)
    	bsh.BSHMethodInvocation.eval(Unknown Source)
    	bsh.BSHPrimaryExpression.eval(Unknown Source)
    	bsh.BSHPrimaryExpression.eval(Unknown Source)
    	bsh.Interpreter.eval(Unknown Source)
    	bsh.Interpreter.eval(Unknown Source)
    	org.zkoss.zk.scripting.bsh.BSHInterpreter.exec(BSHInterpreter.java:134)
    	org.zkoss.zk.scripting.util.GenericInterpreter.interpret(GenericInterpreter.java:341)
    	org.zkoss.zk.ui.impl.PageImpl.interpret(PageImpl.java:847)
    	org.zkoss.zk.ui.impl.UiEngineImpl.execNonComponent(UiEngineImpl.java:851)
    	org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:651)
    	org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:661)
    	org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:629)
    	org.zkoss.zk.ui.impl.UiEngineImpl.execCreate(UiEngineImpl.java:596)
    	org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage0(UiEngineImpl.java:382)
    	org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage(UiEngineImpl.java:305)
    	org.zkoss.zk.ui.http.DHtmlLayoutServlet.process(DHtmlLayoutServlet.java:225)
    	org.zkoss.zk.ui.http.DHtmlLayoutServlet.doGet(DHtmlLayoutServlet.java:146)
    	javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    	org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
     
    cause m�re
     
    javax.persistence.TransactionRequiredException: EntityManager must be access within a transaction
    	org.jboss.jpa.deployment.ManagedEntityManagerFactory.verifyInTx(ManagedEntityManagerFactory.java:155)
    	org.jboss.jpa.tx.TransactionScopedEntityManager.persist(TransactionScopedEntityManager.java:186)
    	evoluption.ejb.service.bean.MemberSessionBean.createMember(MemberSessionBean.java:109)
    	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	java.lang.reflect.Method.invoke(Method.java:616)
    	org.jboss.aop.joinpoint.MethodInvocation.invokeTarget(MethodInvocation.java:122)
    	org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111)
    	org.jboss.ejb3.EJBContainerInvocationWrapper.invokeNext(EJBContainerInvocationWrapper.java:69)
    	org.jboss.ejb3.interceptors.aop.InterceptorSequencer.invoke(InterceptorSequencer.java:73)
    	org.jboss.ejb3.interceptors.aop.InterceptorSequencer.aroundInvoke(InterceptorSequencer.java:59)
    	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	java.lang.reflect.Method.invoke(Method.java:616)
    	org.jboss.aop.advice.PerJoinpointAdvice.invoke(PerJoinpointAdvice.java:174)
    	org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
    	org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.fillMethod(InvocationContextInterceptor.java:72)
    	org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_fillMethod_25335806.invoke(InvocationContextInterceptor_z_fillMethod_25335806.java)
    	org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
    	org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.setup(InvocationContextInterceptor.java:88)
    	org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_setup_25335806.invoke(InvocationContextInterceptor_z_setup_25335806.java)
    	org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
    	org.jboss.ejb3.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:62)
    	org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
    	org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:56)
    	org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
    	org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
    	org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
    	org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
    	org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
    	org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:68)
    	org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
    	org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
    	org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:190)
    	org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
    	org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
    	org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
    	org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
    	org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
    	org.jboss.ejb3.security.RoleBasedAuthorizationInterceptorv2.invoke(RoleBasedAuthorizationInterceptorv2.java:201)
    	org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
    	org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:186)
    	org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
    	org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:41)
    	org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
    	org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:67)
    	org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
    	org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)
    	org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
    	org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:421)
    	org.jboss.ejb3.remoting.IsLocalInterceptor.invokeLocal(IsLocalInterceptor.java:85)
    	org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:72)
    	org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
    	org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:62)
    	$Proxy395.invoke(Unknown Source)
    	org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:207)
    	org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:164)
    	$Proxy394.createMember(Unknown Source)
    	controler.EBeanUtils.popDB(EBeanUtils.java:78)
    	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	java.lang.reflect.Method.invoke(Method.java:616)
    	bsh.Reflect.invokeMethod(Unknown Source)
    	bsh.Reflect.invokeStaticMethod(Unknown Source)
    	bsh.Name.invokeMethod(Unknown Source)
    	bsh.BSHMethodInvocation.eval(Unknown Source)
    	bsh.BSHPrimaryExpression.eval(Unknown Source)
    	bsh.BSHPrimaryExpression.eval(Unknown Source)
    	bsh.Interpreter.eval(Unknown Source)
    	bsh.Interpreter.eval(Unknown Source)
    	org.zkoss.zk.scripting.bsh.BSHInterpreter.exec(BSHInterpreter.java:134)
    	org.zkoss.zk.scripting.util.GenericInterpreter.interpret(GenericInterpreter.java:341)
    	org.zkoss.zk.ui.impl.PageImpl.interpret(PageImpl.java:847)
    	org.zkoss.zk.ui.impl.UiEngineImpl.execNonComponent(UiEngineImpl.java:851)
    	org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:651)
    	org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:661)
    	org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:629)
    	org.zkoss.zk.ui.impl.UiEngineImpl.execCreate(UiEngineImpl.java:596)
    	org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage0(UiEngineImpl.java:382)
    	org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage(UiEngineImpl.java:305)
    	org.zkoss.zk.ui.http.DHtmlLayoutServlet.process(DHtmlLayoutServlet.java:225)
    	org.zkoss.zk.ui.http.DHtmlLayoutServlet.doGet(DHtmlLayoutServlet.java:146)
    	javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    	org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

  2. #2
    Membre régulier
    Profil pro
    Inscrit en
    Octobre 2010
    Messages
    109
    Détails du profil
    Informations personnelles :
    Âge : 34
    Localisation : France

    Informations forums :
    Inscription : Octobre 2010
    Messages : 109
    Points : 70
    Points
    70
    Par défaut
    Apparemment cette discussion est résolu mais personnellement j'ai le même problème et je ne trouve pas la solution.
    Est ce que quelqu'un pourrait m'aider?

    Merci d'avance

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Connectivité avec des serveurs distants
    Par Ph. B. dans le forum XMLRAD
    Réponses: 8
    Dernier message: 07/02/2003, 13h16
  2. Réponses: 27
    Dernier message: 03/02/2003, 12h27
  3. créer un noeuds avec des paramétres
    Par Toxine77 dans le forum XMLRAD
    Réponses: 5
    Dernier message: 21/01/2003, 16h11
  4. Réponses: 2
    Dernier message: 06/12/2002, 07h50
  5. Une fonction avec des attributs non obligatoires
    Par YanK dans le forum Langage
    Réponses: 5
    Dernier message: 15/11/2002, 13h39

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo