This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Have a look at https://netbeans.org/bugzilla/attachment.cgi?id=137876 There are a lot of NPEs thrown from TypeRepository.getType(TypeRepository.java:143) The log file was attached to issue #232670.
Is there a way to get jpql sample to reproduce these exceptions? Also jpql parser is changed in 7.4 and it may not be reproducible but I need something to verify.
The exception is logged with info level and may not be severe, also there is no details and null check isn't good in my opinion and I don't see neither way to continue evaluation now nor a way for a good fix, keep open for now but as P4, bht. please rice back to P3 after providing additional details. or if some else will provide more details.
It happens also on 7.4 INFO [org.netbeans.modules.j2ee.jpa.verification.JPAProblemFinder]: NPE in jpql validation: null java.lang.NullPointerException at org.netbeans.modules.j2ee.persistence.spi.jpql.TypeRepository.getType(TypeRepository.java:143) at org.netbeans.modules.j2ee.persistence.spi.jpql.Mapping.getType(Mapping.java:88) at org.netbeans.modules.j2ee.persistence.spi.jpql.Mapping.getTypeDeclaration(Mapping.java:100) at org.eclipse.persistence.jpa.jpql.tools.resolver.CollectionValuedFieldResolver.resolveManagedType(CollectionValuedFieldResolver.java:79) at org.eclipse.persistence.jpa.jpql.tools.resolver.AbstractPathResolver.getManagedType(AbstractPathResolver.java:96) ... ... [catch] at org.netbeans.modules.j2ee.jpa.verification.rules.entity.JPQLValidation.apply(JPQLValidation.java:112) at org.netbeans.modules.j2ee.jpa.verification.rules.entity.JPQLValidation.apply(JPQLValidation.java:81) at org.netbeans.modules.j2ee.jpa.verification.common.Rule.execute(Rule.java:68) at org.netbeans.modules.j2ee.jpa.verification.common.RulesEngine.visitTypeAsClass(RulesEngine.java:70) at org.netbeans.modules.j2ee.jpa.verification.JPAProblemFinder.processClass(JPAProblemFinder.java:174) at org.netbeans.modules.j2ee.jpa.verification.JPAProblemFinder.access$000(JPAProblemFinder.java:95) Please let me know if some debugging can be turned on to see which class is causing this problem. My project is way too big, so if it is possible to narrow problem to single class I'll be happy to provide sample.
as it's said in the exception, it's caused by a class where named queries are present, there are(at least) two possibilities for this kind of npe, first one is when verification is cancelled, it may be just artifact and may not need any attention except case of growing message.log too much. another case if it' happened during usual validation because persistence model wasn't constructed prperly. But to evaluate second case I likely will need jpql text with all related entities structures information.
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss