You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Stephen Brooksbank (Jira)" <ji...@apache.org> on 2020/12/09 11:39:00 UTC
[jira] [Created] (NETBEANS-5127) Null pointer exception using the
"Entity Classes from Database" wizard
Stephen Brooksbank created NETBEANS-5127:
--------------------------------------------
Summary: Null pointer exception using the "Entity Classes from Database" wizard
Key: NETBEANS-5127
URL: https://issues.apache.org/jira/browse/NETBEANS-5127
Project: NetBeans
Issue Type: Bug
Components: javaee - Persistence
Affects Versions: 12.2
Environment: 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
Reporter: Stephen Brooksbank
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}}
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.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists