com.google.inject.CreationException: не удалось создать инжектор, смотрите следующие ошибки - PullRequest
0 голосов
/ 04 декабря 2018

Я создал проект в Магнолии на ПК, и теперь мне пришлось перейти на другой.Когда я установил evertything и попытался запустить Tomcat с Intellij, он показывает следующие ошибки:

1) Error injecting constructor, java.lang.RuntimeException: Something went wrong, version workspace for repository magnolia does not exist.
  at info.magnolia.cms.core.version.VersionManager.<init>(VersionManager.java:72)
  at info.magnolia.objectfactory.guice.GuiceComponentConfigurationModule.bindImplementation(GuiceComponentConfigurationModule.java:155) (via modules: com.google.inject.util.Modules$OverrideModule -> com.google.inject.util.Modules$OverrideModule -> info.magnolia.objectfactory.guice.GuiceComponentProviderBuilder$1 -> info.magnolia.objectfactory.guice.GuiceComponentConfigurationModule)
  while locating info.magnolia.cms.core.version.VersionManager

2) null returned by binding at info.magnolia.objectfactory.guice.GuiceComponentConfigurationModule.bindProvider(GuiceComponentConfigurationModule.java:182) (via modules: com.google.inject.util.Modules$OverrideModule -> com.google.inject.util.Modules$OverrideModule -> info.magnolia.objectfactory.guice.GuiceComponentProviderBuilder$1 -> info.magnolia.objectfactory.guice.GuiceComponentConfigurationModule)
 but the 1st parameter of info.magnolia.task.persistence.TasksStoreImpl.<init>(TasksStoreImpl.java:88) is not @Nullable
  at info.magnolia.objectfactory.guice.GuiceComponentConfigurationModule.bindProvider(GuiceComponentConfigurationModule.java:182) (via modules: com.google.inject.util.Modules$OverrideModule -> com.google.inject.util.Modules$OverrideModule -> info.magnolia.objectfactory.guice.GuiceComponentProviderBuilder$1 -> info.magnolia.objectfactory.guice.GuiceComponentConfigurationModule)
  while locating info.magnolia.cms.security.SecuritySupport
    for the 1st parameter of info.magnolia.task.persistence.TasksStoreImpl.<init>(TasksStoreImpl.java:88)
  at info.magnolia.task.persistence.TasksStoreImpl.class(TasksStoreImpl.java:75)
  while locating info.magnolia.task.persistence.TasksStoreImpl
  while locating info.magnolia.task.persistence.TasksStore

3) null returned by binding at info.magnolia.objectfactory.guice.GuiceComponentConfigurationModule.bindProvider(GuiceComponentConfigurationModule.java:182) (via modules: com.google.inject.util.Modules$OverrideModule -> com.google.inject.util.Modules$OverrideModule -> info.magnolia.objectfactory.guice.GuiceComponentProviderBuilder$1 -> info.magnolia.objectfactory.guice.GuiceComponentConfigurationModule)
 but the 1st parameter of info.magnolia.task.persistence.TasksStoreImpl.<init>(TasksStoreImpl.java:88) is not @Nullable
  at info.magnolia.objectfactory.guice.GuiceComponentConfigurationModule.bindProvider(GuiceComponentConfigurationModule.java:182) (via modules: com.google.inject.util.Modules$OverrideModule -> com.google.inject.util.Modules$OverrideModule -> info.magnolia.objectfactory.guice.GuiceComponentProviderBuilder$1 -> info.magnolia.objectfactory.guice.GuiceComponentConfigurationModule)
  while locating info.magnolia.cms.security.SecuritySupport
    for the 1st parameter of info.magnolia.task.persistence.TasksStoreImpl.<init>(TasksStoreImpl.java:88)
  at info.magnolia.task.persistence.TasksStoreImpl.class(TasksStoreImpl.java:75)
  while locating info.magnolia.task.persistence.TasksStoreImpl
  while locating info.magnolia.task.persistence.TasksStore
    for the 1st parameter of info.magnolia.task.DefaultTasksManager.<init>(DefaultTasksManager.java:62)
  at info.magnolia.task.DefaultTasksManager.class(DefaultTasksManager.java:62)
  while locating info.magnolia.task.DefaultTasksManager
  while locating info.magnolia.task.TasksManager

4) null returned by binding at info.magnolia.objectfactory.guice.GuiceComponentConfigurationModule.bindProvider(GuiceComponentConfigurationModule.java:182) (via modules: com.google.inject.util.Modules$OverrideModule -> com.google.inject.util.Modules$OverrideModule -> info.magnolia.objectfactory.guice.GuiceComponentProviderBuilder$1 -> info.magnolia.objectfactory.guice.GuiceComponentConfigurationModule)
 but the 1st parameter of info.magnolia.freemarker.FreemarkerHelper.<init>(FreemarkerHelper.java:96) is not @Nullable
  at info.magnolia.objectfactory.guice.GuiceComponentConfigurationModule.bindProvider(GuiceComponentConfigurationModule.java:182) (via modules: com.google.inject.util.Modules$OverrideModule -> com.google.inject.util.Modules$OverrideModule -> info.magnolia.objectfactory.guice.GuiceComponentProviderBuilder$1 -> info.magnolia.objectfactory.guice.GuiceComponentConfigurationModule)
  while locating info.magnolia.freemarker.FreemarkerConfig
    for the 1st parameter of info.magnolia.freemarker.FreemarkerHelper.<init>(FreemarkerHelper.java:96)
  at info.magnolia.objectfactory.guice.GuiceComponentConfigurationModule.bindImplementation(GuiceComponentConfigurationModule.java:155) (via modules: com.google.inject.util.Modules$OverrideModule -> com.google.inject.util.Modules$OverrideModule -> info.magnolia.objectfactory.guice.GuiceComponentProviderBuilder$1 -> info.magnolia.objectfactory.guice.GuiceComponentConfigurationModule)
  while locating info.magnolia.freemarker.FreemarkerHelper

5) null returned by binding at info.magnolia.objectfactory.guice.GuiceComponentConfigurationModule.bindProvider(GuiceComponentConfigurationModule.java:182) (via modules: com.google.inject.util.Modules$OverrideModule -> com.google.inject.util.Modules$OverrideModule -> info.magnolia.objectfactory.guice.GuiceComponentProviderBuilder$1 -> info.magnolia.objectfactory.guice.GuiceComponentConfigurationModule)
 but the 1st parameter of info.magnolia.task.persistence.TasksStoreImpl.<init>(TasksStoreImpl.java:88) is not @Nullable
  at info.magnolia.objectfactory.guice.GuiceComponentConfigurationModule.bindProvider(GuiceComponentConfigurationModule.java:182) (via modules: com.google.inject.util.Modules$OverrideModule -> com.google.inject.util.Modules$OverrideModule -> info.magnolia.objectfactory.guice.GuiceComponentProviderBuilder$1 -> info.magnolia.objectfactory.guice.GuiceComponentConfigurationModule)
  while locating info.magnolia.cms.security.SecuritySupport
    for the 1st parameter of info.magnolia.task.persistence.TasksStoreImpl.<init>(TasksStoreImpl.java:88)
  at info.magnolia.task.persistence.TasksStoreImpl.class(TasksStoreImpl.java:75)
  while locating info.magnolia.task.persistence.TasksStoreImpl
  while locating info.magnolia.task.persistence.TasksStore
    for the 1st parameter of info.magnolia.task.DefaultTasksManager.<init>(DefaultTasksManager.java:62)
  at info.magnolia.task.DefaultTasksManager.class(DefaultTasksManager.java:62)
  while locating info.magnolia.task.DefaultTasksManager

6) null returned by binding at info.magnolia.objectfactory.guice.GuiceComponentConfigurationModule.bindProvider(GuiceComponentConfigurationModule.java:182) (via modules: com.google.inject.util.Modules$OverrideModule -> com.google.inject.util.Modules$OverrideModule -> info.magnolia.objectfactory.guice.GuiceComponentProviderBuilder$1 -> info.magnolia.objectfactory.guice.GuiceComponentConfigurationModule)
 but the 1st parameter of info.magnolia.task.persistence.TasksStoreImpl.<init>(TasksStoreImpl.java:88) is not @Nullable
  at info.magnolia.objectfactory.guice.GuiceComponentConfigurationModule.bindProvider(GuiceComponentConfigurationModule.java:182) (via modules: com.google.inject.util.Modules$OverrideModule -> com.google.inject.util.Modules$OverrideModule -> info.magnolia.objectfactory.guice.GuiceComponentProviderBuilder$1 -> info.magnolia.objectfactory.guice.GuiceComponentConfigurationModule)
  while locating info.magnolia.cms.security.SecuritySupport
    for the 1st parameter of info.magnolia.task.persistence.TasksStoreImpl.<init>(TasksStoreImpl.java:88)
  at info.magnolia.task.persistence.TasksStoreImpl.class(TasksStoreImpl.java:75)
  while locating info.magnolia.task.persistence.TasksStoreImpl

