Java 11 - problems during tomcat startup for master branch

2,685 views
Skip to first unread message

Sean Horner

unread,
Sep 29, 2021, 1:52:56 PM9/29/21
to sakai-dev

Hello,


Using Java 11 (openjdk) and following the advice in SAK-33595 regarding CATALINA_OPTS, I’m encountering severe errors during tomcat startup. I’m assuming that there might be some instructions or pointers I’m missing, but let me know if I should be posting a jira for the issue described below.


Thanks,

Sean


======

My Setup

Using the maven and java settings below, I’ve successfully built the latest source in the master branch as of this writing (up to commit 6d2931a on Sep. 29, 2021). 


[shorner@myhost ootb-sakai]$ mvn -version

Apache Maven 3.8.2 (ea98e05a04480131370aa0c110b8c54cf726c06f)

Maven home: /opt/maven/apache-maven-3.8.2

Java version: 11.0.12, vendor: Red Hat, Inc., runtime: /usr/lib/jvm/java-11-openjdk-11.0.12.0.7-0.el7_9.x86_64

Default locale: en_US, platform encoding: UTF-8

OS name: "linux", version: "3.10.0-1160.41.1.el7.x86_64", arch: "amd64", family: "unix"


Prior to building, I’ve also ensured that the local maven repository was empty and that the instance of tomcat (9.0.53) had no prior Sakai classes or jars therein. The entirety of my setenv.sh follows.


export JAVA_HOME=/usr/lib/jvm/jre-11-openjdk


CATALINA_OPTS="-server -Xms1g -Xmx2g -Djava.awt.headless=true -XX:+UseCompressedOops -XX:+UseG1GC -Xlog:gc"

CATALINA_OPTS="$CATALINA_OPTS -Dhttp.agent=Sakai"

CATALINA_OPTS="$CATALINA_OPTS -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false"

CATALINA_OPTS="$CATALINA_OPTS -Dsakai.security=$CATALINA_BASE/sakai/"

CATALINA_OPTS="$CATALINA_OPTS -Duser.timezone=US/Pacific"

CATALINA_OPTS="$CATALINA_OPTS -Dsakai.cookieName=SAKAI2SESSIONID"


CATALINA_OPTS="$CATALINA_OPTS --add-exports=java.base/jdk.internal.misc=ALL-UNNAMED --add-exports=java.base/sun.nio.ch=ALL-UNNAMED --add-exports=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED --add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED --add-exports=java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED --illegal-access=permit"


export CATALINA_OPTS


I’m also using the latest version of MySQL/JConnector in $CATALINA_HOME/lib: mysql-connector-java-8.0.25.jar.

Startup Errors

The first inkling of an issue in catalina.out is expressed in the following snippet:


