Skip to content

NPE thrown inside of updated indexer logic #1855

Closed

Description

@martinlippert

I am seeing this in the logs of the language server:

09:45:09.236 ERROR [pool-6-thread-1] o.s.i.v.b.java.utils.SpringIndexerJava   : error extracting symbol information in project 'salespoint-framework' - for docURI 'file:///<some-path>/salespoint/src/main/java/org/salespointframework/catalog/Catalog.java' - on node: /** 
 * Repository interface for  {@link Product}s
 * @author Oliver Gierke
 */
@Repository public interface Catalog<T extends Product> extends SalespointRepository<T,ProductIdentifier> {
  /** 
 * Returns all  {@link Product}s assigned to the given category.
 * @param category
 * @return
 */
  @Query("""
			select p from #{#entityName} p
			 where :category member of p.categories
			""") Streamable<T> findByCategory(  String category);
  /** 
 * Returns all  {@link Product} that are assigned to all given categories.
 * @param categories must not be {@literal null}.
 * @return
 * @since 7.1
 */
  default Streamable<T> findByAllCategories(  String... categories){
  }
  /** 
 * Returns all  {@link Product} that are assigned to all given categories.
 * @param categories must not be {@literal null}.
 * @return
 * @since 7.1
 */
  @Query("""
			    select p from #{#entityName} p
			inner join p.categories c
			     where c in :categories
			     group by p.id having count(p.id) = ?#{#categories.size().longValue()}
			""") Streamable<T> findByAllCategories(  Collection<String> categories);
  /** 
 * Returns all  {@link Product}s that are assigned to any of the given categories.
 * @param categories must not be {@literal null}.
 * @return
 * @since 7.1
 */
  default Streamable<T> findByAnyCategory(  String... categories){
  }
  /** 
 * Returns all  {@link Product}s that are assigned to any of the given categories.
 * @param categories must not be {@literal null}.
 * @return
 * @since 7.1
 */
  @Query("""
			select p from #{#entityName} p
			  join p.categories c
			 where c in :categories
			""") Streamable<T> findByAnyCategory(  Collection<String> categories);
  /** 
 * Returns the  {@link Product}s with the given name.
 * @param name
 * @return
 */
  Streamable<T> findByName(  String name);
}

java.lang.NullPointerException: Cannot invoke "org.springframework.ide.vscode.commons.protocol.spring.Bean.getInjectionPoints()" because "beanDefinition" is null
	at org.springframework.ide.vscode.boot.java.beans.ComponentIndexer.createSymbol(ComponentIndexer.java:113)
	at org.springframework.ide.vscode.boot.java.beans.ComponentIndexer.index(ComponentIndexer.java:96)
	at org.springframework.ide.vscode.boot.java.utils.SpringIndexerJava.extractSymbolInformation(SpringIndexerJava.java:895)
	at org.springframework.ide.vscode.boot.java.utils.SpringIndexerJava$10.visit(SpringIndexerJava.java:712)
	at org.eclipse.jdt.core.dom.TypeDeclaration.accept0(TypeDeclaration.java:480)
	at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:3312)
	at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:3383)
	at org.eclipse.jdt.core.dom.CompilationUnit.accept0(CompilationUnit.java:257)
	at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:3312)
	at org.springframework.ide.vscode.boot.java.utils.SpringIndexerJava.scanAST(SpringIndexerJava.java:692)
	at org.springframework.ide.vscode.boot.java.utils.SpringIndexerJava$7.acceptAST(SpringIndexerJava.java:596)
	at org.springframework.ide.vscode.boot.java.utils.DelegatingFileASTRequestor.acceptAST(DelegatingFileASTRequestor.java:33)
	at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:1135)
	at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:779)
	at org.eclipse.jdt.core.dom.CompilationUnitResolver$ECJCompilationUnitResolver.resolve(CompilationUnitResolver.java:84)
	at org.eclipse.jdt.core.dom.ASTParser.createASTs(ASTParser.java:1122)
	at org.springframework.ide.vscode.boot.java.utils.ASTParserCleanupEnabled.createASTs(ASTParserCleanupEnabled.java:91)
	at org.springframework.ide.vscode.boot.java.utils.SpringIndexerJava.scanFiles(SpringIndexerJava.java:603)
	at org.springframework.ide.vscode.boot.java.utils.SpringIndexerJava.scanFiles(SpringIndexerJava.java:552)
	at org.springframework.ide.vscode.boot.java.utils.SpringIndexerJava.initializeProject(SpringIndexerJava.java:151)
	at org.springframework.ide.vscode.boot.app.SpringSymbolIndex$InitializeProject.run(SpringSymbolIndex.java:848)
	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1825)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1090)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:614)
	at java.base/java.lang.Thread.run(Thread.java:1474)

Activity

  1. added
    for: eclipse
    for: vscode
    and removed on Mar 20, 2026
  2. added this to the 5.2.0.RELEASE milestone on Mar 20, 2026
  3. added a commit that references this issue on Mar 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

for: eclipsefor: vscodetheme: spring index & symbolstype: bug

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions