Theme Reference: installation problem

Hi. I wonder if something is broken with the recent changes to https://github.com/intranda/goobi-viewer-theme-reference. I now get a blank page (except for a top banner) if I click on any link to an indexed item, as you can see (for now) at http://portfolio.docuracy.co.uk/viewer/.

It’s installed on Ubuntu 18.04 (following instructions adapted from https://docs.goobi.io/goobi-viewer-en/8/8.7#goobi-viewer). My browser complains of files missing from viewer/resources/themes/reference/css/dist/WebContent/resources/themes/reference/ which seem instead to be located in viewer/resources/themes/reference/:

Best wishes,
Stephen

Hi @Stephen_Gadd

can you please send me the output of the logfile /var/log/tomcat9/catalina.out and /opt/digiverso/logs/viewer.log that shows immediately when you try to open this record:

Cheers,

Jan :slight_smile:

Oh, and it seems that you have an error in your local config_viewer.xml. Please check the <rest> config element, it seems that you have a double /viewer/viewer in there…

… and please run as root the following commands, too. They were missing in the installation instructions:

a2enmod proxy_wstunnel
systemctl restart apache2

Ah yes, thanks, @jan, I see that all of the tags within in my local config_viewer.xml had double /viewer/viewer in their paths - entirely my fault of course :crazy_face:

I ran the a2enmod as you suggested, and then tried to load the url…

This is where /var/log/tomcat**8**/catalina.out starts reporting the problem:

18-Nov-2020 07:09:03.149 SEVERE [ajp-nio-127.0.0.1-8009-exec-10] com.sun.faces.application.view.FaceletViewHandlingStrategy.handleRenderException Error Rendering View[/viewObject.xhtml]
javax.el.ELException: /file:WEB-INF/lib/viewer-core-4.12.0.jar!/META-INF/resources/resources/components/widgets/widget_views.xhtml @136,110 rendered=“#{cmsBean.isHasRelatedPages(activeDocumentBean.viewManager.pi)}”: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.7.7.v20200504-69f2c2b80d): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLSyntaxErrorException: (conn=88) Table ‘viewer.cms_pages’ doesn’t exist
Error Code: 1146
Call: SELECT cms_page_id, date_created, date_updated, may_contain_url_parameters, page_sorting, parent_page, persistent_url, published, related_pi, static_page, subtheme_discriminator, template_id, use_default_sidebar, wrapper_element_class FROM cms_pages WHERE (related_pi = ?)
bind => [1 parameter bound]
Query: ReadAllQuery(referenceClass=CMSPage sql=“SELECT cms_page_id, date_created, date_updated, may_contain_url_parameters, page_sorting, parent_page, persistent_url, published, related_pi, static_page, subtheme_discriminator, template_id, use_default_sidebar, wrapper_element_class FROM cms_pages WHERE (related_pi = ?)”)

And this is /opt/digiverso/logs/viewer.log:

DEBUG 2020-11-18 07:15:02.188 [ajp-nio-127.0.0.1-8009-exec-2] io.goobi.viewer.managedbeans.ActiveDocumentBean.update(ActiveDocumentBean.java:300)
update(): (IDDOC 1605625199167 ; page 1 ; thread 132)
ERROR 2020-11-18 07:15:02.378 [ajp-nio-127.0.0.1-8009-exec-2] io.goobi.viewer.exceptions.MyExceptionHandler.handle(MyExceptionHandler.java:85)
CLASS: javax.el.ELException
ERROR 2020-11-18 07:15:02.378 [ajp-nio-127.0.0.1-8009-exec-2] io.goobi.viewer.exceptions.MyExceptionHandler.handle(MyExceptionHandler.java:262)
/file:WEB-INF/lib/viewer-core-4.12.0.jar!/META-INF/resources/resources/components/widgets/widget_views.xhtml @136,110 rendered=“#{cmsBean.isHasRelatedPages(activeDocumentBean.viewManager.pi)}”: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.7.7.v20200504-69f2c2b80d): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLSyntaxErrorException: (conn=88) Table ‘viewer.cms_pages’ doesn’t exist
Error Code: 1146
Call: SELECT cms_page_id, date_created, date_updated, may_contain_url_parameters, page_sorting, parent_page, persistent_url, published, related_pi, static_page, subtheme_discriminator, template_id, use_default_sidebar, wrapper_element_class FROM cms_pages WHERE (related_pi = ?)
bind => [1 parameter bound]
Query: ReadAllQuery(referenceClass=CMSPage sql=“SELECT cms_page_id, date_created, date_updated, may_contain_url_parameters, page_sorting, parent_page, persistent_url, published, related_pi, static_page, subtheme_discriminator, template_id, use_default_sidebar, wrapper_element_class FROM cms_pages WHERE (related_pi = ?)”)
javax.el.ELException: /file:WEB-INF/lib/viewer-core-4.12.0.jar!/META-INF/resources/resources/components/widgets/widget_views.xhtml @136,110 rendered=“#{cmsBean.isHasRelatedPages(activeDocumentBean.viewManager.pi)}”: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.7.7.v20200504-69f2c2b80d): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLSyntaxErrorException: (conn=88) Table ‘viewer.cms_pages’ doesn’t exist
Error Code: 1146

All the best,
Stephen

This is the root cause. Looks like there was a problem during initializing the database for the first time. You could try the following:

  • stop tomcat process (systemctl stop tomcat8)
  • delete viewer database (mysql ; drop database viewer)
  • re-create viewer database (create database viewer; quit)
  • start tomcat process (systemctl start tomcat8)
  • wait until the application was deployed completely
  • re-create user account (https://docs.goobi.io/goobi-viewer-en/8/8.7#create-user-account)

It shoud work afterwards. If not I will look for the SQL statement to create the needed database table.

Best, Jan :slight_smile:

:face_with_monocle: Still getting the same error report I’m afraid, @jan

That is weird!

Could you please try to create the table manually:

CREATE TABLE `cms_pages` (
  `cms_page_id` bigint(20) NOT NULL AUTO_INCREMENT,
  `date_created` datetime NOT NULL,
  `date_updated` datetime DEFAULT NULL,
  `page_sorting` bigint(20) DEFAULT NULL,
  `published` tinyint(1) NOT NULL DEFAULT '0',
  `template_id` varchar(255) NOT NULL,
  `use_default_sidebar` tinyint(1) NOT NULL DEFAULT '0',
  `static_page` varchar(255) DEFAULT NULL,
  `persistent_url` varchar(255) DEFAULT NULL,
  `subtheme_discriminator` varchar(255) DEFAULT NULL,
  `parent_page` varchar(255) DEFAULT NULL,
  `related_pi` varchar(255) DEFAULT NULL,
  `may_contain_url_parameters` tinyint(1) DEFAULT '0',
  `wrapper_element_class` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`cms_page_id`)
) ENGINE=InnoDB AUTO_INCREMENT=93 DEFAULT CHARSET=utf8

That’s fixed it :clap:

Thanks, @jan. I’ve just added another example document which processed through to the Viewer without any problems. :+1:

FYI: That the table cms_pages was not created automatically is a bug. I was able to reproduce it and created an internal ticket for my colleagues a few moments ago. Thanks for the hint @Stephen_Gadd

1 „Gefällt mir“

The issue was fixed yesterday in the develop Branch. The fix is included in the upcoming release

1 „Gefällt mir“