Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-5278

Unable to create entities from DB tables

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 12.2
    • 12.2
    • apisupport - Project
    • None
    • Windows 10, NetBeans 12.2, MySQL 5.6

    Description

      Unable to create Entities from DB Tables. The DB has been registered properly and it is also displaying the DB Tables and corresponding columns properly. However, when I try to create the entities classes from the Database, the generated classes are simple stubs with the just the class structure without any content inside. The detailed error is as follows:

      java.lang.NullPointerException: Cannot invoke "com.sun.tools.javac.processing.JavacProcessingEnvironment$DiscoveredProcessors.iterator()" because "this.discoveredProcs" is null
      at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:914)
      at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$2500(JavacProcessingEnvironment.java:113)
      at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1298)
      at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1380)
      at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1350)
      at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1240)
      at com.sun.tools.javac.main.JavaCompiler.lambda$readSourceFile$3(JavaCompiler.java:930)
      at com.sun.tools.javac.code.ClassFinder.complete(ClassFinder.java:330)
      at com.sun.tools.javac.code.Symbol.complete(Symbol.java:683)
      at com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:1434)
      at com.sun.tools.javac.model.JavacElements.nameToSymbol(JavacElements.java:262)
      at com.sun.tools.javac.model.JavacElements.unboundNameToSymbol(JavacElements.java:196)
      at com.sun.tools.javac.model.JavacElements.doGetElement(JavacElements.java:182)
      at com.sun.tools.javac.model.JavacElements.doGetTypeElement(JavacElements.java:172)
      at com.sun.tools.javac.model.JavacElements.getTypeElement(JavacElements.java:160)
      at com.sun.tools.javac.model.JavacElements.getTypeElement(JavacElements.java:85)
      at org.netbeans.modules.j2ee.persistence.wizard.fromdb.JavaPersistenceGenerator$Generator$EntityClassGenerator.generateRelationship(JavaPersistenceGenerator.java:1439)
      at org.netbeans.modules.j2ee.persistence.wizard.fromdb.JavaPersistenceGenerator$Generator$ClassGenerator.run(JavaPersistenceGenerator.java:866)
      at org.netbeans.modules.j2ee.persistence.wizard.fromdb.JavaPersistenceGenerator$Generator$2.run(JavaPersistenceGenerator.java:577)
      at org.netbeans.modules.j2ee.persistence.wizard.fromdb.JavaPersistenceGenerator$Generator$2.run(JavaPersistenceGenerator.java:571)
      at org.netbeans.api.java.source.JavaSource$1.run(JavaSource.java:673)
      at org.netbeans.api.java.source.JavaSource$1.run(JavaSource.java:663)
      at org.netbeans.api.java.source.JavaSource$MultiTask.run(JavaSource.java:502)
      at org.netbeans.modules.parsing.impl.TaskProcessor.callUserTask(TaskProcessor.java:586)
      at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:130)
      at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:114)
      at org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:181)
      at org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:178)
      at org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager.priorityIO(FileChangedManager.java:153)
      at org.netbeans.modules.masterfs.providers.ProvidedExtensions.priorityIO(ProvidedExtensions.java:335)
      at org.netbeans.modules.parsing.nb.DataObjectEnvFactory.runPriorityIO(DataObjectEnvFactory.java:118)
      at org.netbeans.modules.parsing.impl.Utilities.runPriorityIO(Utilities.java:67)
      at org.netbeans.modules.parsing.impl.TaskProcessor.runUserTask(TaskProcessor.java:178)
      at org.netbeans.modules.parsing.api.ParserManager.parse(ParserManager.java:81)
      at org.netbeans.api.java.source.JavaSource.runUserActionTaskImpl(JavaSource.java:452)
      at org.netbeans.api.java.source.JavaSource.runUserActionTask(JavaSource.java:423)
      at org.netbeans.api.java.source.JavaSource.runModificationTask(JavaSource.java:684)
      at org.netbeans.modules.j2ee.persistence.wizard.fromdb.JavaPersistenceGenerator$Generator.runImpl(JavaPersistenceGenerator.java:571)
      at org.netbeans.modules.j2ee.persistence.wizard.fromdb.JavaPersistenceGenerator$Generator.run(JavaPersistenceGenerator.java:379)
      at org.netbeans.modules.j2ee.persistence.wizard.fromdb.JavaPersistenceGenerator.generateBeans(JavaPersistenceGenerator.java:206)
      at org.netbeans.modules.j2ee.persistence.wizard.fromdb.JavaPersistenceGenerator.generateBeans(JavaPersistenceGenerator.java:149)
      at org.netbeans.modules.j2ee.persistence.wizard.fromdb.RelatedCMPWizard.createBeans(RelatedCMPWizard.java:391)
      at org.netbeans.modules.j2ee.persistence.wizard.fromdb.RelatedCMPWizard.access$000(RelatedCMPWizard.java:63)
      at org.netbeans.modules.j2ee.persistence.wizard.fromdb.RelatedCMPWizard$1.run(RelatedCMPWizard.java:248)
      at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
      at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
      at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)
      [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)

      The entity created is as follows:

      /*

      • To change this license header, choose License Headers in Project Properties.
      • To change this template file, choose Tools | Templates
      • and open the template in the editor.
        */
        package com.kpk.packages;

      /**
      *

      • @author KPK
        */
        public class Customer {

      }

      Attachments

        Activity

          People

            Unassigned Unassigned
            pavan.krishna Pavan Kosaraju
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: