0

I have a JSF 2 application. There is a NullPointerException in one page. The logs and stacktrace does not give any useful information. Therefore, I wanted to debug the exact location where the NullPointerException is thrown.

The stacktrace is here:

java.lang.NullPointerException
    at javax.faces.component.UIViewRoot.getViewMap(UIViewRoot.java:1521)
    at javax.faces.component.UIViewRoot.getViewMap(UIViewRoot.java:1479)
    at com.sun.faces.mgbean.BeanManager$ScopeManager$ViewScopeHandler.handle(BeanManager.java:550)
    at com.sun.faces.mgbean.BeanManager$ScopeManager.pushToScope(BeanManager.java:458)
...

The problem is that I cannot enter into UIViewRoot.getViewMap using debugger.

The debugger shows that it is inside getViewMap method:

http://dl.dropbox.com/u/103580364/temp/000496.jpg

But the source code referenced shows comment lines:

http://dl.dropbox.com/u/103580364/temp/000495.jpg

I run the application on an embedded Jetty server. Why does the debugger not enter into the real executing code?

Mert Nuhoglu
  • 9,695
  • 16
  • 79
  • 117
  • 2
    The JSF version you're actually executing seems to be different from the one you have in your Maven local repo. What kind of tools are you using to manage that Server? It looks like they're deploying their own JSF version instead of the one you want... – Aritz Jul 10 '13 at 10:35
  • 1
    Indeed, the source code file is of a different JSF impl/version than the actually running one. I recommend to reframe the question in Eclipse context. This is not specifically a JSF/JavaEE problem. You'd have had exactly the same problem when e.g. running Apache Commons IO 1.2.3 and attaching a source code file of Apache Commons IO 1.3.2. – BalusC Jul 10 '13 at 12:57
  • Please, retag this question topics to the IDE you're actually working with and 'Maven' tag. Remove java and jsf tags. – Aritz Jul 10 '13 at 20:19
  • Thank you for the advices. I use IntelliJ Idea. I imported the project from Maven's pom.xml file. IntelliJ uses the libraries defined in the pom.xml file. – Mert Nuhoglu Jul 11 '13 at 07:15

0 Answers0