faiteanu / hibiscus.docmanager

DocManager plugin for Jameica/Hibiscus
Other
6 stars 0 forks source link

Installation of docmanager from repo failed #4

Open funkmastergst opened 2 years ago

funkmastergst commented 2 years ago

Hi, after installing the latest version of docmanager plugin from your repo and restarting Jameica-Hibiscus an error is shown in the application that something went wrong with the new plugin:

unable to init plugin hibiscus.docmanager: error while installing plugin

After deinstallation and a 2nd try I can find the following information:

From hibiscus.trace.db:

2021-12-26 21:08:55 jdbc[4]: exception
org.h2.jdbc.JdbcSQLSyntaxErrorException: Tabelle "DOCMANAGER_ACCOUNT" besteht bereits
Table "DOCMANAGER_ACCOUNT" already exists; SQL statement:
CREATE TABLE DOCMANAGER_ACCOUNT (id IDENTITY(1),institute varchar(255) NOT NULL,username varchar(255) NOT NULL,name varchar(255) NULL,DocumentsPath varchar(255) NULL,comment varchar(1000) NULL,lastupdate timestamp,UNIQUE (id),PRIMARY KEY (id)) [42101-199]

From jamaica.log:

[Sun Dec 26 21:08:55 CET 2021][ERROR][main][de.derrichter.hibiscus.mashup.HibiscusMashup.init] Schriftarten einlesen fehlerhaft: 
java.io.IOException: Problem reading font data.
    at java.desktop/java.awt.Font.createFont0(Unknown Source)
    at java.desktop/java.awt.Font.createFont(Unknown Source)
    at de.derrichter.hibiscus.mashup.HibiscusMashup.init(HibiscusMashup.java:125)
    at de.willuhn.jameica.plugin.PluginLoader.initPlugin(PluginLoader.java:394)
    at de.willuhn.jameica.plugin.PluginLoader.init(PluginLoader.java:239)
    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:78)

[Sun Dec 26 21:08:55 CET 2021][ERROR][main][de.willuhn.sql.ScriptExecutor.execute] error while executing sql script. Current statement: CREATE TABLE DOCMANAGER_ACCOUNT (id IDENTITY(1),institute varchar(255) NOT NULL,username varchar(255) NOT NULL,name varchar(255) NULL,DocumentsPath varchar(255) NULL,comment varchar(1000) NULL,lastupdate timestamp,UNIQUE (id),PRIMARY KEY (id))
org.h2.jdbc.JdbcSQLSyntaxErrorException: Tabelle "DOCMANAGER_ACCOUNT" besteht bereits
Table "DOCMANAGER_ACCOUNT" already exists; SQL statement:
CREATE TABLE DOCMANAGER_ACCOUNT (id IDENTITY(1),institute varchar(255) NOT NULL,username varchar(255) NOT NULL,name varchar(255) NULL,DocumentsPath varchar(255) NULL,comment varchar(1000) NULL,lastupdate timestamp,UNIQUE (id),PRIMARY KEY (id)) [42101-199]
    at org.h2.message.DbException.getJdbcSQLException(DbException.java:451)
    at org.h2.message.DbException.getJdbcSQLException(DbException.java:427)
    at org.h2.message.DbException.get(DbException.java:205)
    at org.h2.message.DbException.get(DbException.java:181)
    at org.h2.command.ddl.CreateTable.update(CreateTable.java:85)
    at org.h2.command.CommandContainer.update(CommandContainer.java:133)
    at org.h2.command.Command.executeUpdate(Command.java:267)
    at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:169)
    at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:126)
    at de.willuhn.sql.ScriptExecutor.execute(ScriptExecutor.java:166)
    at de.willuhn.sql.ScriptExecutor.execute(ScriptExecutor.java:77)
    at de.willuhn.jameica.hbci.server.AbstractDBSupportImpl.execute(AbstractDBSupportImpl.java:66)
    at name.aiteanu.docmanager.server.DocDBServiceImpl.install(DocDBServiceImpl.java:331)
    at name.aiteanu.docmanager.DocManager.install(DocManager.java:59)
    at de.willuhn.jameica.plugin.PluginLoader.initPlugin(PluginLoader.java:371)
    at de.willuhn.jameica.plugin.PluginLoader.init(PluginLoader.java:239)
    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:78)

[Sun Dec 26 21:08:55 CET 2021][ERROR][main][name.aiteanu.docmanager.DocManager.install] unable to create database
java.rmi.RemoteException: error while executing sql script C:\Users\Gerit\.jameica\plugins\hibiscus.docmanager\sql\h2-create.sql; nested exception is: 
    java.sql.SQLException: exception while executing sql script: Tabelle "DOCMANAGER_ACCOUNT" besteht bereits
Table "DOCMANAGER_ACCOUNT" already exists; SQL statement:
CREATE TABLE DOCMANAGER_ACCOUNT (id IDENTITY(1),institute varchar(255) NOT NULL,username varchar(255) NOT NULL,name varchar(255) NULL,DocumentsPath varchar(255) NULL,comment varchar(1000) NULL,lastupdate timestamp,UNIQUE (id),PRIMARY KEY (id)) [42101-199]. Current statement: CREATE TABLE DOCMANAGER_ACCOUNT (id IDENTITY(1),institute varchar(255) NOT NULL,username varchar(255) NOT NULL,name varchar(255) NULL,DocumentsPath varchar(255) NULL,comment varchar(1000) NULL,lastupdate timestamp,UNIQUE (id),PRIMARY KEY (id))
    at de.willuhn.jameica.hbci.server.AbstractDBSupportImpl.execute(AbstractDBSupportImpl.java:74)
    at name.aiteanu.docmanager.server.DocDBServiceImpl.install(DocDBServiceImpl.java:331)
    at name.aiteanu.docmanager.DocManager.install(DocManager.java:59)
    at de.willuhn.jameica.plugin.PluginLoader.initPlugin(PluginLoader.java:371)
    at de.willuhn.jameica.plugin.PluginLoader.init(PluginLoader.java:239)
    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:78)
Caused by: java.sql.SQLException: exception while executing sql script: Tabelle "DOCMANAGER_ACCOUNT" besteht bereits
Table "DOCMANAGER_ACCOUNT" already exists; SQL statement:
CREATE TABLE DOCMANAGER_ACCOUNT (id IDENTITY(1),institute varchar(255) NOT NULL,username varchar(255) NOT NULL,name varchar(255) NULL,DocumentsPath varchar(255) NULL,comment varchar(1000) NULL,lastupdate timestamp,UNIQUE (id),PRIMARY KEY (id)) [42101-199]. Current statement: CREATE TABLE DOCMANAGER_ACCOUNT (id IDENTITY(1),institute varchar(255) NOT NULL,username varchar(255) NOT NULL,name varchar(255) NULL,DocumentsPath varchar(255) NULL,comment varchar(1000) NULL,lastupdate timestamp,UNIQUE (id),PRIMARY KEY (id))
    at de.willuhn.sql.ScriptExecutor.execute(ScriptExecutor.java:195)
    at de.willuhn.sql.ScriptExecutor.execute(ScriptExecutor.java:77)
    at de.willuhn.jameica.hbci.server.AbstractDBSupportImpl.execute(AbstractDBSupportImpl.java:66)
    ... 11 more
Caused by: org.h2.jdbc.JdbcSQLSyntaxErrorException: Tabelle "DOCMANAGER_ACCOUNT" besteht bereits
Table "DOCMANAGER_ACCOUNT" already exists; SQL statement:
CREATE TABLE DOCMANAGER_ACCOUNT (id IDENTITY(1),institute varchar(255) NOT NULL,username varchar(255) NOT NULL,name varchar(255) NULL,DocumentsPath varchar(255) NULL,comment varchar(1000) NULL,lastupdate timestamp,UNIQUE (id),PRIMARY KEY (id)) [42101-199]
    at org.h2.message.DbException.getJdbcSQLException(DbException.java:451)
    at org.h2.message.DbException.getJdbcSQLException(DbException.java:427)
    at org.h2.message.DbException.get(DbException.java:205)
    at org.h2.message.DbException.get(DbException.java:181)
    at org.h2.command.ddl.CreateTable.update(CreateTable.java:85)
    at org.h2.command.CommandContainer.update(CommandContainer.java:133)
    at org.h2.command.Command.executeUpdate(Command.java:267)
    at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:169)
    at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:126)
    at de.willuhn.sql.ScriptExecutor.execute(ScriptExecutor.java:166)
    ... 13 more

[Sun Dec 26 21:08:55 CET 2021][ERROR][main][de.willuhn.jameica.plugin.PluginLoader.init] unable to init plugin hibiscus.docmanager: error while installing plugin

Any hints? Thanx a lot.

faiteanu commented 2 years ago

Hello, the updating process may have some issues, as the plugin is still comparably new. Especially as you uninstalled and reinstalled the plugin, that is indeed not handled properly.

My suggestion for your case: make a backup of the mentioned file, just for safety C:\Users\Gerit\.jameica\plugins\hibiscus.docmanager\sql\h2-create.sql

Then open the file h2-create.sql, delete all content and save the empty file. (Do not delete the file, as this will lead to different errors.)

Finally start Jameica. The plugin should start properly and not try to create a table that already exists. If you see a different error regarding a duplicate column in table DOCMANAGER_DOCUMENT, use the same procedure as above the make the file updates/update0001.sql empty.

Sorry for the inconvenience.