how to fix Method not found Exception:onRowSelect(SelectEvent event)? - jsf

I am getting the following error when I select a row in the lazy datatable :
javax.faces.FacesException: Method not found: com.gestion.projet.web.jsf.ProjetComponentImpl#f632823.onRowSelect(org.primefaces.event.SelectEvent)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:85)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:114)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:308)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:113)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:315)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
and then the code associated with the following bean method:
#Scope("session")
#Component("ProjetComponent")
public class ProjetComponentImpl implements ProjetComponent {
public void onRowSelect(SelectEvent event) {
FacesMessage msg = new FacesMessage("Projet Selected", ((Projet) event.getObject()).getIdprojet().toString());
FacesContext.getCurrentInstance().addMessage(null, msg);
}
}
and this the xhtml page:
<h:form id="form">
<p:dataTable var="current" value="#{ProjetComponent.lazyModel}"
paginator="true" rows="10"
paginatorTemplate="{RowsPerPageDropdown} {FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}"
rowsPerPageTemplate="5,10,15" selectionMode="single"
selection="#{ProjetComponent.projet}" id="projetTable" lazy="true">
<p:ajax event="rowSelect" listener="#{ProjetComponent.onRowSelect}"
update=":form:projetDetail" oncomplete="PF('projetDialog').show()" />
<p:column headerText="Id" sortBy="#{current.idprojet}" filterBy="#{current.idprojet}">
<h:outputText value="#{current.idprojet}" />
</p:column>
<p:column headerText="Nom" sortBy="#{current.nomprojet}"
filterBy="#{current.nomprojet}">
<h:outputText value="#{current.nomprojet}" />
</p:column>
</p:dataTable>
<p:dialog header="Projet Detail" widgetVar="projetDialog" modal="true"
showEffect="fade" hideEffect="fade" resizable="false">
<p:outputPanel id="projetDetail" style="text-align:center;">
<p:panelGrid columns="2"
rendered="#{not empty ProjetComponent.projet}"
columnClasses="label,value">
<f:facet name="header">
</f:facet>
<h:outputText value="Id:" />
<h:outputText value="#{ProjetComponent.projet.idprojet}" />
<h:outputText value="Nom:" />
<h:outputText value="#{ProjetComponent.projet.nomprojet}" />
</p:panelGrid>
</p:outputPanel>
</p:dialog>
</h:form>
this is a snaphshot of what i get when i select a row :

Seems you're interchanging Spring Annotations with JSF annotations - PrimeFaces is a JSF component library in use with a JSF Managed Bean - #SessionScope and #ManagedBean(name="projectBlah")
from the javax.faces.bean packages

Related

How to pass around action outcome to jsf composition?

I have this JSF snippet which works fine. When the commandbutton is clicked it should reload the page by redirecting to itself.
<p:dataTable value="#{fileModel.files}"
var="file" scrollable="true" scrollHeight="400">
<p:column headerText="#{msgs.lbl_file}">
#{file.name}
</p:column>
<p:column width="150">
<p:commandButton value="#{msgs.lbl_import}"
actionListener="#{fileModel.importFile(file, module)}"
**action="mypage.jsf?faces-redirect=true"**/>
</p:column>
<p:column width="150">
<p:commandLink value="#{msgs.lbl_view}" target="_blank" ajax="false"
actionListener="#{fileModel.view(file)}"/>
</p:column>
</p:dataTable>
Because I want to reuse this in multiple pages I tried to make this JSF template and include it via ui:include. Only thing is that I need the action to be configurable depending on the page it is used in.
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:p="http://primefaces.org/ui">
<p:dataTable value="#{fileModel.files}"
var="file" scrollable="true" scrollHeight="400">
<p:column headerText="#{msgs.lbl_file}">
#{file.name}
</p:column>
<p:column width="150">
<p:commandButton value="#{msgs.lbl_import}"
actionListener="#{fileModel.importFile(file, module)}"
**action="#{redirectTo}"**/>
</p:column>
<p:column width="150">
<p:commandLink value="#{msgs.lbl_view}" target="_blank" ajax="false"
actionListener="#{fileModel.view(file)}"/>
</p:column>
</p:dataTable>
</ui:composition>
With the inclusion
<ui:include src="moduleSettingImportDialog.xhtml">
<ui:parameter name="redirectTo" value="mypage.jsf?faces-redirect=true"/>
</ui:include>
The error I get is something like
javax.el.ELException: Not a Valid Method Expression: #{redirectTo}
at
com.sun.el.lang.ExpressionBuilder.createMethodExpression(ExpressionBuilder.java:311)
at
com.sun.el.ExpressionFactoryImpl.createMethodExpression(ExpressionFactoryImpl.java:96)
at
org.jboss.weld.util.el.ForwardingExpressionFactory.createMethodExpression(ForwardingExpressionFactory.java:43)
at
org.jboss.weld.el.WeldExpressionFactory.createMethodExpression(WeldExpressionFactory.java:53)
at
com.sun.faces.facelets.tag.TagAttributeImpl.getMethodExpression(TagAttributeImpl.java:240)
at
com.sun.faces.facelets.tag.jsf.ActionSourceRule$ActionMapper2.applyMetadata(ActionSourceRule.java:107)
at
com.sun.faces.facelets.tag.MetadataImpl.applyMetadata(MetadataImpl.java:81)
A similar error I get when using JSF composite components.
<c:interface>
<c:attribute name="module"/>
<c:attribute name="redirectTo" type="java.lang.String"/>
</c:interface>
<c:implementation rendered="#{systemSettingModel.LOG_REASON_FOR_CHANGES_ISAKTIV}">
<p:dataTable value="#{fileModel.files}"
var="file" scrollable="true" scrollHeight="400">
<p:column headerText="#{msgs.lbl_file}">
#{file.name}
</p:column>
<p:column width="150">
<p:commandButton value="#{msgs.lbl_import}"
actionListener="#{fileModel.importFile(file, cc.attrs.module)}"
**action="#{cc.attrs.redirectTo}"**/>
</p:column>
<p:column width="150">
<p:commandLink value="#{msgs.lbl_view}" target="_blank" ajax="false"
actionListener="#{fileModel.view(file)}"/>
</p:column>
</p:dataTable>
</c:implementation>
#{cc.attrs.redirectTo}: javax.el.ELException:
java.lang.IllegalArgumentException: Cannot convert
multimodulesettings.jsf?faces-redirect=true&includeViewParams=true of
type class java.lang.String to class javax.el.MethodExpression
javax.faces.FacesException: #{cc.attrs.redirectTo}:
javax.el.ELException: java.lang.IllegalArgumentException: Cannot
convert
multimodulesettings.jsf?faces-redirect=true&includeViewParams=true of
type class java.lang.String to class javax.el.MethodExpression at
com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:118)
at javax.faces.component.UICommand.broadcast(UICommand.java:315) at
javax.faces.component.UIData.broadcast(UIData.java:1108) at
javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:790)
at
javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1282)
at
com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) at
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:646) at
org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:344)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at
org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:78)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at
org.glassfish.tyrus.servlet.TyrusServletFilter.doFilter(TyrusServletFilter.java:295)
How to pass a fixed string to a JSF template or composite component that is used in the action attribute of a commandButton?
As a workaround I implemented a JSF bean method that just returns the passed in string like so.
public String echo(String s) {
return s;
}
Then instead of passing the fix string as a parameter to the component it is being passed by an EL expression.
<ui:include src="moduleSettingImportDialog.xhtml">
<ui:parameter name="redirectTo" value="#{jsfBean.echo('mypage.jsf?faces-redirect=true')}"/>
</ui:include>

javax.el.ELException: listener="#{MyTab.tabChange2}": java.lang.NullPointerException at com.sun.faces.facelets.el.TagMethodExpression.invoke

MyTabs.xhtml
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.org/ui">
<h:head>
<title>Tab view</title>
</h:head>
<h:form style="width:500px;" id="form">
<p:growl id="msgs" showDetail="true" />
<p:tabView dynamic="true">
<p:ajax event="tabChange" listener="#{MyTab.tabChange}" update="p1 p2 p3"/>
<p:tab title="C" id="c">
<h:panelGrid columns="2" cellpadding="10" id="p1">
<h:outputText value="#{MyTab.msg}"></h:outputText>
</h:panelGrid>
</p:tab>
<p:tab title="C++" id="cpp">
<h:panelGrid columns="2" cellpadding="10" id="p2">
<h:outputText value="#{MyTab.msg}"></h:outputText>
</h:panelGrid>
</p:tab>
<p:tab title="Java" id="java">
<h:panelGrid columns="2" cellpadding="10" id="p3">
<h:outputText value="#{MyTab.msg}"></h:outputText>
</h:panelGrid>
<p:tabView dynamic="false">
<f:ajax event="tabChange" listener="#{MyTab.tabChange2}" update="pg1,pg2"/>
<p:tab title="JSP" id="jsp">
<h:panelGrid id="pg1">
<h:outputText value="#{MyTab.javaProg}"></h:outputText>
</h:panelGrid>
</p:tab>
<p:tab title="JSF" id="jsf">
<h:panelGrid id="pg2">
<h:outputText value="#{MyTab.javaProg}"></h:outputText>
</h:panelGrid>
</p:tab>
</p:tabView>
</p:tab>
</p:tabView>
</h:form>
</html>
MyTab.java
package mypak;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import org.primefaces.event.TabChangeEvent;
#ManagedBean(name="MyTab")
public class MyTab {
private String msg="C";
private String javaProg="j2ee";
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public String getJavaProg() {
return javaProg;
}
public void tabChange(TabChangeEvent e){
String id=e.getTab().getId();
if(id.equals("c")){
msg="C is a good programming language.";
}else if(id.equals("cpp")){
msg="C++ is better !";
}else{
msg="Java is the best :)";
}
}
public void tabChange2(TabChangeEvent e){
System.out.println("nested");
String id=e.getTab().getId();
if(id.equals("jsp")){
javaProg="JSP is good option";
}
if(id.equals("jsf")){
javaProg="JSF is the better";
}
}
}
Error I am getting when I click on a nested tab
Sep 16, 2015 9:45:37 PM com.sun.faces.lifecycle.InvokeApplicationPhase execute
WARNING: /MyTabs.xhtml #31,81 listener="#{MyTab.tabChange2}": java.lang.NullPointerException
javax.el.ELException: /MyTabs.xhtml #31,81 listener="#{MyTab.tabChange2}": java.lang.NullPointerException
at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:111)
at com.sun.faces.facelets.tag.jsf.core.AjaxBehaviorListenerImpl.processAjaxBehavior(AjaxHandler.java:462)
at org.primefaces.event.TabChangeEvent.processListener(TabChangeEvent.java:42)
at javax.faces.component.behavior.BehaviorBase.broadcast(BehaviorBase.java:106)
at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:809)
at org.primefaces.component.api.UITabPanel.broadcast(UITabPanel.java:1259)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:790)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1282)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:646)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:617)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:668)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1527)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1484)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at mypak.MyTab.tabChange2(MyTab.java:38)
at sun.reflect.GeneratedMethodAccessor48.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.el.parser.AstValue.invoke(AstValue.java:247)
at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:267)
at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
... 32 more
I am using JSF 2,Prime Faces 5.2 ,Tomcat 8.
How is this caused and how can I solve it?

p:dialog does not set properties to Entity

I have the following p:datatable that hold two buttons that call the View and the Add dialogs.
The problem is with the Add dialog, that does not seem to be setting properties to any of the Entity objects.
When I put a break on the save() method inside ChildrenController.java all values a 'null'.
I am using:
PrimeFaces 5.1 |
Mojarra 2.2.7 |
Glassfish 4.1 |
ChildrenDataTable.xhtml
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.org/ui"
xmlns:ui="http://java.sun.com/jsf/facelets">
<h:form id="form1">
<p:dataTable var="child" value="#{childrenController.children}"
scrollable="true"
scrollHeight="500">
<p:column>
<f:facet name="header">First Name</f:facet>
<h:outputText value="#{child.firstName}" />
</p:column>
<p:column>
<f:facet name="header">Last Name</f:facet>
<h:outputText value="#{child.lastName}" />
</p:column>
<p:column>
<f:facet name="header">Parent Name</f:facet>
<h:outputText value="#{child.parent.firstName}" />
</p:column>
<p:column>
<f:facet name="header">Parent Last Name</f:facet>
<h:outputText value="#{child.parent.lastName}" />
</p:column>
<p:column style="width:32px;text-align: center">
<p:commandButton update=":mainForm:form1:childDetail"
oncomplete="PF('childDialog').show()"
process="#this"
icon="ui-icon-search"
title="View">
<f:setPropertyActionListener value="#{child}"
target="#{childrenController.selectedChild}" />
</p:commandButton>
</p:column>
<p:column style="width:32px;text-align: center">
<p:commandButton onclick="PF('childAddDialog').show()"
icon="ui-icon-person"
title="Add">
</p:commandButton>
</p:column>
</p:dataTable>
<!-- Dialog for the View button-->
<p:dialog header="Child Info"
widgetVar="childDialog"
modal="false"
showEffect="fade"
hideEffect="fade"
resizable="false">
<p:outputPanel id="childDetail" style="text-align:center;">
<p:panelGrid columns="2"
rendered="#{not empty childrenController.selectedChild}"
columnClasses="label,value">
<h:outputText value="First Name:" />
<h:outputText value="#{childrenController.selectedChild.firstName}" />
<h:outputText value="Last Name:" />
<h:outputText value="#{childrenController.selectedChild.lastName}" />
<h:outputText value="Birth Date:" />
<h:outputText value="#{childrenController.selectedChild.dateOfBirth}"/>
<h:outputText value="Medical Info:" />
<h:outputText value="#{childrenController.selectedChild.medicalInfo}" />
</p:panelGrid>
</p:outputPanel>
</p:dialog>
<!--Dialog for the Add button-->
<p:dialog header="Register Child"
widgetVar="childAddDialog"
modal="false"
showEffect="fade"
hideEffect="fade"
resizable="false">
<p:outputPanel id="childRegister" style="text-align:center;">
<p:panelGrid columns="2" >
<f:facet name="header">
Child info
</f:facet>
<h:outputText value="First Name:"/>
<h:inputText value="#{childrenController.child.firstName}"
required="true"/>
<h:outputText value="Last Name:"/>
<h:inputText value="#{childrenController.child.lastName}"
required="true"/>
<h:outputText value="Birth Date:"/>
<h:inputText value="#{childrenController.child.dateOfBirth}"
required="true"/>
<h:outputText value="Medical Info:"/>
<p:inputTextarea value="#{childrenController.child.medicalInfo}"
rows="5" cols="30" counter="display" maxlength="128"
counterTemplate="{0} characters remaining." autoResize="false"/>
<h:outputText id="display" />
</p:panelGrid>
<p:panelGrid columns="2" >
<f:facet name="header">
Parent info
</f:facet>
<h:outputText value="First Name:"/>
<h:inputText value="#{childrenController.parent.firstName}"
required="true"/>
<h:outputText value="Last Name:"/>
<h:inputText value="#{childrenController.parent.lastName}"
required="true"/>
<h:outputText value="Username:"/>
<h:inputText value="#{childrenController.user.username}"
required="true"/>
<h:outputText value="Password1:"/>
<p:password id="pwd1" value="#{childrenController.password1}"
match="pwd2"
required="true"/>
<h:outputText value="Password2:"/>
<p:password id="pwd2" value="#{childrenController.user.password}"
required="true"/>
<p:commandButton actionListener="#{childrenController.save()}"
value="Save"
process="#this"
oncomplete="childAddDialog.hide()">
</p:commandButton>
</p:panelGrid>
</p:outputPanel>
</p:dialog>
</h:form>
</ui:composition>
ChildrenController.java
#Named
#SessionScoped
public class ChildrenController implements Serializable{
// This final string will be used to set the loginn role to parent
private static final String parentRole = "parent";
private String password1;
#EJB
private ChildEJB childEJB;
private Child currentChild;
private Child child = new Child();
#EJB
private ParentEJB parentEJB;
private Parent parent = new Parent();
#EJB
private RoleEJB roleEJB;
private Role role = new Role(parentRole);
#EJB
private UserEJB userEJB;
private User user = new User();
public Child getCurrentChild() {
return currentChild;
}
public void setCurrentChild(Child currentChild) {
this.currentChild = currentChild;
}
public Child getChild() {
return child;
}
public void setChild(Child child) {
this.child = child;
}
public Parent getParent() {
return parent;
}
public void setParent(Parent parent) {
this.parent = parent;
}
public User getUser() {
return user;
}
public void setUser(User user) {
this.user = user;
}
public Role getRole() {
return role;
}
public void setRole(Role role) {
this.role = role;
}
public Child getSelectedChild() {
return selectedChild;
}
public void setSelectedChild(Child selectedChild) {
this.selectedChild = selectedChild;
}
private Child selectedChild;
public List<Child> getChildren() {
return childEJB.findAll();
}
public String getPassword1() {
return password1;
}
public void setPassword1(String password1) {
this.password1 = password1;
}
public void save(){
// Map the parent to the child and vice verca
parent.addChild(child);
child.setParent(parent);
// Persist the Parent
parent = parentEJB.addNew(parent);
// Persist the Child
child = childEJB.addNew(child);
// This will set the username for the parent role
role.setUsername(user.getUsername());
// This will set the role for the new username
user.setRole(role);
// This will map that the login belongs to a Parent
user.setParent(parent);
// Persist the new User
user = userEJB.addNew(user);
}
}
Stack Trace
Warning: A system exception occurred during an invocation on EJB ParentEJB, method: public entity.Parent EJB.ParentEJB.addNew(entity.Parent)
Warning: javax.ejb.EJBException
at com.sun.ejb.containers.EJBContainerTransactionManager.processSystemException(EJBContainerTransactionManager.java:748)
at com.sun.ejb.containers.EJBContainerTransactionManager.completeNewTx(EJBContainerTransactionManager.java:698)
at com.sun.ejb.containers.EJBContainerTransactionManager.postInvokeTx(EJBContainerTransactionManager.java:503)
at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4566)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2074)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2044)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:220)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
at com.sun.proxy.$Proxy250.addNew(Unknown Source)
at EJB.__EJB31_Generated__ParentEJB__Intf____Bean__.addNew(Unknown Source)
at mb.ChildrenController.save(ChildrenController.java:110)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at javax.el.ELUtil.invokeMethod(ELUtil.java:332)
at javax.el.BeanELResolver.invoke(BeanELResolver.java:537)
at javax.el.CompositeELResolver.invoke(CompositeELResolver.java:256)
at com.sun.el.parser.AstValue.invoke(AstValue.java:283)
at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:304)
at org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:40)
at org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50)
at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
at javax.faces.event.MethodExpressionActionListener.processAction(MethodExpressionActionListener.java:147)
at javax.faces.event.ActionEvent.processListener(ActionEvent.java:88)
at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:813)
at javax.faces.component.UICommand.broadcast(UICommand.java:300)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:790)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1282)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:646)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:318)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:415)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:282)
at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.validation.ConstraintViolationException: Validation failed for classes [entity.Parent] during persist time for groups [javax.validation.groups.Default, ]
List of constraint violations:[
ConstraintViolationImpl{interpolatedMessage='may not be null', propertyPath=lastName, rootBeanClass=class entity.Parent, messageTemplate='{javax.validation.constraints.NotNull.message}'}
ConstraintViolationImpl{interpolatedMessage='may not be null', propertyPath=firstName, rootBeanClass=class entity.Parent, messageTemplate='{javax.validation.constraints.NotNull.message}'}
]
at org.hibernate.cfg.beanvalidation.BeanValidationEventListener.validate(BeanValidationEventListener.java:160)
at org.hibernate.cfg.beanvalidation.BeanValidationEventListener.onPreInsert(BeanValidationEventListener.java:95)
at org.hibernate.action.internal.EntityIdentityInsertAction.preInsert(EntityIdentityInsertAction.java:202)
at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:91)
at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:480)
at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:191)
at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:175)
at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:210)
at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:324)
at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:288)
at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:194)
at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:125)
at org.hibernate.jpa.event.internal.core.JpaPersistEventListener.saveWithGeneratedId(JpaPersistEventListener.java:84)
at org.hibernate.event.internal.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:206)
at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:149)
at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:75)
at org.hibernate.internal.SessionImpl.firePersist(SessionImpl.java:807)
at org.hibernate.internal.SessionImpl.persist(SessionImpl.java:780)
at org.hibernate.internal.SessionImpl.persist(SessionImpl.java:785)
at org.hibernate.jpa.spi.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:1181)
at com.sun.enterprise.container.common.impl.EntityManagerWrapper.persist(EntityManagerWrapper.java:287)
at EJB.ParentEJB.addNew(ParentEJB.java:31)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1081)
at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1153)
at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:4786)
at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:656)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:608)
at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:46)
at org.jboss.weld.ejb.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:52)
at sun.reflect.GeneratedMethodAccessor166.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:608)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doCall(SystemInterceptorProxy.java:163)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:140)
at sun.reflect.GeneratedMethodAccessor168.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:369)
at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:4758)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4746)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:212)
... 54 more
You didn't process your components in your question's code. What you did there to fix the problem in your own answer is including your form in the list of UIComponents to process. That means that JSF will not look at all your input components in your form and that's why it will not retrieve any values you entered in those fields to set them in your backing bean.
To get a better understanding of what process means, you may look at this question.
Solved the problem by putting the p:commandButton inside the p:panelGrid of the dialog which makes absolutely no sense to me whatsovever ! Anyway here is how the dialog looks like:
<h:form id="formName">
<p:dialog>
<p:panelGrid>
<p:commandButton process="#this :formName" ajax="false" actionListener="#{bean.method()}"/>
</p:panelGrid>
</p:dialog>
</h:form>
EDIT: edited code to be more readable

