[jboss-user] [JBoss Seam] - h:datatable/el not displaying data

paradigmza do-not-reply at jboss.com
Fri Aug 3 07:25:24 EDT 2007


Hi again,

I am using Seam 2.0.0 beta and Jboss 4.2.1,

I am having lots of problems using Seam from a quartz MDB bean (instead of from the web end where everything works perfectly)

This is an example of my xhtml file that is included in the email and in the web page... (It works from the web page)

includeData.xhtml

  |                <h:dataTable value="#{settlementList.resultList}" var="settlement">
  | 			<h:column>
  | 				#{settlement.testString}	
  | 			</h:column>
  | 			<h:column>
  | 				hello	
  | 			</h:column>
  | 		</h:dataTable>
  | 

where the resultList returns a List of 5 entity beans, and the value of testString is "bob"

I include this code using the standard
<ui:include src="/includeData.xhtml" />

now from the website, this displays a table with 5 rows and 2 columns, first column contains "bob" and second one contains "hello".

The email also has a 5 row table but the first column is empty and second column contains "bob"...

after lots of testing and debugging it looks like the el is not even parsing
#{settlement.testString} because if I change it to #{settlement.testasdegtqarString} the website gives an error where as the  email still sends with same results, I also tried to use rich:dataTable instead of h:dataTable hoping it was JSF-RI that was the problem and got this exception
anonymous wrote : 13:12:05,809 ERROR [SendSettlementEmailBean] could not EMAIL:
  | javax.faces.FacesException: Resources framework is not initialised, check web.xml for Filter configuration
  |         at org.ajax4jsf.framework.resource.ResourceBuilderImpl.getWebXml(ResourceBuilderImpl.java:109)
  |         at org.ajax4jsf.framework.resource.ResourceBuilderImpl.getUri(ResourceBuilderImpl.java:297)
  |         at org.ajax4jsf.framework.resource.InternetResourceBase.getUri(InternetResourceBase.java:211)
  |         at org.ajax4jsf.framework.resource.BaseResourceRenderer.encodeBegin(BaseResourceRenderer.java:62)
  |         at org.ajax4jsf.framework.resource.OneTimeRenderer.encodeBegin(OneTimeRenderer.java:48)
  |         at org.ajax4jsf.framework.resource.BaseResourceRenderer.encode(BaseResourceRenderer.java:45)
  |         at org.ajax4jsf.framework.resource.InternetResourceBase.encode(InternetResourceBase.java:306)
  |         at org.ajax4jsf.framework.renderer.HeaderResourcesRendererBase.encodeResourcesArray(HeaderResourcesRendererBase.java:131)
  |         at org.ajax4jsf.framework.renderer.HeaderResourcesRendererBase.preEncodeBegin(HeaderResourcesRendererBase.java:118)
  |         at org.ajax4jsf.framework.renderer.RendererBase.encodeBegin(RendererBase.java:98)
  |         at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:788)
  |         at javax.faces.component.UIData.encodeBegin(UIData.java:879)
  |         at org.ajax4jsf.ajax.repeat.UIDataAdaptor.encodeBegin(UIDataAdaptor.java:989)
  |         at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:269)
  |         at com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:117)
  |         at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
  |         at org.jboss.seam.ui.util.JSF.renderChild(JSF.java:175)
  |         at org.jboss.seam.ui.util.JSF.renderChildren(JSF.java:163)
  |         at org.jboss.seam.mail.ui.MailComponent.encode(MailComponent.java:80)
  |         at org.jboss.seam.mail.ui.MailComponent.encode(MailComponent.java:54)
  |         at org.jboss.seam.mail.ui.UIBody.encodeChildren(UIBody.java:44)
  |         at org.jboss.seam.ui.util.JSF.renderChild(JSF.java:175)
  |         at org.jboss.seam.ui.util.JSF.renderChildren(JSF.java:163)
  |         at org.jboss.seam.mail.ui.UIMessage.encodeChildren(UIMessage.java:155)
  |         at org.jboss.seam.ui.util.JSF.renderChild(JSF.java:175)
  |         at org.jboss.seam.ui.util.JSF.renderChildren(JSF.java:163)
  |         at org.jboss.seam.ui.facelet.FaceletsRenderer.renderFacelet(FaceletsRenderer.java:147)
  |         at org.jboss.seam.ui.facelet.FaceletsRenderer.render(FaceletsRenderer.java:111)
  |         at coza.healthbridge.justswipe.beans.session.SendSettlementEmailBean.sendEmail(SendSettlementEmailBean.java:63)
  |         at coza.healthbridge.justswipe.beans.session.SendSettlementEmailBean.sendEmails(SendSettlementEmailBean.java:56)
  |         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.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:46)
  |         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.ExtendedPersistenceContextPropagationInterceptor.invoke(ExtendedPersistenceContextPropagationInterceptor.java:57)
  |         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.invokeInCallerTx(TxPolicy.java:126)
  |         at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
  |         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.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:83)
  |         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.stateful.StatefulContainer.localInvoke(StatefulContainer.java:204)
  |         at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:100)
  |         at $Proxy158.sendEmails(Unknown Source)
  |         at coza.healthbridge.justswipe.beans.services.QuartzMDBBean.execute(QuartzMDBBean.java:25)
  |         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.RootInterceptor.invoke(RootInterceptor.java:101)
  |         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.invokeInCallerTx(TxPolicy.java:126)
  |         at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
  |         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.ejb3.mdb.MessagingContainer.localInvoke(MessagingContainer.java:245)
  |         at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.delivery(MessageInflowLocalProxy.java:268)
  |         at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.invoke(MessageInflowLocalProxy.java:138)
  |         at $Proxy161.execute(Unknown Source)
  |         at org.jboss.resource.adapter.quartz.inflow.QuartzJob.execute(QuartzJob.java:57)
  |         at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
  |         at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)


I am not sure if changing to rich faces would solve the problem...


The rest of my code is
@MessageDriven(activationConfig = { @ActivationConfigProperty(propertyName = "cronTrigger", propertyValue = "0 0/1 * * * ?") })
  | @ResourceAdapter("quartz-ra.rar")
  | @Depends("jboss.ha:service=HASingletonDeployer,type=Barrier")
  | public class QuartzMDBBean implements Job {
  | 
  | 	@EJB
  | 	SendSettlementEmail email;
  | 
  | 	public void execute(JobExecutionContext jobExecutionContext)
  | 			throws JobExecutionException {
  | 		email.sendEmails();
  | 	}
  | }
  | 

and the actual bean that is emailing



@Stateless
  | @Name("sendEmailsBean")
  | public class SendSettlementEmailBean implements SendSettlementEmail {
  | 
  | 	@Logger
  | 	Log log;
  | 	
  | 	@In(create = true)
  | 	private Renderer renderer;
  | 
  | 	private void sendEmails() {
  | 		try {
  | 			renderer.render("/emails/settlementReport.xhtml");
  | 			log.debug("Email Sent");
  | 		} catch (Exception e) {
  | 			log.error("could not EMAIL:", e);
  | 		}
  | 	}
  | }
  | 

any ideas? please?, if you need any more info, just ask... because I am having trouble just understanding what the real problem is... 

Sean.

ps. This used to work with JBoss 4.0.5 and Seam 1.2.1

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

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4070503



More information about the jboss-user mailing list