facebook

Problems with jsf

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse Archived
  2.  > 
  3. Application Servers and Deployment
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #243347 Reply

    HI,

    unfortunatly running a simple jsf application causes always the following exceptions:

    type Exception report

    message

    description The server encountered an internal error () that prevented it from fulfilling this request.

    exception

    org.apache.jasper.JasperException
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:370)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
    com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:147)
    com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
    com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
    com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
    org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)

    root cause

    java.lang.NullPointerException
    javax.faces.webapp.UIComponentTag.setupResponseWriter(UIComponentTag.java:615)
    javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:217)
    org.apache.myfaces.taglib.core.ViewTag.doStartTag(ViewTag.java:71)
    org.apache.jsp.eingabe_jsp._jspx_meth_f_view_0(org.apache.jsp.eingabe_jsp:121)
    org.apache.jsp.eingabe_jsp._jspService(org.apache.jsp.eingabe_jsp:95)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
    com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:147)
    com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
    com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
    com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
    org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)

    note The full stack trace of the root cause is available in the Apache Tomcat/5.5 logs.

    It happens while stepping on the first <f:view> tag.

    I call the the *.faces page.

    Could you please help?

    Thanks in advance.

    Kind Regards
    Oliver

    Below you find addtional informations

    JBOSS 4.03.SP1
    jdk 1.5.0_05

    the faces-config.xml looks like :

    <?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”&gt;

    <faces-config >
    <managed-bean>
    <managed-bean-name>SquareRoot</managed-bean-name>
    <managed-bean-class>beans.SquareRoot</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    </managed-bean>
    <navigation-rule>
    <from-view-id>/eingabe.jsp</from-view-id>
    <navigation-case>
    <from-outcome>success</from-outcome>
    <to-view-id>/ausgabe.jsp</to-view-id>
    </navigation-case>
    </navigation-rule>
    <navigation-rule>
    <from-view-id>/ausgabe.jsp</from-view-id>
    </navigation-rule>
    </faces-config>

    web.xml looks like :

    <?xml version=”1.0″ encoding=”UTF-8″?>
    <web-app xmlns=”http://java.sun.com/xml/ns/j2ee&#8221; xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance&#8221; version=”2.4″ xsi:schemaLocation=”http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd”&gt;
    <context-param>
    <param-name>javax.faces.CONFIG_FILES</param-name>
    <param-value>/WEB-INF/faces-config.xml</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-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.faces</url-pattern>
    </servlet-mapping>
    </web-app>

    the web-inf/lib contains:

    commons-beanutils.jar
    commons-collections.jar
    commons-digester.jar
    commons-logging.jar
    jsf-api.jar
    jsf-impl.jar
    jstl.jar
    standard.jar

    the
    …\deploy\secondTest.war\WEB-INF\classes\beans

    contains the SquareRoot.class file

    .project file looks like

    <?xml version=”1.0″ encoding=”UTF-8″?>
    <projectDescription>
    <name>secondTest</name>
    <comment></comment>
    <projects>
    </projects>
    <buildSpec>
    <buildCommand>
    <name>com.genuitec.eclipse.j2eedt.core.WebClasspathBuilder</name>
    <arguments>
    </arguments>
    </buildCommand>
    <buildCommand>
    <name>org.eclipse.jdt.core.javabuilder</name>
    <arguments>
    </arguments>
    </buildCommand>
    <buildCommand>
    <name>com.genuitec.eclipse.j2eedt.core.J2EEProjectValidator</name>
    <arguments>
    </arguments>
    </buildCommand>
    <buildCommand>
    <name>com.genuitec.eclipse.j2eedt.core.DeploymentDescriptorValidator</name>
    <arguments>
    </arguments>
    </buildCommand>
    <buildCommand>
    <name>com.ibm.etools.validation.validationbuilder</name>
    <arguments>
    </arguments>
    </buildCommand>
    <buildCommand>
    <name>com.ibm.sse.model.structuredbuilder</name>
    <arguments>
    </arguments>
    </buildCommand>
    <buildCommand>
    <name>com.genuitec.eclipse.jsf.configValidator</name>
    <arguments>
    </arguments>
    </buildCommand>
    <buildCommand>
    <name>com.genuitec.eclipse.ast.deploy.core.DeploymentBuilder</name>
    <arguments>
    </arguments>
    </buildCommand>
    </buildSpec>
    <natures>
    <nature>com.genuitec.eclipse.ast.deploy.core.deploymentnature</nature>
    <nature>com.genuitec.eclipse.j2eedt.core.webnature</nature>
    <nature>org.eclipse.jdt.core.javanature</nature>
    <nature>com.genuitec.eclipse.jsf.jsfnature</nature>
    </natures>
    </projectDescription>

    #243401

    You should access JSF mappings using the faces extension instead of JSP. I.e. if you have file mypage.jsp you should access it using mypage.faces.

    #243411

    I’m actually doing this and I understood, that

    org.apache.jasper.JasperException
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:370)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
    com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:147)
    com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
    com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
    com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)

    javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)

    org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)

    within the Exception stack means that the FacesServlet is called. What else can cause the error?

    Kind Regards,
    Oliver

    #243413

    I don’t know what this problem can be – can you try to generate page in your project using or JSF template and see if it opens when you deploy it to the server?

    Can you attach the JSP contents? Do you use some JSP include or redirects?

    #243416

    Hi,

    this seems to be a JBOSS problem. I removed ….\jboss-4.0.3SP1\server\default\deploy\jbossweb-tomcat55.sar\jsf-libs which contains myfaces libs, deleted temporary directories (tmp, data, ..) of the server and it worked.

    I will try out how to integrate myfaces later.

    Thanks for your help.

    Kind Regards
    Oliver

    #243422

    Thanks for your information – we’ll keep an eye on MyFaces + JBoss combo – maybe there’s something we can do to avoid problems.
    Were you using MyFaces 1.0.9? Maybe JBoss is bundling 1.1.1?

    #243453

    Hi,

    Jboss is bundling 1.1-something. Myeclipse is bundled with 1.0.9.

    For whatever reason this seems to lead to compatiblity problems while using the Sun JSF reference implementation. maybe jboss activates the myfaces servelet??

    However, the jboss manual gives a hint to remove the directory if you want to implement a sun JSF application. Anyway, at the moment I’m more interested in running a 1.1 something jsf version and myeclipse is supporting myfaces only in version 1.0.

    Getting JBOSS plus myfaces 1.1something plus myeclipse running would be a nice thing, you could keep on. 🙂

    Kind regards,
    Oliver

    #243458

    MyEclipse 4.1M2 also allows you to pick MyFaces 1.1.1 as a JSF implementation.

    #244410

    Markus Brose
    Member

    Hi,
    I have the same problem as Oliver, but I can not take the solution path, he took:

    this seems to be a JBOSS problem. I removed ….\jboss-4.0.3SP1\server\default\deploy\jbossweb-tomcat55.sar\jsf-libs which contains myfaces libs, deleted temporary directories (tmp, data, ..) of the server and it worked.

    Since I’m dependend of an Internet Provider I can not tell the provider to delete a directory of his JBoss installation just for me.
    So please, please, please follow up on this, I need a different solution.

    Thank you
    Markus

    #244417

    Markus, did you try the MyFaces 1.1.1 bundled with MyEclipse 4.1M2?

Viewing 10 posts - 1 through 10 (of 10 total)
Reply To: Problems with jsf

You must be logged in to post in the forum log in