29-Sep-2021 10:42:14.890 ^[[31mERROR^[[m [main] o.s.i.IgniteEntityManagerFactoryBean.buildNativeEntityManagerFactory Failed to initialize JPA EntityManagerFactory: Could not parse mapping document: jar:file:/opt/tomcat/tomcat9.0.53_ootb-master/lib/coursemanagement-hibernate-model-22-SNAPSHOT.jar!/org/sakaiproject/coursemanagement/impl/AcademicSessionCmImpl.hbm.xml (INPUT_STREAM)


29-Sep-2021 10:42:14.890 ^[[33mWARN^[[m [main] o.s.u.SakaiApplicationContext.refresh Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in file [/opt/tomcat/tomcat9.0.53_ootb-master/components/sakai-kernel-impl/WEB-INF/db-components.xml]: Invocation of init method failed; nested exception is org.hibernate.boot.InvalidMappingException: Could not parse mapping document: jar:file:/opt/tomcat/tomcat9.0.53_ootb-master/lib/coursemanagement-hibernate-model-22-SNAPSHOT.jar!/org/sakaiproject/coursemanagement/impl/AcademicSessionCmImpl.hbm.xml (INPUT_STREAM)


Further on things go downhill rapidly, leading to a large number of exception stack traces. The following edited stack trace is the first of those:


29-Sep-2021 10:42:15.303 [31mERROR[m [main] o.s.c.i.SpringCompMgr.init Error creating bean with name 'entityManagerFactory' defined in file [/opt/tomcat/tomcat9.0.53_ootb-master/components/sakai-kernel-impl/WEB-INF/db-components.xml]: Invocation of init method failed; nested exception is org.hibernate.boot.InvalidMappingException: Could not parse mapping document: jar:file:/opt/tomcat/tomcat9.0.53_ootb-master/lib/coursemanagement-hibernate-model-22-SNAPSHOT.jar!/org/sakaiproject/coursemanagement/impl/AcademicSessionCmImpl.hbm.xml (INPUT_STREAM)

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in file [/opt/tomcat/tomcat9.0.53_ootb-master/components/sakai-kernel-impl/WEB-INF/db-components.xml]: Invocation of init method failed; nested exception is org.hibernate.boot.InvalidMappingException: Could not parse mapping document: jar:file:/opt/tomcat/tomcat9.0.53_ootb-master/lib/coursemanagement-hibernate-model-22-SNAPSHOT.jar!/org/sakaiproject/coursemanagement/impl/AcademicSessionCmImpl.hbm.xml (INPUT_STREAM)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1786) ~[spring-beans-5.3.9.jar:5.3.9]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:602) ~[spring-beans-5.3.9.jar:5.3.9]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:524) ~[spring-beans-5.3.9.jar:5.3.9]

at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.9.jar:5.3.9]

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.9.jar:5.3.9]

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.9.jar:5.3.9]

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.9.jar:5.3.9]

at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1154) ~[spring-context-5.3.9.jar:5.3.9]

at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:908) ~[spring-context-5.3.9.jar:5.3.9]

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[spring-context-5.3.9.jar:5.3.9]

at org.sakaiproject.component.impl.SpringCompMgr.init(SpringCompMgr.java:164) 


-- SNIP --


Caused by: org.hibernate.boot.InvalidMappingException: Could not parse mapping document: jar:file:/opt/tomcat/tomcat9.0.53_ootb-master/lib/coursemanagement-hibernate-model-22-SNAPSHOT.jar!/org/sakaiproject/coursemanagement/impl/AcademicSessionCmImpl.hbm.xml (INPUT_STREAM)

at org.hibernate.boot.jaxb.internal.InputStreamXmlSource.doBind(InputStreamXmlSource.java:46) ~[hibernate-core-5.3.20.Final.jar:5.3.20.Final]

at org.hibernate.boot.jaxb.internal.InputStreamXmlSource.doBind(InputStreamXmlSource.java:38) ~[hibernate-core-5.3.20.Final.jar:5.3.20.Final]

at org.hibernate.boot.spi.XmlMappingBinderAccess.bind(XmlMappingBinderAccess.java:79) ~[hibernate-core-5.3.20.Final.jar:5.3.20.Final]

-- SNIP --


Caused by: org.hibernate.internal.util.config.ConfigurationException: Unable to build hbm.xml JAXBContext

at org.hibernate.boot.jaxb.internal.MappingBinder.hbmJaxbContext(MappingBinder.java:85) ~[hibernate-core-5.3.20.Final.jar:5.3.20.Final]

at org.hibernate.boot.jaxb.internal.MappingBinder.doBind(MappingBinder.java:62) ~[hibernate-core-5.3.20.Final.jar:5.3.20.Final]

-- SNIP --


Caused by: javax.xml.bind.JAXBException: Error while searching for service [javax.xml.bind.JAXBContextFactory]

at javax.xml.bind.ContextFinder$1.createException(ContextFinder.java:72) ~[jakarta.xml.bind-api-2.3.3.jar:2.3.3]

at javax.xml.bind.ContextFinder$1.createException(ContextFinder.java:69) ~[jakarta.xml.bind-api-2.3.3.jar:2.3.3]


-- SNIP --


Caused by: java.util.ServiceConfigurationError: javax.xml.bind.JAXBContextFactory: com.sun.xml.bind.v2.JAXBContextFactory not a subtype

at java.util.ServiceLoader.fail(ServiceLoader.java:589) ~[?:?]

at java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1237) ~[?:?]

at java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1265) ~[?:?]

at java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1300) ~[?:?]

at java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1385) ~[?:?]

at javax.xml.bind.ServiceLoaderUtil.firstByServiceLoader(ServiceLoaderUtil.java:39) ~[jakarta.xml.bind-api-2.3.3.jar:2.3.3]

at javax.xml.bind.ContextFinder.find(ContextFinder.java:354) ~[jakarta.xml.bind-api-2.3.3.jar:2.3.3]

at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:691) ~[jakarta.xml.bind-api-2.3.3.jar:2.3.3]

