You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@netbeans.apache.org by Klerman <kl...@gmail.com> on 2021/03/04 22:33:30 UTC

NetBeans fails to generate entity classes from database...

Hello
I'm trying to develop a small desktop database application with Java,
Hibernate and NetBeans. The database has 7 tables.
It would be great to have the entity classes generated by NetBeans, but
when I select all the tables in the wizard, NetBeans generates 7 classes
with only the class declarations, no constructors, no fields, no getter and
setters. When I try to generate the entities by selecting each table, one
by one, the code is generated, but the relationships (many to one, ...) are
ignored.
I noticed that NetBeans is reporting an issue after the wizard ends with
the generation for all the tables selected. It says that a
java.lang.NullPointerException has occurred.
Is there any solution to this problem ?.

*Java:* 11.0.10; OpenJDK 64-Bit Server VM 11.0.10+9-Ubuntu-0ubuntu1.20.04

*Runtime:* OpenJDK Runtime Environment 11.0.10+9-Ubuntu-0ubuntu1.20.04

*System:* Linux version 5.8.0-44-generic running on amd64; UTF-8; es_VE
(nb)

*User directory:* /home/klerman/snap/netbeans/common/data/12.2

*Cache directory:* /home/klerman/snap/netbeans/common/cache/12.2


-- 

Klerman Gutierrez.

Re: NetBeans fails to generate entity classes from database...

Posted by Geertjan Wielenga <ge...@googlemail.com.INVALID>.
Details on that NPE, i.e., full stack trace, with steps to reproduce, in an
issue, then someone can help.

Gj

On Thu, 4 Mar 2021 at 23:33, Klerman <kl...@gmail.com> wrote:

> Hello
> I'm trying to develop a small desktop database application with Java,
> Hibernate and NetBeans. The database has 7 tables.
> It would be great to have the entity classes generated by NetBeans, but
> when I select all the tables in the wizard, NetBeans generates 7 classes
> with only the class declarations, no constructors, no fields, no getter and
> setters. When I try to generate the entities by selecting each table, one
> by one, the code is generated, but the relationships (many to one, ...) are
> ignored.
> I noticed that NetBeans is reporting an issue after the wizard ends with
> the generation for all the tables selected. It says that a
> java.lang.NullPointerException has occurred.
> Is there any solution to this problem ?.
>
> *Java:* 11.0.10; OpenJDK 64-Bit Server VM 11.0.10+9-Ubuntu-0ubuntu1.20.04
>
> *Runtime:* OpenJDK Runtime Environment 11.0.10+9-Ubuntu-0ubuntu1.20.04
>
> *System:* Linux version 5.8.0-44-generic running on amd64; UTF-8; es_VE
> (nb)
>
> *User directory:* /home/klerman/snap/netbeans/common/data/12.2
>
> *Cache directory:* /home/klerman/snap/netbeans/common/cache/12.2
>
>
> --
>
> Klerman Gutierrez.
>
>