Tuesday, December 30, 2008

Show Business Logic Validation/Error/Exception in JSF pages Using AJAX4JSF in Seam Application.

I am facing issue while adding FacesMessages to the Current FacesConfig. My Implementation is as Follows
public void addUser(){
......
String message = "Duplicate user name. Username already exists";
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage( FacesMessage.SEVERITY_INFO, message, message));
}

But I am getting the following warning and I am not able to Show the error message in the Client Side Page.

WARNING: FacesMessage(s) have been enqueued, but may not have been displayed.sourceId=rstReport:timeHorizonDecoration:timeHorizon[severity=(ERROR 2), summary=(value is required), detail=(value is required)]

The Solution I made as
I have Created a Utility class to add the Error messages into the Current FacesConfig Instance.

import java.util.Iterator;

import javax.faces.application.FacesMessage;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;

public class ErrorMsgUtil {
   public static void addError(FacesMessage.Severity severity,String componentId,String    messageText){
       FacesMessage message = new FacesMessage(messageText);
       FacesContext context = FacesContext.getCurrentInstance();
       UIComponent component = findComponent(context.getViewRoot(), componentId);
       context.addMessage(component.getClientId(context), message);
   }

   private static UIComponent findComponent(UIComponent parent, String id) {
       if(id.equals(parent.getId())) {
          return parent;
       }
       Iterator kids = parent.getFacetsAndChildren();
       while(kids.hasNext()) {
          UIComponent kid = kids.next();
          UIComponent found = findComponent(kid, id);
          if(found != null) {
             return found;
          }
       }
       return null;
   }
}


And I have Called the Error Method as Follows

public void addUser(){
   try{
      ...........
      ... addUser ... Code
   }catch(UserAlreadyExistException e){
      String message = "Duplicate user name. Username already exists";
      ErrorMsgUtil.addError(FacesMessage.SEVERITY_ERROR,"errorMsg", msg);
   }
}


and added one h:message for="errorMsg";

It is working fine for the AJAX4JSF Page implementation.

Wednesday, December 10, 2008

javax.faces.FacesException: 530-5.5.1 Authentication Required. Learn more at 530 5.5.1 http://mail.google.com/support/bin/answer.

