Null pointer dealing with jsps
- Dominant language
- Java
- Stars
- 3.1k
- Forks
- 935
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 17
Description
### Apache NetBeans version
Apache NetBeans 30
### What happened
When trying to save jsps after modifying I'm getting a null pointer. This actually started happening in 29 so I upgraded to 30 to try to fix it.
```
java.lang.NullPointerException: Cannot invoke "org.netbeans.api.j2ee.core.Profile.isAtLeast(org.netbeans.api.j2ee.core.Profile)" because the return value of "org.netbeans.modules.web.api.webmodule.WebModule.getJ2eeProfile()" is null
at org.netbeans.modules.web.jspparser.JspParserImpl.createParseProxy(JspParserImpl.java:234)
at org.netbeans.modules.web.jspparser.JspParserImpl.getParseProxy(JspParserImpl.java:225)
at org.netbeans.modules.web.jspparser.JspParserImpl.getJspOpenInfo(JspParserImpl.java:177)
```
### Language / Project Type / NetBeans Component
jsp gradle project
### How to reproduce
I am not sure what makes me special. Something I did seems to have caused this to start happening, but I hope the stack trace will be sufficient. It doesn't matter what way you try to save. it still gets the null and I am forced to discard changes.
### Did this work correctly in an earlier version?
Apache NetBeans 28
### Operating System
Mac OS Tahoe 26.2 (25C56)
### JDK
Java(TM) SE Runtime Environment (build 21.0.4+8-LTS-274)
### Apache NetBeans packaging
Community provided installer
### Anything else
It was working with Netbeans 29 till I set something or installed some module.
### Are you willing to submit a pull request?
Yes
Contributor guide
Research direction
Start in org.netbeans.modules.web.jspparser.JspParserImpl, especially createParseProxy at line 234, and trace why WebModule.getJ2eeProfile() is null for a Gradle JSP project. Reproduce by modifying and saving a JSP, then verify saving no longer produces the reported NullPointerException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100