tabview inside another tabview

i 'am trying to put a tabview inside a another tabview but i get error in the ajax event from the tabview inside here is the error
javax.el.MethodNotFoundException: Method not found: com.controlleurs.SelectBean#75c0452.onTabChange1(javax.faces.event.AjaxBehaviorEvent)
at org.apache.el.util.ReflectionUtil.getMethod(ReflectionUtil.java:249)
at org.apache.el.parser.AstValue.invoke(AstValue.java:271)
at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:273)
at org.primefaces.component.behavior.ajax.AjaxBehaviorListenerImpl.processCustomListener(AjaxBehaviorListenerImpl.java:87)
at org.primefaces.component.behavior.ajax.AjaxBehaviorListenerImpl.processArgListener(AjaxBehaviorListenerImpl.java:72)
at org.primefaces.component.behavior.ajax.AjaxBehaviorListenerImpl.processAjaxBehavior(AjaxBehaviorListenerImpl.java:56)
at javax.faces.event.AjaxBehaviorEvent.processListener(AjaxBehaviorEvent.java:113)
at javax.faces.component.behavior.BehaviorBase.broadcast(BehaviorBase.java:106)
at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:804)
at javax.faces.component.UIData.broadcast(UIData.java:1086)
at javax.faces.component.UIData.broadcast(UIData.java:1108)
at javax.faces.component.UIData.broadcast(UIData.java:1108)
at javax.faces.component.UIData.broadcast(UIData.java:1108)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:790)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1282)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:646)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:315)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
here is my xhmtl code
<h:form id="form">
<p:tabView id="my" >
<p:tab id="tabview" title="Ressources Humaines">
<p:tabView activeIndex="#{SelectBean.activeTab}" value="#{SelectBean.types}" var="item" >
<p:ajax event="tabChange" listener="#{SelectBean.onTabChange}" update=":form" />
<p:tab title="#{item}">
<p:tabView id="tab" activeIndex="#{SelectBean.other}" value="#{SelectBean.res}" var="rr">
<p:ajax event="tabChange" listener="#{SelectBean.onTabChange1}" />
<p:tab title="#{rr.nom_ressource}">
<h:panelGrid>
<h:graphicImage value="Ressources/images/emp.jpg" style="vertical-align:middle" />
<span style="font-size:15px; width:170px; display:inline-block;"> Nom : #{rr.nom_ressource} Type: #{rr.type_ressource} Specification: #{rr.experience} </span>
<h:commandButton image="Ressources/images/delete.jpg" actionListener="#{SelectBean.act}" update=":form" style="vertical-align:middle" >
Supprimer
</h:commandButton>
<h:commandButton image="Ressources/images/update.png" style="vertical-align:middle" >
Modifier
</h:commandButton>
</h:panelGrid>
</p:tab>
</p:tabView>
</p:tab>
</p:tabView>
</p:tab>
<p:tab title="Ressources Materielle">
</p:tab>
</p:tabView>
</h:form>
anyhelp please
In your bean he cant find the method..
The signature of the method should be public void onTabChange(TabChangeEvent event)
This is how your method signature looks like?
Why you have double <p:ajax event="tabChange"
Hope that help