javax.faces.FacesException: 530-5.5.1 Authentication Required. Learn more at
530 5.5.1 http://mail.google.com/support/bin/answer.py?answer=14257 i6sm1479332tid.16
13:11:44,855 ERROR [STDERR] at org.jboss.seam.mail.ui.UIMessage.encodeEnd(UIMessage.java:146)
13:11:44,855 ERROR [STDERR] at org.jboss.seam.ui.util.JSF.renderChild(JSF.java:181)
13:11:44,855 ERROR [STDERR] at org.jboss.seam.ui.util.JSF.renderChildren(JSF.java:163)
13:11:44,855 ERROR [STDERR] at org.jboss.seam.ui.facelet.FaceletsRenderer.renderFacelet(FaceletsRenderer.java:206)
13:11:44,855 ERROR [STDERR] at org.jboss.seam.ui.facelet.FaceletsRenderer$1.process(FaceletsRenderer.java:160)
13:11:44,855 ERROR [STDERR] at org.jboss.seam.ui.facelet.FaceletsRenderer$RenderingContext.run(FaceletsRenderer.java:78)
13:11:44,855 ERROR [STDERR] at org.jboss.seam.ui.facelet.FaceletsRenderer.render(FaceletsRenderer.java:169)
13:11:44,855 ERROR [STDERR] at org.domain.EMSeam2.session.email.EmailAction.send(EmailAction.java:19)
13:11:44,855 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
13:11:44,855 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
13:11:44,855 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
13:11:44,855 ERROR [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
13:11:44,855 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
13:11:44,855 ERROR [STDERR] at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
13:11:44,855 ERROR [STDERR] at org.jboss.seam.intercept.EJBInvocationContext.proceed(EJBInvocationContext.java:44)
13:11:44,855 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
13:11:44,855 ERROR [STDERR] at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:46)
13:11:44,855 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
13:11:44,855 ERROR [STDERR] at org.jboss.seam.persistence.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.java:48)
13:11:44,855 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
13:11:44,855 ERROR [STDERR] at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:31)
13:11:44,855 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
13:11:44,855 ERROR [STDERR] at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
13:11:44,855 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
13:11:44,855 ERROR [STDERR] at org.jboss.seam.persistence.EntityManagerProxyInterceptor.aroundInvoke(EntityManagerProxyInterceptor.java:26)
13:11:44,855 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
13:11:44,855 ERROR [STDERR] at org.jboss.seam.persistence.HibernateSessionProxyInterceptor.aroundInvoke(HibernateSessionProxyInterceptor.java:27)
13:11:44,855 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
13:11:44,855 ERROR [STDERR] at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:106)
13:11:44,855 ERROR [STDERR] at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:50)
13:11:44,855 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor428.invoke(Unknown Source)
13:11:44,855 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
13:11:44,855 ERROR [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
13:11:44,855 ERROR [STDERR] at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
13:11:44,855 ERROR [STDERR] at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
13:11:44,855 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
13:11:44,855 ERROR [STDERR] at org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor.invoke(ExtendedPersistenceContextPropagationInterceptor.java:57)
13:11:44,855 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
13:11:44,855 ERROR [STDERR] at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
13:11:44,855 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
13:11:44,855 ERROR [STDERR] at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
13:11:44,855 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
13:11:44,855 ERROR [STDERR] at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
13:11:44,855 ERROR [STDERR] at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
13:11:44,855 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
13:11:44,855 ERROR [STDERR] at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:94)
13:11:44,855 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
13:11:44,855 ERROR [STDERR] at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:83)
13:11:44,855 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
13:11:44,855 ERROR [STDERR] at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
13:11:44,855 ERROR [STDERR] at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:106)
13:11:44,855 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
13:11:44,855 ERROR [STDERR] at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
13:11:44,855 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
13:11:44,855 ERROR [STDERR] at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
13:11:44,855 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
13:11:44,855 ERROR [STDERR] at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:204)
13:11:44,855 ERROR [STDERR] at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:117)
13:11:44,855 ERROR [STDERR] at $Proxy168.send(Unknown Source)
13:11:44,855 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
13:11:44,855 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
13:11:44,855 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
13:11:44,855 ERROR [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
13:11:44,855 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
13:11:44,855 ERROR [STDERR] at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
13:11:44,855 ERROR [STDERR] at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:76)
13:11:44,855 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
13:11:44,855 ERROR [STDERR] at org.jboss.seam.ejb.RemoveInterceptor.aroundInvoke(RemoveInterceptor.java:41)
13:11:44,855 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
13:11:44,855 ERROR [STDERR] at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:106)
13:11:44,855 ERROR [STDERR] at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:54)
13:11:44,855 ERROR [STDERR] at org.javassist.tmp.java.lang.Object_$$_javassist_1.send(Object_$$_javassist_1.java)
13:11:44,855 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
13:11:44,855 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
13:11:44,855 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
13:11:44,855 ERROR [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
13:11:44,855 ERROR [STDERR] at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:328)
13:11:44,855 ERROR [STDERR] at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:341)
13:11:44,871 ERROR [STDERR] at org.jboss.el.parser.AstPropertySuffix.invoke(AstPropertySuffix.java:58)
13:11:44,871 ERROR [STDERR] at org.jboss.el.parser.AstValue.invoke(AstValue.java:96)
13:11:44,871 ERROR [STDERR] at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
13:11:44,871 ERROR [STDERR] at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
13:11:44,871 ERROR [STDERR] at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:77)
13:11:44,871 ERROR [STDERR] at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
13:11:44,871 ERROR [STDERR] at javax.faces.component.UICommand.broadcast(UICommand.java:383)
13:11:44,871 ERROR [STDERR] at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:321)
13:11:44,871 ERROR [STDERR] at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:296)
13:11:44,871 ERROR [STDERR] at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:253)
13:11:44,871 ERROR [STDERR] at org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:466)
13:11:44,871 ERROR [STDERR] at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
13:11:44,871 ERROR [STDERR] at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
13:11:44,871 ERROR [STDERR] at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
13:11:44,871 ERROR [STDERR] at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
13:11:44,871 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
13:11:44,871 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
13:11:44,871 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
13:11:44,871 ERROR [STDERR] at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
13:11:44,871 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
13:11:44,871 ERROR [STDERR] at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
13:11:44,871 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
13:11:44,871 ERROR [STDERR] at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
13:11:44,871 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
13:11:44,871 ERROR [STDERR] at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:177)
13:11:44,871 ERROR [STDERR] at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:267)
13:11:44,871 ERROR [STDERR] at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:380)
13:11:44,871 ERROR [STDERR] at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:507)
13:11:44,871 ERROR [STDERR] at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
13:11:44,871 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
13:11:44,871 ERROR [STDERR] at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
13:11:44,871 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
13:11:44,871 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
13:11:44,871 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
13:11:44,871 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
13:11:44,871 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
13:11:44,871 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
13:11:44,871 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
13:11:44,871 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
13:11:44,871 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
13:11:44,871 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
13:11:44,871 ERROR [STDERR] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
13:11:44,871 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
13:11:44,871 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
13:11:44,871 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
13:11:44,871 ERROR [STDERR] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
13:11:44,871 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
13:11:44,871 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
13:11:44,871 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
13:11:44,871 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
13:11:44,871 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
13:11:44,871 ERROR [STDERR] at java.lang.Thread.run(Unknown Source)
13:11:44,871 ERROR [STDERR] Caused by: com.sun.mail.smtp.SMTPSendFailedException: 530-5.5.1 Authentication Required. Learn more at
530 5.5.1 http://mail.google.com/support/bin/answer.py?answer=14257 i6sm1479332tid.16
13:11:44,871 ERROR [STDERR] at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1388)
13:11:44,871 ERROR [STDERR] at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:959)
13:11:44,871 ERROR [STDERR] at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:583)
13:11:44,871 ERROR [STDERR] at org.jboss.seam.mail.ui.UIMessage.encodeEnd(UIMessage.java:141)
13:11:44,871 ERROR [STDERR] ... 129 more


Solution

To Resolve this Issue, Add the property
mail.smtp.auth in property file with Value="True"

javax.faces.FacesException: 530 5.7.0 Must issue a STARTTLS command first. b4sm3763817tic.22

Solution is At the End.

12:34:40,096 ERROR [STDERR] at org.jboss.seam.mail.ui.UIMessage.encodeEnd(UIMessage.java:146)
12:34:40,096 ERROR [STDERR] at org.jboss.seam.ui.util.JSF.renderChild(JSF.java:181)
12:34:40,096 ERROR [STDERR] at org.jboss.seam.ui.util.JSF.renderChildren(JSF.java:163)
12:34:40,112 ERROR [STDERR] at org.jboss.seam.ui.facelet.FaceletsRenderer.renderFacelet(FaceletsRenderer.java:206)
12:34:40,112 ERROR [STDERR] at org.jboss.seam.ui.facelet.FaceletsRenderer$1.process(FaceletsRenderer.java:160)
12:34:40,112 ERROR [STDERR] at

org.jboss.seam.ui.facelet.FaceletsRenderer$RenderingContext.run(FaceletsRenderer.java:78)
12:34:40,112 ERROR [STDERR] at org.jboss.seam.ui.facelet.FaceletsRenderer.render(FaceletsRenderer.java:169)
12:34:40,112 ERROR [STDERR] at org.domain.EMSeam2.session.email.EmailAction.send(EmailAction.java:19)
12:34:40,112 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
12:34:40,112 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
12:34:40,112 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
12:34:40,112 ERROR [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
12:34:40,112 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
12:34:40,112 ERROR [STDERR] at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
12:34:40,112 ERROR [STDERR] at org.jboss.seam.intercept.EJBInvocationContext.proceed(EJBInvocationContext.java:44)
12:34:40,112 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
12:34:40,112 ERROR [STDERR] at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:46)
12:34:40,112 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
12:34:40,112 ERROR [STDERR] at org.jboss.seam.persistence.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.java:48)
12:34:40,112 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
12:34:40,112 ERROR [STDERR] at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:31)
12:34:40,112 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
12:34:40,112 ERROR [STDERR] at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
12:34:40,112 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
12:34:40,112 ERROR [STDERR] at org.jboss.seam.persistence.EntityManagerProxyInterceptor.aroundInvoke(EntityManagerProxyInterceptor.java:26)
12:34:40,112 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
12:34:40,112 ERROR [STDERR] at org.jboss.seam.persistence.HibernateSessionProxyInterceptor.aroundInvoke(HibernateSessionProxyInterceptor.java:27)
12:34:40,112 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
12:34:40,112 ERROR [STDERR] at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:106)
12:34:40,112 ERROR [STDERR] at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:50)
12:34:40,112 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
12:34:40,112 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
12:34:40,112 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
12:34:40,112 ERROR [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
12:34:40,112 ERROR [STDERR] at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
12:34:40,112 ERROR [STDERR] at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
12:34:40,112 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
12:34:40,112 ERROR [STDERR] at org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor.invoke(ExtendedPersistenceContextPropagationInterceptor.java:57)
12:34:40,112 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
12:34:40,112 ERROR [STDERR] at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
12:34:40,112 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
12:34:40,112 ERROR [STDERR] at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
12:34:40,112 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
12:34:40,112 ERROR [STDERR] at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
12:34:40,112 ERROR [STDERR] at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
12:34:40,112 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
12:34:40,112 ERROR [STDERR] at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:94)
12:34:40,112 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
12:34:40,112 ERROR [STDERR] at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:83)
12:34:40,112 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
12:34:40,112 ERROR [STDERR] at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
12:34:40,112 ERROR [STDERR] at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:106)
12:34:40,112 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
12:34:40,112 ERROR [STDERR] at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
12:34:40,112 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
12:34:40,112 ERROR [STDERR] at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
12:34:40,112 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
12:34:40,112 ERROR [STDERR] at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:204)
12:34:40,112 ERROR [STDERR] at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:117)
12:34:40,112 ERROR [STDERR] at $Proxy168.send(Unknown Source)
12:34:40,112 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
12:34:40,112 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
12:34:40,112 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
12:34:40,112 ERROR [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
12:34:40,112 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
12:34:40,112 ERROR [STDERR] at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
12:34:40,112 ERROR [STDERR] at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:76)
12:34:40,112 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
12:34:40,112 ERROR [STDERR] at org.jboss.seam.ejb.RemoveInterceptor.aroundInvoke(RemoveInterceptor.java:41)
12:34:40,112 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
12:34:40,112 ERROR [STDERR] at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:106)
12:34:40,112 ERROR [STDERR] at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:54)
12:34:40,112 ERROR [STDERR] at org.javassist.tmp.java.lang.Object_$_javassist_1.send(Object_$_javassist_1.java)
12:34:40,112 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
12:34:40,112 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
12:34:40,112 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
12:34:40,112 ERROR [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
12:34:40,112 ERROR [STDERR] at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:328)
12:34:40,112 ERROR [STDERR] at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:341)
12:34:40,112 ERROR [STDERR] at org.jboss.el.parser.AstPropertySuffix.invoke(AstPropertySuffix.java:58)
12:34:40,112 ERROR [STDERR] at org.jboss.el.parser.AstValue.invoke(AstValue.java:96)
12:34:40,112 ERROR [STDERR] at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
12:34:40,112 ERROR [STDERR] at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
12:34:40,112 ERROR [STDERR] at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:77)
12:34:40,112 ERROR [STDERR] at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
12:34:40,112 ERROR [STDERR] at javax.faces.component.UICommand.broadcast(UICommand.java:383)
12:34:40,112 ERROR [STDERR] at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:321)
12:34:40,112 ERROR [STDERR] at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:296)
12:34:40,112 ERROR [STDERR] at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:253)
12:34:40,112 ERROR [STDERR] at org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:466)
12:34:40,112 ERROR [STDERR] at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
12:34:40,112 ERROR [STDERR] at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
12:34:40,112 ERROR [STDERR] at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
12:34:40,112 ERROR [STDERR] at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
12:34:40,112 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
12:34:40,112 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
12:34:40,112 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
12:34:40,112 ERROR [STDERR] at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
12:34:40,112 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
12:34:40,112 ERROR [STDERR] at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
12:34:40,112 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
12:34:40,112 ERROR [STDERR] at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
12:34:40,112 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
12:34:40,112 ERROR [STDERR] at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:177)
12:34:40,112 ERROR [STDERR] at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:267)
12:34:40,112 ERROR [STDERR] at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:380)
12:34:40,112 ERROR [STDERR] at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:507)
12:34:40,112 ERROR [STDERR] at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
12:34:40,112 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
12:34:40,112 ERROR [STDERR] at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
12:34:40,112 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
12:34:40,112 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
12:34:40,112 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
12:34:40,112 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
12:34:40,112 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
12:34:40,112 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
12:34:40,112 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
12:34:40,112 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
12:34:40,112 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
12:34:40,112 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
12:34:40,112 ERROR [STDERR] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
12:34:40,112 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
12:34:40,112 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
12:34:40,112 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
12:34:40,112 ERROR [STDERR] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
12:34:40,112 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
12:34:40,112 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
12:34:40,112 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
12:34:40,112 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
12:34:40,112 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
12:34:40,112 ERROR [STDERR] at java.lang.Thread.run(Unknown Source)
12:34:40,112 ERROR [STDERR] Caused by: com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.0 Must issue a STARTTLS command first. b4sm3763817tic.22
12:34:40,112 ERROR [STDERR] at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1388)
12:34:40,112 ERROR [STDERR] at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:959)
12:34:40,112 ERROR [STDERR] at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:583)
12:34:40,112 ERROR [STDERR] at org.jboss.seam.mail.ui.UIMessage.encodeEnd(UIMessage.java:141)
12:34:40,112 ERROR [STDERR] ... 130 more
12:34:40,112 INFO [EmailAction] Error while sending the mail