at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:632) ~[jakarta.xml.bind-api-2.3.3.jar:2.3.3]

at org.hibernate.boot.jaxb.internal.MappingBinder.hbmJaxbContext(MappingBinder.java:82) ~[hibernate-core-5.3.20.Final.jar:5.3.20.Final]

at org.hibernate.boot.jaxb.internal.MappingBinder.doBind(MappingBinder.java:62) ~[hibernate-core-5.3.20.Final.jar:5.3.20.Final]

at org.hibernate.boot.jaxb.internal.AbstractBinder.doBind(AbstractBinder.java:102) ~[hibernate-core-5.3.20.Final.jar:5.3.20.Final]

at org.hibernate.boot.jaxb.internal.AbstractBinder.bind(AbstractBinder.java:57) ~[hibernate-core-5.3.20.Final.jar:5.3.20.Final]

at org.hibernate.boot.jaxb.internal.InputStreamXmlSource.doBind(InputStreamXmlSource.java:43) ~[hibernate-core-5.3.20.Final.jar:5.3.20.Final]

at org.hibernate.boot.jaxb.internal.InputStreamXmlSource.doBind(InputStreamXmlSource.java:38) ~[hibernate-core-5.3.20.Final.jar:5.3.20.Final]

at org.hibernate.boot.spi.XmlMappingBinderAccess.bind(XmlMappingBinderAccess.java:79) ~[hibernate-core-5.3.20.Final.jar:5.3.20.Final]

at org.hibernate.boot.model.process.internal.ScanningCoordinator.applyScanResultsToManagedResources(ScanningCoordinator.java:220) ~[hibernate-core-5.3.20.Final.jar:5.3.20.Final]

at org.hibernate.boot.model.process.internal.ScanningCoordinator.coordinateScan(ScanningCoordinator.java:82) ~[hibernate-core-5.3.20.Final.jar:5.3.20.Final]

at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.prepare(MetadataBuildingProcess.java:99) ~[hibernate-core-5.3.20.Final.jar:5.3.20.Final]

at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.<init>(EntityManagerFactoryBuilderImpl.java:240) ~[hibernate-core-5.3.20.Final.jar:5.3.20.Final]

at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.<init>(EntityManagerFactoryBuilderImpl.java:168) ~[hibernate-core-5.3.20.Final.jar:5.3.20.Final]

at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:52) ~[spring-orm-5.3.9.jar:5.3.9]

at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:365) ~[spring-orm-5.3.9.jar:5.3.9]

at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:409) ~[spring-orm-5.3.9.jar:5.3.9]

at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:396) ~[spring-orm-5.3.9.jar:5.3.9]

at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:341) ~[spring-orm-5.3.9.jar:5.3.9]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1845) ~[spring-beans-5.3.9.jar:5.3.9]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1782) ~[spring-beans-5.3.9.jar:5.3.9]

... 59 more


--
Sean Horner
Senior Web Developer

Information & Technology Services
Pacific Lutheran University
Tacoma, WA 98447
Pronouns: he/him

I am currently working remotely.
For quickest response for Sakai support questions, email sa...@plu.edu, or create a Help Desk ticket at https://helpdesk.plu.edu.

Charles Severance

unread,
Sep 29, 2021, 2:06:01 PM9/29/21
to dev sakai, sean....@plu.edu
There was commit to master that resulted in exactly what you are seeing.  That commit has been reverted.  I would do a “git pull” and re-try before you change anything else :)

/Chuck

--
You received this message because you are subscribed to the Google Groups "Sakai Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sakai-dev+...@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/sakai-dev/CAJkC2Sdy4dysCwqvLeEpaxd%3DH7PZ2j%2BrYJnuHfrU20j3HOQgPQ%40mail.gmail.com.

Sean Horner

unread,
Sep 29, 2021, 2:13:43 PM9/29/21
to Charles Severance, dev sakai
Thanks for the tip. I'm pretty sure I had incorporated the "Revert SAK-43155..." commit if that is what you are referring to. If so, it's interesting that that commit resolved the startup issue for you. I'll try a new pull later today. (I currently have a rebuild underway with an older branch using java 8.)

Thanks,
Sean

Sean Horner

