java.lang.NullPointerException: value cannot be null

Sonatype JIRA | Milos Kleint | 8 years ago
  1. 0

    when trying to download/update the index for java.net repository (or netbeans.org repository at bits.netbeans.org/maven/.index) I get the following NPE Old format of data not supported? java.lang.NullPointerException: value cannot be null at org.apache.lucene.document.Field.<init>(Field.java:229) at org.apache.lucene.document.Field.<init>(Field.java:205) at org.sonatype.nexus.index.creator.MinimalArtifactInfoIndexCreator.updateDocument(MinimalArtifactInfoIndexCreator.java:241) at org.sonatype.nexus.index.context.IndexUtils.updateDocument(IndexUtils.java:71) at org.sonatype.nexus.index.updater.DefaultIndexUpdater.copyUpdatedDocuments(DefaultIndexUpdater.java:330) at org.sonatype.nexus.index.updater.DefaultIndexUpdater.unpackIndexArchive(DefaultIndexUpdater.java:258) at org.sonatype.nexus.index.updater.DefaultIndexUpdater.loadIndexDirectory(DefaultIndexUpdater.java:194) at org.sonatype.nexus.index.updater.DefaultIndexUpdater.fetchAndUpdateIndex(DefaultIndexUpdater.java:108) at org.sonatype.nexus.index.updater.DefaultIndexUpdater.fetchAndUpdateIndex(DefaultIndexUpdater.java:136) at org.sonatype.nexus.index.updater.DefaultIndexUpdater.fetchAndUpdateIndex(DefaultIndexUpdater.java:123) at org.netbeans.modules.maven.indexer.NexusRepositoryIndexerImpl.indexLoadedRepo(NexusRepositoryIndexerImpl.java:363) at org.netbeans.modules.maven.indexer.NexusRepositoryIndexerImpl.loadIndexingContext(NexusRepositoryIndexerImpl.java:287) at org.netbeans.modules.maven.indexer.NexusRepositoryIndexerImpl.access$300(NexusRepositoryIndexerImpl.java:131) at org.netbeans.modules.maven.indexer.NexusRepositoryIndexerImpl$1.run(NexusRepositoryIndexerImpl.java:395) at org.openide.util.Mutex.writeAccess(Mutex.java:433) at org.netbeans.modules.maven.indexer.NexusRepositoryIndexerImpl.indexRepo(NexusRepositoryIndexerImpl.java:386) at org.netbeans.modules.maven.indexer.api.RepositoryIndexer.indexRepo(RepositoryIndexer.java:59) at org.netbeans.modules.maven.repository.RepositoryNode$RefreshIndexAction$1.run(RepositoryNode.java:194) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:573) [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1005)

    Sonatype JIRA | 8 years ago | Milos Kleint
    java.lang.NullPointerException: value cannot be null
  2. 0

    when trying to download/update the index for java.net repository (or netbeans.org repository at bits.netbeans.org/maven/.index) I get the following NPE Old format of data not supported? java.lang.NullPointerException: value cannot be null at org.apache.lucene.document.Field.<init>(Field.java:229) at org.apache.lucene.document.Field.<init>(Field.java:205) at org.sonatype.nexus.index.creator.MinimalArtifactInfoIndexCreator.updateDocument(MinimalArtifactInfoIndexCreator.java:241) at org.sonatype.nexus.index.context.IndexUtils.updateDocument(IndexUtils.java:71) at org.sonatype.nexus.index.updater.DefaultIndexUpdater.copyUpdatedDocuments(DefaultIndexUpdater.java:330) at org.sonatype.nexus.index.updater.DefaultIndexUpdater.unpackIndexArchive(DefaultIndexUpdater.java:258) at org.sonatype.nexus.index.updater.DefaultIndexUpdater.loadIndexDirectory(DefaultIndexUpdater.java:194) at org.sonatype.nexus.index.updater.DefaultIndexUpdater.fetchAndUpdateIndex(DefaultIndexUpdater.java:108) at org.sonatype.nexus.index.updater.DefaultIndexUpdater.fetchAndUpdateIndex(DefaultIndexUpdater.java:136) at org.sonatype.nexus.index.updater.DefaultIndexUpdater.fetchAndUpdateIndex(DefaultIndexUpdater.java:123) at org.netbeans.modules.maven.indexer.NexusRepositoryIndexerImpl.indexLoadedRepo(NexusRepositoryIndexerImpl.java:363) at org.netbeans.modules.maven.indexer.NexusRepositoryIndexerImpl.loadIndexingContext(NexusRepositoryIndexerImpl.java:287) at org.netbeans.modules.maven.indexer.NexusRepositoryIndexerImpl.access$300(NexusRepositoryIndexerImpl.java:131) at org.netbeans.modules.maven.indexer.NexusRepositoryIndexerImpl$1.run(NexusRepositoryIndexerImpl.java:395) at org.openide.util.Mutex.writeAccess(Mutex.java:433) at org.netbeans.modules.maven.indexer.NexusRepositoryIndexerImpl.indexRepo(NexusRepositoryIndexerImpl.java:386) at org.netbeans.modules.maven.indexer.api.RepositoryIndexer.indexRepo(RepositoryIndexer.java:59) at org.netbeans.modules.maven.repository.RepositoryNode$RefreshIndexAction$1.run(RepositoryNode.java:194) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:573) [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1005)

    Sonatype JIRA | 8 years ago | Milos Kleint
    java.lang.NullPointerException: value cannot be null
  3. 0

    Null pointer Exception

    GitHub | 1 year ago | szlwzl
    java.lang.NullPointerException: value cannot be null
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Many content types created by LDAP users are not being indexed properly by confluence. During a full index rebuild, there are several of the following errors in the logs: {noformat} 2011-02-14 12:53:03,512 ERROR [Indexer: 2] [atlassian.bonnie.search.BaseDocumentBuilder] getDocument Error extracting search fields from Attachment: sean.boran3.png v.1 (5570570) TGDBOSE1 using BackwardsCompatibleExtractor wrapping com.atlassian.confluence.search.lucene.extractor.ConfluenceAttachmentMetadataExtractor@4183d912 (confluence.extractors.core:attachmentMetadataExtractor): value cannot be null java.lang.NullPointerException: value cannot be null at org.apache.lucene.document.Field.<init>(Field.java:330) at org.apache.lucene.document.Field.<init>(Field.java:305) at org.apache.lucene.document.Field.<init>(Field.java:284) at com.atlassian.confluence.search.lucene.extractor.ConfluenceAttachmentMetadataExtractor.addFields(ConfluenceAttachmentMetadataExtractor.java:66) at com.atlassian.confluence.plugin.descriptor.ExtractorModuleDescriptor$BackwardsCompatibleExtractor.addFields(ExtractorModuleDescriptor.java:45) at com.atlassian.bonnie.search.BaseDocumentBuilder.getDocument(BaseDocumentBuilder.java:104) at com.atlassian.confluence.search.lucene.ConfluenceDocumentBuilder.getDocument(ConfluenceDocumentBuilder.java:102) at com.atlassian.confluence.search.lucene.tasks.AddDocumentIndexTask.perform(AddDocumentIndexTask.java:43) at com.atlassian.bonnie.index.TempIndexWriter.perform(TempIndexWriter.java:73) at com.atlassian.confluence.search.lucene.TempIndexWriterStrategy.perform(TempIndexWriterStrategy.java:43) at com.atlassian.confluence.search.lucene.tasks.TempIndexBackedIndexTaskPerformer.perform(TempIndexBackedIndexTaskPerformer.java:21) at com.atlassian.confluence.search.lucene.DefaultObjectQueueWorker.indexCollection(DefaultObjectQueueWorker.java:78) at com.atlassian.confluence.search.lucene.DefaultObjectQueueWorker$1.doInTransactionWithoutResult(DefaultObjectQueueWorker.java:62) at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:127) at com.atlassian.confluence.search.lucene.DefaultObjectQueueWorker.run(DefaultObjectQueueWorker.java:51) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) {noformat} {noformat} 2011-02-14 12:53:07,717 ERROR [Indexer: 3] [atlassian.bonnie.search.BaseDocumentBuilder] getDocument Error extracting search fields from status: Wow v.1 (23003144) using BackwardsCompatibleExtractor wrapping com.atlassian.confluence.search.lucene.extractor.UserStatusExtractor@13df208f (confluence.userstatus:userStatusExtractor): value cannot be null java.lang.NullPointerException: value cannot be null at org.apache.lucene.document.Field.<init>(Field.java:330) at org.apache.lucene.document.Field.<init>(Field.java:305) at org.apache.lucene.document.Field.<init>(Field.java:284) at com.atlassian.confluence.search.lucene.extractor.UserStatusExtractor.addFields(UserStatusExtractor.java:24) at com.atlassian.confluence.plugin.descriptor.ExtractorModuleDescriptor$BackwardsCompatibleExtractor.addFields(ExtractorModuleDescriptor.java:45) at com.atlassian.bonnie.search.BaseDocumentBuilder.getDocument(BaseDocumentBuilder.java:104) at com.atlassian.confluence.search.lucene.ConfluenceDocumentBuilder.getDocument(ConfluenceDocumentBuilder.java:102) at com.atlassian.confluence.search.lucene.tasks.AddDocumentIndexTask.perform(AddDocumentIndexTask.java:43) at com.atlassian.bonnie.index.TempIndexWriter.perform(TempIndexWriter.java:73) at com.atlassian.confluence.search.lucene.TempIndexWriterStrategy.perform(TempIndexWriterStrategy.java:43) at com.atlassian.confluence.search.lucene.tasks.TempIndexBackedIndexTaskPerformer.perform(TempIndexBackedIndexTaskPerformer.java:21) at com.atlassian.confluence.search.lucene.DefaultObjectQueueWorker.indexCollection(DefaultObjectQueueWorker.java:78) at com.atlassian.confluence.search.lucene.DefaultObjectQueueWorker$1.doInTransactionWithoutResult(DefaultObjectQueueWorker.java:62) at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:127) at com.atlassian.confluence.search.lucene.DefaultObjectQueueWorker.run(DefaultObjectQueueWorker.java:51) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) {noformat} This is happening for Attachments and UserStatus, and may happen for several other datatypes as well. It only happens where the LDAP user is missing a full name value in confluence (i.e. the PersonalInformation object referenced by the Attachment has a null fullName value, or the UserStatus has a null fullName value, etc). This exception should never be thrown, as null values need to be handled in each of the extractors. h2. Workaround 1) Disable the UserStatusExtractor in the User Status Plugin in Confluence Admin > Plugins. 2) Disable the EmbeddedSubCalendarsExtractor in Team Calendars (if installed) 3) Reindex. 4) Watch for any other stack traces. If there are any, contact support. Note: make a note of which Extractors you will have to disable in case you need to enable them again. The above changes should result in: * The object that any disabled Extractor pertains to will not be searchable * The rest of the content will be indexed correctly and will be searchable

    Atlassian JIRA | 6 years ago | Richard Atkins [Atlassian]
    java.lang.NullPointerException: value cannot be null

    1 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      value cannot be null

      at org.apache.lucene.document.Field.<init>()
    2. Lucene
      Field.<init>
      1. org.apache.lucene.document.Field.<init>(Field.java:229)
      2. org.apache.lucene.document.Field.<init>(Field.java:205)
      2 frames
    3. Sonatype Nexus Indexer
      DefaultIndexUpdater.fetchAndUpdateIndex
      1. org.sonatype.nexus.index.creator.MinimalArtifactInfoIndexCreator.updateDocument(MinimalArtifactInfoIndexCreator.java:241)
      2. org.sonatype.nexus.index.context.IndexUtils.updateDocument(IndexUtils.java:71)
      3. org.sonatype.nexus.index.updater.DefaultIndexUpdater.copyUpdatedDocuments(DefaultIndexUpdater.java:330)
      4. org.sonatype.nexus.index.updater.DefaultIndexUpdater.unpackIndexArchive(DefaultIndexUpdater.java:258)
      5. org.sonatype.nexus.index.updater.DefaultIndexUpdater.loadIndexDirectory(DefaultIndexUpdater.java:194)
      6. org.sonatype.nexus.index.updater.DefaultIndexUpdater.fetchAndUpdateIndex(DefaultIndexUpdater.java:108)
      7. org.sonatype.nexus.index.updater.DefaultIndexUpdater.fetchAndUpdateIndex(DefaultIndexUpdater.java:136)
      8. org.sonatype.nexus.index.updater.DefaultIndexUpdater.fetchAndUpdateIndex(DefaultIndexUpdater.java:123)
      8 frames
    4. org.netbeans.modules
      NexusRepositoryIndexerImpl$1.run
      1. org.netbeans.modules.maven.indexer.NexusRepositoryIndexerImpl.indexLoadedRepo(NexusRepositoryIndexerImpl.java:363)
      2. org.netbeans.modules.maven.indexer.NexusRepositoryIndexerImpl.loadIndexingContext(NexusRepositoryIndexerImpl.java:287)
      3. org.netbeans.modules.maven.indexer.NexusRepositoryIndexerImpl.access$300(NexusRepositoryIndexerImpl.java:131)
      4. org.netbeans.modules.maven.indexer.NexusRepositoryIndexerImpl$1.run(NexusRepositoryIndexerImpl.java:395)
      4 frames
    5. org.openide.util
      Mutex.writeAccess
      1. org.openide.util.Mutex.writeAccess(Mutex.java:433)
      1 frame
    6. org.netbeans.modules
      RepositoryNode$RefreshIndexAction$1.run
      1. org.netbeans.modules.maven.indexer.NexusRepositoryIndexerImpl.indexRepo(NexusRepositoryIndexerImpl.java:386)
      2. org.netbeans.modules.maven.indexer.api.RepositoryIndexer.indexRepo(RepositoryIndexer.java:59)
      3. org.netbeans.modules.maven.repository.RepositoryNode$RefreshIndexAction$1.run(RepositoryNode.java:194)
      3 frames
    7. org.openide.util
      RequestProcessor$Task.run
      1. org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:573)
      1 frame