MUFLifetimeManager.startFramework(..) requires old "saracommons" on downstream classpath, causing NoClassDefFoundError
Closed this issue · 1 comments
After removing the old and erroneous "saracommons" dependency from our own code, MUFLifeTimeManager.startFramework(..)
throws a NoClassDefFoundError
, presumably due to it requiring edu.cmu.inmind.multiuser.common.model.UserModel
.
However, that class is specific to the "Sara" InMind Movie Application and in fact that version from saracommons is incompatible with the new application; Saracommons should not be on the classpath of any MUF artifacts.
2018-05-14 10:30:26,864 INFO SaraServerMainClass - Starting MUF listening on "tcp://128.237.99.154".
Exception in thread "main" java.lang.NoClassDefFoundError: edu/cmu/inmind/multiuser/common/model/UserModel
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.getDeclaredMethods(Class.java:1975)
at com.google.inject.spi.InjectionPoint.getInjectionPoints(InjectionPoint.java:688)
at com.google.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:380)
at com.google.inject.internal.ConstructorBindingImpl.getInternalDependencies(ConstructorBindingImpl.java:165)
at com.google.inject.internal.InjectorImpl.getInternalDependencies(InjectorImpl.java:616)
at com.google.inject.internal.InjectorImpl.cleanup(InjectorImpl.java:572)
at com.google.inject.internal.InjectorImpl.initializeJitBinding(InjectorImpl.java:558)
at com.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:887)
at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:808)
at com.google.inject.internal.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:285)
at com.google.inject.internal.InjectorImpl.getBindingOrThrow(InjectorImpl.java:217)
at com.google.inject.internal.InjectorImpl.getInternalFactory(InjectorImpl.java:893)
at com.google.inject.internal.FactoryProxy.notify(FactoryProxy.java:46)
at com.google.inject.internal.ProcessedBindingData.runCreationListeners(ProcessedBindingData.java:50)
at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:134)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:107)
at com.google.inject.Guice.createInjector(Guice.java:99)
at com.google.inject.Guice.createInjector(Guice.java:73)
at com.google.inject.Guice.createInjector(Guice.java:62)
at edu.cmu.inmind.multiuser.controller.resources.DependencyManager.initialize(DependencyManager.java:33)
at edu.cmu.inmind.multiuser.controller.resources.DependencyManager.getInstance(DependencyManager.java:23)
at edu.cmu.inmind.multiuser.controller.session.SessionManager.<init>(SessionManager.java:63)
at edu.cmu.inmind.multiuser.controller.muf.MultiuserController.<init>(MultiuserController.java:51)
at edu.cmu.inmind.multiuser.controller.muf.MUFLifetimeManager.startFramework(MUFLifetimeManager.java:35)
at edu.cmu.inmind.multiuser.sara.MainClassBase.execute(MainClassBase.java:51)
at edu.cmu.inmind.multiuser.sara.SaraServerMainClass.main(SaraServerMainClass.java:42)
Caused by: java.lang.ClassNotFoundException: edu.cmu.inmind.multiuser.common.model.UserModel
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 28 more
2018-05-14 10:30:27,085 FrameworkShutdownThread-tcp://128.237.99.1545555 WARN Unable to register Log4j shutdown hook because JVM is shutting down. Using SimpleLogger
Disconnected from the target VM, address: '127.0.0.1:33555', transport: 'socket'
java.lang.NullPointerException
at edu.cmu.inmind.multiuser.controller.muf.MultiuserController.close(MultiuserController.java:131)
at edu.cmu.inmind.multiuser.controller.muf.MultiuserController.stop(MultiuserController.java:114)
at edu.cmu.inmind.multiuser.controller.muf.MultiuserController$1.run(MultiuserController.java:84)
Todd, there is no dependency to saracommons in MUF at all. The error you are getting is due to dependency injection. So, you need to check you are not using "edu.cmu.inmind.multiuser.common.model.UserModel" in your config.properties file, on your createModules method in your main class, or somewhere else.