Mert Nuhoglu
Mert Nuhoglu

Reputation: 10143

What does stripped JARs (no bytecode for methods) mean?

I am trying hard to find the cause of a weird JSF error. To do this, I try to debug the source code inside javaee-web-api module where a NullPointerException is thrown during JSF rendering. But I am stuck because the debugger does not show me the source code of that location.

There is a discussion thread that says that javaee-web-api is stripped (no bytecode for methods) and meant to be used only for compilation.

What does this mean? Can someone explain it in more detail? I want to understand why I cannot debug the location where that NullPointerException is thrown. I think this is related to the fact that these JARs are stripped.

Upvotes: 6

Views: 258

Answers (1)

Ian Fairman
Ian Fairman

Reputation: 635

Normally, the class files in a jar file will contain information on the line numbers relating to the code in the class - this is called the debug information. A stripped jar simply does not have this information.

You are correct in assuming this is the problem. The stack trace you see won't contain any line numbers relating to the code in the stripped jar. Since the jar is provided by a third-party, there's nothing you can do to get that information.

Upvotes: 2

Related Questions