-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Valid use of SDK causes workflow manager startup exception and failure #26
Comments
FWIW, I've worked on projects in the past where the Reflections library was used, and it constantly caused us problems. I'd suggest replacing the use of Reflections with the standard Java SPI API, which is quite easy to use, has very low overhead, and doesn't suffer from I'm willing to write a PR if you're open to this approach. Edit: custom categories is logged under #15. |
To further malign Reflections |
Gripes about Reflections aside, this is part of the bug: seahorse/seahorse-workflow-executor/deeplang/src/main/scala/ai/deepsense/deeplang/TypeUtils.scala Line 31 in c1b2e66
By using the |
* Use originating mirror for types instantiated from TypeTag. Fix for #26 * Propagated TypeTag/mirror provenance further through APIs. Tried to minimize changes more than a single type away from TypeUtils. Signed-off-by: Simeon H.K. Fitch <fitch@astraea.io> * Removed unused imports. Signed-off-by: Simeon H.K. Fitch <fitch@astraea.io> * Change version to 1.4.3-SNAPSHOT * Fixed incorrect selection of "boot" ClassLoader instead of application ClassLoader. Signed-off-by: Simeon H.K. Fitch <fitch@astraea.io>
The test at the following repo and branch causes a
ClassNotFoundException
.https://github.com/metasim/seahorse-test/tree/classloader-bug
To reproduce, run
sbt assembly
and copy the resulting jar to the$SEAHORSE/jars
directory.My suspicion is that this is due to custom operation code being loaded in a separate class loader (via the
CatalogScanner
) that what was used to load the SDK classes, but then a SDK class attempts to instantiate a class in that class loader from the parentClassLoader
. But I'm not 100% sure of this. It's the only reason I can think of why the class can't be found even though it is most certainly in the jar file with theRegister
'd operation.The relevant part of the stack trace is this:
As you can see, the class
TestTransformerAsOp
is loaded, the constructor gets called, and then the super typeTransfomerAsOperation
constructor is called. It in turn attempts to create an instance of its type parameter, as captured via aTypeTag
. ThroughTypeUtils
an instance fetched, but fails to be found bysun.misc.Launcher$AppClassLoader.loadClass
, which is the rootClassLoader
.IMHO, this is a critical bug because there's no possible workaround.
The text was updated successfully, but these errors were encountered: