Skip to content
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

ProjectBuildLogAppender not found when starting the daemon #165

Closed
ppalaga opened this issue Oct 27, 2020 · 1 comment · Fixed by #166
Closed

ProjectBuildLogAppender not found when starting the daemon #165

ppalaga opened this issue Oct 27, 2020 · 1 comment · Fixed by #166
Assignees
Milestone

Comments

@ppalaga
Copy link
Contributor

ppalaga commented Oct 27, 2020

Reproducible via mvnd -v. The following is looged on the server:

09:23:23,083 |-ERROR in ch.qos.logback.core.joran.action.AppenderAction - Could not create an Appender of type [org.jboss.fuse.mvnd.logging.smart.ProjectBuildLogAppender]. ch.qos.logback.core.util.DynamicClassLoadingException: Failed to instantiate type org.jboss.fuse.mvnd.logging.smart.ProjectBuildLogAppender
	at ch.qos.logback.core.util.DynamicClassLoadingException: Failed to instantiate type org.jboss.fuse.mvnd.logging.smart.ProjectBuildLogAppender
	at 	at ch.qos.logback.core.util.OptionHelper.instantiateByClassNameAndParameter(OptionHelper.java:69)
	at 	at ch.qos.logback.core.util.OptionHelper.instantiateByClassName(OptionHelper.java:45)
	at 	at ch.qos.logback.core.util.OptionHelper.instantiateByClassName(OptionHelper.java:34)
	at 	at ch.qos.logback.core.joran.action.AppenderAction.begin(AppenderAction.java:52)
	at 	at ch.qos.logback.core.joran.spi.Interpreter.callBeginAction(Interpreter.java:269)
	at 	at ch.qos.logback.core.joran.spi.Interpreter.startElement(Interpreter.java:145)
	at 	at ch.qos.logback.core.joran.spi.Interpreter.startElement(Interpreter.java:128)
	at 	at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:50)
	at 	at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:165)
	at 	at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:152)
	at 	at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:110)
	at 	at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:53)
	at 	at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:75)
	at 	at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:150)
	at 	at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:84)
	at 	at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55)
	at 	at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
	at 	at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
	at 	at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:412)
	at 	at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:357)
	at 	at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:383)
	at 	at org.jboss.fuse.mvnd.common.Environment.<clinit>(Environment.java:57)
	at 	at org.jboss.fuse.mvnd.common.MavenDaemon.main(MavenDaemon.java:33)
Caused by: java.lang.ClassNotFoundException: org.jboss.fuse.mvnd.logging.smart.ProjectBuildLogAppender
	at 	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:602)
	at 	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
	at 	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
	at 	at ch.qos.logback.core.util.OptionHelper.instantiateByClassNameAndParameter(OptionHelper.java:56)
	at 	... 22 common frames omitted

The stack trace was mentioned in #152 which seems to be about another problem.

@ppalaga ppalaga self-assigned this Oct 27, 2020
@ppalaga
Copy link
Contributor Author

ppalaga commented Oct 27, 2020

org.jboss.fuse.mvnd.common.Environment is the only class that wants to log something from the daemon's boot class path. It does not work, because mvnd-daemon.jar (that includes ProjectBuildLogAppender) is not there.

I think it would be cleaner to let org.jboss.fuse.mvnd.common.Environment to log to System.out and remove slf4j-api and logback-* from the boot classpath of the daemon (see https://github.com/mvndaemon/mvnd/blob/master/client/src/main/java/org/jboss/fuse/mvnd/client/DaemonConnector.java#L258-L259 )
rather than add mvnd-daemon to the boot class path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant