Error on JSF

Hi all,
Can someone please tell me why am I getting this error? Ever since I've installed jsf on eclipse to work with JSP/JavaServlet the Server (tomcat) being very temperamental it's fine at time and most of the time keeps greeting me with this error. Can someone please help
Thanks
04-Mar-2010 23:58:39 org.apache.catalina.core.StandardContext listenerStart SEVERE: Error configuring application listener of class org.apache.myfaces.webapp.StartupServletContextListener java.lang.ClassNotFoundException: org.apache.myfaces.webapp.StartupServletContextListener at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1484) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1329) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3915) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardHost.start(StandardHost.java:722) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:593) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) 04-Mar-2010 23:58:39 org.apache.catalina.core.StandardContext listenerStart SEVERE: Skipped installing application listeners due to previous error(s) 04-Mar-2010 23:58:39 org.apache.catalina.core.StandardContext start SEVERE: Error listenerStart 04-Mar-2010 23:58:39 org.apache.catalina.core.StandardContext start SEVERE: Context [/JSFDiary] startup failed due to previous errors 04-Mar-2010 23:58:39 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc SEVERE: A web application registered the JBDC driver [oracle.jdbc.OracleDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.

Zed420 wrote:
Thanks for your reply,
Can anyone suggest any solution to this problem please, I've have been searching and trying all sorts without any joy.
Reply 2 told you the source of the problem. Your class path is missing something.

Similar Messages

  • Unexpected error decoding JSF component: {0} in SAP BO 4.0 sp2

    Hi,
       Am getting the above mentioned error repeatidly. I tried clearing the tomcat cache folder and restarted the tomcat but that couldnt help me to resolve the issue, Help me to resolve the issue.

    Hi Abhi,
    Please refer the below KBA regarding your issue
    1710454 - Unexpected error decoding JSF component BI 4.0
    https://service.sap.com/sap/support/notes/1710454
    Thanks,
    Daya

  • How to custom a conversion error in JSF page in JDeveloper

    According to the book "Core JavaServer Faces" p213 (fifth edition), if I add the following line to messages.properties file, and specifiy it in the faces-config.xml and .jsp file, then the displayed conversion error message should be my tailored one instead of the default. However, I still get the default error message. Besides, I didn't find "CONVERSION" variable in UIInput class. Is the book wrong? And what's the correct way?
    javax.faces.component.UIInput.CONVERSION=Please correct your input

    I didn't choose any special in JDeveloper IDE. I just selected "new" to create a file called "message.properties" and put the line there. I didn't specify converters excepts declaring the type in the Jave Beans. I guess the converting is done by the JSF framework automatically. It must be a JSF converter since I created the page as a JSF page.

  • Validation error in JSF

    Hi,
    In my sample project the UI is powered by JSF, overall application architecture is J2EE.
    In a scenario,we have a page where we toggle between radio buttons and page reloads everytime we toggle, with different forms.
    In specific we have three radion buttons namely x ,y and z.
    When the default page loads, x is selected and when i shift my selection to y the page reloads with different forms and no error is seen.
    Next when i select z page reloads with different forms but error is displayed on the top of the page as below
    "Validation error:Value is not valid."
    Once the error is dispalyed on the page the error continues to remain eventhough we revert back the radio selection.
    In the above case jsp calls the js and the snippet of the same is as below
    JSP snippet:
    <TD><h:selectOneRadio styleClass="selectOneRadio" id="radio1"
    value="#{sessionScope.sameJam}"
    onclick=return jump_onclick(this,event);>
    <f:select itemValue="x"
    itemLabel="#{labels.label_x}" />
    <f:select itemValue="y"
    itemLabel="#{labels.label_y}" />
    <f:select itemValue="z"
    itemLabel="#{labels.label_z}" />
    </h:selectOneRadio></TD>
    JS snippet:
    function jump_onclick(thisObj,thisEvent){
    thisObj.form.submit();
    Java code:
    protected HtmlSelectOneRadio getRadio1() {
    if (radio1 == null) {
    radio1 = (HtmlSelectOneRadio) findComponentInRoot("radio1");
    return radio1;
    Thanks in advance.

    Re-wrote the below code in jsp
    <h:form rendered="#{sS.selectedItem =='x'}" styleClass="selectOneRadio" >
    <h:selectOneRadio rendered="#{sS.selectedItem =='x'}" >
    <f:selectItem itemValue="x" itemLabel="labelx" />
    <f:selectItem itemValue="y" itemLabel="labely" />
    <f:selectItem itemValue="z" itemLabel="labelz"/>
    </h:selectOneRadio>
    </h:form>
    <h:form rendered="#{sS.selectedItem =='y'}" styleClass="selectOneRadio" >
    <h:selectOneRadio rendered="#{sS.selectedItem =='y'}" >
    <f:selectItem itemValue="x" itemLabel="labelx" />
    <f:selectItem itemValue="y" itemLabel="labely" />
    <f:selectItem itemValue="z" itemLabel="labelz"/>
    </h:selectOneRadio>
    </h:form>
    <h:form rendered="#{sS.selectedItem =='z'}" styleClass="selectOneRadio" >
    <h:selectOneRadio rendered="#{sS.selectedItem =='z'}" >
    <f:selectItem itemValue="x" itemLabel="labelx" />
    <f:selectItem itemValue="y" itemLabel="labely" />
    <f:selectItem itemValue="z" itemLabel="labelz"/>
    </h:selectOneRadio>
    <h:commandButton value="submit" action="#{sS.action}" />
    </h:form>Below is my java code in SS class:
    package mypackage;
    public class SS {
        private String selectedItem;
    public SS(){
    String selectedItem = "x";
        public void action() {
            System.out.println("Selected item: " + selectedItem);
        public String getSelectedItem() {
            return selectedItem;
        public void setSelectedItem(String selectedItem) {
            this.selectedItem = selectedItem;
    }Result is:
    Instead of getting 3 radio buttons, i get a submit button my page.
    Please correct me if I am wrong somewhere.

  • Error in JSF  - java.lang.NumberFormatException: For input string:

    Nice day friends,
    I am sure that this is one stupid question by newbie like me, but I already lost hope since there no many post on this error especially in JSF at Google.
    Here the full error I've got :
    executePhase(RENDER_RESPONSE 6,com.sun.faces.context.FacesContextImpl@12bb287) threw exception
    java.lang.NumberFormatException: For input string: "id"
    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
    at java.lang.Integer.parseInt(Integer.java:447)
    at java.lang.Integer.parseInt(Integer.java:497)
    at javax.el.ListELResolver.toInteger(ListELResolver.java:373)
    at javax.el.ListELResolver.getValue(ListELResolver.java:167)
    Here my snippet of code :
    NationalityDO.java (managed bean)
    public class NationalityDO implements Serializable {
    @Id
    @Column(name = "ID", nullable = false)
    private String id;
    private List nationalityList;
    public NationalityDO() {
    public NationalityDO(String id) {
    this.id = id;
    public String getId() {
    return this.id;
    public void setId(String id) {
    this.id = id;
    public List getNationalityList(){
    NationalityDA da=new NationalityDA();
    if(nationalityList==null){
    System.out.println("if(nationalityList==null)");
    try {
    nationalityList=da.retrieveNationalityList();
    } catch (Exception ex) {
    ex.printStackTrace();
    return nationalityList;
    public void setNationalityList(){
    this.nationalityList=nationalityList;
    This is my NationalityDA (used to retrieve data)
    public class NationalityDA {
    public NationalityDA() {
    public List retrieveNationalityList() throws Exception{
    ArrayList ls=new ArrayList();
    Connection con = null;
    PreparedStatement ps = null;
    ResultSet rsReturn = null;
    try {
    con = DBManager.getDBConnection();
    String sql="select id,descr,setup_date,change_date from nationality order by id asc" ;
    ps = con.prepareStatement(sql);
    rsReturn = ps.executeQuery();
    while(rsReturn.next()){
    List lsNationality =new ArrayList();
    lsNationality.add(rsReturn.getString(1));//id
    lsNationality.add(rsReturn.getString(2));//descr
    ls.add(lsNationality);
    } catch(SQLException sqlex) {
    sqlex.printStackTrace();
    } finally {
    con.close();
    ps.close();
    return ls;
    Here my nationality.jsp
    <h:dataTable value='#{nationality.nationalityList}' var='item' border="1" cellpadding="2" cellspacing="0">
    <h:column>
    <f:facet name="header">
    <h:outputText value="Id"/>
    </f:facet>
    <h:outputText value="#{item.id}"/>
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="Descr"/>
    </f:facet>
    <h:outputText value="#{item.descr}"/>
    </h:column>
    </h:dataTable>
    Here my face-config.xml
    <managed-bean>
    <managed-bean-name>nationality</managed-bean-name>
    <managed-bean-class>com.dataobject.nationality.NationalityDO</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    </managed-bean>
    <navigation-rule>
    <navigation-case>
    <from-outcome>success</from-outcome>
    <to-view-id>/nationality/testNationality.jsp</to-view-id>
    </navigation-case>
    <navigation-case>
    <from-outcome>fail</from-outcome>
    <to-view-id>/nationality/testNationality.jsp</to-view-id>
    </navigation-case>
    </navigation-rule>
    For your information, the retrieve of data work successfully, this is the table description in oracle database which is varchar for id,
    SQL> desc nationality
    Name Null? Type
    ID NOT NULL VARCHAR2(4)
    DESCR VARCHAR2(20)
    SETUP_DATE TIMESTAMP(6)
    CHANGE_DATE TIMESTAMP(6)
    *If you feel that I should improve my writing in forum, I am really happy to know
    Thanks,
    unid

    thanks....
    Actually I already view the site many times before but after you told me then I get the idea,that's y working together is better, because i sometimes won't realize my mistake even it was the easiest one...
    So i just change my code in NationalityDA.java as
    while(rsReturn.next()){
    NationalityDO n=new NationalityDO();
    n.setId(rsReturn.getString(1));
    System.out.println("rsReturn.getString(1)"+ rsReturn.getString(1));
    n.setDescr(rsReturn.getString(2));
    System.out.println("rsReturn.getString(2)"+ rsReturn.getString(2));
    n.setSetupDate(rsReturn.getDate(3));
    System.out.println("rsReturn.getString(3)"+ rsReturn.getString(3));
    n.setChangeDate(rsReturn.getDate(4));
    System.out.println("rsReturn.getString(4)"+ rsReturn.getString(4));
    ls.add(n);
    Once again, thanks..and my 3 dukes are yours..
    -unid

  • I am geeting an error with jsf 1.2 please help

    i have used a datatable tag in JSF which just takes a ResultSet object and prints every row in it in a tabular form. I cheked i am recieving the resultset object with about 8 columns but when the jsf page is invoked it gives me following error.
    HTTP Status 500 -
    type Exception report
    message
    descriptionThe server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: java.sql.SQLException: The column position '2' is out of range. The number of columns for this ResultSet is '1'.
    root cause
    javax.faces.el.EvaluationException: java.sql.SQLException: The column position '2' is out of range. The number of columns for this ResultSet is '1'.
    root cause
    java.sql.SQLException: The column position '2' is out of range. The number of columns for this ResultSet is '1'.
    root cause
    org.apache.derby.client.am.SqlException: The column position '2' is out of range. The number of columns for this ResultSet is '1'.
    note The full stack traces of the exception and its root causes are available in the GlassFish v3 logs.
    GlassFish v3
    Thanks
    Harish Ingle

    If possible please post your JSF code and the corresponding java code where in you are getting your resultset and preparing to display the same in your jsp page.

  • Error with JSF application on SAP NetWeaver  App Server  7.3

    Hello Gurus,
                             I have a JSF web application which I have deployed on the SAP NetWeaver Server 7.3 , but when trying to access the same I get the error
    Cannot process an HTTP request to servlet [Faces Servlet] in [SecurePro] web application. [EXCEPTION] javax.servlet.ServletException: com.sap.engine.services.servlets_jsp.server.jsp.exceptions.CompilingException: Error in executing the compilation process: [ Compilation Failed! Exit Code=1
    Has anybody else also got the same error earlier?, I am using Mojarra  implementation for JSF.
    I had earlier deployed the same application in an earlier JSF version and it worked on NWAS7.0 but Now I need to upgrade that, Please help
    Thanks
    Somil Agarwal

    Hi Ingo,
    Yes - Ive tried every possible combination and here is my findings...
    I don't think the 32-bit version of the SAP Java Connector (2.1.8) works on a Windows 2003 x64 SAP J2EE 7.0, i.e. the sapjco.jar file. I created a directory and added it to the CLASSPATH of the J2EE server (server and instance) and I also added it to the Java classpath using: java -jar <path+sapjco.jar> -classpath. Executing this command brings up a SAP Java connector window where it displays information of the version, location of the sapjcorfc.dll file etc. This windows opens, but is not able to display the information. If I do exactly the same with the x64 bit version of the SAP Java connector (2.1.8) it displays the information correctly in the SAP Java connector popup. I've tried copying the sapjcorfc.dll and the librfc32.dll to both the /system32 and the SYSWOW64 directory on the server.
    HOWEVER, in CMC the Role Import tab still does not work - I just get the text null (in red). Before adding the sapjco.jar to the java classpath I got another error on the Role import tab - something like /com/sap/mw/jco/$JCOFunction. So it seems like it is now able to find the sapjco.jar file, but can not use it properly.
    The big question is now: Should the sapjco.jar file actually be on the Application server or on the BOE Server? I know it says on the application server in all documentation, but that generally assumes Tomcat and all installed on one server.
    BOE uses the sapjco.jar file to connect to the BW system to import the roles and that must be the BOE server doing that job and not the Application server???
    Just my thoughts - maybe we can discuss this at Teched in Phoenix? :o)
    Best regards,
    Jacob

  • 404 error access JSF pages

    Hello,
    When I was running my JSF application through the embeded Tomcat 6.0.18 server in Netbeans 6.5.1 all worked fine. After deploying the *.WAR file to the stand alone Tomcat 6.0.18 server I get a 404 error when I access the jsf pages. The default page at http://localhost:8080 work fine and so does the servlet in the same webapp as my jsfs. I tried downloading the JSF & JSTL frameworks and placing the contents of their lib directory into TOMCATHOME/lib and restarted the server - no effect
    Pls Help ! Thnx
    (URL im using to access one of the jsf pages is http://localhost:8080/LUIDManager/LUID_Config_List.jsf)
    Here is my web.xml file:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
        <context-param>
            <param-name>com.sun.faces.verifyObjects</param-name>
            <param-value>false</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>javax.faces.STATE_SAVING_METHOD</param-name>
            <param-value>client</param-value>
        </context-param>
        <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>initServlet</servlet-name>
            <servlet-class>Servlets.initServlet</servlet-class>
        </servlet>
        <servlet-mapping>
            <servlet-name>Faces Servlet</servlet-name>
            <url-pattern>*.jsf</url-pattern>
        </servlet-mapping>
        <servlet-mapping>
            <servlet-name>initServlet</servlet-name>
            <url-pattern>/initServlet</url-pattern>
        </servlet-mapping>
        <session-config>
            <session-timeout>
                30
            </session-timeout>
        </session-config>
        <welcome-file-list>
            <welcome-file>forwardToJSF.jsp</welcome-file>
            </welcome-file-list>
        <resource-ref>
            <description>DB Connection</description>
            <res-ref-name>jdbc/luidregistry</res-ref-name>
            <res-type>javax.sql.DataSource</res-type>
            <res-auth>Container</res-auth>
        </resource-ref>
        </web-app>Edited by: paulchwd on Apr 15, 2009 5:01 PM

    Thnx for your reply. Not sure what Faclets are. I added the JSF 1.2 framework from Netbeans into my project. I am also an idiot :)
    The links the servlet generates to take me to the JSFs had a typo - wrong port #
    Thnx for the help

  • Error deploying JSF app on Sun 8.1 (Works fine on 9.0)

    Hello All,
    I have a simple JSF app which works fine on Sun App server 9.0 but throws the error below on 8.1. Please help!!!
    exception
    javax.servlet.ServletException: java.lang.Boolean
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:209)
         sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:585)
         org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
         java.security.AccessController.doPrivileged(Native Method)
         javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
         org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
    root cause
    java.lang.ClassCastException: java.lang.Boolean
         com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72)
         javax.faces.component.UICommand.broadcast(UICommand.java:312)
         javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
         javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)
         com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75)
         com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:221)
         com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
         sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:585)
         org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
         java.security.AccessController.doPrivileged(Native Method)
         javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
         org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)Thanks.
    Message was edited by:
    ndnguy

    Make sure you don't include any JSF implementation jars in your web application.

  • Getting javascript error in jsf portlet

    Hi,
    I wrote a jsf page with command links calling an action in ManagedBean. Its works fine if run as jsf page. But when I associate the jsf page with a portlet and run the page, I am getting javascript error when clicked on the command links.
    Please help me to resolve this problem.
    The jsf page
    <%@ page language="java" contentType="text/html;charset=UTF-8"%>
    <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
    <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
    <%@ taglib uri="http://www.bea.com/servers/portal/groupspace/tags/activemenus" prefix="activemenus" %>
    <%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    <%@ taglib uri="http://bea.com/faces/adapter/tags-naming" prefix="netuix" %>
    <html>
    <head></head>
         <body>
    <f:view>
         <netuix:namingContainer id="facesContent">
              <h:form>
    <f:verbatim>
         <table border="0" width="100%">
              <tr>
                   <td>
                        <h:outputLabel value="Notifications" for="heading"/>
                   </td>
                   <td>
                        (<h:outputText value="#{notificationsBean.notificationsSize}" escape="true"/>)
                   </td>
                   <td>
                             <h:commandLink action="#{notificationsBean.showInWorkList}" immediate="true">
                                  <h:outputText value="Show in Worklist"/>
                             </h:commandLink>
                   </td>
                   <td>
                        <h:outputText value="hai"/>
                   </td>
              </tr>
         </table>
    </f:verbatim>     
              <div style="overflow: auto; width: 100%; height: 200px">
              <h:dataTable value="#{notificationsBean.userNotifs.notificationsList}" var="notification">
                   <h:column>
                        <f:facet name="header">
                             <h:commandLink action="#{notificationsBean.sort}">
                                  <f:param name="column" value="caseNB"/>
                                  <f:param name="sortDirection" value="#{notificationsBean.sortDirection}"/>
                                  <f:param name="pattern" value="####"/>
                                  <h:outputText value="Case ID"/>
                             </h:commandLink>
                        </f:facet>
                        <h:outputText value="#{notification.caseNB}"/>
                   </h:column>
                   <h:column>
                        <f:facet name="header">
                             <h:commandLink action="#{notificationsBean.sort}" immediate="true">
                                  <h:outputText value="From"/>
                                  <f:param name="column" value="senderNM"/>
                                  <f:param name="pattern" value=""/>
                                  <f:param name="sortDirection" value="#{notificationsBean.sortDirection}"/>
                             </h:commandLink>
                        </f:facet>
                        <h:outputText value="#{notification.senderNM}"/>
                   </h:column>
                   <h:column>
                        <f:facet name="header">
                             <h:commandLink action="#{notificationsBean.sort}">
                                  <f:param name="column" value="priorityCD"/>
                                  <f:param name="sortDirection" value="#{notificationsBean.sortDirection}"/>
                                  <f:param name="pattern" value=""/>
                                  <h:outputText value="Priority"/>
                             </h:commandLink>
                        </f:facet>
                        <h:outputText value="#{notification.priorityCD}"/>
                   </h:column>
                   <h:column>
                        <f:facet name="header">
                             <h:commandLink action="#{notificationsBean.sort}">
                                  <f:param name="column" value="subjectTX"/>
                                  <f:param name="sortDirection" value="#{notificationsBean.sortDirection}"/>
                                  <f:param name="pattern" value=""/>
                                  <h:outputText value="Subject"/>
                             </h:commandLink>
                        </f:facet>
                        <h:outputText value="#{notification.subjectTX}"/>
                   </h:column>
                   <h:column>
                        <f:facet name="header">
                             <h:commandLink action="#{notificationsBean.sort}">
                                  <f:param name="column" value="createDT"/>
                                  <f:param name="sortDirection" value="#{notificationsBean.sortDirection}"/>
                                  <f:param name="pattern" value="dd-MM-yyyy"/>
                                  <h:outputText value="Created(ET)"/>
                             </h:commandLink>
                        </f:facet>
                        <h:outputText value="#{notification.createDT}"/>
                   </h:column>
              </h:dataTable>
              </div>
                   </h:form>
    </netuix:namingContainer>
    </f:view>
    </body>
    </html>
    The Managed Bean:
    public class NotificationsManagedBean {
         private UserNotifications userNotifs=new UserNotifications();
         private int notificationsSize;
         private String column;
         private String sortDirection = "asc";
         private String pattern;
         public UserNotifications getUserNotifs() {
              getUserNotificationsList();
              return userNotifs;
         public void setUserNotifs(UserNotifications userNotifs) {
              this.userNotifs = userNotifs;
         public int getNotificationsSize() {
              getUserNotificationsList();
              return notificationsSize;
         public void setNotificationsSize(int notificationsSize) {
              this.notificationsSize = notificationsSize;
         public String getColumn() {
              return column;
         public void setColumn(String column) {
              this.column = column;
         public String getSortDirection() {
              return sortDirection;
         public void setSortDirection(String sortDirection) {
              if(sortDirection != null && sortDirection.trim().length()!=0)
                   this.sortDirection = sortDirection;
         public String getPattern() {
              return pattern;
         public void setPattern(String pattern) {
              this.pattern = pattern;
         public String showInWorkList() {
              System.err.println("test");
              return "success1";
              //TODO Auto-generated method stub
         public String sort(){
              sort(column, sortDirection);
              return "success";
         @SuppressWarnings("unchecked")
         private void getUserNotificationsList()
              ArrayList<Notification> notificationsList = new ArrayList<Notification>();
              for(int i=0;i<20;i++)
                   Notification notif = new Notification();
                   notif.setCaseNB("122"+i);
                   notif.setCreateDT("12-12-2002");
                   notif.setSenderNM("testing1"+(i%3));
                   System.out.println(notif.getSenderNM());
                   notif.setSubjectTX("testing2"+(i%4));
                   System.out.println(notif.getSubjectTX());
                   notif.setPriorityCD("High");
                   notificationsList.add(notif);
    userNotifs.setNotificationsList(notificationsList);
              if(userNotifs.getNotificationsList()!=null)
                   this.setNotificationsSize(userNotifs.getNotificationsList().size());
    * <p>Return the <code>FacesContext</code> instance for the
    * current request.
    protected FacesContext context() {
    return (FacesContext.getCurrentInstance());
    protected void sort(final String column, final String direction) {
              java.util.Comparator comparator = new SortComparator(userNotifs.getNotificationsList(),column,direction,pattern);
              java.util.Collections.sort(userNotifs.getNotificationsList(), comparator);     
              if(direction.equalsIgnoreCase("asc"))
                   setSortDirection("desc");
              else
                   setSortDirection("asc");
    }

    Too less relevant information and too much irrelevant code.
    First of all, which JS error exactly are you getting? You as developer should know better that you shouldn't ignore errors. They contain helpful information about the cause of the problem and thus also how to solve it. Where exactly does the error come from? (view the generated HTML source). Which JSF implementation and version exactly are you using? Which webbrowser exactly are you using? Does it work in/with other/newer versions?

  • JSF 1.2 and Tomcat 6.0.16, error parsing 'jsf-ri-runtime.xml'

    I am working on an application that used jsf 1.1 but would like to move to jsf 1.2. I've added the 1.2 jars (jsf-api.jar and jsf-impl.jar) and jstl-1.2.jar to the app. When I deploy to tomcat 6, i get the following error:
    15-Feb-2008 11:30:36 org.apache.catalina.core.StandardContext listenerStart
    SEVERE: Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
    com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! Unable to parse document 'jar:file:/C:/servers/apache-tomcat-6.0.16/webapps/myWebApp/WEB-INF/lib/jsf-impl-1.2.jar!/com/sun/faces/jsf-ri-runtime.xml': This parser does not support specification "null" version "null"
    at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:212)
    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:174)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4350)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:829)
    at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:718)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1147)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
    at org.apache.catalina.core.StandardService.start(StandardService.java:516)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
    Caused by: com.sun.faces.config.ConfigurationException: Unable to parse document 'jar:file:/C:/servers/apache-tomcat-6.0.16/webapps/myWebApp/WEB-INF/lib/jsf-impl-1.2.jar!/com/sun/faces/jsf-ri-runtime.xml': This parser does not support specification "null" version "null"
    at com.sun.faces.config.ConfigManager$ParseTask.call(ConfigManager.java:409)
    at com.sun.faces.config.ConfigManager$ParseTask.call(ConfigManager.java:353)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
    at java.lang.Thread.run(Thread.java:619)
    I thought this would have something to do with the xml parser so i added jaxb and jaxp to the application but I still get the same error. Can anyone help? Is there a possibility that a library in the app is overriding jaxb/jaxp?

    I had a similar problem on OC4J. For some crazy reason, Oracle still bundles their own XML parser (I say still. It's OC4J 10.1.3 we have in production, so we're just a wee bit behind the curve). At any rate, I had to tell OC4j not to use Oracle's XML parser and just the one bundle with the JRE (1.5). IIRC (and I should know this since I work on Mojarra :), that's caused by an older version of JAXB, so I think you're on the right track. You might check to see if Tomcat 6 bundles JAXB. If it does, you'll need to remove it or update it. If you're on 1.5 or greater, I don't think you need to have that in the app server lib anyway, as the JDK/JRE bundles it.
    Hope that helps. :)

  • Error with JSF

    Hi,
    I am trying to deploy a jsf example app (download jsf-test in jboss site) in JBoss Portal server 2.0, when I try to invoke a jsf page, I got the error as below:
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Cannot find FacesContext
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
         org.apache.jsp.login_jsp._jspService(login_jsp.java:91)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
         org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)
    root cause
    javax.servlet.jsp.JspException: Cannot find FacesContext
         javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:409)
         com.sun.faces.taglib.jsf_core.ViewTag.doStartTag(ViewTag.java:105)
         org.apache.jsp.login_jsp._jspx_meth_f_view_0(login_jsp.java:106)
         org.apache.jsp.login_jsp._jspService(login_jsp.java:82)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
         org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.
    Any idea regarding this? Any help would be appreciated.
    Raymond

    "Cannot find FacesContext" error typically occurs when you don't call FacesServlet.
    Check your web.xml.
    If you specify as <url-pattern>/faces/*</url-pattern>
    you should browse "http://localhost:8080/xxxx/faces/page.jsp",
    not "http://localhost:8080/xxxx/page.jsp".

  • Javascript error in jsf page.

    Hi,
    I am trying to Do post form a script function in a jsf page. I am using the trh:script tag for adding the script. But when run it i am getting a lot of errors saying that the attributes cannot be recognised. I am trying to send a xml updated with some data after the click of a button to the server. Though its not showing any any errors when not run.
    Below is the code i am using :
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://myfaces.apache.org/trinidad/html" prefix="trh"%>
    <%@ taglib uri="http://myfaces.apache.org/trinidad" prefix="tr"%>
    <%@ taglib uri="http://xmlns.oracle.com/dss/trinidad/faces" prefix="dvtt"%>
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces/rich" prefix="af"%>
    <f:view>
    <trh:script text="
    var endpointURL = "http://localhost:7101/services/MobileManagerService";
    var xmlstring = '<?xml version="1.0"encoding="UTF-8"?>\
    <notifications>\
         <notification>\
              <id>1<\/id>\
                   <status>CLOSE<\/status>\               
              <\/notification>\
         <\/notifications>';
    var xmlobject = (new DOMParser()).parseFromString(xmlstring, "text/xml");
    var stautsXml = (new XMLSerializer()).serializeToString(xmlobject);
    alert(stautsXml);
    var http_request = false;
    function makePOSTRequest(method, url, parameters) {
    http_request = false;
    if(window.XMLHttpRequest) { // Mozilla, Safari,...
    http_request = new XMLHttpRequest();
    if (http_request.overrideMimeType) {
    // Set type accordingly to anticipated content type.
    http_request.overrideMimeType('text/xml');
    // http_request.overrideMimeType('text/html');
    } else if (window.ActiveXObject) { // IE
    try {
    http_request = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
    try {
    http_request = new ActiveXObject("Microsoft.XMLHTTP");
    } catch (e) {}
    if (!http_request) {
    alert('Cannot create XMLHttpRequest object');
    return false;
    http_request.onreadystatechange = alertContents;
    // http_request.open(method, url, true);
    if(method=='GET'){
    http_request.open(method, url + parameters, true);
    http_request.setRequestHeader("Content-type", "text/xml");
    http_request.setRequestHeader("Content-length", parameters.length);
    http_request.setRequestHeader("Connection", "close");
    http_request.send(null);
    if(method=='POST') {
    http_request.open(method, url, true);
    http_request.setRequestHeader("Content-type", "text/xml");
    http_request.setRequestHeader("Content-length", parameters.length);
    http_request.setRequestHeader("Connection", "close");
    http_request.send(parameters);
    if(method=='PUT') {
    http_request.open(method, url, true);
    http_request.setRequestHeader("Content-type", "text/xml");
    http_request.setRequestHeader("Content-length", parameters.length);
    http_request.setRequestHeader("Connection", "close");
    http_request.send(parameters);
    if(method=='DELETE') {
    http_request.open(method, url+parameters, true);
    http_request.setRequestHeader("Content-type", "text/xml");
    http_request.setRequestHeader("Content-length", parameters.length);
    http_request.setRequestHeader("Connection", "close");
    http_request.send(null);
    function alertContents() {
    if (http_request.readyState == 4) {
    if (http_request.status == 200) {
    alert('Response received from server:\n'+http_request.responseText);
    result = http_request.responseText;
    // Turn < and > into &lt; and &gt; for displaying on the page.
    result = result.replace(/\<([^!])/g, '&lt;$1');
    result = result.replace(/([^-])\>/g, '$1&gt;');
    document.getElementById('serverresponse').innerHTML = result;
    } else {
    alert('There was a problem with the request.'
    +http_request.responseText +' '+http_request.status);
    document.getElementById('serverresponse').innerHTML = http_request.responseText;
    function postApproveForm() {
    var poststr = stautsXml ;
    alert('Sending XML to server:\n'+poststr);
    makePOSTRequest('POST', endpointURL , poststr);
    "/>
    <trh:html id="h2">
    <trh:head title="ApproveAlerts" id="h1">
    <meta http-equiv="Content-Type"
    content="text/html; charset=windows-1252"/>
    <link type="text/css" rel="stylesheet" href="css/iPhone.css"/>
    </trh:head>
    <trh:body id="b1">
    <!-- <jsp:useBean id="IdBean" class="oracle.application.IdBean" scope="application"/> -->
    <af:messages id="m1"/>
    <trh:body styleClass="body" id="b2">
    <!-- <td><input type="button" name="Approve" value="Approve" onclick="javascript:approveAlert();"></td> -->
    <td>
    <input type="button" name="Approve" value="Approve" onclick="postApproveform();" </input>
    </td>
    <af:outputText id="ot1" value='"#{requestScope.myId}"'/>
    </trh:body>
    </trh:body>
    </trh:html>
    </f:view>
    Do i need to add some taglib or something to make it work ?
    Regards
    Sishant
    Edited by: user784337 on May 24, 2010 3:37 AM

    Because :
    Session.getAtrribute is java-code that can only run on the server
    and
    var y = session.getAttribute is javascript-code run on the client.

  • Error loading JSF page popup window - Cannot find FacesContext

    Hello,
    I am trying to load a popup window from my Visual Web JSF page. The popup window itself will be a Visual Web JSF page also.
    As an example, i have 2 buttons on my original page with jsp tags as follows::
    <webuijsf:button binding="#{Page1.button1}" id="button1" onClick="window.showModelessDialog('./PopupPage.jsp'); return false;"
    style="left: 19px; top: 16px; position: absolute" text="Button"/>
    <webuijsf:button actionExpression="#{Page1.button2_action}" binding="#{Page1.button2}" id="button2"
    onClick="window.showModelessDialog('./PopupPage.jsp');" style="position: absolute; left: 20px; top: 44px" text="Button"/>
    When i click Button1, the popup window appears but will not load the page within the window. I get the following report in the server log:
    StandardWrapperValve[jsp]: PWC1406: Servlet.service() for servlet jsp threw exception
    java.lang.RuntimeException: Cannot find FacesContext
    at javax.faces.webapp.UIComponentClassicTagBase.getFacesContext(UIComponentClassicTagBase.java:1811)
    at javax.faces.webapp.UIComponentClassicTagBase.setJspId(UIComponentClassicTagBase.java:1628)
    at org.apache.jsp.PopupPage_jsp._jspx_meth_f_view_0(PopupPage_jsp.java from :102)
    at org.apache.jsp.PopupPage_jsp._jspService(PopupPage_jsp.java from :77)
    ETC ETC
    If i click Button2 (which does NOT return false in the onclick Script and thus submits the first page) the first attempt fails with the same error, but if i try a second time the popup window displays and loads the page correctly.
    Any solutions would be greatly appreciated as this is driving me crazy :-s
    Edited by: coxy69 on Jan 9, 2008 10:29 PM

    Cannot find FacesContextThis generally indicates that you invoked a request which points to a JSP page which contains JSF tags, but that the request itself isn't passed through the FacesServlet. Make sure that the request URL is covered by the url-pattern setting of the FacesServlet in the web.xml.

  • Error Accessing JSF Tags in html div

    Hi,
    I am getting an error when trying to access <h:outputTest from within div. I am trying to embed a style sheet dynamically into the div.
    Following is my code:
    <div class="headerSDPLogo <h:outputText value='#{nlsSupport.align_logo}'/> ">The JSF tag isnt parsed at all. Accessing <h:outputText returns me this error.
    com.sun.facelets.FaceletException:
    Error Traced[line: 13] The value of attribute "class" associated with an element type "div" must not contain the '<' character.What could be the possible turnaround to this.
    Thanks.

    Mujju101 wrote:
    <div class="headerSDPLogo <h:outputText value='#{nlsSupport.align_logo}'/> ">What could be the possible turnaround to this.This perhaps?
    <div class="headerSDPLogo #{nlsSupport.align_logo}">

Maybe you are looking for

  • DVI.I to VGA LCD monitor

    Hi Everyone Is there anything to gain by using the DVI connection on my MSI FX5900XT graphics card to the VGA port on a  DELL 19" LCD Monitor ? I was just wondering as the card came with an adaptor DVI/VGA so I can use either output on the card. At t

  • Redeploy sender soap adapter 7.1

    We have PI 7.1 SP7 and expriencing many problems with the sender SOAP adapter the service registry works for us for all web services but from other applications like xmlspy and soapui we get messages of chace problems and unauthorized ( all cache che

  • Audio problem with "Soft Frame" Main...

    I'm using iDVD '08 and trying to make a slideshow DVD. I have created the DVD successfully, with the exception that I cannot get audio to play on the main title screen. I have audio playing on other menus, during slideshows, etc. Except when I try to

  • Play .flv frame-by-frame

    Hi All, I was wondering if there is a player out there that is capable of playing flash video frame-by-frame. That is, in addition to a surub bar a forward and previous button should seek to next or previous frame on the flv video. Encoding all frame

  • SCOM 2012 and AIX 6.1.0.0

    I am new to SCOM, and have been tasked with getting SCOM setup to monitor some AIX servers.  After the initial install, I did install the available AIX management packs, which included the 6.1 packs, show in the below screen shot.  Yet when I attempt