Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JavaFX FXML TableView error [SOLVED]

AD5XJNov 14 2022 — edited Nov 16 2022

I am very new working with FXML so this may be a newbie question and newbie mistake in my code.
I have a small project (at this point at least) where I wish to open a new window with a FXML defined format. When my menu action menu Database -> Entitiy Maintenance loads that fxml I get the following error:
ERROR MainController.actionEntityMaint 184: err loading EntityMaint.fxml err=java.lang.NullPointerException: Cannot invoke "javafx.scene.control.TableView.setItems(javafx.collections.ObservableList)" because "this.tblEntityView" is null

Here is the relevant code:
jLoggerFX-src.tar.7z (18.88 KB)
The TableView is named correctly in the fxml and the fxml file is in the resources folder of my Maven project.
So far, I have been unable to detect the cause of this problem. Any help would be appreciated. Please excuse my inexperienced coding.
Environment:
Linux MInt LMDE 5 Cinnamon 5.4.12
Kernel 5.10.0-19-amd64
CPU Intel Core i5-6500 X4@3.2Ghz
RAM M.2 16 Gb card
Java 17 JRE and JavaFX 18
Product Version: Apache NetBeans IDE 15
Updates: NetBeans IDE is updated to version NetBeans 8.2 Patch 2

UPDATE: I managed to figure it out on my own with no input from here.

Comments

Frank Kulash

Hi,

It's not clear what you want.  It would help if you posted a little sample data (CREATE TABLE and INSERT statements) and the exact results you want from that sample data.

If you want to SUM, or do any kind of aggregate function, on multiple columns, here's one way:

WITH    pivot_data    AS

(

    SELECT  job, sal, comm, deptno

    FROM    scott.emp

)

SELECT    *

FROM      pivot_data

PIVOT     (    SUM (sal)      AS sal

          ,    SUM (comm)     AS comm

          ,    AVG (sal)      AS avgsal

          FOR  job  IN ( 'ANALYST'    AS analyst

                       , 'CLERK'      AS clerk

                       , 'MANAGER'    AS mannager

                       , 'PRESIDENT'  AS president

                       , 'SALESMAN'   AS salesman

                       )

          )

ORDER BY  deptno

;

See the Forum FAQ:

odie_63
Answer

TexasApexDeveloper wrote:

I haven't found any documentation showing how to have multiple columns summed in a pivot query yet.

Not even THE official documentation?

http://docs.oracle.com/cd/E11882_01/server.112/e25554/analysis.htm#DWHSG8731

Marked as Answer by TexasApexDeveloper · Sep 27 2020
TexasApexDeveloper

My bad, I should have done further research.. That looks spot on!!

Thank you,

Tony Miller
LuvMuffin Software
Ruckersville, VA

1 - 3

Post Details

Added on Nov 14 2022
0 comments
651 views