JSF NoSuchMethodException

Hi!
I constantly receive a NoSuchMethodException in my simple JSF application. Found one similar post in the forum, but there were no solution to the problem there...
Basically I have a JSP with this code:
<h:commandLink id="reload" action="update" actionListener="#{mainBean.changeID}">
  <h:outputText id="history" value="#{history.endTask}"/>
</h:commandLink>And my backing bean:
import javax.faces.event.ActionEvent;
import javax.faces.event.ActionListener;
public class MainBackingBean implements ActionListener {
  public void changeID(ActionEvent actionEvent) {
    System.out.println("this time maybe?");
}faces-config.xml:
<managed-bean>
  <managed-bean-name>mainBean</managed-bean-name>
    <managed-bean-class>
      com.util.ejb.backing.MainBackingBean
    </managed-bean-class>
  <managed-bean-scope>session</managed-bean-scope>
</managed-bean>The stacktrace looks like this when clicking the link:
15:44:58,244 ERROR [[FacesServlet]] Servlet.service() for servlet FacesServlet threw exception
javax.faces.el.EvaluationException: Exception while invoking expression #{mainBean.changeID}
Caused by: java.lang.NoSuchMethodException: com.util.ejb.backing.MainBackingBean.changeID(javax.faces.event.ActionEvent)
I'm all out of ideas what can be causing this. I have tried to access the method from within the class which works fine, and the JSF seem to render fine otherwise. I am thankful for all suggestions!
Best regards,
Peter

Thanks for looking for a solution before posting. I'd be glad to help you out.
First off, you don't actually need to implement ActionListener on your bean when you access it this way. There's two ways to add an action listener to a component, the first is with the actionListener attribute (as you've done), the other is by using the f:actionListener tag.
When you use the actionListener attribute, you just have to have a method that is executed when an action happens (the method needs to have a specific signature though). You are very close to having the right method signature. Here's the signature your method should match (in fact, it's so close that I'm not sure this is necessary):
  public void changeID(ActionEvent actionEvent) throws AbortProcessingException {
    //perform actions
  }Anyways, the biggest thing here is to remove the implements ActionListener. This puts some method requirements onto your MainBackingBean that you have not fulfilled.
Doing the above ought to solve your NoSuchMethodException errors. The next bit is for informational purposes.
The second way to add an ActionListener to a component is with the f:actionListener tag. The f:actionListener tag is added as a child to your commandLink or commandButton. It would look something like this:
<h:commandLink id="reload" action="update" actionListener="#{mainBean.changeID}">
  <h:outputText id="history" value="#{history.endTask}"/>
  <f:actionListener type="your.package.name.ActionListenerClassName" />
</h:commandLink>This will register an action listener, of class your.package.name.ActionListenerClassName, on the commandLink.
When you create the ActionListenerClassName, this is when you need to implement ActionListener. By implementing ActionListener this forces you to write the processAction method. The ActionListenerClassName class will look like this:
public class MyActionListener implements ActionListener {
     /* (non-Javadoc)
      * @see javax.faces.event.ActionListener#processAction(javax.faces.event.ActionEvent)
     public void processAction(ActionEvent event)
          throws AbortProcessingException {
          //Perform action here
}And that's all there is to it.
Hope this helps!
CowKing

Similar Messages

  • WebLogic 10gR3 Portal Remote EJB gives java.lang.NoSuchMethodException

    We are migrating from WebLogic 11g to WebLogic 10gR3 Portal. The application we have currently works with 11g. Since migrating to 10gR3 we are now recieving the following error while calling a remote EJB.
    java.lang.NoSuchMethodException: com.xyz.SomeService_um3hps_SomeServiceRemoteImpl_1030_WLStub.login(java.lang.String, java.lang.String, com.xyz.User, com.xyz.Journal)
    at java.lang.Class.getMethod(Class.java:1605)
    at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.getTargetMethod(RemoteBusinessIntfProxy.java:162)
    at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:53)
    at $Proxy161.login(Unknown Source)
    at com.xyz.SomeServlet.service(PortalLoginServlet.java:109)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
    at com.xyz.presentation.jsf.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:114)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3502)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(Unknown Source)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2186)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2092)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Version: WebLogic 10gR3 Portal
    The call is being made from one cluster to another in the same domain.
    There are two separate ear files that make up the application. One EAR contains the application, the other contains services. The services ear is deployed to one cluster, and the application to another cluster. Remote EJB calls are made from the application to the services. If these ears are in separate clusters, the calls fail with the error above. If the EARs are deployed within the same cluster, the calls work correctly.
    Thanks
    Edited by: user7719024 on Feb 17, 2010 2:40 PM

    Hi,
    As u are migrating from WebLogic 11g to WebLogic 10gR3 Portal so it will be best if you can generate the Artifacts like Stubs...etc using APPC compiler of WebLogic 10gR3 Portal.
    Then deploy the EAR/WAR on WebLogic 10gR3 Portal Server. http://jaysensharma.wordpress.com/2010/02/08/weblogic-specific-appc-ant-task/
    Thanks
    Jay SenSharma

  • JSF parameter handling

    Hi to all;
    I would like to ask you, if it is possible to do in JSF with following condition:
    Step 1 of 3 [edit page]
    Parameter 1 : value 1
    Parameter 2 : value 2
    Parameter 3 : value 3
    Parameter 4 : value 4 (new val 4)
    Parameter 5 : value 5 (new val 5)
    Note:
    1) the parameter and its values is spooled from DB using Entity bean
    2) user is allowed to edit any parameter as shown in the page
    Step 2 of 3 [confirm page]
    Parameter 1 : value 1
    Parameter 2 : value 2
    Parameter 3 : value 3
    Parameter 4 : new val 4
    Parameter 5 : new val 5
    Note:
    1) this page is to display all the values has been changed by the user
    2) it has 2 options here, either proceed (submit and update to db) or back (return to previous page by displaying the last history (old & new values)
    Step 3 of 3 [submit page]
    Update DB and display success / error msg
    Please, if you could advise or point me with sample, I am really appreciated for your help, thanks in advance.
    Rgds;
    Yoke Yew

    Hi, thanks for your reply. But, i'm not sure if i could program as following:
    -PwdMgmtEdit.jsp-
    <h:dataTable id="pmPara" value="#{pwdMgmtBean.pmCol}" var="pmEdit" binding="#{pwdMgmtBean.myDataTable}"
              styleClass="table" headerClass="tableHeader" rowClasses="tableRowOdd, tableRowEven" width="600">
    <h:column>
                        <f:facet name="header">
                             <h:outputText value="#{lbl['pm.ival']}" />
                        </f:facet>
                             <h:inputText id="fldval" value="#{pmEdit.fldval}" valueChangeListener="#{pmEdit.editPmCol}"/>
                   </h:column>
              </h:dataTable>
    -PwdMgmtBean.java-
    public class PasswordManagementBean extends CommonBean implements ValueChangeListener {
    private final String CLASS_NAME = "PasswordManagementBean";
    private PasswordManagementDelegate pmDelegate = null;
    private Collection pmCol = null;
    /* Get selected datatable row. */
    private HtmlDataTable myDataTable = null;
    //private PasswordManagementDto myDataItem = new PasswordManagementDto();
    private PasswordManagement myDataItem = new PasswordManagement();
    public PasswordManagementBean() {
    reset();
    pmDelegate = new PasswordManagementDelegate();
    public void editPmCol(ValueChangeEvent event) {
    System.out.println("YY test 2.");
    // Get selected MyData item to be edited.
    myDataItem = (PasswordManagement) myDataTable.getRowData();
    public Collection getPmCol() {
    try {
    pmCol = pmDelegate.getAllPara();
    } catch (ApplicationException e) {
    System.out.println(CLASS_NAME + "-" + e);
    return pmCol;
    public void setPmCol(Collection pmCol) {
    this.pmCol = pmCol;
    public HtmlDataTable getMyDataTable() {
    return myDataTable;
    public void setMyDataTable(HtmlDataTable myDataTable) {
    this.myDataTable = myDataTable;
    public PasswordManagement getMyDataItem() {
    return myDataItem;
    public void setMyDataItem(PasswordManagement myDataItem) {
    this.myDataItem = myDataItem;
    public void processValueChange(ValueChangeEvent arg0) throws AbortProcessingException {
    System.out.println("YY test 1.");
    // TODO Auto-generated method stub
    It didn't print the system.out, instead complain with following error:
    Caused by: java.lang.NoSuchMethodException: com.infopro.eserv.app.passwordmanagement.domain.PasswordManagement.editPmCol(javax.faces.event.ValueChangeEvent)
         at java.lang.Class.getMethod(Class.java:1581)
         at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:121)
         ... 30 more
    Suppor,t the method editPmCol i 've added in PwdMgmtBean Pls advise

  • Array index out of bounds in oracle top links, jsf page

    Dear All,
    // This is my controller page //
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package jsfpack;
    import db.Addressmaster;
    import db.Partymaster;
    import db.Propertymaster;
    import db.RealEstateJSFBean;
    import java.lang.reflect.InvocationTargetException;
    import java.lang.reflect.Method;
    import java.util.ArrayList;
    import java.util.Collection;
    import java.util.HashMap;
    import java.util.Iterator;
    import java.util.List;
    import java.util.Map;
    import java.util.Random;
    import java.util.StringTokenizer;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import javax.annotation.Resource;
    import javax.faces.FacesException;
    import javax.faces.application.FacesMessage;
    import javax.faces.component.UIComponent;
    import javax.faces.context.FacesContext;
    import javax.persistence.EntityManager;
    import javax.persistence.EntityManagerFactory;
    import javax.persistence.PersistenceUnit;
    import javax.persistence.Query;
    import javax.transaction.SystemException;
    import javax.transaction.UserTransaction;
    import sysadmin.Admin;
    * @author siva.np
    public class RealEstatectrler {
    private RealEstateJSFBean realBean = null;
    private List<RealEstateJSFBean> realBeans = null;
    @Resource
    private UserTransaction utx = null;
    public int batchSize = 5;
    private int firstItem = 0;
    private int itemCount = -1;
    private Admin ma = null;
    @PersistenceUnit(unitName = "ReaEstatelJSFPU")
    private EntityManagerFactory emf = null;
    public EntityManager getEntityManager() {
    System.out.println("Siva 1 ");
    return emf.createEntityManager();
    public String create() {     
    //FacesContext fac = fac.getCurrentInstance().getExternalContext().getRequestMap().get("RealJSFProjBean");
    EntityManager em = getEntityManager();
    //RealEstateJSFBean RealEstBean = (RealEstateJSFBean) FacesContext.getCurrentInstance().getExternalContext().getRequestMap().get("RealEstateJSFBean");
    RealEstateJSFBean RealEstBean = (RealEstateJSFBean) FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get("RealEstateJSFBean");
    Addressmaster am = null;
    Partymaster pm = null;
    Propertymaster ppm = null;
    try {                      
    Random rand = new Random();
    Long l = rand.nextLong();
    System.out.println("I am in the creat metyhod");
    utx.begin();
    am = new Addressmaster();
    am.setAddresscode("A"+l.toString());
    am.setPodoorno(RealEstBean.getPodoorno());
    am.setStreetname(RealEstBean.getStreetname());
    am.setPlace(RealEstBean.getPlace());
    am.setCity(RealEstBean.getCity());
    am.setState(RealEstBean.getStates());
    am.setCountry(RealEstBean.getCountry());
    am.setPhoneno(RealEstBean.getPhoneno());
    am.setMobileno(RealEstBean.getMobileno());
    am.setEmail(RealEstBean.getEmail());
    em.persist(am);
    ppm = new Propertymaster();
    ppm.setPropertycode("PP"+l.toString());
    ppm.setPropertytype(RealEstBean.getPropertytype());
    ppm.setPropertyage(RealEstBean.getPropertyage());
    ppm.setBuiltarea(RealEstBean.getBuiltarea());
    ppm.setPlotarea(RealEstBean.getPlotarea());
    ppm.setBhk(RealEstBean.getBhk());
    ppm.setTotalnofloors(RealEstBean.getTotalnofloors());
    ppm.setParkingrequired(RealEstBean.getParkingrequired());
    ppm.setPaymenttype(RealEstBean.getPaymenttype());
    ppm.setTotalamount(RealEstBean.getTotalamount());
    ppm.setPropaddress1(RealEstBean.getPropaddress1());
    ppm.setPropaddress2(RealEstBean.getPropaddress2());
    ppm.setPlace(RealEstBean.getPropplace());
    ppm.setCity(RealEstBean.getPropcity());
    ppm.setState(RealEstBean.getPropstates());
    ppm.setCountry(RealEstBean.getPropcountry());
    ppm.setRemarks(RealEstBean.getRemarks());
    em.persist(ppm);
    // Party Master table
    pm = new Partymaster();
    pm.setPartycode("P"+l.toString());
    pm.setPartyname(RealEstBean.getPartyname());
    pm.setUsertype(RealEstBean.getUsertype());
    pm.setUsername(RealEstBean.getUsername());
    pm.setPassword(RealEstBean.getPassword());
    // pm.setAddresscode(am.getAddresscode());
    // pm.setPropertycode(ppm.getPropertycode());
    em.persist(pm);
    // Admin Table
    ma = new Admin();
    ma.setCode("P"+l.toString());
    ma.setUsername(RealEstBean.getUsername());
    ma.setPassword(RealEstBean.getPassword());
    em.persist(ma);
    utx.commit();
    addSuccessMessage("Real Estate was successfully created.");
    } catch (Exception ex) {           
    try {
    ex.printStackTrace();
    utx.rollback();
    } catch (IllegalStateException ex1) {
    Logger.getLogger(RealEstatectrler.class.getName()).log(Level.SEVERE, null, ex1);
    } catch (SecurityException ex1) {
    Logger.getLogger(RealEstatectrler.class.getName()).log(Level.SEVERE, null, ex1);
    } catch (SystemException ex1) {
    Logger.getLogger(RealEstatectrler.class.getName()).log(Level.SEVERE, null, ex1);
    } finally {
    em.close();
    return listSetup();
    public String edit() {
    RealEstateConverter converter = new RealEstateConverter();
    String adminString = converter.getAsString(FacesContext.getCurrentInstance(), null, realBean);
    String currentAdminString = getRequestParameter("jsfcrud.currentRealJSF");
    Addressmaster am;
    Partymaster pm;
    Propertymaster ppm;
    EntityManager em = getEntityManager();
    try {
    utx.begin();
    am = em.find(Addressmaster.class, realBean.getAddresscode().trim());
    if(am != null){
    am.setAddresscode(realBean.getAddresscode().trim());
    am.setPodoorno(realBean.getPodoorno());
    am.setStreetname(realBean.getStreetname());
    am.setPlace(realBean.getPlace());
    am.setCity(realBean.getCity());
    am.setState(realBean.getStates());
    am.setCountry(realBean.getCountry());
    am.setPhoneno(realBean.getPhoneno());
    am.setMobileno(realBean.getMobileno());
    am.setEmail(realBean.getEmail());
    em.merge(am);
    // Property Master table
    ppm = em.find(Propertymaster.class, realBean.getPropertycode().trim());
    if(ppm != null){           
    ppm.setPropertytype(realBean.getPropertytype());
    ppm.setPropertyage(realBean.getPropertyage());
    ppm.setBuiltarea(realBean.getBuiltarea());
    ppm.setPlotarea(realBean.getPlotarea());
    ppm.setBhk(realBean.getBhk());
    ppm.setTotalnofloors(realBean.getTotalnofloors());
    ppm.setParkingrequired(realBean.getParkingrequired());
    ppm.setPaymenttype(realBean.getPaymenttype());
    ppm.setTotalamount(realBean.getTotalamount());
    ppm.setPropaddress1(realBean.getPropaddress1());
    ppm.setPropaddress2(realBean.getPropaddress2());
    ppm.setPlace(realBean.getPropplace());
    ppm.setCity(realBean.getPropcity());
    ppm.setState(realBean.getPropstates());
    ppm.setCountry(realBean.getPropcountry());
    ppm.setRemarks(realBean.getRemarks());
    em.merge(ppm);
    // Party Master table
    String Party = realBean.getPropertycode().replace("PP","P");
    pm = em.find(Partymaster.class, Party.trim());
    if(pm != null){
    pm.setPartycode(Party.trim());
    pm.setPartyname(realBean.getPartyname());
    pm.setUsertype(realBean.getUsertype());
    pm.setUsername(realBean.getUsername());
    pm.setPassword(realBean.getPassword());
    //pm.setAddresscode(am.getAddresscode());
    // pm.setPropertycode(ppm.getPropertycode());
    em.merge(pm);
    // Admin Table
    ma = em.find(Admin.class, Party.trim());
    if(ma != null){
    ma.setCode(Party.trim());
    ma.setUsername(realBean.getUsername());
    ma.setPassword(realBean.getPassword());
    em.merge(ma);
    utx.commit();
    addSuccessMessage("Real Estate was successfully updated.");
    } catch (Exception ex) {
    ex.printStackTrace();
    } finally {
    em.close();
    return detailSetup();
    public String destroy() {
    realBean = getRealFromRequest();
    if (realBean == null) {           
    String currentAdminString = getRequestParameter("jsfcrud.currentRealJSF");
    addErrorMessage("The Real Estate with id " + currentAdminString + " no longer exists.");
    String relatedControllerOutcome = relatedControllerOutcome();
    if (relatedControllerOutcome != null) {
    return relatedControllerOutcome;
    return listSetup();
    EntityManager em = getEntityManager();
    try {           
    utx.begin();
    em.remove(em.find(Addressmaster.class, realBean.getAddresscode()));
    em.remove(em.find(Propertymaster.class, realBean.getPropertycode().trim()));
    String Party = realBean.getPropertycode().replace("PP","P");
    em.remove(em.find(Partymaster.class, Party.trim()));
    em.remove(em.find(Admin.class, Party.trim()));
    utx.commit();
    addSuccessMessage("Real Edit User was successfully deleted.");
    } catch (Exception ex) {
    try {
    ensureAddErrorMessage(ex, "A persistence error occurred.");
    utx.rollback();
    } catch (Exception e) {
    ensureAddErrorMessage(e, "An error occurred attempting to roll back the transaction.");
    return null;
    } finally {
    em.close();
    String relatedControllerOutcome = relatedControllerOutcome();
    if (relatedControllerOutcome != null) {
    return relatedControllerOutcome;
    return listSetup();
    public RealEstateJSFBean getEstProjBean(){  
    System.out.println("Siva 12 ");
    if(realBean == null){
    //realBean = getEstProjBean();
    realBean = getRealFromRequest();
    if (realBean == null) {
    realBean = new RealEstateJSFBean();
    return realBean;
    public String listSetup() {
    System.out.println("Siva 13 ");
    reset(true);
    return "RealEst_list";
    public String detailSetup() {
    System.out.println("Siva 14 ");
    return scalarSetup("RealEst_detail");
    public String createSetup() {
    System.out.println("Siva 15 ");
    reset(false);
    realBean = new RealEstateJSFBean();
    return "RealEst_create";
    public String editSetup() {       
    System.out.println("EDit");
    return scalarSetup("RealEst_edit");
    private String scalarSetup(String destination) {
    System.out.println("Dest "+destination);
    reset(false);
    realBean = getRealFromRequest();
    if (realBean == null) {
    String requestAdminString = getRequestParameter("jsfcrud.currentRealJSF");
    addErrorMessage("The admin with sss id " + requestAdminString + " no longer exists.");
    String relatedControllerOutcome = relatedControllerOutcome();
    if (relatedControllerOutcome != null) {
    return relatedControllerOutcome;
    return listSetup();
    return destination;
    public int getFirstItem() {
    System.out.println("Siva 16 ");
    getItemCount();
    if (firstItem >= itemCount) {
    if (itemCount == 0) {
    firstItem = 0;
    } else {
    int zeroBasedItemCount = itemCount - 1;
    double pageDouble = zeroBasedItemCount / batchSize;
    int page = (int) Math.floor(pageDouble);
    firstItem = page * batchSize;
    return firstItem;
    public int getLastItem() {
    System.out.println("Siva 17 ");
    getFirstItem();
    return firstItem + batchSize > itemCount ? itemCount : firstItem + batchSize;
    public int getBatchSize() {
    System.out.println("Siva 18 ");
    return batchSize;
    public String next() {
    System.out.println("Siva 19 ");
    reset(false);
    getFirstItem();
    if (firstItem + batchSize < itemCount) {
    firstItem += batchSize;
    return "RealEst_list";
    public String prev() {
    System.out.println("Siva 20 ");
    reset(false);
    getFirstItem();
    firstItem -= batchSize;
    if (firstItem < 0) {
    firstItem = 0;
    return "RealEst_list";
    private Map<Object, String> asString = null;
    public Map<Object, String> getAsString() {
    System.out.println("Siva 21 ");
    if (asString == null) {
    asString = new HashMap<Object, String>() {
    @Override
    public String get(Object key) {
    if (key instanceof Object[]) {
    Object[] keyAsArray = (Object[]) key;
    if (keyAsArray.length == 0) {
    return "(No Items)";
    StringBuffer sb = new StringBuffer();
    for (int i = 0; i < keyAsArray.length; i++) {
    if (i > 0) {
    sb.append("<br />");
    sb.append(keyAsArray);
    return sb.toString();
    System.out.println("This is siva ");
    return new RealEstateConverter().getAsString(FacesContext.getCurrentInstance(), null, (RealEstateJSFBean) key);
    return asString;
    private String relatedControllerOutcome() {
    System.out.println("Siva 22 ");
    String relatedControllerString = getRequestParameter("jsfcrud.relatedController");
    String relatedControllerTypeString = getRequestParameter("jsfcrud.relatedControllerType");
    if (relatedControllerString != null && relatedControllerTypeString != null) {
    FacesContext context = FacesContext.getCurrentInstance();
    Object relatedController = context.getApplication().getELResolver().getValue(context.getELContext(), null, relatedControllerString);
    try {
    Class<?> relatedControllerType = Class.forName(relatedControllerTypeString);
    Method detailSetupMethod = relatedControllerType.getMethod("detailSetup");
    return (String) detailSetupMethod.invoke(relatedController);
    } catch (ClassNotFoundException e) {
    throw new FacesException(e);
    } catch (NoSuchMethodException e) {
    throw new FacesException(e);
    } catch (IllegalAccessException e) {
    throw new FacesException(e);
    } catch (InvocationTargetException e) {
    throw new FacesException(e);
    return null;
    private void reset(boolean resetFirstItem) {
    System.out.println("Siva 23 ");
    realBean = null;
    realBeans = null;
    itemCount = -1;
    if (resetFirstItem) {
    firstItem = 0;
    private RealEstateJSFBean getRealFromRequest() {
    System.out.println("Siva 24 ");
    String theId = getRequestParameter("jsfcrud.currentRealJSF");
    System.out.println("TEEE "+theId);
    return (RealEstateJSFBean) new RealEstateConverter().getAsObject(FacesContext.getCurrentInstance(), null, theId);
    private String getRequestParameter(String key) {
    System.out.println("Siva 25 ");
    return FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(key);
    public List<RealEstateJSFBean> getEstProjBeans() {
    if (realBeans == null) {
    System.out.println("Real JSF 1");
    realBeans = getEstProjBeans(false);
    return realBeans;
    public List<RealEstateJSFBean> getEstProjBeans(boolean all) {
    EntityManager em = getEntityManager();
    //ArrayList results = null;
    List results = new ArrayList();
    List resList = new ArrayList();
    RealEstateJSFBean[] test = null;
    RealEstateJSFBean srsiva = new RealEstateJSFBean();
    try {           
    // Query q = em.createQuery("select object(o) from Addressmaster as o");
    // Query q = em.createQuery("SELECT p.partyname, a.addresscode FROM Partymaster p LEFT JOIN p.Addressmaster a");
    // Query q = em.createQuery("SELECT p.partyname, a.addresscode FROM Partymaster p LEFT JOIN p.Addressmaster a");
    String strQuery = "select am.addresscode, pm.partyname,pm.propertycode, am.email, pm.username, am.podoorno,am.streetname, am.place, am.city, am.state, am.country, am.phoneno, am.mobileno, pm.usertype, ppm.propertytype,ppm.builtarea, ppm.plotarea, ppm.propertyage, ppm.bhk, ppm.TotalNoFloors, ppm.TotalAmount, ppm.PropAddress1, ppm.PropAddress2, ppm.place, ppm.city, " +
    " ppm.state,ppm.country,ppm.remarks, ppm.parkingrequired, pm.password from partymaster pm left outer join propertymaster ppm on pm.propertycode = ppm.propertycode left outer join addressmaster am on pm.addresscode = am.addresscode";
    Query q = em.createNativeQuery(strQuery);
    resList=q.getResultList();
    System.out.println("List Query "+resList);
    int sizeTest = resList.size();
    if (!all) {
    q.setMaxResults(batchSize);
    q.setFirstResult(getFirstItem());
    System.out.println("Count Query "+sizeTest);
    test=new RealEstateJSFBean[sizeTest];
    for(int i=0;i<sizeTest;i++)
    test[i]=new RealEstateJSFBean();
    String s=resList.get(i).toString();
    System.out.println("Res list"+s);
    StringTokenizer st=new StringTokenizer(s,",");
    while(st.hasMoreElements())
    String leave_id=st.nextElement().toString();
    StringTokenizer st1=new StringTokenizer(leave_id,"[");
    while(st1.hasMoreElements())
    test[i].setAddresscode(st1.nextElement().toString().trim());
    test[i].setPartyname(st.nextElement().toString().trim());
    test[i].setPropertycode(st.nextElement().toString());
    test[i].setEmail(st.nextElement().toString().trim());
    test[i].setUsername(st.nextElement().toString().trim());
    test[i].setPodoorno(st.nextElement().toString().trim());
    test[i].setStreetname(st.nextElement().toString().trim());
    test[i].setPlace(st.nextElement().toString().trim());
    test[i].setCity(st.nextElement().toString().trim());
    test[i].setStates(st.nextElement().toString().trim());
    test[i].setCountry(st.nextElement().toString().trim());
    test[i].setPhoneno(Long.parseLong(st.nextElement().toString().trim()));
    test[i].setMobileno(Long.parseLong(st.nextElement().toString().trim()));
    test[i].setUsertype(st.nextElement().toString().trim());
    test[i].setPropertytype(st.nextElement().toString().trim());
    test[i].setBuiltarea(Double.parseDouble(st.nextElement().toString().trim()));
    test[i].setPlotarea(Double.parseDouble(st.nextElement().toString().trim()));
    test[i].setPropertyage(st.nextElement().toString().trim());
    test[i].setBhk(Integer.parseInt(st.nextElement().toString().trim()));
    test[i].setTotalnofloors(Integer.parseInt(st.nextElement().toString().trim()));
    test[i].setTotalamount(Long.parseLong(st.nextElement().toString().trim()));
    test[i].setPropaddress1(st.nextElement().toString().trim());
    test[i].setPropaddress2(st.nextElement().toString().trim());
    test[i].setPropplace(st.nextElement().toString().trim());
    test[i].setPropcity(st.nextElement().toString().trim());
    test[i].setPropstates(st.nextElement().toString().trim());
    test[i].setPropcountry(st.nextElement().toString().trim());
    test[i].setRemarks(st.nextElement().toString().trim());
    test[i].setParkingrequired(st.nextElement().toString().trim());
    String firstname=st.nextElement().toString();
    StringTokenizer st2=new StringTokenizer(firstname,"]");
    while(st2.hasMoreElements())
    test[i].setPassword(st2.nextElement().toString().trim());
    results.add(test[i]);
    break;
    System.out.println("III "+i);
    return results;
    } finally {
    em.close();
    public RealEstateJSFBean getEstProjBeansEdit(String Propertycode) {
    EntityManager em = getEntityManager();
    try {           
    String strSQL = "select am.addresscode, pm.partyname,pm.propertycode, am.email, pm.username, am.podoorno,am.streetname, am.place, am.city, am.state, am.country, am.phoneno, am.mobileno, pm.usertype, ppm.propertytype,ppm.builtarea, ppm.plotarea, ppm.propertyage, ppm.bhk, ppm.TotalNoFloors, ppm.TotalAmount, ppm.PropAddress1, ppm.PropAddress2, ppm.place, ppm.city, " +
    " ppm.state,ppm.country,ppm.remarks, ppm.parkingrequired, pm.password from partymaster pm left outer join propertymaster ppm on pm.propertycode = ppm.propertycode left outer join addressmaster am on pm.addresscode = am.addresscode where ppm.propertycode = '"+Propertycode.trim()+"'";
    Query q = em.createNativeQuery(strSQL);
    if (!Propertycode.equals("")) {
    q.setMaxResults(batchSize);
    q.setFirstResult(getFirstItem());
    realBean=new RealEstateJSFBean();
    String s=q.getSingleResult().toString();
    StringTokenizer st=new StringTokenizer(s,",");
    while(st.hasMoreElements())
    String leave_id=st.nextElement().toString();
    StringTokenizer st1=new StringTokenizer(leave_id,"[");
    while(st1.hasMoreElements())
    realBean.setAddresscode(st1.nextElement().toString().trim());
    realBean.setPartyname(st.nextElement().toString().trim());
    realBean.setPropertycode(st.nextElement().toString());
    realBean.setEmail(st.nextElement().toString().trim());
    realBean.setUsername(st.nextElement().toString().trim());
    realBean.setPodoorno(st.nextElement().toString().trim());
    realBean.setStreetname(st.nextElement().toString().trim());
    realBean.setPlace(st.nextElement().toString().trim());
    realBean.setCity(st.nextElement().toString().trim());
    realBean.setStates(st.nextElement().toString().trim());
    realBean.setCountry(st.nextElement().toString().trim());
    realBean.setPhoneno(Long.parseLong(st.nextElement().toString().trim()));
    realBean.setMobileno(Long.parseLong(st.nextElement().toString().trim()));
    realBean.setUsertype(st.nextElement().toString().trim());
    realBean.setPropertytype(st.nextElement().toString().trim());
    realBean.setBuiltarea(Double.parseDouble(st.nextElement().toString().trim()));
    realBean.setPlotarea(Double.parseDouble(st.nextElement().toString().trim()));
    realBean.setPropertyage(st.nextElement().toString().trim());
    realBean.setBhk(Integer.parseInt(st.nextElement().toString().trim()));
    realBean.setTotalnofloors(Integer.parseInt(st.nextElement().toString().trim()));
    realBean.setTotalamount(Long.parseLong(st.nextElement().toString().trim()));
    realBean.setPropaddress1(st.nextElement().toString().trim());
    realBean.setPropaddress2(st.nextElement().toString().trim());
    realBean.setPropplace(st.nextElement().toString().trim());
    realBean.setPropcity(st.nextElement().toString().trim());
    realBean.setPropstates(st.nextElement().toString().trim());
    realBean.setPropcountry(st.nextElement().toString().trim());
    realBean.setRemarks(st.nextElement().toString().trim());
    realBean.setParkingrequired(st.nextElement().toString().trim());
    String firstname=st.nextElement().toString();
    StringTokenizer st2=new StringTokenizer(firstname,"]");
    while(st2.hasMoreElements())
    realBean.setPassword(st2.nextElement().toString().trim());
    System.out.println("SSS"+realBean.toString());
    return realBean;
    } finally {
    em.close();
    public int getItemCount() {
    System.out.println("Siva 27 ");
    if (itemCount == -1) {
    EntityManager em = getEntityManager();
    try {
    itemCount = ((Long) em.createQuery("select count(o) from Addressmaster as o").getSingleResult()).intValue();
    //itemCount = ((Long) em.createQuery("select count(partycode) from partymaster as pm left outer join propertymaster as ppm on pm.propertycode = ppm.propertycode left outer join addressmaster as am on pm.addresscode = am.addresscode").getSingleResult()).intValue();
    //itemCount = ((int) em.createQuery("select pm.partyname,pm.propertycode, am.email, pm.username, am.podoorno,am.streetname, am.place, am.city, am.state, am.country, am.phoneno, am.mobileno, ppm.propertytype,ppm.builtarea, ppm.plotarea, ppm.propertyage, ppm.bhk, ppm.TotalNoFloors, ppm.TotalAmount, ppm.PropAddress1, ppm.PropAddress2, ppm.place, ppm.city, ppm.state,ppm.country,ppm.remarks, ppm.parkingrequired, pm.password from partymaster pm left outer join propertymaster ppm on pm.propertycode = ppm.propertycode left outer join addressmaster am on pm.addresscode = am.addresscode").getResultList().size());
    } finally {
    em.close();
    return itemCount;
    private void ensureAddErrorMessage(Exception ex, String defaultMsg) {
    System.out.println("Siva 28 ");
    String msg = ex.getLocalizedMessage();
    if (msg != null && msg.length() > 0) {
    addErrorMessage(msg);
    } else {
    addErrorMessage(defaultMsg);
    public static void addErrorMessage(String msg) {
    Fac

    No one is going to read this. Please post only the code which caused the problem, not the whole project.
    Please try to create a test case which reproduces this problem and post it here. And last but not least,
    please use the CODE button in the message editor toolbar to get the tags. Paste code in there so
    that you get well-formatted (and thus well-readable) code.
    Please also carefully read this article: [How To Ask Questions The Smart Way|http://www.catb.org/~esr/faqs/smart-questions.html].                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to get ALL values as default for  a drop down box in JSF

    Hi,
    I have a drop down box in JSF page which retrieves values from LOVCache.java. I have values like Company, Client, User, ALL in the drop down box.
    By default blank value is selected for the drop down box. I want to make ALL(which retrieves data for all the values) as default value for the drop down box.
    Could any body help me? Any help must be appreciated.
    Thanks,
    Aseet

    Thanks Nikhil. But I am fetching the values from the LOVCache.java.
    I am using <af:selectManyChoice>. Is there any way I can use LOVCache.java value for selecting default values instead of hard coding?
    I mean to say can I write
    unselectedLabel="#{LOVCache.entityTypeSelectionList.anyValue}"
    where LOVCache.entityTypeSelectionList is used to populate the drop down box.
    Regards,
    Aseet

  • I am trying to use java  file as Model layer and jsf as presentation layer

    I am trying to use java file as Model layer and jsf as presentation layer and need some help
    I successfully get the value of h:outputText from java file by doing simple binding operation but I am facing problems when I am trying to fill h:dataTable
    I create java file
    package oracle.model;
    import java.sql.;*
    import java.util.;*
    *public class TableBean {*
    Connection con ;
    Statement ps;
    ResultSet rs;
    private List perInfoAll = new ArrayList();
    *public List getperInfoAll() {*
    perInfoAll.add(0,new perInfo("name","username","blablabla"));
    return perInfoAll;
    *public class perInfo {*
    String uname;
    String firstName;
    String lastName;
    *public perInfo(String firstName,String lastName,String uname) {*
    this.uname = uname;
    this.firstName = firstName;
    this.lastName = lastName;
    *public String getUname() {*
    return uname;
    *public String getFirstName() {*
    return firstName;
    *public String getLastName() {*
    return lastName;
    right click on the file and choose 'create data control'
    then i wrote the jsf file:
    *<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>*
    *<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>*
    *<f:view>*
    *<h:dataTable id="dt1" value="#{bindings.perInfoAll}"*
    var="item" bgcolor="#F1F1F1" border="10"
    cellpadding="5" cellspacing="3" rows="4" width="50%"
    dir="LTR" frame="hsides" rules="all"
    *>*
    *<f:facet name="header">*
    *<h:outputText value="This is 'dataTable' demo" id="ot6"/>*
    *</f:facet>*
    *<h:column id="c2">*
    *<f:facet name="header">*
    *<h:outputText value="First Name" id="ot1"/>*
    *</f:facet>*
    *<h:outputText style="" value="#{item.firstName}"*
    id="ot2"/>
    *</h:column>*
    *<h:column id="c4">*
    *<f:facet name="header">*
    *<h:outputText value="Last Name" id="ot9"/>*
    *</f:facet>*
    *<h:outputText value="#{item.lastName}" id="ot8"/>*
    *</h:column>*
    *<h:column id="c3">*
    *<f:facet name="header">*
    *<h:outputText value="Username" id="ot7"/>*
    *</f:facet>*
    *<h:outputText value="#{item.uname}" id="ot4"/>*
    *</h:column>*
    *<f:facet name="footer">*
    *<h:outputText value="The End" id="ot3"/>*
    *</f:facet>*
    *</h:dataTable>*
    *</center>*
    *</af:document>*
    *</f:view>*
    but nothing is appear in my table
    I know that there is something wrong in calling the binding object
    I need help pls and where can i find some help to deal with another tag types
    thanks

    i dragged the "perInfoAll" from my "Data Controls" and choosed adf table (even I know that new table with adf tags well be generated and i want table with jsf tags)
    and this code is generated
    *<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"*
    *"http://www.w3.org/TR/html4/loose.dtd">*
    *<%@ page contentType="text/html;charset=UTF-8"%>*
    *<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>*
    *<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>*
    *<%@ taglib uri="http://xmlns.oracle.com/adf/faces/rich" prefix="af"%>*
    *<f:view>*
    *<af:document id="d1">*
    *<af:messages id="m1"/>*
    *<af:form id="f1">*
    *<af:table value="#{bindings.perInfoAll1.collectionModel}" var="row"*
    *rows="#{bindings.perInfoAll1.rangeSize}"*
    *emptyText="#{bindings.perInfoAll1.viewable ? 'No data to display.' : 'Access Denied.'}"*
    *fetchSize="#{bindings.perInfoAll1.rangeSize}"*
    *rowBandingInterval="0"*
    *selectionListener="#{bindings.perInfoAll1.collectionModel.makeCurrent}"*
    *rowSelection="multiple" id="t1">*
    *<af:column sortProperty="uname" sortable="false"*
    *headerText="#{bindings.perInfoAll1.hints.uname.label}"*
    *id="c1">*
    *<af:inputText value="#{row.bindings.uname.inputValue}"*
    *label="#{bindings.perInfoAll1.hints.uname.label}"*
    *required="#{bindings.perInfoAll1.hints.uname.mandatory}"*
    *columns="#{bindings.perInfoAll1.hints.uname.displayWidth}"*
    *maximumLength="#{bindings.perInfoAll1.hints.uname.precision}"*
    *shortDesc="#{bindings.perInfoAll1.hints.uname.tooltip}"*
    *id="it3">*
    *<f:validator binding="#{row.bindings.uname.validator}"/>*
    *</af:inputText>*
    *</af:column>*
    *<af:column sortProperty="firstName" sortable="false"*
    *headerText="#{bindings.perInfoAll1.hints.firstName.label}"*
    *id="c2">*
    *<af:inputText value="#{row.bindings.firstName.inputValue}"*
    *label="#{bindings.perInfoAll1.hints.firstName.label}"*
    *required="#{bindings.perInfoAll1.hints.firstName.mandatory}"*
    *columns="#{bindings.perInfoAll1.hints.firstName.displayWidth}"*
    *maximumLength="#{bindings.perInfoAll1.hints.firstName.precision}"*
    *shortDesc="#{bindings.perInfoAll1.hints.firstName.tooltip}"*
    *id="it2">*
    *<f:validator binding="#{row.bindings.firstName.validator}"/>*
    *</af:inputText>*
    *</af:column>*
    *<af:column sortProperty="lastName" sortable="false"*
    *headerText="#{bindings.perInfoAll1.hints.lastName.label}"*
    *id="c3">*
    *<af:inputText value="#{row.bindings.lastName.inputValue}"*
    *label="#{bindings.perInfoAll1.hints.lastName.label}"*
    *required="#{bindings.perInfoAll1.hints.lastName.mandatory}"*
    *columns="#{bindings.perInfoAll1.hints.lastName.displayWidth}"*
    *maximumLength="#{bindings.perInfoAll1.hints.lastName.precision}"*
    *shortDesc="#{bindings.perInfoAll1.hints.lastName.tooltip}"*
    *id="it1">*
    *<f:validator binding="#{row.bindings.lastName.validator}"/>*
    *</af:inputText>*
    *</af:column>*
    *</af:table>*
    *</af:form>*
    *</af:document>*
    *</f:view>*
    but when run it i see the following errors
    *Class oracle.adf.model.adapter.bean.BeanDataControl can not access a member of class nl.amis.hrm.EmpManager with modifiers "private"*
    *Object EmpManager of type DataControl is not found.*
    *java.lang.NullPointerException*
    *Class oracle.adf.model.adapter.bean.BeanDataControl can not access a member of class nl.amis.hrm.EmpManager with modifiers "private"*
    *Object EmpManager of type DataControl is not found.*
    *java.lang.NullPointerException*
    :(

  • How to get security roles in a JSF portlet

    I need to get the LDAP user-roles available in the Sun Portal Server 7 in my JSF-168 portlet.
    I've added the mapping file, updated the portlet.xml and web.xml, deployed the portlet (psconsole). But the portlet shows the "content not available" error with javax....title title.
    I've probably messed up the descriptors, but I don't see what is wrong. Here they are:
    roleMaps.properties
    cn\=VSM.Administrator,dc\=neco,dc\=cz=Administrator
    web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.4">
      <context-param>
        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
        <param-value>server</param-value>
      </context-param>
      <context-param>
        <param-name>javax.faces.CONFIG_FILES</param-name>
        <param-value>/WEB-INF/navigation.xml,/WEB-INF/managed-beans.xml</param-value>
      </context-param>
      <context-param>
        <param-name>com.sun.faces.validateXml</param-name>
        <param-value>true</param-value>
      </context-param>
      <context-param>
        <param-name>com.sun.faces.verifyObjects</param-name>
        <param-value>false</param-value>
      </context-param>
      <filter>
        <filter-name>UploadFilter</filter-name>
        <filter-class>com.sun.rave.web.ui.util.UploadFilter</filter-class>
        <init-param>
          <description>
              The maximum allowed upload size in bytes.  If this is set
              to a negative value, there is no maximum.  The default
              value is 1000000.
            </description>
          <param-name>maxSize</param-name>
          <param-value>1000000</param-value>
        </init-param>
        <init-param>
          <description>
              The size (in bytes) of an uploaded file which, if it is
              exceeded, will cause the file to be written directly to
              disk instead of stored in memory.  Files smaller than or
              equal to this size will be stored in memory.  The default
              value is 4096.
            </description>
          <param-name>sizeThreshold</param-name>
          <param-value>4096</param-value>
        </init-param>
      </filter>
      <filter-mapping>
        <filter-name>UploadFilter</filter-name>
        <servlet-name>Faces Servlet</servlet-name>
      </filter-mapping>
      <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
      </servlet>
      <servlet>
        <servlet-name>ExceptionHandlerServlet</servlet-name>
        <servlet-class>com.sun.errorhandler.ExceptionHandler</servlet-class>
        <init-param>
          <param-name>errorHost</param-name>
          <param-value>localhost</param-value>
        </init-param>
        <init-param>
          <param-name>errorPort</param-name>
          <param-value>25444</param-value>
        </init-param>
      </servlet>
      <servlet>
        <servlet-name>ThemeServlet</servlet-name>
        <servlet-class>com.sun.rave.web.ui.theme.ThemeServlet</servlet-class>
      </servlet>
      <servlet>
        <description>Generated By Sun Java Studio Creator</description>
        <display-name>CreatorPortlet Wrapper</display-name>
        <servlet-name>VSMPortal</servlet-name>
        <servlet-class>org.apache.pluto.core.PortletServlet</servlet-class>
        <init-param>
          <param-name>portlet-class</param-name>
          <param-value>com.sun.faces.portlet.FacesPortlet</param-value>
        </init-param>
        <init-param>
          <param-name>portlet-guid</param-name>
          <param-value>VSMPortal.VSMPortal</param-value>
        </init-param>
      </servlet>
      <servlet-mapping>
        <servlet-name>ExceptionHandlerServlet</servlet-name>
        <url-pattern>/error/ExceptionHandler</url-pattern>
      </servlet-mapping>
      <servlet-mapping>
        <servlet-name>ThemeServlet</servlet-name>
        <url-pattern>/theme/*</url-pattern>
      </servlet-mapping>
      <servlet-mapping>
        <servlet-name>VSMPortal</servlet-name>
        <url-pattern>/VSMPortal/*</url-pattern>
      </servlet-mapping>
      <welcome-file-list>
        <welcome-file>faces/null</welcome-file>
      </welcome-file-list>
      <error-page>
        <exception-type>javax.servlet.ServletException</exception-type>
        <location>/error/ExceptionHandler</location>
      </error-page>
      <error-page>
        <exception-type>java.io.IOException</exception-type>
        <location>/error/ExceptionHandler</location>
      </error-page>
      <error-page>
        <exception-type>javax.faces.FacesException</exception-type>
        <location>/error/ExceptionHandler</location>
      </error-page>
      <error-page>
        <exception-type>com.sun.rave.web.ui.appbase.ApplicationException</exception-type>
        <location>/error/ExceptionHandler</location>
      </error-page>
      <jsp-config>
        <jsp-property-group>
          <url-pattern>*.jspf</url-pattern>
          <is-xml>true</is-xml>
        </jsp-property-group>
      </jsp-config>
         <security-role>
              <role-name>Administrator</role-name>
         </security-role>          
    </web-app>
    portlet.xml
    <?xml version='1.0' encoding='UTF-8' ?>
    <portlet-app xmlns='http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd                         http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd' version='1.0'>
         <portlet>
              <description>Created By Java Studio Creator</description>
              <portlet-name>VSMPortal</portlet-name>
              <display-name>VSMPortal Portlet</display-name>
              <portlet-class>com.sun.faces.portlet.FacesPortlet</portlet-class>
              <init-param>
                   <name>com.sun.faces.portlet.INIT_VIEW</name>
                   <value>/Uctarna.jsp</value>
              </init-param>
              <expiration-cache>0</expiration-cache>
              <supports>
                   <mime-type>text/html</mime-type>
                   <portlet-mode>VIEW</portlet-mode>
              </supports>
              <supported-locale>en</supported-locale>
              <portlet-info>
                   <title>VSMPortal</title>
                   <short-title>VSMPortal</short-title>
                   <keywords>Creator</keywords>
              </portlet-info>
              <security-role-ref>
                   <role-name>Administrator</role-name>
                   <role-link>Administrator</role-link>
              </security-role-ref>          
         </portlet>
    </portlet-app>If I don't use the security-role and security-role-ref tags, the portlet works, and the isUserInRole method obviously doesn't.

    Nobody uses the LDAP roles in a portlet? Anybody knows other thread discussing similar issue (I can't find anything)?

  • Error while opening a dwg file :java.lang.NoSuchMethodException: Method

    Hello Experts,
    I tried to integrate WebCenter Content with Autovue ,the integration was good untill i get this error while trying to open a dwg file checked in Content Server using View in Autovue option in Actions :
    java.lang.NoSuchMethodException: Method fileOpen(com.cimmetry.core.SessionID, com.cimmetry.core.DocID, com.cimmetry.core.Authorization, <null>, java.lang.Boolean, <null>) not found in class com.cimmetry.jvueserver.VCETConnection
         at com.cimmetry.jvueserver.ar.a(Unknown Source)
         at com.cimmetry.jvueserver.ar.a(Unknown Source)
         at com.cimmetry.jvueserver.ar.a(Unknown Source)
         at com.cimmetry.jvueserver.ar.d(Unknown Source)
         at com.cimmetry.jvueserver.ar.a(Unknown Source)
         at com.cimmetry.jvueserver.ah.run(Unknown Source)
    Any suggestions would help me,
    Thanks in Advance
    Raj

    Hi Raj,
    The solution to this problem is posted in My Oracle Support:
    Error: "java.lang.NoSuchMethodException: Method fileOpen" when Trying to View Files Using AutoVue Integrated to Oracle Universal Content Management (UCM) (Doc ID 1341644.1).
    It has all the details, step by step.
    Jeff

  • JSF Pages are not rendering correctly when  loaded using Non JSF actions

    Hi All,
    This problem is irritating me and I am posting the same query for the third time here.
    When I come from non jsf actions such as page submitting using Javascript, clicking anchor link, clicking normal Html submit button and so on my page is not rendering correctlly .
    In other words, My first GET method/Post method works perfectly for the first time when the page is loaded.
    But when we try to access the page for the second time, although logical work is perfect in bean, I am getting same old page.
    How to resolve this issue?
    or
    Is this Bug of Sun's Implementation of JSF Framework.
    Thanks,
    Sudhakar

    Hi Sudhakar,
    There is a discussion about refreshing a page, Take a look at the below thread
    http://swforum.sun.com/jive/thread.jspa?threadID=55660
    Hope this what you are looking for
    MJ

  • Any way (event) to call Java method after view created in JSF 2.0

    Hi,
    I am using JSF 2.0 Mojarra's implementation.
    I am interested to know if there is a way to call Java methods before and/or after view has been restored.
    I wanted to initialize data for my page in this Java method.
    I could see there is an event class PostRestoreStateEvent added in JSF 2.0. How to use it?
    I tired to use f:event element as below, but it does not work. Can anyone share anyother idea to achieve this behaviour?
    <f:metadata>
    <f:event type="postRestoreState" listener="#{employeeLoadBean.loadAfterRestoreView}"/>
    </f:metadata>
    Regards,
    Kishore K S

    Hi,
    The problem is solved as below.
    <f:metadata>
    <f:event type="javax.faces.event.PostRestoreStateEvent" listener="#{employeeViewEventListener.postRestoreState}"/>
    </f:metadata>
    The above calls the Java method #{employeeViewEventListener.postRestoreState} whenever View has been restored.
    It was not working when shortName of the event (ie., postRestoreState) is given and throwing ClassNotFound exception.
    Regards,
    Kishore K S

  • Can't reference methods in a Bean from a Composite JSF Component.

    I have the following composite component TestCC.xhtml:
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"
    xmlns:cc="http://java.sun.com/jsf/composite" xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <cc:interface>
    <cc:attribute name="manager" method-signature="java.lang.String helloTest()" required="true"/>
    </cc:interface>
    <cc:implementation>
    Hello #{cc.attrs.manager} !!!!!!!!!!!!!!!!!!!!!
    </cc:implementation>
    </html>
    When I try to call it in a JSFF file:
    <?xml version='1.0' encoding='UTF-8'?>
    <ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:icc="http://java.sun.com/jsf/composite/IchipComponent">
    <icc:TestCC manager="#{viewScope.PatientClinicalBean.helloTest}"/>
    The page crashes at my composite tag with the following message in the console:
    javax.el.ELException: //C:/Documents and Settings/tlam/Application Data/JDeveloper/system11.1.2.3.39.62.76.1/o.j2ee/drs/iCHIP/ViewControllerWebApp.war/WEB-INF/classes/META-INF/resources/IchipComponent/TestCC.xhtml: javax.el.PropertyNotFoundException: //C:/Documents and Settings/tlam/Application Data/JDeveloper/system11.1.2.3.39.62.76.1/o.j2ee/drs/iCHIP/ViewControllerWebApp.war/Patient/Profile/Clinical.jsff @13,86 manager="#{viewScope.PatientClinicalBean.helloTest}": The class 'patient.profile.PatientClinicalBean' does not have the property 'helloTest'.
    But my managed bean does have a public String helloTest() method, as well as other methods that work fine elsewhere in my JSFF page:
    public class PatientClinicalBean{
    String test = "TESTING";
    public String helloTest() {
    return test;
    I have tried this many times with different methods, all with the same result. Yet if my composite component outputs just a string and I enter the expression <icc:TestCC manager="#{viewScope.PatientClinicalBean.test}"/> to access the String test field directly it executes properly. I can't seem to reference any of the methods in PatientClinicalBean from only my composite component, when other method calls work fine in the same JSFF page. All other examples I've seen on the web have no problems doing this the same way I have, am I missing something?!
    Edited by: tnology on 24-Oct-2012 14:13
    Edited by: tnology on 24-Oct-2012 14:14
    Edited by: tnology on 24-Oct-2012 14:16

    What if you change the method in the class like this?
    public String getHelloTest() {
      return test;
    }If you attempt to read a property call abc from a bean, you need to have a method called getAbc(). If you attempt to set a property called abc, you need to have a method called setAbc(...). This is JavaBeans convention.

  • I can't view dataTable in JSF

    Hi, anyone who can help me with java server faces, i want to put data from a resultset to dataTable, i made everithing but my table is not visible.
    My code is:
    <?xml version='1.0' encoding='windows-1252'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core">
    <jsp:output omit-xml-declaration="true" doctype-root-element="HTML"
    doctype-system="http://www.w3.org/TR/html4/loose.dtd"
    doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"/>
    <jsp:directive.page contentType="text/html;charset=windows-1252"/>
    <f:view>
    <html>
    <head>
    <meta http-equiv="Content-Type"
    content="text/html; charset=windows-1252"/>
    <title>Consultas</title>
    </head>
    <body><h:form binding="#{backing_Consultas.form1}" id="form1">
    <h:commandButton value="commandButton1"
    binding="#{backing_Consultas.commandButton1}"
    id="commandButton1"
    action="#{backing_Consultas.commandButton1_action}"/>
    </p>
    <p>
    <h:dataTable border="1" var="#{backing_Consultas.dataTable1}"
    id="dataTable1">
    <h:column binding="#{backing_Consultas.column1}"/>
    <h:column binding="#{backing_Consultas.column2}"/>
    <h:column binding="#{backing_Consultas.column3}"/>
    <h:column binding="#{backing_Consultas.column4}"/>
    </h:dataTable>
    </h:form></body>
    </html>
    </f:view>
    <!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_Consultas-->
    </jsp:root>
    This es a JSPX page.
    Please any idea
    thanks
    alex

    Try to disable the hardware acceleration in the Flash Player.
    See [[Cannot view full screen Flash videos]]
    Flash "Display settings" window:
    * http://www.macromedia.com/support/documentation/en/flashplayer/help/help01.html

  • Not able to drag new data control to my jsf

    hi am not able to drag Queriable Attributes into the new query.jsf page and abl to Create it as a Query > ADF Query Panel.
    this is what i have done
    1.In the Application Navigator locate the adfc-config file under the Page Flows node in the ViewController project. Double-click it to open it in the editor. This is where you are going to define the application's navigation.
    2.Drag the DeptEmpPage.jsf file from the Application Navigator into the empty adfc-config diagram.
    3.From the Component Palette drag and drop a View component into the adf-config diagram, and rename it query. This represents the new JSF page that you are about to create.
    4.From the Component Palette select Control Flow Case and then click on the DeptEmpPage and drag a line to the query page.
    Name this line goQuery.
    5.From the Component Palette choose another Control Flow Case and then create an opposite flow from the query page to the DeptEmpPage. Name this flow back.
    6.Double-click the query view in the diagram to create the new page. In the Create JSF Page dialog accept the default Facelets radio button, and with the Quick Start Layout radio button selected, click Browse.
    7.In the Component Gallery, retain the default One Column category, type and layout, but check the Apply Themes checkbox in the Options pane.
    Click OK and OK again to create the page.
    8.To add the employees search functionality to the page, open the Data Controls accordion, and locate EmpDetails1. (If you do not see it click the Refresh button).
    am not able to Select All Queriable Attributes and drag it into the new query.jsf page. Create it as a Query > ADF Query Panel.
    Edited by: user603350 on 2011/12/06 3:34 PM
    Edited by: user603350 on 2011/12/06 3:39 PM

    ... and this solved the problem ?

  • Can not upload image of larger size in jsf

    i had some issues in file uploading. File uploading is working fine in my local machine and when i am using the www.mywebsite.com:8080/fileUpload.jsf
    but i can not upload images by using the following www.mywebsite.com/fileUpload.jsf
    Ie: without the port. I am using windows server and tomcat 5.5.27
    When i am trying to upload a bigger size image i am getting the following error
    I am using jsf(tomahawk)
    09:10:47,315 ERROR MultipartRequestWrapper:? - Exception while uploading file.
    org.apache.commons.fileupload.FileUploadException: Processing of multipart/form-data request failed. Socket read failed
    at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:384)
    at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:268)
    at org.apache.myfaces.webapp.filter.MultipartRequestWrapper.parseRequest(MultipartRequestWrapper.java:85)
    at org.apache.myfaces.webapp.filter.MultipartRequestWrapper.getParameter(MultipartRequestWrapper.java:181)
    at org.apache.myfaces.context.servlet.RequestParameterMap.getAttribute(RequestParameterMap.java:42)
    at org.apache.myfaces.context.servlet.AbstractAttributeMap.get(AbstractAttributeMap.java:91)
    at org.apache.myfaces.renderkit.html.HtmlResponseStateManager.getTreeStructureToRestore(HtmlResponseStateManager.java:159)
    at org.apache.myfaces.application.jsp.JspStateManagerImpl.getSequenceString(JspStateManagerImpl.java:260)
    at org.apache.myfaces.application.jsp.JspStateManagerImpl.restoreTreeStructure(JspStateManagerImpl.java:230)
    at org.apache.myfaces.application.jsp.JspStateManagerImpl.restoreView(JspStateManagerImpl.java:267)
    at org.apache.myfaces.application.jsp.JspViewHandlerImpl.restoreView(JspViewHandlerImpl.java:231)
    at org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(RestoreViewExecutor.java:81)
    at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
    at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:100)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at com.zerone.rrs.authentication.AuthenticationFilter.doFilter(AuthenticationFilter.java:100)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
    at org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:444)
    at org.apache.coyote.ajp.AjpAprProtocol$AjpConnectionHandler.process(AjpAprProtocol.java:472)
    at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1286)
    at java.lang.Thread.run(Unknown Source)

    Never mind . problem solved after i restarted

  • Help me in the first JSF !

    Hi everybody ! Help me please ! I'm starting learn JSF, but in my first program have problems, I dont know, please help me ! Every config is normal, it can write message "Hello, JSF !", but when I use bean, problems appear...
    ---------------------Here my code file index.jsp-----------------------
    <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
    <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
    <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Insert title here</title>
    </head>
    <body>
    <f:view>
         <h:form id="myform">
         <h:inputText value="#{MyStudent.name}"></h:inputText>
         <h:commandButton action="#{MyStudent.welcome}" value="Submit"></h:commandButton>
         <h:outputLabel value="#{MyStudent.msg}"></h:outputLabel>
         </h:form>
    </f:view>
    </body>
    </html>
    --------------------Here my code of bean-------------------------------
    package myhoangthanh.yahoo.com;
    public class Student {
         String name;
         String msg;
         public void setName(String name) {
              this.name = name;
         public String getName(){
              return name;
         public String getMsg() {
              return msg;
         public String welcome() {
              msg = "Welcome " + name + " to my Website !";
              return "";
    ----------------------And here my code in faces-config.xml---------------------------
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE faces-config PUBLIC
    "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
    "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
    <faces-config>
         <managed-bean>
              <managed-bean-name>MyStudent</managed-bean-name>
              <managed-bean-class>myhoangthanh.yahoo.com.Student</managed-bean-class>
              <managed-bean-scope>session</managed-bean-scope>
         </managed-bean>
    </faces-config>
    --------------------------I use server GlassFish 2.1, when run, I get message error : ---------------------------------
    exception
    javax.servlet.ServletException: The class 'myhoangthanh.yahoo.com.Student' does not have the property 'welcome'.
    root cause
    javax.el.PropertyNotFoundException: The class 'myhoangthanh.yahoo.com.Student' does not have the property 'welcome'.
    =========================
    Why, in my class have welcome method, and I can call it ! Right ? Please help me !

    Hi oisunngungoc ,
    i think you should return value in in your welcome method.... There are two problems/.....
    Firstly, you miss here an update-string for your next page (welcome method)
    secondly navigation rules are not well defined (faces-config)
    public String welcome() {
    msg = "Welcome " + name + " to my Website !";
    return "";
    }instead of returning nothing or empty string you can return "success"
    and in your Faces-config.xml you should have navigation like this
            <navigation-rule>
              <display-name>index.jsp</display-name>
              <from-view-id>/index.jsp</from-view-id>
              <navigation-case>
                   <from-outcome>Success</from-outcome>
                   <to-view-id>/index.jsp</to-view-id>
              </navigation-case>rigth welcome method is as follows
    public String welcome() {
    msg = "Welcome " + name + " to my Website !";
    return "Success";
    }Regards,
    Romi

Maybe you are looking for

  • Erro in CAF Application(Web Dynpro UI)

    Hi All, While  I am creating a CAF UI using Web Dynpro I am getting the following run time error: "It can't be determined from the exception chain, which class loader failed to load the above class. But at least the class loader of the current applic

  • Query on SoD matrix for CRM-Webshop applications - RAR 5.3

    Hi, We are implementing RAR 5.3 for CRM system. We observed that GRC has standard SoD matrix for CRM application. But there is no SOD matrix available for the Webshop (B2B/B2C/BOB) where access will be provided to the external users We are of the opi

  • Acrobat docs print all black

    Our 'workhorse' LJ 5Si has beeen with us for YEARS - and has pretty much always been able to do everything.. This 5Si has a JetDirect Ethernet connection on our LAN and everyone prints to it routinely... it gets a lot of usage... But now, we suddenly

  • Can't establish a wireless connection

    Product: HP Photosmart C8180 Recent Changes: Purchased new wireless router and setup WPA security My printer is unable to see either of my two wireless networks within my home "springfield" nor "springfield_EXT" (a network extender).  Both require a

  • I can't download,OS XLion,is alway said Paused, on the Lion item.

    I Can't download,OS X Lion,is allway said Paysed,on the Lion download.