Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-97271

BeanCreationException after deployed Liferay Knowledge Base LPKG into portal that has the knowledge base included

    Details

    • Type: Bug
    • Status: Verified
    • Resolution: Unresolved
    • Affects Version/s: 7.0.X
    • Fix Version/s: None
    • Component/s: Knowledge Base
    • Labels:
    • Fix Priority:
      3

      Description

      Steps to reproduce:

      1. Start a new 7.0.x-private bundle.
      2. Deploy Liferay Knowledge Base.lpkg into it.
      3. Restart the bundle

      Actual Result:
      Throws a error

      2019-06-24 08:44:57.260 WARN  [localhost-startStop-1][ModuleApplicationContext:185] Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.knowledge.base.service.KBArticleLocalService' defined in URL [bundleentry://454.fwk1013118362/META-INF/spring/module-spring.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.knowledge.base.service.impl.KBArticleLocalServiceImpl': Unable to inject bean reference fields; nested exception is java.lang.IllegalArgumentException: Can not set com.liferay.knowledge.base.internal.importer.KBArchiveFactory field com.liferay.knowledge.base.service.impl.KBArticleLocalServiceImpl.kbArchiveFactory to com.liferay.knowledge.base.internal.importer.KBArchiveFactory
      2019-06-24 08:44:57.264 ERROR [localhost-startStop-1][ModuleApplicationContextRegistrator:81] Unable to start com.liferay.knowledge.base.service
      org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.knowledge.base.service.KBArticleLocalService' defined in URL [bundleentry://454.fwk1013118362/META-INF/spring/module-spring.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.knowledge.base.service.impl.KBArticleLocalServiceImpl': Unable to inject bean reference fields; nested exception is java.lang.IllegalArgumentException: Can not set com.liferay.knowledge.base.internal.importer.KBArchiveFactory field com.liferay.knowledge.base.service.impl.KBArticleLocalServiceImpl.kbArchiveFactory to com.liferay.knowledge.base.internal.importer.KBArchiveFactory
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:562)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
      	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
      	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
      	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
      	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
      	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)
      	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)
      	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543)
      	at com.liferay.portal.spring.extender.internal.context.ModuleApplicationContextRegistrator._createApplicationContext(ModuleApplicationContextRegistrator.java:142)
      	at com.liferay.portal.spring.extender.internal.context.ModuleApplicationContextRegistrator.start(ModuleApplicationContextRegistrator.java:60)
      	at sun.reflect.GeneratedMethodAccessor606.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.apache.felix.dm.InvocationUtil.invokeMethod(InvocationUtil.java:111)
      	at org.apache.felix.dm.InvocationUtil.invokeCallbackMethod(InvocationUtil.java:66)
      	at org.apache.felix.dm.impl.ComponentImpl.invokeCallbackMethod(ComponentImpl.java:769)
      	at org.apache.felix.dm.impl.ComponentImpl.invoke(ComponentImpl.java:760)
      	at org.apache.felix.dm.impl.ComponentImpl.bindService(ComponentImpl.java:705)
      	at org.apache.felix.dm.impl.ComponentImpl.access$400(ComponentImpl.java:54)
      	at org.apache.felix.dm.impl.ComponentImpl$7.run(ComponentImpl.java:202)
      	at org.apache.felix.dm.impl.SerialExecutor.runTask(SerialExecutor.java:137)
      	at org.apache.felix.dm.impl.SerialExecutor.runTasks(SerialExecutor.java:119)
      	at org.apache.felix.dm.impl.SerialExecutor.execute(SerialExecutor.java:85)
      	at org.apache.felix.dm.impl.ComponentImpl.calculateStateChanges(ComponentImpl.java:252)
      	at org.apache.felix.dm.impl.ComponentImpl.dependencyAvailable(ComponentImpl.java:379)
      	at org.apache.felix.dm.impl.dependencies.ServiceDependencyImpl.doAddedService(ServiceDependencyImpl.java:849)
      	at org.apache.felix.dm.impl.dependencies.ServiceDependencyImpl.access$200(ServiceDependencyImpl.java:60)
      	at org.apache.felix.dm.impl.dependencies.ServiceDependencyImpl$4.run(ServiceDependencyImpl.java:317)
      	at org.apache.felix.dm.impl.SerialExecutor.runTask(SerialExecutor.java:137)
      	at org.apache.felix.dm.impl.SerialExecutor.runTasks(SerialExecutor.java:119)
      	at org.apache.felix.dm.impl.SerialExecutor.execute(SerialExecutor.java:85)
      	at org.apache.felix.dm.impl.SerialExecutor.execute(SerialExecutor.java:104)
      	at org.apache.felix.dm.impl.dependencies.ServiceDependencyImpl.addedService(ServiceDependencyImpl.java:314)
      	at org.apache.felix.dm.tracker.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1331)
      	at org.apache.felix.dm.tracker.AbstractTracked.trackAdding(AbstractTracked.java:290)
      	at org.apache.felix.dm.tracker.AbstractTracked.track(AbstractTracked.java:236)
      	at org.apache.felix.dm.tracker.ServiceTracker$Tracked.serviceChangedHideAspects(ServiceTracker.java:1212)
      	at org.apache.felix.dm.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1107)
      	at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:891)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:804)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:228)
      	at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:464)
      	at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:482)
      	at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:1001)
      	at com.liferay.portal.upgrade.internal.release.ReleasePublisher.publish(ReleasePublisher.java:66)
      	at com.liferay.portal.upgrade.internal.release.ReleasePublisher.activate(ReleasePublisher.java:86)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.apache.felix.scr.impl.inject.BaseMethod.invokeMethod(BaseMethod.java:224)
      	at org.apache.felix.scr.impl.inject.BaseMethod.access$500(BaseMethod.java:39)
      	at org.apache.felix.scr.impl.inject.BaseMethod$Resolved.invoke(BaseMethod.java:617)
      	at org.apache.felix.scr.impl.inject.BaseMethod.invoke(BaseMethod.java:501)
      	at org.apache.felix.scr.impl.inject.ActivateMethod.invoke(ActivateMethod.java:302)
      	at org.apache.felix.scr.impl.inject.ActivateMethod.invoke(ActivateMethod.java:294)
      	at org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:297)
      	at org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:108)
      	at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:906)
      	at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:879)
      	at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:823)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse$1.run(ServiceFactoryUse.java:212)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.factoryGetService(ServiceFactoryUse.java:210)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.getService(ServiceFactoryUse.java:111)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceConsumer$2.getService(ServiceConsumer.java:45)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:496)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.getService(ServiceRegistry.java:464)
      	at org.eclipse.osgi.internal.framework.BundleContextImpl.getService(BundleContextImpl.java:619)
      	at org.apache.felix.scr.impl.manager.SingleRefPair.getServiceObject(SingleRefPair.java:72)
      	at org.apache.felix.scr.impl.inject.BindMethod.getServiceObject(BindMethod.java:648)
      	at org.apache.felix.scr.impl.manager.DependencyManager.getServiceObject(DependencyManager.java:2201)
      	at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.prebind(DependencyManager.java:1118)
      	at org.apache.felix.scr.impl.manager.DependencyManager.prebind(DependencyManager.java:1520)
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager.collectDependencies(AbstractComponentManager.java:1005)
      	at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:859)
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:748)
      	at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:1012)
      	at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:968)
      	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1215)
      	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1136)
      	at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:945)
      	at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:881)
      	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1167)
      	at org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:127)
      	at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:891)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:804)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:228)
      	at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:464)
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:886)
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:873)
      	at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:132)
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:940)
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:740)
      	at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:1012)
      	at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:968)
      	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1215)
      	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1136)
      	at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:945)
      	at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:881)
      	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1167)
      	at org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:127)
      	at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:891)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:804)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:228)
      	at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:464)
      	at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:482)
      	at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:1001)
      	at com.liferay.registry.internal.RegistryImpl.registerService(RegistryImpl.java:369)
      	at com.liferay.portal.servlet.MainServlet.registerPortalInitialized(MainServlet.java:1366)
      	at com.liferay.portal.servlet.MainServlet.init(MainServlet.java:427)
      	at javax.servlet.GenericServlet.init(GenericServlet.java:158)
      	at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1188)
      	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1132)
      	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1021)
      	at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5085)
      	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5397)
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
      	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:755)
      	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:731)
      	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
      	at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:620)
      	at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1832)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.knowledge.base.service.impl.KBArticleLocalServiceImpl': Unable to inject bean reference fields; nested exception is java.lang.IllegalArgumentException: Can not set com.liferay.knowledge.base.internal.importer.KBArchiveFactory field com.liferay.knowledge.base.service.impl.KBArticleLocalServiceImpl.kbArchiveFactory to com.liferay.knowledge.base.internal.importer.KBArchiveFactory
      	at com.liferay.portal.spring.extender.internal.bean.ServiceReferenceAnnotationBeanPostProcessor.autoInject(ServiceReferenceAnnotationBeanPostProcessor.java:118)
      	at com.liferay.portal.spring.extender.internal.bean.ServiceReferenceAnnotationBeanPostProcessor.postProcessBeforeInitialization(ServiceReferenceAnnotationBeanPostProcessor.java:67)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:407)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1623)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
      	... 134 more
      Caused by: java.lang.IllegalArgumentException: Can not set com.liferay.knowledge.base.internal.importer.KBArchiveFactory field com.liferay.knowledge.base.service.impl.KBArticleLocalServiceImpl.kbArchiveFactory to com.liferay.knowledge.base.internal.importer.KBArchiveFactory
      	at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:167)
      	at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:171)
      	at sun.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorImpl.java:81)
      	at java.lang.reflect.Field.set(Field.java:764)
      	at com.liferay.portal.spring.extender.internal.bean.ServiceReferenceAnnotationBeanPostProcessor.autoInject(ServiceReferenceAnnotationBeanPostProcessor.java:112)
      	... 138 more
      

        Attachments

          Activity

            People

            • Assignee:
              support-lep@liferay.com SE Support
              Reporter:
              felix.zhang Felix Zhang
              Participants of an Issue:
              Recent user:
              Brian Wulbern
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Days since last comment:
                21 weeks, 2 days ago

                Packages

                Version Package