Skip to content

Shutdown Hook in BundledCompilerFactory causes NoClassDefFoundError #462

Open
@jbb01

Description

@jbb01

I'm trying to run the embedded host from a maven plugin. The build succeeds, but after the BUILD SUCCESS message an error occurs during the shutdown hook running the DirCleaner for the temporary directory containing the bundled dart executable.

Exception in thread "Thread-1" java.lang.NoClassDefFoundError: de/larsgrefer/sass/embedded/bundled/DirCleaner$DeletingFileVisitor
	at de.larsgrefer.sass.embedded.bundled.DirCleaner.run(DirCleaner.java:23)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.ClassNotFoundException: de.larsgrefer.sass.embedded.bundled.DirCleaner$DeletingFileVisitor
	at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
	at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
	... 2 more

This appears to be a common problem when using shutdown hooks from inside maven plugins.

A method for running and removing the shutdown hook inside BundledCompilerFactory would probably solve the problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions