Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
JSP - A mailing list about Java Server Pages specification and reference
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Oracle Connection Pooling in 3 2 2
Servlet : Session invalidate
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Tomcat and webapplication specific java library path
Running a Simple JMS Example
Mapping in workers2 properties
org apache jasper JasperException
Cannot find message resources under key org apache struts action
   MESSAGE
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
url string for connecting jboss to oracle
Value attribute of <html:checkbox
javax servlet ServletException: BeanUtils populate
HTTP Status 404 The requested resource is not available
5 0 18: Windows XP Pro vs Windows 2000
 
- async timed events and mailing

- async timed events and mailing

2007-06-13       - By smeaggie

 Back
Hello All,

I have a small problem with emailing from my application. If a user triggers an
action in the web pages emailing works perfectly, however I also have a timed
service running started on deployement, wich must run every day. I use a pojo
controller wih basicly does this:

 | @(protected)("notifierController")
 | @(protected)()
 | @(protected)(ScopeType.APPLICATION)
 | public class NotifierController {
 |   @(protected)(create = true)
 |   private Notifier notifier;
 |  
 |   @(protected)()
 |   public void start() {
 |     Timer nTimer = notifier.check(0, 24*60*60*1000);
 |   }
 | }
 |
the Notifier object is a stateless session bean with the check() method in the
interface:

 | @(protected)()
 | public interface Notifier {
 |   @(protected)()
 |   public Timer check(@(protected) long d, @(protected) long i);
 | }
 |
>From the bean implementation I try to send the email like this:

 | @(protected)()
 | @(protected)("notifier")
 | public class NotifierBean implements Notifier {
 |   @(protected)()
 |   private Timer timer;
 |  
 |   @(protected)()
 |   private Renderer renderer;
 |  
 |   public Timer check(@(protected) long d, @(protected) long i) {
 |     try {
 |       this.renderer.render("/path/to/email.xhtml");
 |     } catch (Exception e) {
 |       e.printStackTrace();
 |     }
 |    
 |     return this.timer;
 |   }
 | }
 |
The email component is properly configured as it works from interface-triggered
bean methods, when this executes I get th exception:
anonymous wrote :
 | 12:50:15,337 ERROR [STDERR] java.lang.UnsupportedOperationException Source code of java.lang.UnsupportedOperationException
 | 12:50:15,337 ERROR [STDERR]     at org.jboss.seam.mock.MockApplication
.createComponent(MockApplication.java:154)
 | 12:50:15,337 ERROR [STDERR]     at com.sun.facelets.tag.jsf
.ComponentHandler.createComponent(ComponentHandler.java:243)
 | 12:50:15,337 ERROR [STDERR]     at com.sun.facelets.tag.jsf
.ComponentHandler.apply(ComponentHandler.java:139)
 | 12:50:15,337 ERROR [STDERR]     at com.sun.facelets.compiler
.NamespaceHandler.apply(NamespaceHandler.java:49)
 | 12:50:15,337 ERROR [STDERR]     at com.sun.facelets.compiler
.EncodingHandler.apply(EncodingHandler.java:25)
 | 12:50:15,337 ERROR [STDERR]     at com.sun.facelets.impl.DefaultFacelet Source code of com.sun.facelets.impl.DefaultFacelet
.apply(DefaultFacelet.java:95)
 | 12:50:15,337 ERROR [STDERR]     at org.jboss.seam.ui.facelet
.FaceletsRenderer.renderFacelet(FaceletsRenderer.java:107)
 | 12:50:15,337 ERROR [STDERR]     at org.jboss.seam.ui.facelet
.FaceletsRenderer.render(FaceletsRenderer.java:56)
 | 12:50:15,337 ERROR [STDERR]     at my.package.Notifier.check(NotifierBean
.java:20)
 | 12:50:15,337 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl
.invoke0(Native Method)
 | 12:50:15,337 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl
.invoke(NativeMethodAccessorImpl.java:39)
 | 12:50:15,337 ERROR [STDERR]     at sun.reflect.DelegatingMethodAccessorImpl
.invoke(DelegatingMethodAccessorImpl.java:25)
 | 12:50:15,337 ERROR [STDERR]     at java.lang.reflect.Method Source code of java.lang.reflect.Method(Method
.java:585)
 | 12:50:15,337 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation
.invokeNext(MethodInvocation.java:112)
 | 12:50:15,337 ERROR [STDERR]     at org.jboss.ejb3.interceptor
.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
 | 12:50:15,337 ERROR [STDERR]     at org.jboss.seam.intercept
.EJBInvocationContext.proceed(EJBInvocationContext.java:37)
 | 12:50:15,337 ERROR [STDERR]     at org.jboss.seam.intercept
.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
 | 12:50:15,337 ERROR [STDERR]     at org.jboss.seam.interceptors
.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:47)
 | 12:50:15,337 ERROR [STDERR]     at org.jboss.seam.intercept
.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
 | 12:50:15,337 ERROR [STDERR]     at org.jboss.seam.interceptors
.BusinessProcessInterceptor.aroundInvoke(BusinessProcessInterceptor.java:51)
 | 12:50:15,338 ERROR [STDERR]     at org.jboss.seam.intercept
.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
 | 12:50:15,338 ERROR [STDERR]     at org.jboss.seam.interceptors
.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:27)
 | 12:50:15,338 ERROR [STDERR]     at org.jboss.seam.intercept
.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
 | 12:50:15,338 ERROR [STDERR]     at org.jboss.seam.intercept.RootInterceptor
.invoke(RootInterceptor.java:103)
 | 12:50:15,338 ERROR [STDERR]     at org.jboss.seam.intercept
.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:53)
 | 12:50:15,338 ERROR [STDERR]     at sun.reflect.GeneratedMethodAccessor333
.invoke(Unknown Source)
 | 12:50:15,338 ERROR [STDERR]     at sun.reflect.DelegatingMethodAccessorImpl
.invoke(DelegatingMethodAccessorImpl.java:25)
 | 12:50:15,338 ERROR [STDERR]     at java.lang.reflect.Method Source code of java.lang.reflect.Method(Method
.java:585)
 | 12:50:15,338 ERROR [STDERR]     at org.jboss.ejb3.interceptor
.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
 | 12:50:15,338 ERROR [STDERR]     at org.jboss.ejb3.interceptor
.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
 |

The email is text only, no calls to other components or whatsoever. Somebody
knows what's the mistake I make?

Thanks in advance,
Eric

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic
&p=4053887#4053887

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode
=reply&p=4053887
__ ____ ____ ____ ____ ____ ____ ____ ____ ____
jboss-user mailing list
jboss-user@(protected)
https://lists.jboss.org/mailman/listinfo/jboss-user

©2008 junlu.com - Jax Systems, LLC, U.S.A.