openequella / openEQUELLA

Core openEQUELLA sources
https://openequella.github.io/
Apache License 2.0
42 stars 44 forks source link

chore: upgrade sttp #1481

Closed cbeach47 closed 4 years ago

cbeach47 commented 4 years ago

Upgrade com.softwaremill.sttp

Changelog / release notes are proving elusive. Beset I could find is: https://github.com/softwaremill/sttp/commits/v1

cbeach47 commented 4 years ago

While sttp is using the fs2 backend, it appears to be a transitive dependency ( https://sttp.readthedocs.io/en/v1/backends/asynchttpclient.html ) . The fs2-io dependency looks to be for a separate purpose ( referenced in WizardApi ). It appears like the two are unrelated in terms of compatible version requirements.

cbeach47 commented 4 years ago

Nothing stood out as problematic going from 1.6.4 (current) to 1.7.2 (latest in the v1 series).

compile succeeded, however, equellaserver/run failed to launch the institutions.do page and threw the following. io.circle is at 0.11.x and the latest version is 0.12.y but not convinced an upgrade is what it needs.

java.lang.ClassNotFoundException: io.circe.ObjectEncoder
    at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:419)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:352)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:757)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:419)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:352)
    at org.java.plugin.standard.StandardPluginClassLoader.loadClass(StandardPluginClassLoader.java:407)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:352)
    at com.tle.core.db.tables.AuditLogMeta$.iso(AuditLogEntry.scala:30)
    at com.tle.core.db.DBSchema.$init$(DBSchema.scala:66)
    at com.tle.core.db.PostgresSchema$.<init>(PostgresSchema.scala:31)
    at com.tle.core.db.PostgresSchema$.<clinit>(PostgresSchema.scala)
    at com.tle.core.db.DBSchema$.schemaForDBType$lzycompute(DBSchema.scala:200)
    at com.tle.core.db.DBSchema$.schemaForDBType(DBSchema.scala:197)
    at com.tle.core.db.DBSchema$.queries(DBSchema.scala:210)
    at com.tle.core.settings.SettingsDB$.<init>(SettingsDB.scala:37)
    at com.tle.core.settings.SettingsDB$.<clinit>(SettingsDB.scala)
    at com.tle.web.settings.UISettings$.<init>(UISettings.scala:42)
    at com.tle.web.settings.UISettings$.<clinit>(UISettings.scala)
    at com.tle.web.template.RenderNewTemplate$.$anonfun$isNewLayout$5(RenderNewTemplate.scala:97)
    at scala.runtime.java8.JFunction0$mcZ$sp.apply(JFunction0$mcZ$sp.java:12)
    at scala.Option.getOrElse(Option.scala:121)
    at com.tle.web.template.RenderNewTemplate$.$anonfun$isNewLayout$1(RenderNewTemplate.scala:100)
    at scala.runtime.java8.JFunction0$mcZ$sp.apply(JFunction0$mcZ$sp.java:12)
    at scala.Option.getOrElse(Option.scala:121)
    at com.tle.web.template.RenderNewTemplate$.isNewLayout(RenderNewTemplate.scala:88)
    at com.tle.web.template.RenderNewTemplate.isNewLayout(RenderNewTemplate.scala)
    at com.tle.web.template.RenderTemplate.renderHtml(RenderTemplate.java:141)
    at com.tle.web.sections.render.HtmlRendererListener.render(HtmlRendererListener.java:46)
    at com.tle.web.sections.events.RenderEvent.fire(RenderEvent.java:74)
    at com.tle.web.sections.events.RenderEvent.fire(RenderEvent.java:26)
    at com.tle.web.sections.generic.DefaultSectionInfo.processEvent(DefaultSectionInfo.java:471)
    at com.tle.web.sections.generic.DefaultSectionInfo.processEvent(DefaultSectionInfo.java:394)
    at com.tle.web.sections.registry.AbstractSectionsController.renderFromRoot(AbstractSectionsController.java:69)
    at com.tle.web.sections.registry.AbstractSectionsController.renderForward(AbstractSectionsController.java:59)
    at com.tle.web.sections.registry.AbstractSectionsController.execute(AbstractSectionsController.java:45)
    at com.tle.web.sections.registry.SectionsServlet.service(SectionsServlet.java:71)
    at com.tle.web.sections.equella.MultipartSectionsServlet.service(MultipartSectionsServlet.java:48)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
    at com.tle.web.dispatcher.ServletDispatcher.dispatch(ServletDispatcher.java:95)
    at com.tle.web.dispatcher.RequestDispatchFilter.doFilter(RequestDispatchFilter.java:91)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:543)
    at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:747)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:609)
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:810)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1623)
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
cbeach47 commented 4 years ago

Actually, according to the sttp pom it needs circe 0.12.1 at least ( https://repo1.maven.org/maven2/com/softwaremill/sttp/circe_2.13/1.7.2/circe_2.13-1.7.2.pom ).

Unfortunately, the upgrade didn't upgrade all the transitive deps that I was hoping for, so I'm holding off on submitting a PR for now. The relavent bits to change in the equellaserver/build.sbt:

...
val circeVersion     = "0.12.3"
val jsoupVersion     = "1.11.3"
val sttpVersion      = "1.7.2"
val fs2Version       = "1.0.5"
val jsassVersion     = "5.3.0"

libraryDependencies ++= Seq(
  "io.circe"                       %% "circe-core"                    % circeVersion,
  "io.circe"                       %% "circe-generic"                 % circeVersion,
  "io.circe"                       %% "circe-parser"                  % circeVersion,
// Note: As of 0.12.2, circe-generic-extras lives in it's own repo and it's versioning is
//       not necessarily in sync with the the io.circe libraries
  "io.circe"                       %% "circe-generic-extras"          % "0.12.2",
  "co.fs2"                         %% "fs2-io"                        % fs2Version,
  "com.softwaremill.sttp"          %% "core"                          % sttpVersion,
  "com.softwaremill.sttp"          %% "async-http-client-backend-fs2" % sttpVersion,
  "com.softwaremill.sttp"          %% "circe"                         % sttpVersion,
...
stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.