3 Replies Latest reply on Sep 18, 2007 1:19 PM by Pete Muir

    JBoss 4.2.0 / 4.2.1 - Seam 2.0.0B1 - Mail Problem

    Bradley Smith Master

      Hello,

      I'm having trouble with Seam Mail on JBoss 4.2 (both 4.2.0 and 4.2.1). What appears to be happening is that a particular SLSB which requires the mail session (@In[jected] by Seam), is not being deployed. All other Session beans which then depend on the Mail SLSB are subsequently not deployed as well. Here are some config and code fragments I have that use the MailReaderBean:

      First, components.xml:

      <?xml version="1.0" encoding="UTF-8"?>
      <components xmlns="http://jboss.com/products/seam/components"
       xmlns:core="http://jboss.com/products/seam/core"
       xmlns:mail="http://jboss.com/products/seam/mail"
       xmlns:framework="http://jboss.com/products/seam/framework"
       xmlns:jms="http://jboss.com/products/seam/jms"
       xmlns:security="http://jboss.com/products/seam/security"
       xmlns:transaction="http://jboss.com/products/seam/transaction"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation=
       "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.0.xsd
       http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.0.xsd
       http://jboss.com/products/seam/framework http://jboss.com/products/seam/framework-2.0.xsd
       http://jboss.com/products/seam/jms http://jboss.com/products/seam/jms-2.0.xsd
       http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-2.0.xsd
       http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.0.xsd
       http://jboss.com/products/seam/transaction http://jboss.com/products/seam/transaction-2.0.xsd">
      
       <core:init jndi-pattern="access-control-1.0/#{ejbName}/local" debug="true"/>
      
       <mail:mail-session session-jndi-name="java:/Mail" auto-create="true"/>
      
      ....
      


      I've also configured a mail service bound to java:/Mail using mail-service.xml in the server deploy directory. There are no errors generated by the server in regards to this MailService.

      11:32:48,292 INFO STDOUT - DEBUG: JavaMail version 1.4ea
      11:32:48,292 INFO STDOUT - DEBUG: java.io.FileNotFoundException: C:\Program Files\Java\jdk1.5.0_12\jre\lib\javamail.providers (The system cannot find the file specified)
      11:32:48,292 INFO STDOUT - DEBUG: !anyLoaded
      11:32:48,292 INFO STDOUT - DEBUG: not loading resource: /META-INF/javamail.providers
      11:32:48,308 INFO STDOUT - DEBUG: successfully loaded resource: /META-INF/javamail.default.providers
      11:32:48,308 INFO STDOUT - DEBUG: Tables of loaded providers
      11:32:48,308 INFO STDOUT - DEBUG: Providers Listed By Class Name: {com.sun.mail.smtp.SMTPSSLTransport=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Su
      n Microsystems, Inc], com.sun.mail.smtp.SMTPTransport=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc], com.sun.mail.imap.IMAPSSLStore=
      javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc], com.sun.mail.pop3.POP3SSLStore=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLS
      tore,Sun Microsystems, Inc], com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], com.sun.mail.pop3.POP3Store=javax.ma
      il.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc]}
      11:32:48,308 INFO STDOUT - DEBUG: Providers Listed By Protocol: {imaps=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc], imap=javax.mail.P
      rovider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], smtps=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc], pop3
      =javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc], pop3s=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun Microsystems, Inc],
       smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]}
      11:32:48,308 INFO STDOUT - DEBUG: successfully loaded resource: /META-INF/javamail.default.address.map
      11:32:48,308 INFO STDOUT - DEBUG: !anyLoaded
      11:32:48,324 INFO STDOUT - DEBUG: not loading resource: /META-INF/javamail.address.map
      11:32:48,324 INFO STDOUT - DEBUG: java.io.FileNotFoundException: C:\Program Files\Java\jdk1.5.0_12\jre\lib\javamail.address.map (The system cannot find the file specified)
      11:32:48,324 INFO org.jboss.mail.MailService - Mail Service bound to java:/Mail
      


      Here is part of the SLSB that is not deploying - note also that bean is intended to serve as a timer that rereads incoming mail from its mailSession:

      @Stateless
      @Name("mailReader")
      public class MailReaderBean implements MailReader {
      
       @Logger
       private Log log;
      
       @PersistenceContext(unitName = "accessControlDatabase")
       private EntityManager em;
      
       @Resource(mappedName = "java:/Mail")
       private Session mailSession;
      
       @Resource
       private TimerService timerService;
      
       @EJB(beanName="TerminationRequestManagerBean")
       private TerminationRequestManager terminationRequestManager;
      
       @EJB(beanName="ActiveUserReconcilerBean")
       private ActiveUserReconciler activeUserReconciler;
      
       @Timeout
       public void readEmail(Timer timer) {
       ... code ...
       }
      
       public void startReading() {
       ... code ...
       }
      
       public void stopReading() {
       ... code ...
       }
      
       public boolean isMailReaderTimerRunning() {
       ... code ...
       }
      }
      


      There is code in the .war part of my ear which attempts to lookup the MailReaderBean and call the startReading() method using standard JNDI - this code is now failing (was/is working in Seam 1.2.1 + JBoss 4.0.5):

      11:48:28,505 ERROR com.evergreen.accesscontrol.MailReaderStarterListener - javax.naming.NameNotFoundException: local not bound
      ....
      11:48:28,865 WARN com.evergreen.accesscontrol.MailReaderStarterListener - Unable to get MailConfigurationEditor using MailReaderJNDI='access-control-1.0/MailReaderBean/local'.
       MailReader not started.
      


      I've tried with and without adding mail-ra.rar and got the same problem. I'm also running with a jboss-app.xml that looks like this:

      <?xml version="1.0" encoding="utf-8"?>
      <!DOCTYPE jboss-app
       PUBLIC "-//JBoss//DTD J2EE Application 1.4//EN"
       "http://www.jboss.org/j2ee/dtd/jboss-app_4_2.dtd">
      <jboss-app>
       <module-order>strict</module-order>
       <loader-repository>
       evergreen.com:loader=access-control
       </loader-repository>
      </jboss-app>
      


      If I get rid of the <module-order>strict</module-order> then I get another exception related to problems with timers:

      11:46:39,506 WARN com.arjuna.ats.jta.logging.loggerI18N - [com.arjuna.ats.internal.jta.transaction.arjunacore.lastResource.disallow] [com.arjuna.ats.internal.jta.transaction.a
      rjunacore.lastResource.disallow] Adding multiple last resources is disallowed. Current resource is org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@ccd2
      49
      11:46:39,506 ERROR org.jboss.ejb.txtimer.TimerServiceImpl - Cannot create txtimer
      java.lang.IllegalStateException: Unable to persist timer
       at org.jboss.ejb.txtimer.DatabasePersistencePolicy.insertTimer(DatabasePersistencePolicy.java:124)
       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:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy30.insertTimer(Unknown Source)
       at org.jboss.ejb.txtimer.TimerServiceImpl.createTimer(TimerServiceImpl.java:256)
       at org.jboss.ejb.txtimer.TimerServiceImpl.createTimer(TimerServiceImpl.java:202)
       at org.jboss.ejb3.timerservice.jboss.TimerServiceFacade.createTimer(TimerServiceFacade.java:66)
       at com.evergreen.accesscontrol.impl.MailReaderBean.startReading(MailReaderBean.java:167)
       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:585)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
       at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
       at org.jboss.seam.intercept.EJBInvocationContext.proceed(EJBInvocationContext.java:44)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
       at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:31)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
       at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
       at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:116)
       at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:53)
       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:585)
       at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
       at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
       at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
       at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:106)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:214)
       at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:184)
       at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:81)
       at $Proxy238.startReading(Unknown Source)
       at com.evergreen.accesscontrol.MailReaderStarterListener.contextInitialized(MailReaderStarterListener.java:33)
       at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3854)
       at org.apache.catalina.core.StandardContext.start(StandardContext.java:4359)
       at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:761)
       at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:741)
       at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:553)
       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:585)
       at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
       at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.apache.catalina.core.StandardContext.init(StandardContext.java:5310)
       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:585)
       at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
       at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:301)
       at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeployer.java:104)
       at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:375)
       at org.jboss.web.WebModule.startModule(WebModule.java:83)
       at org.jboss.web.WebModule.startService(WebModule.java:61)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
       at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
       at $Proxy0.start(Unknown Source)
       at org.jboss.system.ServiceController.start(ServiceController.java:417)
       at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy45.start(Unknown Source)
       at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
       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:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
       at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
       at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
       at org.jboss.ws.integration.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:93)
       at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
       at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy46.start(Unknown Source)
       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
       at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy9.deploy(Unknown Source)
       at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
       at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
      Caused by: org.jboss.util.NestedSQLException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.
      Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: -53eef755:1210:46efef96:56 status: ActionStatus.ABORT_ONLY >); - nested
       throwable: (org.jboss.resource.JBossResourceException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException:
      java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: -53eef755:1210:46efef96:56 status: ActionStatus.ABORT_ONLY >)
      )
       at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:94)
       at org.jboss.ejb.txtimer.GeneralPurposeDatabasePersistencePlugin.insertTimer(GeneralPurposeDatabasePersistencePlugin.java:199)
       at org.jboss.ejb.txtimer.DatabasePersistencePolicy.insertTimer(DatabasePersistencePolicy.java:120)
       ... 149 more
      Caused by: org.jboss.resource.JBossResourceException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: ja
      va.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: -53eef755:1210:46efef96:56 status: ActionStatus.ABORT_ONLY >)
       at org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:343)
       at org.jboss.resource.connectionmanager.BaseConnectionManager2.reconnectManagedConnection(BaseConnectionManager2.java:518)
       at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:399)
       at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:842)
       at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
       ... 151 more
      Caused by: javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: -53eef755:1210:
      46efef96:56 status: ActionStatus.ABORT_ONLY >
       at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener$TransactionSynchronization.checkEnlisted(TxConnectionManager.java:744)
       at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist(TxConnectionManager.java:577)
       at org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:337)
       ... 155 more
      11:46:40,115 INFO org.jboss.seam.servlet.SeamFilter - Initializing filter: org.jboss.seam.web.ajax4jsfFilter
      11:46:40,131 INFO org.ajax4jsf.cache.CacheManager - Selected [org.ajax4jsf.cache.LRUMapCacheFactory] cache factory
      11:46:40,146 INFO org.ajax4jsf.cache.LRUMapCacheFactory - Creating LRUMap cache instance using parameters: {org.ajax4jsf.VIEW_HANDLERS=com.sun.facelets.FaceletViewHandler, com
      .sun.faces.injectionProvider=org.jboss.web.jsf.integration.injection.JBossInjectionProvider, facelets.LIBRARIES=/WEB-INF/evg-ac-taglib.xml, MailReaderJNDI=access-control-1.0/Ma
      ilReaderBean/local, facelets.DEVELOPMENT=true, javax.faces.DEFAULT_SUFFIX=.xhtml}
      11:46:40,146 INFO org.ajax4jsf.cache.LRUMapCacheFactory - Creating LRUMap cache instance of default capacity
      11:46:40,178 INFO org.ajax4jsf.cache.CacheManager - Selected [org.ajax4jsf.cache.LRUMapCacheFactory] cache factory
      11:46:40,178 INFO org.ajax4jsf.cache.LRUMapCacheFactory - Creating LRUMap cache instance using parameters: {org.ajax4jsf.VIEW_HANDLERS=com.sun.facelets.FaceletViewHandler, com
      .sun.faces.injectionProvider=org.jboss.web.jsf.integration.injection.JBossInjectionProvider, facelets.LIBRARIES=/WEB-INF/evg-ac-taglib.xml, MailReaderJNDI=access-control-1.0/Ma
      ilReaderBean/local, facelets.DEVELOPMENT=true, javax.faces.DEFAULT_SUFFIX=.xhtml}
      11:46:40,178 INFO org.ajax4jsf.cache.LRUMapCacheFactory - Creating LRUMap cache instance of default capacity
      11:46:40,178 INFO org.jboss.seam.servlet.SeamFilter - Initializing filter: org.jboss.seam.web.redirectFilter
      11:46:40,178 INFO org.jboss.seam.servlet.SeamFilter - Initializing filter: org.jboss.seam.web.exceptionFilter
      11:46:40,178 INFO org.jboss.seam.servlet.SeamFilter - Initializing filter: org.jboss.seam.web.multipartFilter
      11:46:40,178 INFO org.jboss.seam.servlet.SeamFilter - Initializing filter: org.jboss.seam.debug.hotDeployFilter
      11:46:40,287 INFO org.jboss.deployment.EARDeployer - Started J2EE application: file:/C:/jboss-app-servers/jboss-4.2.0.GA.EVG/server/default/deploy/access-control-1.0.ear
      11:46:43,303 WARN org.hibernate.impl.SessionFactoryObjectFactory - InitialContext did not implement EventContext
      11:48:15,412 INFO org.jboss.web.tomcat.service.TomcatDeployer - undeploy, ctxPath=/access, warUrl=.../tmp/deploy/tmp41094access-control-1.0.ear-contents/access-control-webapp-
      1.0-exp.war/
      11:48:15,427 INFO com.evergreen.accesscontrol.impl.MailReaderBean - There are currently 0 scheduled in this TimerService.
      


      so there are actually 2 issues here - I don't know why the ejb3 timer deployment is blowing up -and- I don't know why the MailReaderBean isn't deploying. When I check the JMX-CONSOLE, I see this for the MailReaderBean:

      +- access-control-1.0 (class: org.jnp.interfaces.NamingContext)
       | +- WorkFlowManagerBean (class: org.jnp.interfaces.NamingContext)
       | | +- local (proxy: $Proxy375 implements No ClassLoaders found for: com.evergreen.accesscontrol.WorkFlowManager (no security manager: RMI class loader disabled))
       | +- ActiveUserReconcilerBean (class: org.jnp.interfaces.NamingContext)
       | | +- local (proxy: $Proxy349 implements No ClassLoaders found for: com.evergreen.accesscontrol.ActiveUserReconciler (no security manager: RMI class loader disabled))
       | +- EntitlementStorageTypeListManagerBean (class: org.jnp.interfaces.NamingContext)
       | | +- localStatefulProxyFactory (class: org.jboss.ejb3.stateful.StatefulLocalProxyFactory)
       | | +- local (class: java.lang.Object)
       ......
       | +- MailReaderBean (class: org.jnp.interfaces.NamingContext)
       | | +- local (proxy: $Proxy366 implements No ClassLoaders found for: com.evergreen.accesscontrol.MailReader (no security manager: RMI class loader disabled))
      


      Help?

      Thanks,
      Brad Smith

        • 1. Re: JBoss 4.2.0 / 4.2.1 - Seam 2.0.0B1 - Mail Problem
          Pete Muir Master

           

          "bsmithjj" wrote:
          Here is part of the SLSB that is not deploying - note also that bean is intended to serve as a timer that rereads incoming mail from its mailSession:

          @Stateless
          @Name("mailReader")
          public class MailReaderBean implements MailReader {
          
           @Logger
           private Log log;
          
           @PersistenceContext(unitName = "accessControlDatabase")
           private EntityManager em;
          
           @Resource(mappedName = "java:/Mail")
           private Session mailSession;
          
           @Resource
           private TimerService timerService;
          
           @EJB(beanName="TerminationRequestManagerBean")
           private TerminationRequestManager terminationRequestManager;
          
           @EJB(beanName="ActiveUserReconcilerBean")
           private ActiveUserReconciler activeUserReconciler;
          
           @Timeout
           public void readEmail(Timer timer) {
           ... code ...
           }
          
           public void startReading() {
           ... code ...
           }
          
           public void stopReading() {
           ... code ...
           }
          
           public boolean isMailReaderTimerRunning() {
           ... code ...
           }
          }
          


          This is just injecting the MailSession using EJB3, not Seam, to inject the Seam managed mail session do:

          @In private javax.mail.Session mailSession;


          I've tried with and without adding mail-ra.rar and got the same problem. I'm also running with a jboss-app.xml that looks like this:


          mail-ra.rar is for incoming mail - so you can take that out of the equation.

          Sorry, not much help. But I don't think this has much to do with Seam.

          • 2. Re: JBoss 4.2.0 / 4.2.1 - Seam 2.0.0B1 - Mail Problem
            Bradley Smith Master

            Hi Pete,

            I appreciate your suggestion and info, however, the reason I used the @Resource approach is because in the past, when this bean woke up to perform its timeout method, the Seam annotations would not be obeyed (since the timeout method is not being invoked in a JSF request). I don't know if Seam is capable of intercepting Timeout methods at this point...do you?

            Thanks,
            Brad Smith

            • 3. Re: JBoss 4.2.0 / 4.2.1 - Seam 2.0.0B1 - Mail Problem
              Pete Muir Master

              It should if you use Seam timer support rather than EJB timer support.