The Problem:
java.lang.NullPointerException
at mainPackagePaketverwaltung.Datenbank.savePaket(Datenbank.java:58)
at mainPackagePaketverwaltung.MainPV$12.actionPerformed(MainPV.java:507)
The Cause:
This is the Line (58):
myStatement.executeUpdate("INSERT INTO Relation VALUES(NULL, '"+ PaketID +"', '"+ atodb.getArtikelID() + "', '"+ atodb.getMenge() +"')");
From what i understand this should create a new line in the Database because the NULL/Primary_Key is set to Auto_Increment, but after one runt it errors out.
That should not happen bc with each run a new line would be made by the Auto_Increment.
More Info:
PaketID is a INT
atodb.getArtikelID is a INT
atodb.getMenge is a INT
All DB Fields are INT,s