Solution:
This Bug is Just because of the Absence of the Property


Add this property in the

mail-service.xml as follows.




Thanks
Asker Ali M

How to Integrate Seam2.0 with GMail SMTP to Send Mails.

Hi,
Step 1.

For Setting Up the GMail SMTP for the Seam mail Functionality First of All Set the SMTP details in the mail-service.xml in the JBoss\server\default\deploy Folder.
Create on Mail Template File As Follows.
Also Add the property mail.smtp.auth

property name="mail.smtp.auth" value="true" in the properties File.

Step 2:


Set this Configuration File Entry in Components.xml file as follows.
Comment the Existing Session !-- mail:mail-session host="localhost" port="2525" username="test" password="test" --

And teh new Entry will be as follows.
mail:mail-session session-jndi-name="java:/Mail"/

Step 3.

Create an XHTML FIle With Mail Format as follows like Simplemail.xhtml



Step 4:

Create an Session Bean to handle the Request and Send the mail.Named EmailAction.java
import javax.ejb.Local;

@Local
public interface Email{
public void send();
public void destroy();
}

import javax.ejb.Remove;
import javax.ejb.Stateful;

import org.jboss.seam.annotations.Destroy;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Logger;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.log.Log;
@Stateful
@Name("email")
public class EmailAction implements Email
{    
    @In(create=true)
    private org.jboss.seam.faces.Renderer renderer;
   
    @Logger private Log log;
    public void send() {
      try {
         renderer.render("/samplemail.xhtml");
         log.info("email sent to asker");
     }catch (Exception e) {
         e.printStackTrace();
         log.info("Error while sending the mail");
     }
    }

    @Remove
    @Destroy
    public void destroy() {}
    }
}

Call this send method from any of the JSF Command Button as follows.
h:commandLink value="Send Mail to Asker" action="#{email.send}"/.

Monday, December 1, 2008

Seam Books and Article Online.

























The best URL Available is :http://docs.jboss.org/seam/1.2.1.GA/reference/en/html/index.html

The Best Book I found for a Beginner is Practical JBoss Seam Projects.You can Download this PDF Free from http://www.flazx.com/ebook8859.php or Contact Me: askeralim@gmail.com.

Here are the Best 15 Best JBoss Seam Tutorials.

Sunday, November 30, 2008

Seam Interview Questions

  1. How a Transaction can be managed in Seam Application.
  2. What are the Different Seam Components.
  3. What is the Use of @Transient Annotation.
  4. @WebRemote How It works in Seam AJAX Implementation.
  5. Can we have stateless session bean for Conversation Context.
  6. Attribute for Synchronized AJAX REQUEST in AJAX4JSF?
  7. What is the difference between s:link and h:commandLink.
  8. What is the difference between h:commandLink and h:outputLink.
  9. How Event Handling is being done in Seam Framework.
  10. What are the Implicit and Explicit Conversation.
  11. In which phase of JSF Life Cycle the Implicit Conversation will be started and Destroyed.
  12. In which phase of JSF Life Cycle the explicit will be started and Destroyed.
  13. How Can you set the Conversation Time out in Seam Application.
  14. What is the Annotation for Synchronized Access to a Action Listener Method.






