[Résolu] Alfresco & Liferay 5.0

cancel
Showing results for 
Search instead for 
Did you mean: 
ericc
Member II

[Résolu] Alfresco & Liferay 5.0

Bonjour,
j'essaye d'installer Alfreco avec la dernière version de Liferay en suivant le tutoriel de Jeff Potts (fait pour une version 4 de Liferay).
Mis a part une petite modif dans le fichier liferay-plugin-package.xml le reste semble identique mais j'ai un soucis au point 14 lors du déploiement des portlets Alfresco dans Liferay. J'ai une erreur (trace placé en fin de message).

Est ce que certains ont déjà essayé le mariage Liferay 5 + Alfresco? Ou est ce que ce type d'erreur lors d'une intégration vous ais déjà arrivé (ou est ce que ça vous parle)?

Merci.


INFO: Illegal access: this web application instance has been stopped already.  Could not load org.bouncycastle
.jce.provider.JDKMessageDigest$MD4.  The eventual following stack trace is caused by an error thrown for debug
ging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functi
onal impact.
java.lang.IllegalStateException
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1249)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1209)
        at java.security.Provider$Service.getImplClass(Provider.java:1172)
        at java.security.Provider$Service.newInstance(Provider.java:1129)
        at sun.security.jca.GetInstance.getInstance(GetInstance.java:220)
        at sun.security.jca.GetInstance.getInstance(GetInstance.java:147)
        at java.security.Security.getImpl(Security.java:658)
        at java.security.MessageDigest.getInstance(MessageDigest.java:122)
        at org.alfresco.repo.security.authentication.MD4PasswordEncoderImpl.<clinit>(MD4PasswordEncoderImpl.ja
va:60)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27
)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
        at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:84)
        at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:60)
        at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiati
onStrategy.java:45)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(Abstra
ctAutowireCapableBeanFactory.java:701)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(Abs
tractAutowireCapableBeanFactory.java:687)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAut
owireCapableBeanFactory.java:388)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:
250)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingleto
nBeanRegistry.java:141)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:247)

        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:161)

        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefiniti
onValueResolver.java:245)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanD
efinitionValueResolver.java:124)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(Ab
stractAutowireCapableBeanFactory.java:1019)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractA
utowireCapableBeanFactory.java:809)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAut
owireCapableBeanFactory.java:425)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:
250)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingleto
nBeanRegistry.java:141)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:247)

        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:161)

        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefiniti
onValueResolver.java:245)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanD
efinitionValueResolver.java:124)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(Ab
stractAutowireCapableBeanFactory.java:1019)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractA
utowireCapableBeanFactory.java:809)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAut
owireCapableBeanFactory.java:425)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:
250)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingleto
nBeanRegistry.java:141)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:247)

        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:161)

        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefiniti
onValueResolver.java:245)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanD
efinitionValueResolver.java:124)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(Ab
stractAutowireCapableBeanFactory.java:1019)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractA
utowireCapableBeanFactory.java:809)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAut
owireCapableBeanFactory.java:425)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:
250)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingleto
nBeanRegistry.java:141)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:247)

        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:161)

        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefiniti
onValueResolver.java:245)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanD
efinitionValueResolver.java:124)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(Ab
stractAutowireCapableBeanFactory.java:1019)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractA
utowireCapableBeanFactory.java:809)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAut
owireCapableBeanFactory.java:425)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:
250)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingleto
nBeanRegistry.java:141)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:247)

        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:161)

        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefiniti
onValueResolver.java:245)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanD
efinitionValueResolver.java:124)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(Ab
stractAutowireCapableBeanFactory.java:1019)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractA
utowireCapableBeanFactory.java:809)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAut
owireCapableBeanFactory.java:425)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:
250)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingleto
nBeanRegistry.java:141)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:247)

        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:161)

        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefiniti
onValueResolver.java:245)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanD
efinitionValueResolver.java:124)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(Ab
stractAutowireCapableBeanFactory.java:1019)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractA
utowireCapableBeanFactory.java:809)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAut
owireCapableBeanFactory.java:425)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:
250)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingleto
nBeanRegistry.java:141)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:247)

        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:161)

        at org.springframework.aop.framework.ProxyFactoryBean.initializeAdvisorChain(ProxyFactoryBean.java:438
)
        at org.springframework.aop.framework.ProxyFactoryBean.getObject(ProxyFactoryBean.java:251)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectFromFactoryBean(AbstractBean
Factory.java:1211)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBean
Factory.java:1177)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:261)

        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:161)

        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefiniti
onValueResolver.java:245)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanD
efinitionValueResolver.java:124)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(Ab
stractAutowireCapableBeanFactory.java:1019)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractA
utowireCapableBeanFactory.java:809)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAut
owireCapableBeanFactory.java:425)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:
250)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingleto
nBeanRegistry.java:141)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:247)

        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:161)

        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefiniti
onValueResolver.java:245)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanD
efinitionValueResolver.java:124)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(Ab
stractAutowireCapableBeanFactory.java:1019)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractA
utowireCapableBeanFactory.java:809)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAut
owireCapableBeanFactory.java:425)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:
250)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingleto
nBeanRegistry.java:141)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:247)

        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:161)

        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefiniti
onValueResolver.java:245)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanD
efinitionValueResolver.java:124)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(Ab
stractAutowireCapableBeanFactory.java:1019)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractA
utowireCapableBeanFactory.java:809)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAut
owireCapableBeanFactory.java:425)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:
250)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingleto
nBeanRegistry.java:141)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:247)

        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:161)

        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefiniti
onValueResolver.java:245)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanD
efinitionValueResolver.java:124)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(Ab
stractAutowireCapableBeanFactory.java:1019)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractA
utowireCapableBeanFactory.java:809)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAut
owireCapableBeanFactory.java:425)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:
250)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingleto
nBeanRegistry.java:141)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:247)

        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:161)

        at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.j
ava:642)
        at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(Abst
ractApplicationContext.java:419)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.j
ava:328)
        at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRe
freshableWebApplicationContext.java:156)
        at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java
:49)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
        at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:926)
        at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:889)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
        at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1217)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
        at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1306)
        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.j
ava:1570)
        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.j
ava:1579)
        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1559)
        at java.lang.Thread.run(Thread.java:595)
13:24:09,388 INFO  [PluginPackageUtil:76] Checking for available updates
13:24:09,412 INFO  [PluginPackageUtil:76] Finished checking for available updates in 0 ms
13:24:10,186 User:System ERROR [web.context.ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serverConnector' defin
ed in class path resource [alfresco/core-services-context.xml]: Invocation of init method failed; nested excep
tion is java.io.IOException: Cannot bind to URL [rmi://localhost:50500/alfresco/jmxrmi]: javax.naming.NameAlre
adyBoundException: alfresco/jmxrmi [Root exception is java.rmi.AlreadyBoundException: alfresco/jmxrmi]
Caused by: java.io.IOException: Cannot bind to URL [rmi://localhost:50500/alfresco/jmxrmi]: javax.naming.NameA
lreadyBoundException: alfresco/jmxrmi [Root exception is java.rmi.AlreadyBoundException: alfresco/jmxrmi]
        at javax.management.remote.rmi.RMIConnectorServer.newIOException(RMIConnectorServer.java:814)
        at javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:431)
        at org.springframework.jmx.support.ConnectorServerFactoryBean.afterPropertiesSet(ConnectorServerFactor
yBean.java:168)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(Abst
ractAutowireCapableBeanFactory.java:1118)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(Abstrac
tAutowireCapableBeanFactory.java:1085)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAut
owireCapableBeanFactory.java:429)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:
250)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingleto
nBeanRegistry.java:141)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:247)

        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:161)

        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(Defau
ltListableBeanFactory.java:270)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.j
ava:346)
        at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRe
freshableWebApplicationContext.java:156)
        at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java
:49)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
        at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:926)
        at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:889)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
        at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1217)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
        at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1306)
        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.j
ava:1570)
        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.j
ava:1579)
        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1559)
        at java.lang.Thread.run(Thread.java:595)
Caused by: javax.naming.NameAlreadyBoundException: alfresco/jmxrmi [Root exception is java.rmi.AlreadyBoundExc
eption: alfresco/jmxrmi]
        at com.sun.jndi.rmi.registry.RegistryContext.bind(RegistryContext.java:118)
        at com.sun.jndi.toolkit.url.GenericURLContext.bind(GenericURLContext.java:208)
        at javax.naming.InitialContext.bind(InitialContext.java:359)
        at javax.management.remote.rmi.RMIConnectorServer.bind(RMIConnectorServer.java:635)
        at javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:427)
        … 30 more
Caused by: java.rmi.AlreadyBoundException: alfresco/jmxrmi
        at sun.rmi.registry.RegistryImpl.bind(RegistryImpl.java:123)
        at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown Source)
        at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:375)
        at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:240)
        at sun.rmi.transport.Transport$1.run(Transport.java:153)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
        at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
        at java.lang.Thread.run(Thread.java:595)
        at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
        at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
        at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:343)
        at sun.rmi.registry.RegistryImpl_Stub.bind(Unknown Source)
        at com.sun.jndi.rmi.registry.RegistryContext.bind(RegistryContext.java:116)
        … 34 more
13:24:10,233 User:System ERROR [[Catalina].[localhost].[/alfresco]] Exception lors de l'envoi de l'├®v├¿nement
contexte initialis├® (context initialized) ├á l'instance de classe d'├®coute (listener) org.springframework.w
eb.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serverConnector' defin
ed in class path resource [alfresco/core-services-context.xml]: Invocation of init method failed; nested excep
tion is java.io.IOException: Cannot bind to URL [rmi://localhost:50500/alfresco/jmxrmi]: javax.naming.NameAlre
adyBoundException: alfresco/jmxrmi [Root exception is java.rmi.AlreadyBoundException: alfresco/jmxrmi]
Caused by: java.io.IOException: Cannot bind to URL [rmi://localhost:50500/alfresco/jmxrmi]: javax.naming.NameA
lreadyBoundException: alfresco/jmxrmi [Root exception is java.rmi.AlreadyBoundException: alfresco/jmxrmi]
        at javax.management.remote.rmi.RMIConnectorServer.newIOException(RMIConnectorServer.java:814)
        at javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:431)
        at org.springframework.jmx.support.ConnectorServerFactoryBean.afterPropertiesSet(ConnectorServerFactor
yBean.java:168)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(Abst
ractAutowireCapableBeanFactory.java:1118)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(Abstrac
tAutowireCapableBeanFactory.java:1085)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAut
owireCapableBeanFactory.java:429)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:
250)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingleto
nBeanRegistry.java:141)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:247)

        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:161)

        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(Defau
ltListableBeanFactory.java:270)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.j
ava:346)
        at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRe
freshableWebApplicationContext.java:156)
        at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java
:49)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
        at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:926)
        at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:889)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
        at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1217)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
        at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1306)
        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.j
ava:1570)
        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.j
ava:1579)
        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1559)
        at java.lang.Thread.run(Thread.java:595)
Caused by: javax.naming.NameAlreadyBoundException: alfresco/jmxrmi [Root exception is java.rmi.AlreadyBoundExc
eption: alfresco/jmxrmi]
        at com.sun.jndi.rmi.registry.RegistryContext.bind(RegistryContext.java:118)
        at com.sun.jndi.toolkit.url.GenericURLContext.bind(GenericURLContext.java:208)
        at javax.naming.InitialContext.bind(InitialContext.java:359)
        at javax.management.remote.rmi.RMIConnectorServer.bind(RMIConnectorServer.java:635)
        at javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:427)
        … 30 more
Caused by: java.rmi.AlreadyBoundException: alfresco/jmxrmi
        at sun.rmi.registry.RegistryImpl.bind(RegistryImpl.java:123)
        at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown Source)
        at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:375)
        at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:240)
        at sun.rmi.transport.Transport$1.run(Transport.java:153)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
        at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
        at java.lang.Thread.run(Thread.java:595)
        at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
        at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
        at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:343)
        at sun.rmi.registry.RegistryImpl_Stub.bind(Unknown Source)
        at com.sun.jndi.rmi.registry.RegistryContext.bind(RegistryContext.java:116)
        … 34 more
4 Replies
christophes
Member II

Re: [Résolu] Alfresco & Liferay 5.0

Bah apparemment c'est un mariage forcé, parce qu'il a pas l'air content  :roll:

Plus sérieusement, il semble qu'il y ait les traces d'un ancien démarrage d'Alfresco qui traine. Vérifie qu'il n' y a pas de processus Java qui tourne encore.

Christophe
ericc
Member II

Re: [Résolu] Alfresco & Liferay 5.0

J'ai refait le processus histoire que les deux tourtereaux se connaissent mieux.

Y'a du mieux; maintenant j'ai bien dans la liste des applications (= portlets disponible) une catégorie alfresco avec la liste des portlets à ajouter (j'avais oublié je pense certains morceaux du web.xml) donc y'a du mieux.

Par contre quand je démarre j'ai cette erreur (pas très parlante) :
14:19:59,131 ERROR [PortletHotDeployListener:545] java.lang.NullPointerException
java.lang.NullPointerException
        at org.alfresco.web.scripts.portlet.WebScriptPortlet.init(WebScriptPortlet.java:88)
        at com.liferay.portlet.InvokerPortlet.init(InvokerPortlet.java:272)
        at com.liferay.portlet.PortletInstanceFactory._init(PortletInstanceFactory.java:235)
        at com.liferay.portlet.PortletInstanceFactory._create(PortletInstanceFactory.java:110)
        at com.liferay.portlet.PortletInstanceFactory.create(PortletInstanceFactory.java:55)
        at com.liferay.portal.deploy.hot.PortletHotDeployListener.initPortlet(PortletHotDeployListener.java:54
2)
        at com.liferay.portal.deploy.hot.PortletHotDeployListener.doInvokeDeploy(PortletHotDeployListener.java
:231)
        at com.liferay.portal.deploy.hot.PortletHotDeployListener.invokeDeploy(PortletHotDeployListener.java:1
15)
        at com.liferay.portal.kernel.deploy.hot.HotDeployUtil._fireDeployEvent(HotDeployUtil.java:84)
        at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireDeployEvent(HotDeployUtil.java:41)
        at com.liferay.portal.kernel.servlet.PortletContextListener.portalInit(PortletContextListener.java:92)

        at com.liferay.portal.kernel.util.PortalInitableUtil.init(PortalInitableUtil.java:48)
        at com.liferay.portal.kernel.servlet.PortletContextListener.contextInitialized(PortletContextListener.
java:88)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
        at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:926)

Et lors de l'ajout de la portlet j'ai des messages d'erreur :
The Web Script /alfresco/168s/ui/myspaces has responded with a status of 500 - Internal Error.

500 Description:   An error inside the HTTP server which prevented it from fulfilling the request.

Message:   Transaction must be active and synchronization is required

Exception:   org.alfresco.error.AlfrescoRuntimeException - Transaction must be active and synchronization is required
ou
java.lang.IllegalArgumentException - All user details are mandatory!
quand je n'ai pas le bon utilisateur.

Des pistes? Des réponses? …
ericc
Member II

Re: [Résolu] Alfresco & Liferay 5.0

Je continue mes investigations.

