JSF NullPointerException

mp123

Grünschnabel
Hallo,
ich arbeite mich gerade in JSF ein. Bei mir kommt nur leider eine NullPointerException bei einem total einfachen
Beispiel:
editCustomer.xhtml
HTML:
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html">
<head>
  <title>MyGourmet - Edit Customer</title>
</head>
<body>
  <h1><h:outputText value="Hallo Welt"/></h1>
</body>
</html>

Und die Exception ist:
RequestURI=/JSFTraining3/editCustomer.xhtml

Caused by:

java.lang.NullPointerException
at com.sun.faces.context.flash.ELFlash.getPhaseMapForReading(ELFlash.java:748)
at com.sun.faces.context.flash.ELFlash.isEmpty(ELFlash.java:466)
at com.sun.faces.facelets.util.DevTools.writeVariables(DevTools.java:318)
at com.sun.faces.facelets.util.DevTools.writeVariables(DevTools.java:208)
at com.sun.faces.facelets.util.DevTools.debugHtml(DevTools.java:123)
at com.sun.faces.renderkit.RenderKitUtils.renderHtmlErrorPage(RenderKitUtils.java:1139)
at com.sun.faces.context.ExceptionHandlerImpl.throwIt(ExceptionHandlerImpl.java:249)
at com.sun.faces.context.ExceptionHandlerImpl.handle(ExceptionHandlerImpl.java:136)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:119)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:313)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:829)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)

Ich verwende einen Jetty server und Maven. Es wird alles korrekt kompiliert, aber beim Aufrufen kommt dieser Fehler
und mir ist unklar, wie ich denn lösen kann.

Danke schonmal im Voraus für die Hilfe
 
Was manchmal hilft ist nach der letzten (ersten) Zeile im Stack zu googlen hier also
"com.sun.faces.context.flash.ELFlash.getPhaseMapForReading". Manchmal kommt man dann zur API oder Doku wo meisten eigentlich alles selbstverständlich ist. Das heißt wenn du nach "com.sun.faces.context.flash.ELFlash.getPhaseMapForReading" googelst, würdest du folgende beiträge finden:

http://stackoverflow.com/questions/...g-nullpointerexception-at-com-sun-faces-conte

http://stackoverflow.com/questions/9828788/java-ee-6-jsf-2-with-html-pages-instead-of-xhtml

http://stackoverflow.com/questions/7008507/jsf-page-exception

Edit: Und um dir jetzt zu helfen, ist mehr als die XHTML Seite notwending, denn die ist ja wirklich nichts großes. Viel wichtiger ist die Faces Config.
 
Zuletzt bearbeitet:
Zurück