Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
12.2
-
None
-
None
-
Windows 10; Product Version: Apache NetBeans IDE 12.2
Java: 15; OpenJDK 64-Bit Server VM 15+36-1562
Derby DB v10.14.2.0
Wildfly 21.0.1
Description
I'm getting a null pointer exception when trying to generate database entity classes using the wizard:
java.lang.NullPointerException: Cannot invoke "com.sun.tools.javac.processing.JavacProcessingEnvironment$DiscoveredProcessors.iterator()" because "this.discoveredProcs" is null
NOTE: This is a regression issue, as it works correctly using Netbeans 12.1.
I'm using Apache Derby DB and Wildfly.There are two unmapped entities in the database (one-to-many relationship), and the persistence context is set up to use JTA.
What gets generated is two "stub" java class files containing only the basic class definition without any content
package com.brooksbank.weldexamples.db;
/**
* @author sjbro
*/
public class Codetypes {
}
The persistance context is :
<?xml version="1.0" encoding="UTF-8"?>
<persistence
version="2.2"
xmlns="http://xmlns.jcp.org/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_2.xsd">
<persistence-unit name="com.brooksbank_weldExamples_war_1.0PU" transaction-type="JTA">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:/weldExamplesDS</jta-data-source>
</persistence-unit>
</persistence>
The datasource is defined in wildfly as:
{{ <datasource jndi-name="java:/weldExamplesDS" pool-name="weldExamplesDSPool">}}
{{ <connection-url>jdbc:derby://localhost:1527/WeldExamplesDB</connection-url>}}
{{ <driver-class>org.apache.derby.jdbc.ClientDriver</driver-class>}}
{{ <driver>derbyclient.jar</driver>}}
{{ <security>}}
{{ <user-name>******</user-name>}}
{{ <password>******</password>}}
{{ </security>}}
{{ </datasource>}}
The connection to the database works for other database record types and the wizard pulls up the list of entities correctly to select from.