Il semblerait que cela soit lié à un bug Alfresco (ref ici : http://forums.alfresco.com/en/viewtopic.php?p=37515), j'essaye donc de corriger via un "hack" proposé sur ce même topic (ici : http://forums.alfresco.com/en/viewtopic.php?p=37515#p37515 ).
Premier soucis : Je ne sais pas trop quoi faire de cette classe, je dois certainement l'utiliser à la place d'une autre dans un fichier de conf, mais pour le moment je n'arrives même pas à avoir une classe qui fonctionne.
Quand je copie colle le code, adapte le package et ajoute la librairie spring-portlet j'ai des import non résolu vers :
org.alfresco.web.scripts.WebScriptContext;
org.alfresco.web.scripts.WebScriptDescription.RequiredAuthentication;
org.alfresco.web.scripts.portlet.WebScriptPortletAuthenticator;
J'ai les deux SDK, le code source Alfresco, … et impossible de trouver ces classes >_<

Un rayon de lumière (tchi tcha) pour m'aider? (ou une autre solution?)
ericc
Member II

Re: [Résolu] Alfresco & Liferay 5.0

C'est bon victoire, le mariage est réussi.

Donc pour ceux qui voudrais tenter la même chose :
- Suivre le tutoriel mis en lien plus haut. La seule différence se fera au niveau du fichier liferay-plugin-package.xml (dispo dans le zip du tutoriel), editer le pour y mettre cela :

<liferay-versions>
   <liferay-version>5.1.*</liferay-version>
</liferay-versions>

- Une fois fais et quand vous avez le message d'erreur : "Transaction must be active and synchronization is required" (dans les portlets), arrêtez tomcat.

Créer une classe que vous packagerez dans un jar (je mets le code en fin de post), pour ça vous devez avoir le SDK Alfresco et surtout le jar alfresco-web-framework.jar (une version de la 2.9b ce l'a pas).
Editez ensuite le fichier web-scripts-application-context.xml (webapps/alfresco/WEB-INF/classes/alfresco/), recherche le bean ayant pour id webscripts.authenticator.jsr168.webclient et remplacer l'attribut class par le nom de votre classe (exemple en dessous).

Et voilà.


<bean id="webscripts.authenticator.jsr168.webclient" class="com.bluexml.alfresco.utils.authenticator.WebClientPortletAuthenticatorPatchedFactory">
      <property name="repository" ref="webscripts.repo" />
      <property name="authenticationService" ref="AuthenticationService" />
   </bean>


package com.bluexml.alfresco.utils.authenticator;

import javax.portlet.PortletSession;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
import javax.transaction.UserTransaction;

import org.alfresco.repo.security.authentication.AuthenticationUtil;
import org.alfresco.repo.web.scripts.Repository;
import org.alfresco.repo.web.scripts.portlet.WebClientPortletAuthenticatorFactory;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.security.AuthenticationService;
import org.alfresco.service.transaction.TransactionService;
import org.alfresco.web.app.servlet.AuthenticationHelper;
import org.alfresco.web.bean.repository.User;
import org.alfresco.web.scripts.Authenticator;
import org.alfresco.web.scripts.Description;
import org.alfresco.web.scripts.portlet.WebScriptPortletRequest;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

public class WebClientPortletAuthenticatorPatchedFactory extends WebClientPortletAuthenticatorFactory {

   // Logger
   private static final Log logger = LogFactory.getLog(WebClientPortletAuthenticatorFactory.class);

   // dependencies
   private AuthenticationService authenticationService;
   private TransactionService transactionService;
   private Repository repository;

   /**
    * @param authenticationService
    */
   public void setAuthenticationService(AuthenticationService authenticationService) {
      this.authenticationService = authenticationService;
   }

   /**
    * @param scriptContext
    */
   public void setRepository(Repository repository) {
      this.repository = repository;
   }

   /**
    * @param transactionService
    */
   public void setTransactionService(TransactionService transactionService) {
      this.transactionService = transactionService;
   }

   /* (non-Javadoc)
    * @see org.alfresco.web.scripts.portlet.PortletAuthenticatorFactory#create(javax.portlet.RenderRequest, javax.portlet.RenderResponse)
    */
   public Authenticator create(RenderRequest req, RenderResponse res) {
      return new WebClientPortletAuthenticator(req, res);
   }

   public class WebClientPortletAuthenticator implements Authenticator {
      // dependencies
      private RenderRequest req;
      private RenderResponse res;

      /**
       * Construct
       *
       * @param authenticationService
       * @param req
       * @param res
       */
      public WebClientPortletAuthenticator(RenderRequest req, RenderResponse res) {
         this.req = req;
         this.res = res;
      }

      /* (non-Javadoc)
       * @see org.alfresco.web.scripts.Authenticator#authenticate(org.alfresco.web.scripts.Description.RequiredAuthentication, boolean)
       */
      public boolean authenticate(Description.RequiredAuthentication required, boolean isGuest) {
         PortletSession session = req.getPortletSession();

         // first look for the username key in the session - we add this by
         // hand for some portals
         // when the WebScriptPortletRequest is created
         String portalUser = (String) req.getPortletSession().getAttribute(
               WebScriptPortletRequest.ALFPORTLETUSERNAME);
         if (portalUser == null) {
            portalUser = req.getRemoteUser();
         }

         if (logger.isDebugEnabled()) {
            logger.debug("JSR-168 Remote user: " + portalUser);
         }

         if (isGuest || portalUser == null) {
            if (logger.isDebugEnabled())
               logger.debug("Authenticating as Guest");

            // authenticate as guest
            AuthenticationUtil.setCurrentUser(AuthenticationUtil.getGuestUserName());

            if (logger.isDebugEnabled())
               logger.debug("Setting Web Client authentication context for guest");

            createWebClientUser(session);
            removeSessionInvalidated(session);
         } else {
            if (logger.isDebugEnabled())
               logger.debug("Authenticating as user " + portalUser);

            AuthenticationUtil.setCurrentUser(portalUser);

            // determine if Web Client context needs to be updated
            User user = getWebClientUser(session);
            if (user == null || !portalUser.equals(user.getUserName())) {
               if (logger.isDebugEnabled())
                  logger.debug("Setting Web Client authentication context for user " + portalUser);

               createWebClientUser(session);
               removeSessionInvalidated(session);
            }
         }

         return true;
      }

      /**
       * Helper. Remove Web Client session invalidated flag
       *
       * @param session
       */
      private void removeSessionInvalidated(PortletSession session) {
         session.removeAttribute(AuthenticationHelper.SESSION_INVALIDATED, PortletSession.APPLICATION_SCOPE);
      }

      /**
       * Helper. Create Web Client session user
       *
       * @param session
       */
      private void createWebClientUser(PortletSession session) {
         UserTransaction tx = null;
         try {
            // start a txn as this method interacts with public services
            tx = transactionService.getUserTransaction();
            tx.begin();

            NodeRef personRef = repository.getPerson();
            User user = new User(authenticationService.getCurrentUserName(), authenticationService
                  .getCurrentTicket(), personRef);
            NodeRef homeRef = repository.getUserHome(personRef);
            if (homeRef != null) {
               user.setHomeSpaceId(homeRef.getId());
            }
            session.setAttribute(AuthenticationHelper.AUTHENTICATION_USER, user, PortletSession.APPLICATION_SCOPE);

            tx.commit();
         } catch (Throwable e) {
            try {
               if (tx != null) {
                  tx.rollback();
               }
            } catch (Exception tex) {
            }
         }
      }

      /**
       * Helper. Get Web Client session user
       *
       * @param session
       * @return
       */
      private User getWebClientUser(PortletSession session) {
         return (User) session.getAttribute(AuthenticationHelper.AUTHENTICATION_USER,
               PortletSession.APPLICATION_SCOPE);
      }
   }

}