Answers:
What is the difference between s:link and h:commandLink?

The s:link tag renders an HTML anchor tag with an "href" attribute. The display value of the link can also be obtained from a message bundle to support internationalization (I18N). This link does not submit an HTML form when included on the page.

This tag facilitates the construction of Seam conversation-aware HTML hyperlinks by allowing you to include invoke JSF backing bean actions using browser-friendly hyperlinks. The Seam conversationId parameter is included automatically in the request by this tag.

Example:





HTML Output

Open Project

What is Bijection in Seam.


The combination of injection and outjection is known as bijection.Bijection is managed by a method interceptor. Injection occurs prior tothe method being invoked, and outjection occurs when the invocation iscomplete. You can think of the context variables participating in thisinteraction as flowing through the component as it's invoked. Injectiontakes context variables from the Seam container and assigns them toproperties on the target instance, and outjection promotes the value ofits properties to context variables.

Seam Bijection Support the Following:
  • Two-way propagation of references: A component can have a reference injected by the container, and a component can also “outject” a reference to the enclosing context as well
  • Dynamic updates: Instead of doing one-time injection of references, bijection is done on each invocation of the component. This is key in the Seam component model, since components can be stateful, and therefore they and their dependent beans can evolve across invocations.
  • Multiple contexts: Dependencies (incoming and outgoing) can be established across multiple Seam contexts, rather than being forced to exist within a single context. So a session-scoped component can inject request-scoped beans and outject application-scoped beans, for example.
Bijection differs from IoC in that it is dynamic, contextual, and bidirectional. You can think of it as a mechanism for aliasing contextual variables (names in the various contexts bound to the current thread) to attributes of the component. Bijection allows auto-assembly of stateful components by the container. It even allows a component to safely and easily manipulate the value of a context variable, just by assigning to an attribute of the component.

Monday, November 24, 2008

Generics and Wildcards.

1.What will be the output of This program?

public class ArrayToCollection {
   public static void main(String s[]){
       int a[]=new int[10];
       for(int i=0;i<10;i++){
         a[i]=i;
       }

       for(Integer i:a){
         System.out.print(" "+i);
       }
   }
}
Answer :0 1 2 3 4 5 6 7 8 9

2.

Tuesday, August 19, 2008

Error on File output Stream in Jboss Seam application

The Sessin Bean mthod as follows
public void file(){
       HttpServletResponse response = (HttpServletResponse)facesContext.getResponse();
       response.setContentType("application/rtf");
       response.addHeader("Content-disposition", "attachment; filename=Direct.rtf");

       try{
          ServletOutputStream os = response.getOutputStream();
          File file = new File("c:\\Direct.rtf");
          FileInputStream fis = new FileInputStream(file);
          byte bytes[]=new byte[1000];
          int read=0;
          while((read = fis.read(bytes)) != -1){
              os.write(bytes,0,read);
          }

          os.flush();
          facesContext.responseComplete();
          os.close();

          log.info("\nSuccess\n");
       }catch(Exception e){
          log.info("\nFailure : " + e.toString() + "\n");
       }
    log.info("Completed");
   }

The tag as follows.
Open file

But I am getting the following exception
SEVERE: Error Rendering View[/testTable.xhtml]
java.lang.IllegalStateException: Servlet response already use stream, Writer not possible
at org.ajax4jsf.webapp.FilterServletResponseWrapper.getWriter(FilterServletResponseWrapper.java:226)
at javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.java:112)
at com.sun.facelets.FaceletViewHandler.createResponseWriter(FaceletViewHandler.java:414)
at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:571)
at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:189)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:147)
at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:256)
at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:362)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:488)
at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)

Wednesday, August 6, 2008

Kerala:How the mindset of young Muslims is changing

"Muslims in Malappuram believe that they can use education as a tool to change their lives for the better," says Malappuram native Dr Husain Randathani, who is into the final stages of his book Mappila Muslims: Society and Struggle.
"The liberalisation of the Indian economy has triggered a growing belief in education, because they -- especially the younger Muslims -- believe they too can join the economic bandwagon, they can be a part of it and benefit from it."

"We tell our students that religion is a must," says Abdul Hakim, a teacher at Baitul-Huda, a private school at Kozhichana in Malappuram, the Muslim-dominated district in north Kerala.
"But we also tell them that religious education is in itself not enough -- they need to learn English, they need to learn regular subjects, and they need to excel in these studies in order to hold their own, and to compete, with the rest of the world."

Taken together, those two statements encapsulate a dramatic change that is sweeping across a district that is over 90 per cent Muslim in population: The younger generation increasingly believes in education as the panacea for their ills, and the elder generation is willing to break the mindset of a lifetime, and concede that a Koran-centric education will no longer suffice.

P P Abdul Rasheed has been closely associated with this changing landscape, first as a professor at Farookh College, Kerala's first exclusively Muslim college, and more recently, as principal of a newly established private educational institution in Malappuram.

"I remember some seven years ago, we did a sample survey in Farookh College," Professor Rasheed recalls. "We asked the students what they wanted to be when they grew up -- and an overwhelming majority said they wanted to go to the Gulf."

"They didn't say what they wanted to do there -- just going there was an end in itself. Becoming a cricket player was second on the list, then came doctors, engineers and such. No one wanted to go for the IAS and other competitive exams; no one, not one single respondent, wanted to be a scientist."
A similar survey a little over a year ago produced radically different results, Rasheed says: The number of Gulf aspirants dropped below the 50 per cent mark; careers in information technology came out of nowhere and moved into the second slot; a sizeable number opted for science and related areas of specialisation -- and not one single respondent mentioned cricket as a career goal.

"Aspirations are changing, and very clearly, as you can see from the interest in IT, the increased opportunities within India are driving that change," Professor Rasheed suggests.
He isolates two factors that are acting as catalysts: "One, till the turn of the century, a vast majority of the girls in our college and in fact in our community looked on education merely as a stop gap, a way of improving their matrimonial prospects. In the last five to six years, however, girls -- and their parents -- have realised that they can have rich, rewarding careers in various fields, especially science, IT, the medical and engineering streams, and government service. Significantly, the girls don't see the Gulf as a career goal."

"Ten years ago, even six years ago, the goal of the average young Muslim was escape -- from the stifling poverty of this district to the Gulf, or into marriage, depending on sex. Today, they aspire, they dare to dream, and that is a very significant change, the real implications of which will be felt only a decade or so down the line."

The other key factor, Professor Rasheed believes, is in how the community has been using what in local parlance they call 'Gulf money' -- the sizeable remittances that come from the Diaspora.
Estimates indicate that remittances from abroad amount to 21 per cent of Kerala's GDP; in Malappuram, which boasts with some justification that every family has at least one member working abroad, mostly in the Gulf countries, they estimate that over between 55 to 60 per cent of the district's GDP comprises remittances.

"There is a change in how we are spending that money," Rasheed says. "The trend used to be towards wasteful expenditure -- those who were settled in the Gulf sent money home, which their families used to buy land, put up fancy homes, and fill it with all kinds of electronic gadgetry. It was all about conspicuous consumption."

That, says the professor, is changing, albeit gradually. "I am not suggesting we don't go in for ostentatious expenditure any more -- if anything, it has gotten worse, since more goods are available in the market. But the good thing is, there is a trend towards doing something for the community, of giving something back, of contributing to the larger welfare."

This emerging mindset manifests in an increasing number of private schools; in growing numbers of scholarships that are set up for the benefit of poor, but deserving, students from the community. "Earlier, buying a fancy car or building a posh house was the biggest status symbol; today, it is putting your name to a scholarship," Professor Rasheed says.

A Abdul Wahab, director, scholarship programme, Islamic Youth Centre, says, "There has been a gradual change in the Muslim society of Kerala for the last seven years, as many more young people are educating themselves and excelling in their respective fields."

"Places like Malappuram, Kozhikode, Kannur, Kasargode and Waynad in Kerala have seen the trend of Muslim students taking education very seriously, and they are ready to compete on any platform with anyone. It is a sign that things are changing for the better in our society."
As with any quantum societal shift, the one among Malappuram's Muslim population is producing its own share of problems. 'Problem' might in fact be an odd descriptor for a trend that has seen Muslim students significantly increase their pass percentages, but consider this:
In 2007, Kannur district registered a pass percentage of 90.79 per cent in the SSC exams; Malappuram soared from 51 per cent to 76.62 per cent; Kasargode's figures rose from 68.6 per cent to 80.1 per cent, and Kozhikode also registered 80.6 per cent.

All these districts have significant Muslim populations, and while there are no ready figures available to break the pass percentages down by community, Muslim educationists tell us that by extrapolating the evidence from their own schools, they believe that the increased interest in education shown by the Muslim youth is one of the factors driving this uptick. And the figures for Malappuram seem to bear out that assessment.
Therein lies the catch: Educationists estimate that a one per cent uptick in pass percentages add, in each district, between 500 to 800 additional students seeking admission in colleges each academic year

Courtesy: Syed Firdaus Ashraf and Prem Panicker at Rediff.com

Monday, July 28, 2008

Do you think Money can do everything in Life.

If some one thinks Money can do anthing in Life,
He will do Anything for Money.

Calculate Yourself the value of Money By reading the following Quotes.

“It can buy you a bed but not sleep”
“It can buy you a clock but not time”
“It can buy you a book but not knowledge”
“It can buy you a position but not respect”
“It can buy you medicine but not health”
“It can buy you blood but not life”
“It can buy you sex but not love”

I felt the money as
"Money isn't everything It often causes pain and suffering "

But I need to be an intermediator to distribute the money to whom it required.
The happiness is Richer than the hardcore Money You Have.

Please Refer this Article :what money can buy

Thursday, July 24, 2008

Reason: java.rmi.server.ExportException: Port already in use: 1098; nested exception is: java.net.BindException: Address already in use: JVM_Bind

ObjectName: jboss:service=Naming
State: FAILED
Reason: java.rmi.server.ExportException: Port already in use: 1098; nested exception is:
java.net.BindException: Address already in use: JVM_Bind
I Depend On:
jboss.system:service=ThreadPool
jboss:service=NamingBeanImpl
Depends On Me:
jboss.mq:service=DestinationManager
jboss.mq:service=Invoker
jboss.mq:service=InvocationLayer,type=UIL
jboss.mq:service=InvocationLayer,type=UILXA
jboss.mq:service=InvocationLayer,type=UIL2,alias=UIL2ConnectionFactory
jboss.mq:service=InvocationLayer,type=UIL2XA,alias=UIL2XAConnectionFactory
jboss.jms:alias=QueueConnectionFactory
jboss.jms:alias=TopicConnectionFactory
jboss.jmx:type=adaptor,name=Invoker,protocol=jrmp,service=proxyFactory
jboss.jmx:alias=jmx/rmi/RMIAdaptor
jboss:service=Mail


at org.jboss.deployment.MainDeployer.checkIncompleteDeployments(MainDeployer.java:1385)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:785)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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 $Proxy5.deploy(Unknown Source)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
at org.jboss.Main.boot(Main.java:200)
at org.jboss.Main$1.run(Main.java:508)
at java.lang.Thread.run(Unknown Source)

OR

12:04:32,117 WARN [ServiceController] Problem starting service jboss:service=Naming
java.rmi.server.ExportException: Port already in use: 1098; nested exception is:
java.net.BindException: Address already in use: JVM_Bind
at sun.rmi.transport.tcp.TCPTransport.listen(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport.exportObject(Unknown Source)
at sun.rmi.transport.tcp.TCPEndpoint.exportObject(Unknown Source)
at sun.rmi.transport.LiveRef.exportObject(Unknown Source)
at sun.rmi.server.UnicastServerRef.exportObject(Unknown Source)
at java.rmi.server.UnicastRemoteObject.exportObject(Unknown Source)
at java.rmi.server.UnicastRemoteObject.exportObject(Unknown Source)
at org.jnp.server.Main.initJnpInvoker(Main.java:354)
at org.jnp.server.Main.start(Main.java:316)
at org.jboss.naming.NamingService.startService(NamingService.java:284)
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(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:417)
at org.jboss.system.ServiceController.start(ServiceController.java:435)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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 $Proxy4.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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 $Proxy5.deploy(Unknown Source)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
at org.jboss.Main.boot(Main.java:200)
at org.jboss.Main$1.run(Main.java:508)
at java.lang.Thread.run(Unknown Source)
Caused by: java.net.BindException: Address already in use: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(Unknown Source)
at java.net.ServerSocket.bind(Unknown Source)
at java.net.ServerSocket.(Unknown Source)
at org.jboss.net.sockets.DefaultSocketFactory.createServerSocket(DefaultSocketFactory.java:120)
at org.jboss.net.sockets.DefaultSocketFactory.createServerSocket(DefaultSocketFactory.java:95)
at sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(Unknown Source)
... 62 more


Solution
==========
This Exception happens because The port Number 1098 is used by some other application.In my case It was Google talk in First Exception and Microsoft Outlook 2007 in second case uses the port number 1098,
just close Google talk/Microsoft Outlook and restart the server.later the application will pick some another port.

Regards
Asker Ali M

Monday, July 21, 2008

javax.imageio.IIOException: Quantization table 0x00 was not defined

15:44:35,491 ERROR [STDERR] Jul 21, 2008 3:44:35 PM com.sun.facelets.FaceletViewHandler handleRenderException
SEVERE: Error Rendering View[/waitStaff.xhtml]
javax.imageio.IIOException: Quantization table 0x00 was not defined
at com.sun.imageio.plugins.jpeg.JPEGImageReader.readImage(Native Method)
at com.sun.imageio.plugins.jpeg.JPEGImageReader.readInternal(Unknown Source)
at com.sun.imageio.plugins.jpeg.JPEGImageReader.read(Unknown Source)
at org.jboss.seam.ui.graphicImage.Image.readImage(Image.java:457)
at org.jboss.seam.ui.graphicImage.Image.readImage(Image.java:398)
at org.jboss.seam.ui.graphicImage.Image.setInput(Image.java:141)
at org.jboss.seam.ui.graphicImage.GraphicImageRendererBase.doEncodeBegin(GraphicImageRendererBase.java:31)
at org.jboss.seam.ui.util.cdk.RendererBase.encodeBegin(RendererBase.java:79)
at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:788)
at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:280)
at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
at org.ajax4jsf.renderkit.html.AjaxOutputPanelRenderer.encodeChildren(AjaxOutputPanelRenderer.java:79)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:282)
at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:125)
at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:68)
at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:116)
at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:68)
at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:116)
at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:68)
at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:116)
at org.ajax4jsf.renderkit.AjaxContainerRenderer.encodeAjax(AjaxContainerRenderer.java:123)
at org.ajax4jsf.component.AjaxViewRoot.encodeAjax(AjaxViewRoot.java:641)
at org.ajax4jsf.component.AjaxViewRoot.encodeChildren(AjaxViewRoot.java:512)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:189)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:147)
at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:256)
at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:362)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:488)
at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)

I am getting the above Exception while trying to load an Image using @Lob. data in seam2.0 Framework,

Problem starting service jboss:service=Hypersonic,database=lo calDB

11:03:14,465 WARN  [ServiceController] Problem starting service jboss:service=Hypersonic,database=lo
calDB
java.sql.SQLException: User not found: SA
at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
at org.hsqldb.jdbc.jdbcConnection.(Unknown Source)
at org.hsqldb.jdbcDriver.getConnection(Unknown Source)
at org.hsqldb.jdbcDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:525)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at org.jboss.jdbc.HypersonicDatabase.getConnection(HypersonicDatabase.java:806)
at org.jboss.jdbc.HypersonicDatabase.startStandaloneDatabase(HypersonicDatabase.java:617)
at org.jboss.jdbc.HypersonicDatabase.startService(HypersonicDatabase.java:587)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:274)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:230)

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:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:943)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:428)
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:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy4.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:285)
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:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterce
ptor.java:127)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.mx.util.JMXInvocationHandler.invoke(JMXInvocationHandler.java:273)
at $Proxy41.start(Unknown Source)
at org.jboss.deployment.XSLSubDeployer.start(XSLSubDeployer.java:185)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:989)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:790)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:753)
at sun.reflect.GeneratedMethodAccessor17.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:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterce
ptor.java:127)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy9.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:319)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:507)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeplo
ymentScanner.java:192)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploym
entScanner.java:203)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeployme
ntScanner.java:182)
21:03:14,488 ERROR [URLDeploymentScanner] Incomplete Deployment listing:

--- MBeans waiting for other MBeans ---
ObjectName: jboss:service=Hypersonic,database=localDB
State: FAILED
Reason: java.sql.SQLException: User not found: SA
Depends On Me:
jboss.jca:service=ManagedConnectionFactory,name=DefaultDS

--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: jboss:service=Hypersonic,database=localDB
State: FAILED
Reason: java.sql.SQLException: User not found: SA
Depends On Me:
jboss.jca:service=ManagedConnectionFactory,name=DefaultDS
To Remove this exception Delete hypersonic folder and restart the JBoss Server.
Here the hypersonic folder is currepted, hence the JBoss is generating this Exception.
Solution :
Folder Name :JBoss Server \server\default\data\hypersonic folder need to delete and Restart the System.

Newton's Laws of Software!!!

Newton's Laws of Software!!!

First Law:
Every Software Engineer continues his state of chatting or forwarding mails untill and unless he is assigned work by manager.


Second Law:

The rate of change in the software quality is directly proportional to the payment received from client and the deadline time, and it takes place at the quick rate as and when deadline force is applied.


Third Law:

Bugs can neither be created nor be removed from software by a developer. It can only be converted from one form to another. The total number of bugs in the software always remains constant.

Wednesday, July 16, 2008

How to create an Editable data Table Using Seam2.0

Hi,
here i would like to introduce you the implementation of the Updatable DataTable(An HTML table in Client Side) on change in any of this table field will automatically persist in the Database.
For more details on Seam2.0 Look at
  1. Seam Tutorial
  2. Gavin King Blog
The following is the table we are going to Implement through Seam2.0 Framework.
The
database Table is

The Table person POJO.
===================================================================

package org.domain.person.model;

// default package
// Generated Jun 26, 2008 4:04:45 PM by Hibernate Tools 3.2.0.CR1

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.jboss.seam.annotations.Name;

/**
* Person generated by hbm2java
*/
@Entity
@Table(name = "Person", schema = "dbo", catalog = "TEST")
@Name("person")
public class Person implements java.io.Serializable {

    private int id;
    private String firstname;
    private String lastname;
    private String sname;

    public Person() {
    }

    public Person(int id) {
       this.id = id;
    }

    public Person(int id, String firstname, String lastname, String sname) {
       this.id = id;
       this.firstname = firstname;
       this.lastname = lastname;
       this.sname = sname;
    }

    @Id
    @GeneratedValue(strategy=GenerationType.AUTO)
    @Column(name = "id", unique = true, nullable = false)
    public int getId() {
       return this.id;
    }

    public void setId(int id) {
       this.id = id;
    } 

    @Column(name = "firstname", length = 50)
    public String getFirstname() {
       return this.firstname;
    }

    public void setFirstname(String firstname) {
       this.firstname = firstname;
    }

    @Column(name = "lastname", length = 50)
    public String getLastname() {
       return this.lastname;
    }

    public void setLastname(String lastname) {
       this.lastname = lastname;
    }

    @Column(name = "sname", length = 50)
    public String getSname() {
       return this.sname;
    }

    public void setSname(String sname) {
       this.sname = sname;
    }

}


The Session Bean Handling the Client Table Actions.

package org.domain.person.delegate;

import java.util.ArrayList;
import java.util.List;

import javax.ejb.Remove;
import javax.ejb.Stateful;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

import org.domain.person.model.Person;
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.Destroy;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Logger;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Out;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.annotations.Synchronized;
import org.jboss.seam.log.Log;

@Stateful
@Scope(ScopeType.SESSION)
@Synchronized(timeout=Long.MAX_VALUE)
@Name("testTable")
public class TestTable implements TestTableInt{
     @Logger Log log;
     @PersistenceContext
     private EntityManager em;

     private static List personList = null;

     @In(create=true) @Out
     private Person person;
     private String myName;

     @Remove
     @Destroy
     public void destroy() {
     }

     public void newPerson(){
         log.info("New person Loading");
     }

     public void save(){
         if(person.getId()==0){
             em.persist(person);
         }else{
             em.merge(person);
         }
     }

     public List getPersonList() {
         String sql="SELECT T FROM Person T ";
         personList=em.createQuery(sql).setMaxResults(50).getResultList();
     return personList;
     }
}

The InterFace

import java.util.List;
import javax.faces.model.SelectItem;

import org.domain.EMSeam2.model.Person;

public interface TestTableInt {
    public void destroy() ;
    public void save();
    public List getPersonList();
    public void newPerson();
}

Test Table XHTML File :




The XHTML File:




I didnt found any other option to give the file here, you can get it by mailing to askeralim@gmail.com