6 errors
    at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:543)
    at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:186)
    at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:109)
    at com.google.inject.Guice.createInjector(Guice.java:87)
    at com.google.inject.Guice.createInjector(Guice.java:78)
    at info.magnolia.objectfactory.guice.GuiceComponentProviderBuilder.build(GuiceComponentProviderBuilder.java:149)
    at info.magnolia.objectfactory.guice.GuiceComponentProviderBuilder.build(GuiceComponentProviderBuilder.java:196)
    at info.magnolia.cms.beans.config.ConfigLoader.load(ConfigLoader.java:142)
    at info.magnolia.init.MagnoliaServletContextListener$1.doExec(MagnoliaServletContextListener.java:259)
    at info.magnolia.context.MgnlContext$VoidOp.exec(MgnlContext.java:407)
    at info.magnolia.context.MgnlContext$VoidOp.exec(MgnlContext.java:404)
    at info.magnolia.context.MgnlContext.doInSystemContext(MgnlContext.java:378)
    at info.magnolia.init.MagnoliaServletContextListener.startServer(MagnoliaServletContextListener.java:256)
    at info.magnolia.init.MagnoliaServletContextListener.contextInitialized(MagnoliaServletContextListener.java:182)
    at info.magnolia.init.MagnoliaServletContextListener.contextInitialized(MagnoliaServletContextListener.java:128)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4643)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5109)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:742)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:718)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:703)
    at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1737)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:287)
    at java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:809)
    at java.management/com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
    at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:457)
    at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:406)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:287)
    at java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:809)
    at java.management/com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
    at java.management.rmi/javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1466)
    at java.management.rmi/javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1307)
    at java.management.rmi/javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1399)
    at java.management.rmi/javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:827)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:359)
    at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:200)
    at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:197)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.rmi/sun.rmi.transport.Transport.serviceCall(Transport.java:196)
    at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:562)
    at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:796)
    at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:677)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:676)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.RuntimeException: Something went wrong, version workspace for repository magnolia does not exist.
    at info.magnolia.cms.core.version.BaseVersionManager.<init>(BaseVersionManager.java:152)
    at info.magnolia.cms.core.version.VersionManager.<init>(VersionManager.java:72)
    at info.magnolia.cms.core.version.VersionManager$$FastClassByGuice$$d6682ab7.newInstance(<generated>)
    at com.google.inject.internal.DefaultConstructionProxyFactory$FastClassProxy.newInstance(DefaultConstructionProxyFactory.java:89)
    at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:114)
    at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:91)
    at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:306)
    at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
    at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:148)
    at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:39)
    at com.google.inject.internal.InternalInjectorCreator.loadEagerSingletons(InternalInjectorCreator.java:211)
    at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:182)
    ... 57 more
04-Dec-2018 09:42:57.958 SEVERE [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
04-Dec-2018 09:42:58.005 SEVERE [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal Falló en arranque del Contexto [/diagnostic_project_webapp_war_exploded] debido a errores previos
2018-12-04 09:42:58,036 INFO  info.magnolia.repository.DefaultRepositoryManager : Shutting down JCR
2018-12-04 09:42:58,036 WARN  info.magnolia.repository.WorkspaceMapping         : Failed to retrieve repository provider 'magnolia'. Your Magnolia instance might not have been initialized properly.
[2018-12-04 09:42:58,052] Artifact diagnostic-project-webapp:war exploded: Error during artifact deployment. See server log for details.

Я использую в проекте версию Magnolia 5.7 и версию 1.8 Java.Этот проект работал на другом ПК, я понятия не имею, что происходит ...

Спасибо !!

1 Ответ

0 голосов
/ 04 декабря 2018

Я обнаружил, что я делаю неправильно.Версия java, которую использовал intellij IDEA, была 11, и мне нужно было использовать jdk 1.8 из java.

...