unread,
Sep 29, 2021, 5:09:39 PM9/29/21
to Charles Severance, sakai-dev
Thanks, Chuck. Unfortunately, I'm still encountering the same symptoms during startup despite incorporating the latest code (and doing so with clean builds from scratch). As of this writing, this includes all commits up to and including "Revert 'SAK-44853' Create unified UserMessagingService" (commit 16b0334).

Given this, I assume that something else in my setup or environment may be awry, presumably in my setenv.sh (pasted earlier in this thread). 

The only other thing that comes to mind is that I'm using an instance of MariaDB, version 10.1.48. (The sysadmins at our institution prefer MariaDB over MySQL.) With that said, I haven't observed noticeable problems related to database compatibility prior to the Java 11 switch, though I vaguely recall conversations regarding (eventual?) support for MySQL 8.

Sean    

On Wed, Sep 29, 2021 at 1:15 PM Charles Severance <cs...@umich.edu> wrote:
There is another revert that just went in.  It builds and starts.

/Chuck

Matthew Jones

unread,
Sep 29, 2021, 5:51:59 PM9/29/21
to sean....@plu.edu, Charles Severance, sakai-dev
I've never seen this message at startup but the mariadb driver is already included and we a few developers use this and it works rather than using the MySQL driver. Maybe there's some problem with that one or using both? 

ven...@org.sakaiproject.db.api.SqlService=mysql
driverC...@javax.sql.BaseDataSource=org.mariadb.jdbc.Driver
hibernate.dialect=org.hibernate.dialect.MariaDB103Dialect
u...@javax.sql.BaseDataSource=jdbc:mariadb://127.0.0.1:3306/sakai_master?useUnicode=true&characterEncoding=UTF-8

I'd check this jar file to make sure it's okay and the build was okay.

like unzip -l opt/tomcat/tomcat9.0.53_ootb-master/lib/coursemanagement-hibernate-model-22-SNAPSHOT.jar

Should show this xml file that's having a problem. You could unzip it and really look at AcademicSessionCmImpl.hbm.xml.

Sean Horner

unread,
Sep 29, 2021, 7:39:19 PM9/29/21
to Matthew Jones, Charles Severance, sakai-dev
Thanks for the leads, Matthew. Unfortunately, following those hasn't yet yielded a breakthrough. Not recognizing that a mariadb driver was already deployed-- good to know! -- I've since removed the other mysql driver from $CATALINA_HOME/lib and revised sakai.properties to refer to the mariadb driver, its dialect, etc. Unfortunately, the same error and exception symptoms occur during startup, regardless of using any of the following options for dialect:  

#hibernate.dialect=org.hibernate.dialect.MariaDB103Dialect
#hibernate.dialect=org.hibernate.dialect.MariaDB10Dialect
hibernate.dialect=org.hibernate.dialect.MariaDBDialect


Also, the bundled AcademicSessionCmImpl.hbm.xml I've unzipped from $CATALINA_HOME/lib/coursemanagement-hibernate-model-22-SNAPSHOT.jar looks fine. Using a diff, I observe that it matches the corresponding file from the source:

edu-services/cm-service/cm-impl/hibernate-impl/hibernate/src/hibernate/org/sakaiproject/coursemanagement/impl/AcademicSessionCmImpl.hbm.xml

Given that the root exception in the first stack trace is the following: 

Caused by: java.util.ServiceConfigurationError: javax.xml.bind.JAXBContextFactory: com.sun.xml.bind.v2.JAXBContextFactory not a subtype

... I'm wondering if the new CATALINA_OPTS prescribed in SAK-33595 are somehow not taking effect. 

For instance, in my tomcat setup (9.0.53), I've made no revisions to catalina.sh. With that said, I observe the following as the first line in catalina.out, which seems to derive from lines defining JDK_JAVA_OPTS in catalina.sh:

NOTE: Picked up JDK_JAVA_OPTIONS:  --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED

With that said, the following lines in catalina.out indicate the presence of the new, intended CATALINA_OPTS:

29-Sep-2021 16:12:11.920 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-exports=java.base/jdk.internal.misc=ALL-UNNAMED
29-Sep-2021 16:12:11.920 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-exports=java.base/sun.nio.ch=ALL-UNNAMED
29-Sep-2021 16:12:11.920 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-exports=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED
29-Sep-2021 16:12:11.920 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED
29-Sep-2021 16:12:11.921 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-exports=java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED
29-Sep-2021 16:12:11.921 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED
29-Sep-2021 16:12:11.921 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --illegal-access=permit



Matthew Jones

unread,
Sep 29, 2021, 8:14:28 PM9/29/21
to sean....@plu.edu, Charles Severance, sakai-dev
Hmm, I'm not seeing that. I wonder if it has something to do with the JDK version. I know there's a ton of JDK's out there now. My Java version that starts it is just the OpenJDK one. 

openjdk 11.0.12 2021-07-20
OpenJDK Runtime Environment 18.9 (build 11.0.12+7)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.12+7, mixed mode, sharing)


I believe you can install other ones with SDKMan? https://sdkman.io/jdks 

Earle mentioned this recently and it's what we're using on nightly, though nightly is using Temurin. 

I found this option on StackOverflow as a suggestion but it says it's only for Java 9 and 10, not sure if it'll do anything either. https://stackoverflow.com/a/43574427/3708872
--add-modules java.xml.bind

Sean Horner

unread,
Sep 30, 2021, 7:13:00 PM9/30/21
to Charles Severance, sakai-dev, Matthew Jones
Chuck, Matthew, 

Thank you both for your insights and tips on this. Much appreciated. 

Though I'm still untangling why my normal setup still can't get tomcat to start (despite repeatedly building into empty tomcat instances, local maven repos, and new git working directories, etc.), I've at least been able to get a proof-of-concept working today via https://github.com/csev/sakai-scripts.git on CentOS Linux. Hopefully, this will be enough to help me debug my normal build-deploy process. 

Thanks,
Sean  

On Thu, Sep 30, 2021 at 7:12 AM Charles Severance <cs...@umich.edu> wrote:
Sean,

I spent yesterday (with master broken two times) testing things over and over and over to the point where I am pretty sure I can predictably make Sakai master work with Java 11 four different ways.  I send a dev list note and made a blog post.  You can use my stuff or Matt’s stuff or just look at my stuff and borrow all my bits.

https://www.dr-chuck.com/csev-blog/2021/09/sakai-development-moving-to-java-11/

I would suggest that you start with a fresh Tomcat and a fresh master.   There are little messed up bits like “endorsed” that were not fixed in the big merge but were fixed in the past few days.

I hope this helps.

I want to make this all easier and Matt’s docker and my scripts keep evolving and becoming more useful and reliable.

/Chuck

P.S. Thanks Matt for all the help.

Earle Nietzel

unread,
Oct 4, 2021, 5:12:04 PM10/4/21
to sean....@plu.edu, Charles Severance, sakai-dev, Matthew Jones
Hi Sean,

Were you able to get things going with jdk 11?


-earle


--
You received this message because you are subscribed to the Google Groups "Sakai Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sakai-dev+...@apereo.org.

Matthew Jones

unread,
Oct 4, 2021, 5:20:30 PM10/4/21
to Earle Nietzel, Sean Horner, Charles Severance, sakai-dev
It sounds like if he used Chuck's scripts he was able to get it going with sdkman and 11.0.12-tem at least. It does look like there's lots of distributions of Java/JDK out there now.

I had this issue starting up with OpenJDK with the Slim docker image and profile not working. The regular (non-slim) images worked. Looks like this is a known issue for some of the distributions too and missing libraries.
NoClassDefFoundError: Could not initialize class sun.awt.X11FontManager

I briefly looked at profile to see if this could be removed but not sure if there's any replacement libraries available. Guess it's not a big deal if it works after installing these system libraries. I'm not sure what Sean's issue was with the Red hat JDK. We probably should make a recommendation on which one(s) to use. https://sdkman.io/jdks

I've tested only OpenJDK (jdk.java.net) and Temurin (Eclipse)

Sean Horner

unread,
Oct 4, 2021, 5:59:32 PM10/4/21
to Earle Nietzel, Charles Severance, sakai-dev, Matthew Jones
Thanks for checking in, Earle. Yes, as of Friday, I was fortunately able to get tomcat to start normally with Java 11 builds. I adapted a few slight differences evident in Chuck's scripts to the build-deploy-start-stop scripts we use at our institution. 

However, I was not successful in isolating the root cause of the start failures I experienced-- beyond those that were already cited in this thread stemming from source code commits that were subsequently reverted. I can only speculate that there might have been some weird "cache" in my build process that deployed remnants of the problematic source despite repeated start-from-scratch attempts from git repo through new (empty) tomcat deployments. 

Also fwiw, I'm currently using the original CentOS/RedHad managed jdk that I had been using when the problems occurred, though now without any issues. (When using Chuck's scripts, I did use the 'tem' flavor of jdk.) As our institution eventually moves to Oracle Linux (because of CentOS end-of-life), I'll make a note of any issues experienced with its OS-managed jdk.

Thanks,
Sean

mpellicer

unread,
Nov 4, 2022, 7:00:45 AM11/4/22
to Sakai Development, Sean Horner, sakai-dev
Hi Sean, I know this is an old thread but I just encountered the same issue in a CentOS 8 server, I've raised https://sakaiproject.atlassian.net/browse/SAK-48018 to follow up the issue. I don't think anybody will ever work on this, but if I find a solution I'll document the fix in the Jira for future consultation.

Did you resolve it one year ago or you finally opted for an alternative environment?

Regards!

Sean Horner

unread,
Nov 4, 2022, 1:24:46 PM11/4/22
to mpellicer, Sakai Development
Hello Miguel,

Following the thread in SAK-48018, I infer you resolved this issue with Earle. Let me know otherwise.

Sean 

Ernesto Miranda R.

unread,
Nov 4, 2022, 2:08:07 PM11/4/22
to saka...@apereo.org

Hello Miguel, I managed to get Sakai 22.1 up and running with Java 11.0.17 on AlmaLinux 9... The problem was indeed due to the combination of Centos 8 and Java 11. Now its running without problems..

Regards.

El 04-11-22 a las 14:24, Sean Horner escribió:

Miguel Pellicer

unread,
Nov 7, 2022, 5:19:24 AM11/7/22
to horn...@plu.edu, Sakai Development

Exactly Sean, it's working now after applying SAK-47417 and SAK-47436 to our 22.x branch, this is also part of 22.x now.

Miguel

-- 
-----------------------------------------------
Miguel Pellicer
CTO at EDF

Website: https://www.edf.global
LinkedIn: https://es.linkedin.com/company/entornosdeformacion
LinkedIn: https://www.linkedin.com/in/mpellicer-edf
Office Phone: +34 - 96 381 35 75
Request a meeting here: https://calendly.com/mpellicer
-----------------------------------------------

Su dirección de correo electrónico junto a sus datos personales consta en un fichero cuya finalidad es la de mantener el contacto profesional con Ud. Por ENTORNOS DE FORMACIÓN S.L., como responsable del Fichero y del Tratamiento. De conformidad con el Reglamento (UE) núm. 2016/679, General de Protección de Datos y la LO 3/2018, de 5 de diciembre, de Protección de Datos Personales y garantía de los derechos digitales, puede ejercer de forma totalmente gratuita los derechos de acceso, información, rectificación, supresión y olvido, limitación del tratamiento, oposición, portabilidad y a no ser objeto de decisiones individuales automatizadas enviando un correo electrónica a la siguiente dirección: in...@edf.global Si no desea recibir información por correo electrónico notifiquenoslo en esta misma dirección. Aviso sobre confidencialidad: Este documento se dirige exclusivamente a su destinatario. Por contener información confidencial, sometida a secreto profesional cuya divulgación está prohibida en virtud de la legislación vigente. Se informa a quien lo recibiera, sin ser el destinatario, que la información contenida en el mismo es reservada y su utilización con cualquier fin está prohibida. Si ha recibido este documento por error, le rogamos nos lo comunique y proceda a su destrucción.

Your e-mail address and your data are stored in a file to maintain professional contact between you and ENTORNOS DE FORMACIÓN S.L., as the party responsible for the file and the processing. In accordance with Regulation (EU) No. 2016/679, General Data Protection and the OL 3/2018 of 5th December, to guarantee digital rights, you can exercise free of charge the rights of access, information, rectification, deletion and oblivion, limitation of processing, opposition, portability and the right of you are not subject to automated individual decisions, by sending an e-mail to the following address: in...@edf.global. If you do not wish to receive information by e-mail, please notify us at the same address. Confidentiality notice: This document is addressed exclusively to the addressee. If you have received this document in error, please inform us and destroy it.

Miguel Pellicer

unread,
Nov 7, 2022, 5:21:31 AM11/7/22
to Ernesto Miranda R., saka...@apereo.org

Thanks for confirming Ernesto, after the latest changes it's now working on CentOS 8, so you can choose to stay with CentOS 8 or use AlmaLinux.

Miguel

Reply all
Reply to author
Forward
0 new messages