-
Notifications
You must be signed in to change notification settings - Fork 177
Closed
Description
So #742 did happen to fix the osgi corrupted jar issue however now with the jar being successfully loaded there appears to be another unrelated bug that is due to how the classes are laid out in the jar, i.e.
[error] Test suite org.apache.pekko.http.scaladsl.server.directives.RespondWithDirectivesSpec failed with java.lang.NoClassDefFoundError: org/apache/pekko/protobufv3/internal/MessageLite.
[error] This may be due to the ClassLoaderLayeringStrategy (ScalaLibrary) used by your task.
[error] To improve performance and reduce memory, sbt attempts to cache the class loaders used to load the project dependencies.
[error] The project class files are loaded in a separate class loader that is created for each test run.
[error] The test class loader accesses the project dependency classes using the cached project dependency classloader.
[error] With this approach, class loading may fail under the following conditions:
[error]
[error] * Dependencies use reflection to access classes in your project's classpath.
[error] Java serialization/deserialization may cause this.
[error] * An open package is accessed across layers. If the project's classes access or extend
[error] jvm package private classes defined in a project dependency, it may cause an IllegalAccessError
[error] because the jvm enforces package private at the classloader level.
[error]
[error] These issues, along with others that were not enumerated above, may be resolved by changing the class loader layering strategy.
[error] The Flat and ScalaLibrary strategies bundle the full project classpath in the same class loader.
[error] To use one of these strategies, set the ClassLoaderLayeringStrategy key
[error] in your configuration, for example:
[error]
[error] set http-tests / Test / classLoaderLayeringStrategy := ClassLoaderLayeringStrategy.ScalaLibrary
[error] set http-tests / Test / classLoaderLayeringStrategy := ClassLoaderLayeringStrategy.Flat
[error]
[error] See ClassLoaderLayeringStrategy.scala for the full list of options.
[error] Test suite org.apache.pekko.http.scaladsl.server.RouteResultSpec failed with java.lang.NoClassDefFoundError: org/apache/pekko/protobufv3/internal/MessageLite.
Which is an exert from https://github.com/apache/incubator-pekko-http/actions/runs/6555330770/job/17803594748 .
Ininitial suspicions that this may be due to sbt-assembler but more work is needed to isolate. I will backport #742 onto the 1.0.x branch to confirm the theory that its no longer related to osgi.
Metadata
Metadata
Assignees
Labels
No labels