Search the FirstSpirit Knowledge Base
Auf einem Liferay (6.2 EE) Weblogic Server (10.3.6 oder 12c) kann der LPI Adapter nicht initialisiert werden. Es wird folgender Felher geworfen:
Error creating bean with name 'fosRestClientProxyImpl': Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: com.google.common.collect.Sets.newIdentityHashSet()Ljava/util/Set;
Offensichtlich wird hier die falsche Factory verwendet: javax.ws.rs.client.FactoryFinder.newInstance(FactoryFinder.java:116)
... da die Klasse java.util.Set instanziert wird und nicht com.google.common.collect.Sets.
Wie kann man die für den FOS Client die korrekte Factory angeben?
Viele Grüße,
Robert Lalyko
USU AG
Stack Trace:
Jan 13, 2015 10:01:20 AM org.springframework.web.context.ContextLoader initWebApplicationContext
Schwerwiegend: Context initialization failed
tion is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'fosRestClientProxyImpl': Invocation of init method failed; nested exception is java.lang.NoSuchMethodErr
or: com.google.common.collect.Sets.newIdentityHashSet()Ljava/util/Set;
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:287)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1073)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:516)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:282)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:204)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at com.liferay.portal.kernel.servlet.SecurePluginContextListener.instantiatingListener(SecurePluginContextListener.java:360)
at com.liferay.portal.kernel.servlet.SecurePluginContextListener.instantiatingListeners(SecurePluginContextListener.java:163)
at sun.reflect.GeneratedMethodAccessor760.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.liferay.portal.deploy.hot.ServletContextListenerHotDeployListener.doInvokeDeploy(ServletContextListenerHotDeployListener.java:77)
at com.liferay.portal.deploy.hot.ServletContextListenerHotDeployListener.invokeDeploy(ServletContextListenerHotDeployListener.java:37)
at com.liferay.portal.deploy.hot.HotDeployImpl.doFireDeployEvent(HotDeployImpl.java:208)
at com.liferay.portal.deploy.hot.HotDeployImpl.fireDeployEvent(HotDeployImpl.java:95)
at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireDeployEvent(HotDeployUtil.java:27)
at com.liferay.portal.kernel.servlet.PluginContextListener.fireDeployEvent(PluginContextListener.java:164)
at com.liferay.portal.kernel.servlet.PluginContextListener.doPortalInit(PluginContextListener.java:154)
at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:44)
at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:64)
at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:56)
at com.liferay.portal.kernel.util.BasePortalLifecycle.registerPortalLifecycle(BasePortalLifecycle.java:54)
at com.liferay.portal.kernel.servlet.PluginContextListener.contextInitialized(PluginContextListener.java:116)
at com.liferay.portal.kernel.servlet.SecurePluginContextListener.contextInitialized(SecurePluginContextListener.java:151)
at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:582)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
at weblogic.servlet.internal.EventsManager.executeContextListener(EventsManager.java:233)
at weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:190)
at weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:175)
at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1730)
at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:2740)
at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1704)
at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:781)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:213)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:208)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:35)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:70)
at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:212)
at weblogic.application.internal.ExtensibleModuleWrapper.start(ExtensibleModuleWrapper.java:111)
at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:124)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:213)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:208)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:35)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:70)
at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:24)
at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:729)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:35)
at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:258)
at weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:48)
at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:165)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:582)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:148)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:114)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:335)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844)
at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1253)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:440)
at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:163)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:195)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:13)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:68)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:545)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private de.usu.lpi.firstSpirit.rest.IFosRestClientProxy de.usu.lpi.importContext.statemachine.states.Deplo
ted exception is java.lang.NoSuchMethodError: com.google.common.collect.Sets.newIdentityHashSet()Ljava/util/Set;
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:506)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:84)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:284)
... 74 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'fosRestClientProxyImpl': Invocation of init method failed; nested exception is java.lang.NoSuchMethod
Error: com.google.common.collect.Sets.newIdentityHashSet()Ljava/util/Set;
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:133)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:393)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1415)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:518)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:848)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:790)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:707)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:478)
... 76 more
Caused by: java.lang.NoSuchMethodError: com.google.common.collect.Sets.newIdentityHashSet()Ljava/util/Set;
at org.glassfish.jersey.model.internal.CommonConfig.<init>(CommonConfig.java:215)
at org.glassfish.jersey.client.ClientConfig$State.<init>(ClientConfig.java:144)
at org.glassfish.jersey.client.ClientConfig.<init>(ClientConfig.java:423)
at org.glassfish.jersey.client.JerseyClientBuilder.<init>(JerseyClientBuilder.java:72)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at java.lang.Class.newInstance(Class.java:374)
at javax.ws.rs.client.FactoryFinder.newInstance(FactoryFinder.java:116)
at javax.ws.rs.client.FactoryFinder.find(FactoryFinder.java:206)
at javax.ws.rs.client.ClientBuilder.newBuilder(ClientBuilder.java:86)
at javax.ws.rs.client.ClientBuilder.newClient(ClientBuilder.java:114)
at com.espirit.moddev.fos.api.ApiClient.<init>(ApiClient.java:46)
at com.espirit.moddev.fos.api.ApiClient.<init>(ApiClient.java:28)
at com.espirit.moddev.fos.api.ApiClient$Builder.build(ApiClient.java:156)
at de.usu.lpi.firstSpirit.rest.impl.FosRestClientProxyImpl.initialize(FosRestClientProxyImpl.java:102)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:340)
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:293)
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:130)
... 88 more
Jan 13, 2015 10:01:21 AM org.apache.camel.component.servlet.CamelHttpTransportServlet init
Information: Initialized CamelHttpTransportServlet[name=CamelServlet, contextPath=/lpi-portlet]
Jan 13, 2015 10:03:54 AM org.apache.camel.component.servlet.CamelHttpTransportServlet destroy
Information: Destroyed CamelHttpTransportServlet[CamelServlet]
<13.01.2015 10:03 Uhr MEZ> <Warning> <netuix> <BEA-423420> <Umleitung wird bei Start oder Aktualisierung ausgef├╝hrt. Der Umleitungs-URL lautet /console/console.portal?_nfpb=true&_pageLabel=AppDeploym
Vermutlich wird der Weblogic eine 1.x Jersey Version mitliefern und im Classpath haben. Da gibt es bestimmt Möglichkeiten die zu excluden, damit die Jersey 2.x Version aus der fos-api genommen wird.
Vermutlich wird der Weblogic eine 1.x Jersey Version mitliefern und im Classpath haben. Da gibt es bestimmt Möglichkeiten die zu excluden, damit die Jersey 2.x Version aus der fos-api genommen wird.
Ja, es war ein Problem mit der Weblogic Jersey Implememntierung.
-
Die Lösung war das Kopieren der Bibliotheken in den domain/lib Ordner.
Welche Jars müssen hier alle hinzugefügt werden?