1 2 Previous Next 26 Replies Latest reply on Oct 30, 2006 10:45 PM by modoc Go to original post
      • 15. Re: Scheduling in Seam?
        modoc

        Ok thanks! I added that entry to the components.xml, which appears to fix the main issue. However, I'm now having two other problems with the async service.

        The first is the following errors in the logs (although they don't appear to prevent the method from running:

        14:08:31,304 INFO [EJB3Deployer] Deployed: file:/opt/jboss-4.0.5.GA/server/default/deploy/10MinuteMail.ear/10MinuteMail.jar/
        14:08:31,366 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=10MinuteMail.ear,jar=jboss-seam.jar,name=Dispatcher,service=EJB3 with dependencies:
        14:08:31,598 INFO [EJBContainer] STARTED EJB: org.jboss.seam.core.Dispatcher ejbName: Dispatcher
        14:08:31,729 INFO [EJB3Deployer] Deployed: file:/opt/jboss-4.0.5.GA/server/default/deploy/10MinuteMail.ear/jboss-seam.jar
        14:08:31,742 INFO [TomcatDeployer] deploy, ctxPath=/10MinuteMail, warUrl=.../deploy/10MinuteMail.ear/10MinuteMail.war/
        
        
        14:08:31,766 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
         14:08:31,767 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
        
        
        14:08:31,923 INFO [ServletContextListener] Welcome to Seam 1.1.0.BETA1
        14:08:31,934 INFO [Initialization] reading components.xml
        14:08:32,166 INFO [Initialization] reading properties from: /seam.properties
        14:08:32,169 INFO [Initialization] reading properties from: /jndi.properties
        14:08:32,213 INFO [Initialization] initializing Seam
        



        The other problem is that the method gets called almost continuously. I don't know if it's every second, or immediately after the previous completion or what. I'm passing in 600,000 as the interval, I'm assuming that's milliseconds? So that should be every 10 minutes, I think.

         @Create
         public void doStartService() {
         mLog.info("Starting up...");
         mClientMap = new HashMap<String, SessionMailQueue>();
         mLog.info("Kicking off recurring email processor.");
         this.mEmailService.processEmailsRecurring(new Date(), 600000);
         }
        


        However it just runs the method repeatedly without a pause.

        Any suggestions would be appreciated. Thanks for all your help.

        Regards,

        Modoc

        • 16. Re: Scheduling in Seam?
          gavin.king

          The exception is probably caused by a classloading problem. Are you running all this inside JBoss AS? Do you have scoped classloading specified in jboss-app.xml?

          The repeated calls are the result of the exception, I would imagine.

          • 17. Re: Scheduling in Seam?
            modoc

            I am running this in JBoss AS. I have an exploded ear, with an exploded .jar with all my classes in it, and a .war with my xhtmls, etc...

            I am not specifying scoped classloading in the .xml. should I be?

            The only in my jboss-app.xml is this:

            <jboss-app>
             <loader-repository>
             seam.jboss.org:loader=10MinuteMail
             </loader-repository>
            </jboss-app>
            


            • 18. Re: Scheduling in Seam?
              gavin.king

              I have never tried to do this stuff with an exploded directly, but I don't see why that should make a difference.

              Those lines in jboss-app.xml are enabling scoped classloading, so you are ok there.

              So, I don't know what the problem is. (I know whats going wrong; I don't know the cause or how to fix it.)

              I suggest that tomorrow you grab a nightly build of the seampay example from CVS, which shows this stuff working (I just fixed a minor bug that was causing an error).

              • 19. Re: Scheduling in Seam?
                modoc

                I just updated from cvs, built the seampay example, and when I make a recurring payment I get the following error:

                17:14:33,691 INFO [STDOUT] Hibernate: select top ? account0_.id as id2_, account0_.balance as balance2_, account0_.accountNumber as accountN3_2_ from Account account0_ order by account0_.accountNumber
                17:14:36,727 INFO [STDOUT] Hibernate: select top ? account0_.id as id2_, account0_.balance as balance2_, account0_.accountNumber as accountN3_2_ from Account account0_ order by account0_.accountNumber
                17:14:36,764 INFO [STDOUT] Hibernate: select payments0_.account_id as account10_1_, payments0_.id as id1_, payments0_.id as id3_0_, payments0_.amount as amount3_0_, payments0_.payee as payee3_0_, payments0_.account_id as account10_3_0_, payments0_.paymentDate as paymentD4_3_0_, payments0_.createdDate as createdD5_3_0_, payments0_.lastPaid as lastPaid3_0_, payments0_.active as active3_0_, payments0_.paymentFrequency as paymentF8_3_0_, payments0_.timerHandle as timerHan9_3_0_ from Payment payments0_ where payments0_.account_id=?
                17:14:36,815 INFO [MyfacesConfig] No context init parameter 'org.apache.myfaces.PRETTY_HTML' found, using default value true
                17:14:36,815 INFO [MyfacesConfig] No context init parameter 'org.apache.myfaces.ALLOW_JAVASCRIPT' found, using default value true
                17:14:36,815 INFO [MyfacesConfig] Tomahawk jar not available. Autoscrolling, DetectJavascript, AddResourceClass and CheckExtensionsFilter are disabled now.
                17:14:47,933 INFO [STDOUT] Hibernate: select top ? account0_.id as id2_, account0_.balance as balance2_, account0_.accountNumber as accountN3_2_ from Account account0_ order by account0_.accountNumber
                17:14:47,939 INFO [STDOUT] Hibernate: select payments0_.account_id as account10_1_, payments0_.id as id1_, payments0_.id as id3_0_, payments0_.amount as amount3_0_, payments0_.payee as payee3_0_, payments0_.account_id as account10_3_0_, payments0_.paymentDate as paymentD4_3_0_, payments0_.createdDate as createdD5_3_0_, payments0_.lastPaid as lastPaid3_0_, payments0_.active as active3_0_, payments0_.paymentFrequency as paymentF8_3_0_, payments0_.timerHandle as timerHan9_3_0_ from Payment payments0_ where payments0_.account_id=?
                17:14:48,143 INFO [STDOUT] Hibernate: insert into Payment (id, amount, payee, account_id, paymentDate, createdDate, lastPaid, active, paymentFrequency, timerHandle) values (null, ?, ?, ?, ?, ?, ?, ?, ?, ?)
                17:14:48,147 INFO [STDOUT] Hibernate: call identity()
                17:14:48,158 INFO [PaymentController] scheduling instance org.jboss.seam.example.seampay.Payment@3f1ded
                17:14:48,286 ERROR [ExceptionInterceptor] redirecting to debug page
                java.lang.IllegalStateException: Cannot obtain inMethodFlag for: Timer.getHandle
                 at org.jboss.ejb.AllowedOperationsAssociation.assertAllowedIn(AllowedOperationsAssociation.java:145)
                 at org.jboss.ejb.txtimer.TimerImpl.assertAllowedOperation(TimerImpl.java:403)
                 at org.jboss.ejb.txtimer.TimerImpl.getHandle(TimerImpl.java:284)
                 at org.jboss.seam.example.seampay.PaymentController.saveAndSchedule(PaymentController.java:33)
                 at org.jboss.seam.example.seampay.PaymentController$$FastClassByCGLIB$$4b873d6b.invoke(<generated>)
                 at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
                 at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:47)
                 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
                 at org.jboss.seam.interceptors.ValidationInterceptor.validateTargetComponent(ValidationInterceptor.java:65)
                 at sun.reflect.GeneratedMethodAccessor120.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:585)
                 at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
                 at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:172)
                 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
                 at org.jboss.seam.interceptors.OutcomeInterceptor.interceptOutcome(OutcomeInterceptor.java:23)
                 at sun.reflect.GeneratedMethodAccessor119.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:585)
                 at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
                 at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:172)
                 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
                 at org.jboss.seam.interceptors.RollbackInterceptor.rollbackIfNecessary(RollbackInterceptor.java:30)
                 at sun.reflect.GeneratedMethodAccessor118.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:585)
                 at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
                 at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:172)
                 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
                 at org.jboss.seam.interceptors.BijectionInterceptor.bijectTargetComponent(BijectionInterceptor.java:51)
                 at sun.reflect.GeneratedMethodAccessor117.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:585)
                 at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
                 at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:172)
                 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
                 at org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRunningConversation(ConversationInterceptor.java:60)
                 at sun.reflect.GeneratedMethodAccessor116.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:585)
                 at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
                 at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:172)
                 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
                 at org.jboss.seam.interceptors.BusinessProcessInterceptor.manageBusinessProcessContext(BusinessProcessInterceptor.java:50)
                 at sun.reflect.GeneratedMethodAccessor115.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:585)
                 at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
                 at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:172)
                 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
                 at org.jboss.seam.interceptors.TransactionInterceptor$1.work(TransactionInterceptor.java:26)
                 at org.jboss.seam.util.Work.workInTransaction(Work.java:31)
                 at org.jboss.seam.interceptors.TransactionInterceptor.doInTransactionIfNecessary(TransactionInterceptor.java:20)
                 at sun.reflect.GeneratedMethodAccessor114.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:585)
                 at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
                 at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:172)
                 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
                 at org.jboss.seam.interceptors.ConversationalInterceptor.checkConversationForConversationalBean(ConversationalInterceptor.java:81)
                 at sun.reflect.GeneratedMethodAccessor113.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:585)
                 at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
                 at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:172)
                 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
                 at org.jboss.seam.interceptors.EventInterceptor.aroundInvoke(EventInterceptor.java:51)
                 at sun.reflect.GeneratedMethodAccessor112.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:585)
                 at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
                 at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:172)
                 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
                 at org.jboss.seam.interceptors.RemoveInterceptor.removeIfNecessary(RemoveInterceptor.java:40)
                 at sun.reflect.GeneratedMethodAccessor111.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:585)
                 at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
                 at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:172)
                 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
                 at org.jboss.seam.interceptors.ExceptionInterceptor.handleExceptions(ExceptionInterceptor.java:45)
                 at sun.reflect.GeneratedMethodAccessor110.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:585)
                 at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
                 at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:172)
                 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
                 at org.jboss.seam.interceptors.AsynchronousInterceptor.invokeAsynchronouslyIfNecessary(AsynchronousInterceptor.java:32)
                 at sun.reflect.GeneratedMethodAccessor109.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:585)
                 at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
                 at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:172)
                 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
                 at org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:168)
                 at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:141)
                 at org.jboss.seam.intercept.RootInterceptor.aroundInvoke(RootInterceptor.java:128)
                 at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:103)
                 at org.jboss.seam.intercept.JavaBeanInterceptor.intercept(JavaBeanInterceptor.java:69)
                 at org.jboss.seam.example.seampay.PaymentController$$EnhancerByCGLIB$$d883ac6f.saveAndSchedule(<generated>)
                 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 com.sun.el.parser.AstValue.invoke(AstValue.java:151)
                 at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
                 at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
                 at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:69)
                 at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63)
                 at javax.faces.component.UICommand.broadcast(UICommand.java:106)
                 at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:94)
                 at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:168)
                 at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:343)
                 at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
                 at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                 at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:33)
                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                 at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
                 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
                 at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
                 at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
                 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
                 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
                 at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
                 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
                 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
                 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
                 at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
                 at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
                 at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
                 at java.lang.Thread.run(Thread.java:613)
                17:14:48,305 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
                javax.faces.FacesException: Error calling action method of component with id _id15:_id32:_id41
                 at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:74)
                 at javax.faces.component.UICommand.broadcast(UICommand.java:106)
                 at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:94)
                 at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:168)
                 at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:343)
                 at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
                 at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                 at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:33)
                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                 at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
                 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
                 at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
                 at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
                 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
                 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
                 at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
                 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
                 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
                 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
                 at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
                 at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
                 at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
                 at java.lang.Thread.run(Thread.java:613)
                Caused by: javax.faces.el.EvaluationException: /search.xhtml @137,76 action="#{paymentHome.saveAndSchedule}": java.lang.IllegalStateException: Cannot obtain inMethodFlag for: Timer.getHandle
                 at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:73)
                 at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63)
                 ... 28 more
                Caused by: java.lang.IllegalStateException: Cannot obtain inMethodFlag for: Timer.getHandle
                 at org.jboss.ejb.AllowedOperationsAssociation.assertAllowedIn(AllowedOperationsAssociation.java:145)
                 at org.jboss.ejb.txtimer.TimerImpl.assertAllowedOperation(TimerImpl.java:403)
                 at org.jboss.ejb.txtimer.TimerImpl.getHandle(TimerImpl.java:284)
                 at org.jboss.seam.example.seampay.PaymentController.saveAndSchedule(PaymentController.java:33)
                 at org.jboss.seam.example.seampay.PaymentController$$FastClassByCGLIB$$4b873d6b.invoke(<generated>)
                 at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
                 at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:47)
                 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
                 at org.jboss.seam.interceptors.ValidationInterceptor.validateTargetComponent(ValidationInterceptor.java:65)
                 at sun.reflect.GeneratedMethodAccessor120.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:585)
                 at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
                 at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:172)
                 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
                 at org.jboss.seam.interceptors.OutcomeInterceptor.interceptOutcome(OutcomeInterceptor.java:23)
                 at sun.reflect.GeneratedMethodAccessor119.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:585)
                 at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
                 at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:172)
                 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
                 at org.jboss.seam.interceptors.RollbackInterceptor.rollbackIfNecessary(RollbackInterceptor.java:30)
                 at sun.reflect.GeneratedMethodAccessor118.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:585)
                 at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
                 at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:172)
                 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
                 at org.jboss.seam.interceptors.BijectionInterceptor.bijectTargetComponent(BijectionInterceptor.java:51)
                 at sun.reflect.GeneratedMethodAccessor117.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:585)
                 at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
                 at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:172)
                 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
                 at org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRunningConversation(ConversationInterceptor.java:60)
                 at sun.reflect.GeneratedMethodAccessor116.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:585)
                 at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
                 at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:172)
                 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
                 at org.jboss.seam.interceptors.BusinessProcessInterceptor.manageBusinessProcessContext(BusinessProcessInterceptor.java:50)
                 at sun.reflect.GeneratedMethodAccessor115.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:585)
                 at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
                 at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:172)
                 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
                 at org.jboss.seam.interceptors.TransactionInterceptor$1.work(TransactionInterceptor.java:26)
                 at org.jboss.seam.util.Work.workInTransaction(Work.java:31)
                 at org.jboss.seam.interceptors.TransactionInterceptor.doInTransactionIfNecessary(TransactionInterceptor.java:20)
                 at sun.reflect.GeneratedMethodAccessor114.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:585)
                 at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
                 at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:172)
                 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
                 at org.jboss.seam.interceptors.ConversationalInterceptor.checkConversationForConversationalBean(ConversationalInterceptor.java:81)
                 at sun.reflect.GeneratedMethodAccessor113.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:585)
                 at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
                 at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:172)
                 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
                 at org.jboss.seam.interceptors.EventInterceptor.aroundInvoke(EventInterceptor.java:51)
                 at sun.reflect.GeneratedMethodAccessor112.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:585)
                 at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
                 at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:172)
                 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
                 at org.jboss.seam.interceptors.RemoveInterceptor.removeIfNecessary(RemoveInterceptor.java:40)
                 at sun.reflect.GeneratedMethodAccessor111.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:585)
                 at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
                 at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:172)
                 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
                 at org.jboss.seam.interceptors.ExceptionInterceptor.handleExceptions(ExceptionInterceptor.java:45)
                 at sun.reflect.GeneratedMethodAccessor110.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:585)
                 at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
                 at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:172)
                 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
                 at org.jboss.seam.interceptors.AsynchronousInterceptor.invokeAsynchronouslyIfNecessary(AsynchronousInterceptor.java:32)
                 at sun.reflect.GeneratedMethodAccessor109.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:585)
                 at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
                 at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:172)
                 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
                 at org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:168)
                 at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:141)
                 at org.jboss.seam.intercept.RootInterceptor.aroundInvoke(RootInterceptor.java:128)
                 at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:103)
                 at org.jboss.seam.intercept.JavaBeanInterceptor.intercept(JavaBeanInterceptor.java:69)
                 at org.jboss.seam.example.seampay.PaymentController$$EnhancerByCGLIB$$d883ac6f.saveAndSchedule(<generated>)
                 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 com.sun.el.parser.AstValue.invoke(AstValue.java:151)
                 at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
                 at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
                 at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:69)
                 ... 29 more
                



                Other than how they fail, I haven't found any significant differences between the seampay example and my project, but I'll keep looking.

                Thanks!

                Modoc

                • 20. Re: Scheduling in Seam?
                  gavin.king

                  Then something is broken in your environment, since this runs perfectly for me.

                  • 21. Re: Scheduling in Seam?
                    modoc

                    The latest cvs checkout i have won't actually build. The example seam pay built and deployed just fine, but trying to build new seam jars fails, which I assume means that the fixes you made aren't making it into the example and it's picking up the old seam.jar file:

                    Buildfile: /Users/modoc/Documents/workspaces/digitalsanctuary/jboss-seam/build.xml
                    init:
                     [echo] Build JBoss Seam 1.1
                    compile:
                     [javac] Compiling 69 source files to /Users/modoc/Documents/workspaces/digitalsanctuary/jboss-seam/build/classes
                     [javac] /Users/modoc/Documents/workspaces/digitalsanctuary/jboss-seam/src/main/org/jboss/seam/security/SeamSecurityManager.java:210: cannot find symbol
                     [javac] symbol : method actions()
                     [javac] location: @interface org.jboss.seam.annotations.AclProvider
                     [javac] for (String action : p.actions().split("[,]"))
                     [javac] ^
                     [javac] Note: Some input files use or override a deprecated API.
                     [javac] Note: Recompile with -Xlint:deprecation for details.
                     [javac] Note: Some input files use unchecked or unsafe operations.
                     [javac] Note: Recompile with -Xlint:unchecked for details.
                     [javac] 1 error
                    



                    Secondly, I just noticed that by default all the timers are persisted. So as I modified code, each time the server started up again, it loaded up old timers that weren't valid, hence causing me many errors. But turning off all timer persistence, I was able to get things work, i think. I need to change a few things, but I think I'm on the right track.

                    I'll post back when I'm sure either way.

                    Thanks!

                    Modoc

                    • 22. Re: Scheduling in Seam?
                      modoc

                      Ok. It seems to work correctly now. Thank you for all your help!

                      The only thing that isn't quite right, and it doesn't seem to keep the timer from running, is this error:

                      18:37:45,877 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
                      


                      This only appears when I invoke the Asynchronous method from a @Create method on a component annotated with @Startup. I.e. when it's invoked by the container at startup, and not in the course of a user action.

                      If I invoke the Async method from a page, I don't see the error. Either way, the timer appears to function correctly after that error message.

                      Are Seam timers not meant to be used for server level (non-user based) processes?

                      Thanks!

                      Modoc

                      • 23. Re: Scheduling in Seam?
                        gavin.king

                        Oh, you didn't tell me that this was occurring during the startup cycle!

                        Well, that was easy to fix (get the fix from CVS).

                        • 24. Re: Scheduling in Seam?
                          modoc

                          Same Seam build error, looking for an actions() method on the AclProvider. There is an action() but no actions() afaik.

                          Modoc

                          • 25. Re: Scheduling in Seam?
                            gavin.king

                            Try again, Shane forgot to commit a file.

                            • 26. Re: Scheduling in Seam?
                              modoc

                              Awesome! That fixed it. Thanks!!

                              1 2 Previous Next