Error when I select a given data p:datatable rg.primefaces.component.datatable.DataTable.getRowData(

I'm using prime faces data table in my application where i have
when I select any of a given table
it returns me the following error
someone help?
I used primefaces 3.5
jsf 2.1
My dataTable of primefaces
lazyDataModel = new LazyDataModel<Funcionario>()
{
/**
*
*/
private static final long serialVersionUID = 1L;
#Override
public List<Funcionario> load(int first, int pageSize,
String sortField, SortOrder sortOrder,
Map<String, String> filters) {
try {
funcionarios = funcionarioService.listar(first, pageSize, filters);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
if(getRowCount() <= 0)
{
setRowCount(funcionarioService.getRowCount());
}
setPageSize(pageSize);
super.setWrappedData(funcionarios);
return funcionarios;
}
#Override
public Object getRowKey(Funcionario item) {
System.out.println(item.getCodigo());
return item.getCodigo();
}
#Override
public Funcionario getRowData(String rowKey) {
// TODO Auto-generated method stub
Integer id = Integer.valueOf(rowKey);
for (Funcionario funcionario : (List<Funcionario>) getWrappedData()) {
if(id.equals(funcionario.getCodigo()))
{
return funcionario;
}
}
return null;
}
#Override
public void setRowIndex(int rowIndex) {
/*
* The following is in ancestor (LazyDataModel):
* this.rowIndex = rowIndex == -1 ? rowIndex : (rowIndex % pageSize);
*/
if (rowIndex == -1 || getPageSize() == 0) {
super.setRowIndex(-1);
}
else
super.setRowIndex(rowIndex % getPageSize());
}
};
}
my listagem.xhtml
?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.org/ui"
xmlns:ui="http://java.sun.com/jsf/facelets">
<h:head>
</h:head>
<h:form id = "f">
<p:dataTable emptyMessage="Não tem registros." var = "funcionario"
value = "#{bean.getLazyDataModel()}" paginator="true" rows = "5" id = "tbf"
rowsPerPageTemplate="5,10,15" lazy = "true" filterEvent="enter"
selection="#{bean.selecionado}" selectionMode="single" rowKey="#{bean.funcionario.codigo}"
>
<p:ajax event="rowSelect" update=":t:dialogf:display" oncomplete="funcionarioDialog.show()"/>
<p:column filterBy="#{funcionario.codigo}" headerText="Codigo" filterMatchMode="contains"
>
<h:outputText value="#{funcionario.codigo}" />
</p:column>
<p:column filterBy="#{funcionario.nome}" headerText="Nome" filterMatchMode="contains">
<h:outputText value="#{funcionario.nome}" />
</p:column>
<p:column filterBy="#{funcionario.cpf}" headerText="Cpf" filterMatchMode="contains">
<h:outputText value="#{funcionario.cpf}" />
</p:column>
<p:column filterBy="#{funcionario.dataNascimento}" headerText="Data Nascimento" filterMatchMode="contains" >
<h:outputText value="#{funcionario.dataNascimento}" >
<f:convertDateTime type="date" pattern="dd/MM/yyyy" />
</h:outputText>
</p:column>
<p:column filterBy="#{funcionario.usuario}" headerText="Usuario" filterMatchMode="contains">
<h:outputText value="#{funcionario.usuario}" />
</p:column>
<p:column headerText = "Excluir">
<p:commandLink action ="#{funcionarioBean.excluir()}" update = "tbf" >
excluir
<f:setPropertyActionListener target="#{funcionarioBean.funcionario}" value="#{funcionario}" />
</p:commandLink>
</p:column>
<p:column style="width:4%">
<p:commandButton id="selectButton" update = ":t:dialogf:display" value = "ver"
oncomplete="funcionarioDialog.show()" title="View">
<f:setPropertyActionListener target="#{bean.selecionado}" value="#{funcionario}" />
</p:commandButton>
</p:column>
<p:column headerText = "Alterar">
<p:commandButton id="selectButton2" update = ":t:" value = "Alterar" title="Alterar">
<f:setPropertyActionListener target="#{bean.funcionario}" value="#{funcionario}" />
</p:commandButton>
</p:column>
</p:dataTable>
</h:form>
<h:form id = "dialogf">
<p:dialog id = "dialog" header = "Detalhes do Registro" widgetVar="funcionarioDialog" resizable = "false"
showEffect="fade" hideEffect="explode">
<h:panelGrid id = "display" columns="2" cellpadding="4">
<h:outputText value="Codigo:" />
<h:outputText value="#{bean.selecionado.codigo}" />
<h:outputText value="Nome:" />
<h:outputText value="#{bean.funcionario.nome}" />
<h:outputText value="Cpf:" />
<h:outputText value="#{bean.funcionario.cpf}" />
<h:outputText value="Data Nascimento:" />
<h:outputText value="#{bean.funcionario.dataNascimento}" >
<f:convertDateTime type="date" pattern="dd/MM/yyyy" />
</h:outputText>
<h:outputText value="Usuario:" />
<h:outputText value="#{bean.funcionario.usuario}" />
<h:outputText value="Senha:" />
<h:outputText value="#{bean.funcionario.senha}" />
</h:panelGrid>
</p:dialog>
</h:form>
</html>
error
Set 04, 2013 9:40:56 AM com.sun.faces.context.PartialViewContextImpl processPartial
INFO: java.lang.NullPointerException
java.lang.NullPointerException
at org.primefaces.component.datatable.DataTable.getRowData(DataTable.java:936)
at org.primefaces.component.datatable.feature.SelectionFeature.decodeSingleSelection(SelectionFeature.java:47)
at org.primefaces.component.datatable.feature.SelectionFeature.decode(SelectionFeature.java:38)
at org.primefaces.component.datatable.DataTableRenderer.decode(DataTableRenderer.java:57)
at javax.faces.component.UIComponentBase.decode(UIComponentBase.java:787)
at org.primefaces.component.api.UIData.processDecodes(UIData.java:228)
at com.sun.faces.context.PartialViewContextImpl$PhaseAwareVisitCallback.visit(PartialViewContextImpl.java:506)
at com.sun.faces.component.visit.PartialVisitContext.invokeVisitCallback(PartialVisitContext.java:183)
at org.primefaces.component.api.UIData.visitTree(UIData.java:639)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1600)
at javax.faces.component.UIForm.visitTree(UIForm.java:344)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1600)
at org.primefaces.component.tabview.TabView.visitTree(TabView.java:419)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1600)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1600)
at com.sun.faces.context.PartialViewContextImpl.processComponents(PartialViewContextImpl.java:376)
at com.sun.faces.context.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:252)
at javax.faces.context.PartialViewContextWrapper.processPartial(PartialViewContextWrapper.java:183)
at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:931)
at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:78)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:409)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:178)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:108)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Resources