ElieShalhoub / jee-tutorial-youtube

Automatically exported from code.google.com/p/jee-tutorial-youtube
0 stars 0 forks source link

Error - After including <h:form> tag to welcome.xhtml #2

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. After completing the Tutorial 12
2. Manually typed the coding following the tutorial
3. Build and execute 

What is the expected output?
Login option page (welcome page)

What do you see instead?
type Exception report

message

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

exception

org.springframework.web.util.NestedServletException: Request processing failed; 
nested exception is 
org.springframework.webflow.execution.FlowExecutionException: Exception thrown 
in state 'welcome' of flow 'main'
    org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:932)
    org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:816)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:801)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
root cause

org.springframework.webflow.execution.FlowExecutionException: Exception thrown 
in state 'welcome' of flow 'main'
    org.springframework.webflow.engine.impl.FlowExecutionImpl.wrap(FlowExecutionImpl.java:571)
    org.springframework.webflow.engine.impl.FlowExecutionImpl.resume(FlowExecutionImpl.java:262)
    org.springframework.webflow.executor.FlowExecutorImpl.resumeExecution(FlowExecutorImpl.java:169)
    org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handle(FlowHandlerAdapter.java:183)
    org.springframework.faces.webflow.JsfFlowHandlerAdapter.handle(JsfFlowHandlerAdapter.java:48)
    org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)
    org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
    org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:920)
    org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:816)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:801)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
root cause

javax.faces.FacesException
    com.sun.faces.context.ExceptionHandlerImpl.handle(ExceptionHandlerImpl.java:141)
    javax.faces.context.ExceptionHandlerWrapper.handle(ExceptionHandlerWrapper.java:100)
    com.sun.faces.lifecycle.Phase.doPhase(Phase.java:119)
    com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
    org.springframework.faces.webflow.FlowLifecycle.render(FlowLifecycle.java:80)
    org.springframework.faces.webflow.JsfView.render(JsfView.java:89)
    org.springframework.webflow.engine.ViewState.render(ViewState.java:296)
    org.springframework.webflow.engine.ViewState.refresh(ViewState.java:243)
    org.springframework.webflow.engine.ViewState.resume(ViewState.java:221)
    org.springframework.webflow.engine.Flow.resume(Flow.java:545)
    org.springframework.webflow.engine.impl.FlowExecutionImpl.resume(FlowExecutionImpl.java:258)
    org.springframework.webflow.executor.FlowExecutorImpl.resumeExecution(FlowExecutorImpl.java:169)
    org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handle(FlowHandlerAdapter.java:183)
    org.springframework.faces.webflow.JsfFlowHandlerAdapter.handle(JsfFlowHandlerAdapter.java:48)
    org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)
    org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
    org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:920)
    org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:816)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:801)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
root cause

java.lang.UnsupportedOperationException
    javax.faces.context.ExternalContext.getClientWindow(ExternalContext.java:1500)
    com.sun.faces.context.ExternalContextImpl.encodeActionURL(ExternalContextImpl.java:562)
    org.springframework.faces.webflow.ExternalContextWrapper.encodeActionURL(ExternalContextWrapper.java:29)
    com.sun.faces.renderkit.html_basic.FormRenderer.getActionStr(FormRenderer.java:234)
    com.sun.faces.renderkit.html_basic.FormRenderer.encodeBegin(FormRenderer.java:134)
    javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:869)
    javax.faces.component.UIComponent.encodeAll(UIComponent.java:1854)
    javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
    javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
    com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:443)
    com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
    org.springframework.faces.webflow.FlowViewHandler.renderView(FlowViewHandler.java:99)
    com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
    com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
    com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
    org.springframework.faces.webflow.FlowLifecycle.render(FlowLifecycle.java:80)
    org.springframework.faces.webflow.JsfView.render(JsfView.java:89)
    org.springframework.webflow.engine.ViewState.render(ViewState.java:296)
    org.springframework.webflow.engine.ViewState.refresh(ViewState.java:243)
    org.springframework.webflow.engine.ViewState.resume(ViewState.java:221)
    org.springframework.webflow.engine.Flow.resume(Flow.java:545)
    org.springframework.webflow.engine.impl.FlowExecutionImpl.resume(FlowExecutionImpl.java:258)
    org.springframework.webflow.executor.FlowExecutorImpl.resumeExecution(FlowExecutorImpl.java:169)
    org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handle(FlowHandlerAdapter.java:183)
    org.springframework.faces.webflow.JsfFlowHandlerAdapter.handle(JsfFlowHandlerAdapter.java:48)
    org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)
    org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
    org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:920)
    org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:816)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:801)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

What version of the product are you using? On what operating system?
Using Windows 7
Tomcat 6

Please provide any additional information below.
pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.example.j2eeapp</groupId>
  <artifactId>j2eeapplication</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>war</packaging>
  <name>J2EE Application</name>

  <!-- Primeface Lib is not added to Maven repositories -->
  <!-- Therefore, need to add the repository manually -->
  <repositories>
      <repository>
            <id>prime-repo</id>
            <name>Prime Repo</name>
            <url>http://repository.primefaces.org</url>
        </repository>
  </repositories>

  <dependencies>
    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-core</artifactId>
        <version>4.2.2.Final</version>
    </dependency>
    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-validator</artifactId>
        <version>5.0.1.Final</version>
    </dependency>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.11</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.webflow</groupId>
        <artifactId>spring-webflow</artifactId>
        <version>2.3.2.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.webflow</groupId>
        <artifactId>spring-faces</artifactId>
        <version>2.3.2.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-orm</artifactId>
        <version>3.2.3.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>com.oracle</groupId>
        <artifactId>ojdbc14</artifactId>
        <version>10.2.0.4.0</version>
    </dependency>
    <dependency>
        <groupId>log4j</groupId>
        <artifactId>log4j</artifactId>
        <version>1.2.15</version>
        <exclusions>
    <exclusion>
        <groupId>com.sun.jmx</groupId>
        <artifactId>jmxri</artifactId>
    </exclusion>
    <exclusion>
        <groupId>com.sun.jdmk</groupId>
        <artifactId>jmxtools</artifactId>
    </exclusion>
    <exclusion>
            <groupId>javax.jms</groupId>
            <artifactId>jms</artifactId>
    </exclusion>
</exclusions>
    </dependency>
    <dependency>
        <groupId>com.sun.faces</groupId>
        <artifactId>jsf-impl</artifactId>
        <version>2.2.0</version>
    </dependency>
    <dependency>
        <groupId>com.sun.facelets</groupId>
        <artifactId>jsf-facelets</artifactId>
        <version>1.1.14</version>
    </dependency>
    <dependency>
        <groupId>com.sun.faces</groupId>
        <artifactId>jsf-api</artifactId>
        <version>2.2.0</version>
    </dependency>
    <dependency>
        <groupId>commons-dbcp</groupId>
        <artifactId>commons-dbcp</artifactId>
        <version>1.4</version>
    </dependency>
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-log4j13</artifactId>
        <version>1.0.1</version>
    </dependency>
    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>javax.servlet-api</artifactId>
        <version>3.1.0</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-tx</artifactId>
        <version>3.2.3.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>xml-apis</groupId>
        <artifactId>xml-apis</artifactId>
        <version>2.0.2</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-web</artifactId>
        <version>3.1.4.RELEASE</version>
        <exclusions>
            <exclusion>
                <groupId>org.springframework</groupId>
                <artifactId>spring-asm</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-config</artifactId>
        <version>3.1.4.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.primefaces</groupId>
        <artifactId>primefaces</artifactId>
        <version>3.4</version>
    </dependency>
    <dependency>
        <groupId>cglib</groupId>
        <artifactId>cglib</artifactId>
        <version>3.0</version>
    </dependency>
    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-entitymanager</artifactId>
        <version>4.2.2.Final</version>
    </dependency>

    <dependency>
        <groupId>commons-fileupload</groupId>
        <artifactId>commons-fileupload</artifactId>
        <version>1.3</version>
    </dependency>
    <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>2.4</version>
    </dependency>
  </dependencies>
</project>

Original issue reported on code.google.com by karan...@gmail.com on 24 Jun 2013 at 5:39

GoogleCodeExporter commented 9 years ago
<dependency>
        <groupId>com.sun.faces</groupId>
        <artifactId>jsf-impl</artifactId>
        <version>2.2.0</version>
</dependency>

Try using 2.1.x version for impl and api

Original comment by nikkol1...@gmail.com on 9 Jul 2013 at 5:47

GoogleCodeExporter commented 9 years ago
I am getting the same error. Any solution to this problem? below is my pom file.
<packaging>war</packaging>
    <repositories>
        <repository>
            <id>prime-repo</id>
            <name>PrimeFaces Maven Repository</name>
            <url>http://repository.primefaces.org</url>
        </repository>
    </repositories>
    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.8.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.webflow</groupId>
            <artifactId>spring-webflow</artifactId>
            <version>2.3.1.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.webflow</groupId>
            <artifactId>spring-faces</artifactId>
            <version>2.3.1.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-orm</artifactId>
            <version>3.1.1.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.16</version>
        </dependency>
        <dependency>
            <groupId>com.sun.faces</groupId>
            <artifactId>jsf-impl</artifactId>
            <version>2.1.10</version>
        </dependency>
        <dependency>
            <groupId>com.sun.facelets</groupId>
            <artifactId>jsf-facelets</artifactId>
            <version>1.1.14</version>
        </dependency>
        <dependency>
            <groupId>com.sun.faces</groupId>
            <artifactId>jsf-api</artifactId>
            <version>2.1.10</version>
        </dependency>
        <dependency>
            <groupId>commons-dbcp</groupId>
            <artifactId>commons-dbcp</artifactId>
            <version>20030825.184428</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>1.6.4</version>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>3.0.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-tx</artifactId>
            <version>3.0.5.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>xml-apis</groupId>
            <artifactId>xml-apis</artifactId>
            <version>1.3.02</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-web</artifactId>
            <version>3.1.3.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-config</artifactId>
            <version>3.1.3.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jdbc</artifactId>
            <version>4.1.4.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.primefaces</groupId>
            <artifactId>primefaces</artifactId>
            <version>5.0</version>
        </dependency>
        <dependency>
            <groupId>cglib</groupId>
            <artifactId>cglib</artifactId>
            <version>2.2.2</version>
            <scope>runtime</scope>
        </dependency>

Original comment by venugees...@gmail.com on 11 Feb 2015 at 10:14