Issue
Release is run in a container environment with Release 10.3.3 hooked up to an external database, which is also running in a container (postgres:10.17-buster)
When we try to download the metrics plugin from https://github.com/xebialabs-community/xl-metrics-plugin/releases/download/v1.3.0/xl-metrics-plugin-1.3.0.jar and copy it to xl-release-server/plugins/__local__ and also when tried with xl-release-server/plugins/xlr-official, when we restart the container the below log output is observed:
2022-04-27 13:59:58.376 [main] {} ERROR o.s.boot.SpringApplication - Application run failed
org.springframework.context.ApplicationContextException: Unable to start web server; nested exception
is org.springframework.boot.web.server.WebServerException: Unable to start embedded Jetty web
server
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(Servlet
WebServerApplicationContext.java:163)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.
java:577)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWeb
ServerApplicationContext.java:145)
.........
Caused by: org.springframework.boot.web.server.WebServerException: Unable to start embedded Jetty web
server
at org.springframework.boot.web.embedded.jetty.JettyWebServer.initialize(JettyWebServer.java:129)
at org.springframework.boot.web.embedded.jetty.JettyWebServer.<init>(JettyWebServer.java:90)
at org.springframework.boot.web.embedded.jetty.JettyServletWebServerFactory.getJettyWebServer(Jetty
ServletWebServerFactory.java:429)
at org.springframework.boot.web.embedded.jetty.JettyServletWebServerFactory.getWebServer(JettyServlet
WebServerFactory.java:170)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer
(ServletWebServerApplicationContext.java:182)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(Servlet
WebServerApplicationContext.java:160)
... 7 common frames omitted
Caused by: java.lang.NoClassDefFoundError: scala/Serializable
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:878)
at com.xebialabs.xlrelease.plugin.classloading.XlrPluginClassLoader.protected$defineClass(XlrPlugin
ClassLoader.scala:80)
at com.xebialabs.xlrelease.plugin.classloading.XlrPluginClassLoader.$anonfun$loadClassFromUrl$2(Xlr
PluginClassLoader.scala:80)
at com.xebialabs.xlplatform.utils.ResourceManagement$.using(ResourceManagement.scala:54)
at com.xebialabs.xlrelease.plugin.classloading.XlrPluginClassLoader.loadClassFromUrl(XlrPluginClass
Loader.scala:74)
at com.xebialabs.xlrelease.plugin.classloading.XlrPluginClassLoader.$anonfun$findClass$3(XlrPlugin
ClassLoader.scala:61)
at scala.Option.map(Option.scala:242)
at com.xebialabs.xlrelease.plugin.classloading.XlrPluginClassLoader.$anonfun$findClass$2(XlrPlugin
ClassLoader.scala:61)
at com.xebialabs.xlplatform.utils.PerformanceLogging.logWithTime(PerformanceLogging.scala:11)
at com.xebialabs.xlplatform.utils.PerformanceLogging.logWithTime$(PerformanceLogging.scala:9)
at com.xebialabs.xlrelease.plugin.classloading.XlrPluginClassLoader.logWithTime(XlrPluginClassLoader
.scala:56)
at com.xebialabs.xlrelease.plugin.classloading.XlrPluginClassLoader.findClass(XlrPluginClassLoader.
scala:59)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
at com.xebialabs.xlplatform.metrics.MetricsProtocol.$init$(Metrics.scala:30)
at com.xebialabs.xlplatform.metrics.MetricsRoute.<init>(MetricsRoute.scala:29)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessor
Impl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructor
AccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at java.base/java.lang.Class.newInstance(Class.java:584)
at com.xebialabs.xlplatform.endpoints.routes.ScalaExtensionRoute.$anonfun$codedExtensionRoutes$2(Scala
ExtensionRoute.scala:23)
at scala.collection.immutable.List.map(List.scala:246)
at scala.collection.immutable.List.map(List.scala:79)
at com.xebialabs.xlplatform.endpoints.routes.ScalaExtensionRoute.codedExtensionRoutes(ScalaExtension
Route.scala:20)
at com.xebialabs.xlplatform.endpoints.routes.ScalaExtensionRoute.codedExtensionRoutes$(ScalaExtension
Route.scala:16)
at com.xebialabs.xlplatform.endpoints.servlet.ServletBoot.codedExtensionRoutes(ServletBoot.scala:10)
at com.xebialabs.xlplatform.endpoints.routes.ScalaExtensionRoute.codedExtensionRoutes(ScalaExtension
Route.scala:50)
at com.xebialabs.xlplatform.endpoints.routes.ScalaExtensionRoute.codedExtensionRoutes$(ScalaExtension
Route.scala:49)
... 12 common frames omitted
Caused by: java.lang.ClassNotFoundException: A plugin could not be loaded due to a missing class
(scala.Serializable).
Please remove the offending plugin to successfully start the server.Classes related to JCR were
removed from the server
because of the migration from JCR to SQL.If the plugin depends on these classes and its functionality
is required, please contact support to fix your configuration.scala.Serializable not found
at com.xebialabs.xlrelease.plugin.classloading.XlrPluginClassLoader.$anonfun$findClass$4(XlrPlugin
ClassLoader.scala:67)
at scala.Option.getOrElse(Option.scala:201)
at com.xebialabs.xlrelease.plugin.classloading.XlrPluginClassLoader.$anonfun$findClass$2(XlrPlugin
ClassLoader.scala:63)
at com.xebialabs.xlplatform.utils.PerformanceLogging.logWithTime(PerformanceLogging.scala:11)
... 67 common frames omitted
Workaround/Resolution Action
If you see these errors during startup, it might be because the plugin needs an update and it has to be recompiled in JDK11 because the Java version of the latest Release application is JDK 11.
Comments
Please sign in to leave a comment.