question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

UnsupportedClassVersionError When connecting drawio to self-hosted GitLab instance

See original GitHub issue

Preflight Checklist

  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for a feature request that matches the one I want to file, without success.

Describe the bug We recently updated our GitLab to version 15.1.0-ee, and drawio to version 20.0.4 (running in a docker container). With these updates, drawio can no longer connect to GitLab. (We were using GitLab 14.8.2-ee and drawio version 14.0.3, and these were working fine.)

I spent lots of time digging, checking other issues (https://github.com/jgraph/drawio/issues/2192 , https://github.com/jgraph/drawio/issues/2474) get to the bottom of this bug and updated several things following what other people have tried to try to get it to work:

  • ensured that all our self-signed certificates are both on the gitlab server and in the drawio container
    • these work, I can curl gitlab from drawio and vice versa without any issues.
  • ensured that my gitlab application settings are correct
    • callback to https://diagrams.xxxxxxx.local/gitlab (no .html at the end, and using https)
    • application has the correct scopes (api, read_repository, write_repository)
  • set all the correct environment variables in my docker container:
DRAWIO_GITLAB_URL=https://gitlab.xxxxxxx.local
DRAWIO_GITLAB_ID=9b0axxxxxxxxxxxxxxxxxxxxxxxxxxda0a4aeb21c518fcad78517b26b
DRAWIO_GITLAB_SECRET=3867f5xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx96fc353da7ebb562696
DRAWIO_BASE_URL=https://diagrams.xxxxxxxx.local

And when I spin up the drawio page and try to connect, it raises an “Unknown error”. If I inspect the page and look at the actual request, I see that drawio tried to access endpoint https://diagrams.xxxxxxx.local/gitlab?getState=1 and returns a 500 error:

Exception

jakarta.servlet.ServletException: Error instantiating servlet class [com.mxgraph.online.GitlabAuthServlet]
	org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542)
	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
	org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:690)
	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:356)
	org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)
	org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
	org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:867)
	org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1760)
	org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
	org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
	org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	java.lang.Thread.run(Thread.java:750)
Root Cause

java.lang.UnsupportedClassVersionError: com/mxgraph/online/GitlabAuthServlet has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0 (unable to load class [com.mxgraph.online.GitlabAuthServlet])
	org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2515)
	org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:877)
	org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1413)
	org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1257)
	org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542)
	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
	org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:690)
	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:356)
	org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)
	org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
	org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:867)
	org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1760)
	org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
	org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
	org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	java.lang.Thread.run(Thread.java:750)

Note: any subsequent attempts to connect raise a 404. I can only get the 500 error on the first connection attempt when I startup the container.

And at this point, I’m very far down the rabbit hole, I don’t know what to do anymore… Any help is greatly appreciated.

To Reproduce Steps to reproduce the behavior:

  1. Install GitLab 15.1.0-ee (on an Ubuntu 20.04.4 LTS machine)
  2. Create an application for drawio
  3. Install drawio 20.0.4 in a docker container
  4. add the application credentials in the container’s environment variables when starting it
  5. Install self-signed certificates on GitLab server and drawio container
  6. Try to connect to gitlab in the drawio page

Expected behavior Successful connection to gitlab to see, edit, and commit diagrams to repository D Screenshots image image image

draw.io version (In the Help->About menu of the draw.io editor):

  • draw.io version 20.0.4 (running in docker container)

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
davidjgraphcommented, Jun 30, 2022

Oh, that’s not right, we’ll look.

0reactions
m-mohamedincommented, Jul 14, 2022

Will be fixed in the next release. A manual fix is here https://github.com/jgraph/drawio/issues/2932

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Setup Draw.io To Save To Your Own GitLab Instance
Something went wrong while fetching related merge requests. Closed. Open.
Read more >
Untitled
Mega driver 3, Xdm 9mm 3.8 weight, Music week miami 2013, Zoey 101 10 year anniversary, History repeating itself example, Medium season 1...
Read more >
Bug List
493355, min, P1, eneufeld, CLOS, WONT, Offer the user a choice where to create the new instance when using DefaultReferenceService, 1.8.0, backlog.
Read more >
Untitled
Paso el tiempo rock bones youtube, Ssh 22 connection timed out? ... Jdbc oracle eclipse example, The document speaks for itself lyrics, Burgalesa...
Read more >
Multiple requests at a time java - Caritas Castellaneta
Practically, however, most web containers have connection pools, and can take only so many ... Java Server Socket Example #1: Time Server.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found