Sorry,
da fehlt ja die Hälfte von dem was ich geschrieben hatte...
Ich bezog mich auf diese Zeilen:
Code
[Wed Dec 09 07:45:49 CET 2020][DEBUG][main][de.willuhn.datasource.db.DBIteratorImpl.init] executing sql query: com.mysql.jdbc.JDBC42PreparedStatement@2def7a7a: select version.* from version where name = 'db'
[Wed Dec 09 07:45:49 CET 2020][INFO][main][de.willuhn.jameica.hbci.server.HBCIDBServiceImpl.checkConsistency] current database version: 67
[Wed Dec 09 07:45:49 CET 2020][INFO][main][de.willuhn.jameica.hbci.server.HBCIDBServiceImpl.checkConsistency] init update provider
[Wed Dec 09 07:45:49 CET 2020][INFO][main][de.willuhn.sql.version.Updater.execute] current version: 67
[Wed Dec 09 07:45:49 CET 2020][INFO][main][de.willuhn.sql.version.Updater.execute] searching for available updates
[Wed Dec 09 07:45:49 CET 2020][INFO][main][de.willuhn.sql.version.Updater.execute] found 1 update files
[Wed Dec 09 07:45:49 CET 2020][INFO][main][de.willuhn.sql.version.Updater.execute] encoding: iso-8859-1
[Wed Dec 09 07:45:49 CET 2020][INFO][main][de.willuhn.sql.version.Updater.execute] executing update0068: database update update0068
[Wed Dec 09 07:45:49 CET 2020][INFO][main][de.willuhn.util.I18N.<init>] loading resource bundle lang/hibiscus_messages for locale de_DE
[Wed Dec 09 07:45:49 CET 2020][INFO][main][de.willuhn.jameica.gui.SplashScreen$3.run] reading sql script ...
[Wed Dec 09 07:45:49 CET 2020][DEBUG][main][de.willuhn.sql.ScriptExecutor.execute] reading sql script
[Wed Dec 09 07:45:49 CET 2020][TRACE][main][de.willuhn.jameica.gui.SplashScreen$1.run] startup completed: 48 %
[Wed Dec 09 07:45:49 CET 2020][INFO][main][de.willuhn.jameica.gui.SplashScreen$3.run] starting transaction ...
[Wed Dec 09 07:45:49 CET 2020][INFO][main][de.willuhn.sql.ScriptExecutor.execute] starting transaction
[Wed Dec 09 07:45:49 CET 2020][INFO][main][de.willuhn.jameica.gui.SplashScreen$3.run] executing sql commands ...
[Wed Dec 09 07:45:49 CET 2020][INFO][main][de.willuhn.jameica.gui.SplashScreen$3.run] executing sql commands ...
[Wed Dec 09 07:45:49 CET 2020][DEBUG][main][de.willuhn.sql.ScriptExecutor.execute] executing: ALTER TABLE umsatztyp ADD konto_id int(10), ADD konto_kategorie varchar(255), ADD flags int(1)
[Wed Dec 09 07:45:49 CET 2020][INFO][main][de.willuhn.jameica.gui.SplashScreen$3.run] rollback transaction ...
[Wed Dec 09 07:45:49 CET 2020][INFO][main][de.willuhn.sql.ScriptExecutor.execute] rollback transaction
[Wed Dec 09 07:45:49 CET 2020][ERROR][main][de.willuhn.sql.ScriptExecutor.execute] error while executing sql script. Current statement: ALTER TABLE umsatztyp ADD konto_id int(10), ADD konto_kategorie varchar(255), ADD flags int(1)
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Duplicate column name 'konto_id'
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:488)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
at com.mysql.jdbc.Util.getInstance(Util.java:408)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:944)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3978)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3914)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2530)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2683)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2491)
at com.mysql.jdbc.StatementImpl.executeUpdateInternal(StatementImpl.java:1552)
at com.mysql.jdbc.StatementImpl.executeLargeUpdate(StatementImpl.java:2607)
at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1480)
at de.willuhn.sql.ScriptExecutor.execute(ScriptExecutor.java:166)
at de.willuhn.jameica.hbci.server.AbstractUpdate.execute(AbstractUpdate.java:62)
at de.willuhn.sql.version.Updater.execute(Updater.java:271)
at de.willuhn.sql.version.Updater.execute(Updater.java:181)
at de.willuhn.sql.version.Updater.execute(Updater.java:69)
at de.willuhn.jameica.hbci.server.HBCIDBServiceImpl.checkConsistency(HBCIDBServiceImpl.java:174)
at de.willuhn.jameica.hbci.HBCI$1.call(HBCI.java:111)
at de.willuhn.jameica.hbci.HBCI.call(HBCI.java:359)
at de.willuhn.jameica.hbci.HBCI.init(HBCI.java:107)
at de.willuhn.jameica.plugin.PluginLoader.initPlugin(PluginLoader.java:395)
at de.willuhn.jameica.plugin.PluginLoader.init(PluginLoader.java:240)
at de.willuhn.jameica.services.PluginService.init(PluginService.java:39)
at de.willuhn.boot.BootLoader.resolve(BootLoader.java:139)
at de.willuhn.boot.BootLoader.resolve(BootLoader.java:119)
at de.willuhn.boot.BootLoader.getBootable(BootLoader.java:70)
at de.willuhn.jameica.system.Application.init(Application.java:103)
at de.willuhn.jameica.system.Application.newInstance(Application.java:87)
at de.willuhn.jameica.Main.main(Main.java:75)
[Wed Dec 09 07:45:49 CET 2020][ERROR][main][de.willuhn.jameica.hbci.server.AbstractUpdate.execute] unable to execute update
java.sql.SQLException: exception while executing sql script: Duplicate column name 'konto_id'. Current statement: ALTER TABLE umsatztyp ADD konto_id int(10), ADD konto_kategorie varchar(255), ADD flags int(1)
at de.willuhn.sql.ScriptExecutor.execute(ScriptExecutor.java:195)
at de.willuhn.jameica.hbci.server.AbstractUpdate.execute(AbstractUpdate.java:62)
at de.willuhn.sql.version.Updater.execute(Updater.java:271)
at de.willuhn.sql.version.Updater.execute(Updater.java:181)
at de.willuhn.sql.version.Updater.execute(Updater.java:69)
at de.willuhn.jameica.hbci.server.HBCIDBServiceImpl.checkConsistency(HBCIDBServiceImpl.java:174)
at de.willuhn.jameica.hbci.HBCI$1.call(HBCI.java:111)
at de.willuhn.jameica.hbci.HBCI.call(HBCI.java:359)
at de.willuhn.jameica.hbci.HBCI.init(HBCI.java:107)
at de.willuhn.jameica.plugin.PluginLoader.initPlugin(PluginLoader.java:395)
at de.willuhn.jameica.plugin.PluginLoader.init(PluginLoader.java:240)
at de.willuhn.jameica.services.PluginService.init(PluginService.java:39)
at de.willuhn.boot.BootLoader.resolve(BootLoader.java:139)
at de.willuhn.boot.BootLoader.resolve(BootLoader.java:119)
at de.willuhn.boot.BootLoader.getBootable(BootLoader.java:70)
at de.willuhn.jameica.system.Application.init(Application.java:103)
at de.willuhn.jameica.system.Application.newInstance(Application.java:87)
at de.willuhn.jameica.Main.main(Main.java:75)
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Duplicate column name 'konto_id'
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:488)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
at com.mysql.jdbc.Util.getInstance(Util.java:408)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:944)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3978)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3914)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2530)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2683)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2491)
at com.mysql.jdbc.StatementImpl.executeUpdateInternal(StatementImpl.java:1552)
at com.mysql.jdbc.StatementImpl.executeLargeUpdate(StatementImpl.java:2607)
at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1480)
at de.willuhn.sql.ScriptExecutor.execute(ScriptExecutor.java:166)
... 17 more
[Wed Dec 09 07:45:49 CET 2020][INFO][main][de.willuhn.datasource.db.DBServiceImpl.stop] stopping db service
[Wed Dec 09 07:45:49 CET 2020][DEBUG][main][de.willuhn.datasource.db.DBServiceImpl.stop] db service: object cache matches: 50 %
[Wed Dec 09 07:45:49 CET 2020][INFO][main][de.willuhn.datasource.db.DBServiceImpl.closeConnection] commit connection
[Wed Dec 09 07:45:49 CET 2020][INFO][main][de.willuhn.datasource.db.DBServiceImpl.closeConnection] closing connection
[Wed Dec 09 07:45:49 CET 2020][INFO][main][de.willuhn.datasource.db.DBServiceImpl.closeConnection] connection closed
[Wed Dec 09 07:45:49 CET 2020][INFO][main][de.willuhn.datasource.db.DBServiceImpl.stop] db service stopped [1 connection(s) closed]
[Wed Dec 09 07:45:49 CET 2020][ERROR][main][de.willuhn.jameica.plugin.PluginLoader.init] unable to init plugin hibiscus: de.willuhn.util.ApplicationException: Fehler beim Ausführen des Updates
Die Tabelle umsatztyp sieht bei mir jetzt wie folgt aus:
Code
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
CREATE TABLE `umsatztyp` (
`id` int NOT NULL,
`name` varchar(255) NOT NULL,
`nummer` varchar(5) DEFAULT NULL,
`pattern` mediumtext,
`isregex` int DEFAULT NULL,
`umsatztyp` int DEFAULT NULL,
`parent_id` int DEFAULT NULL,
`color` varchar(11) DEFAULT NULL,
`customcolor` int DEFAULT NULL,
`kommentar` mediumtext,
`konto_id` int DEFAULT NULL,
`konto_kategorie` varchar(255) DEFAULT NULL,
`flags` int DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
ALTER TABLE `umsatztyp`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `id` (`id`),
ADD KEY `idx_umsatztyp_umsatztyp` (`parent_id`);
ALTER TABLE `umsatztyp`
MODIFY `id` int NOT NULL AUTO_INCREMENT;
Im Git habe ich gefunden, dass nur wohl nur dies beim DB Update ausgeführt wird:
Code
"ALTER TABLE umsatztyp ADD konto_id int(10), ADD konto_kategorie varchar(255), ADD flags int(1);",
"ALTER TABLE umsatztyp ADD CONSTRAINT fk_umsatztyp_konto FOREIGN KEY (konto_id) REFERENCES konto (id);"
Wobei die zweite Zeile "ALTER TABLE umsatztyp ADD CONSTRAINT fk_umsatztyp_konto FOREIGN KEY (konto_id) REFERENCES konto (id);" bei mir nicht sauber durch gelaufen ist. Ist aber jetzt in der Tabelle enthalten.
Inzwischen habe ich die Version in der DB von Hand auf 68 gesetzt. Damit scheint alles zu wieder zu laufen.
Ich hoffe du steinigst mich jetzt nicht....