cancel
Showing results for 
Search instead for 
Did you mean: 

Mediawiki Integration with Labs (stable)

philnicholls
Champ in-the-making
Champ in-the-making
Hi all,

I think I have had mediawiki successfully integrated with Alfresco labs 3c in the past (i.e. I could browse wiki content, but not edit it, from Alfresco).

I've now moved to labs stable, but I get an install error:


16:20:43,868 INFO  [org.alfresco.repo.module.ModuleServiceImpl] Found 2 module(s
).
16:20:43,919 INFO  [org.alfresco.repo.module.ModuleServiceImpl] Starting module
'phpIntegration' version 1.0.
16:20:44,091 INFO  [org.alfresco.repo.module.ModuleServiceImpl] Installing modul
e 'org.alfresco.module.mediawikiintegration' version 1.1.
16:20:44,921 ERROR [org.springframework.web.context.ContextLoader] Context initi
alization failed
org.alfresco.error.AlfrescoRuntimeException: Failed to execute transaction-level
behaviour public abstract void org.alfresco.repo.node.NodeServicePolicies$OnCre
ateNodePolicy.onCreateNode(org.alfresco.service.cmr.repository.ChildAssociationR
ef) in transaction 10de3d11-2b4e-4587-ab24-5b5a22baff21
        at org.alfresco.repo.policy.TransactionBehaviourQueue.execute(Transactio
nBehaviourQueue.java:201)
        at org.alfresco.repo.policy.TransactionBehaviourQueue.beforeCommit(Trans
actionBehaviourQueue.java:133)
        at org.alfresco.repo.transaction.AlfrescoTransactionSupport$TransactionS
ynchronizationImpl.doBeforeCommit(AlfrescoTransactionSupport.java:710)
        at org.alfresco.repo.transaction.AlfrescoTransactionSupport$TransactionS
ynchronizationImpl.doBeforeCommit(AlfrescoTransactionSupport.java:690)
….

Has anyone successfully managed to get mediawiki to work with Alfresco labs (stable)?  [or should I just go back to 3c 🙂 ]
Thanks
Phil
20 REPLIES 20

mikeh
Star Contributor
Star Contributor
Bugs (or suspected bugs) should always be raised in JIRA - that's the only place we prioritise such things.

Thanks,
Mike

soliphant
Champ in-the-making
Champ in-the-making
This problem is posted on the Jira site here:

https://issues.alfresco.com/jira/browse/ALFCOM-2585

Go out and vote for it if you want it to get prioritized for getting fixed.

nicnicnicnic
Champ in-the-making
Champ in-the-making
Hello

I have looked at the Java source code to see what changed between the 3.0.0c and the 3.0.0stable. These are my conclusions:

In the 3.0.0c, modules were executed using system user credentials. This is not the case with 3.0.0stable: modules are executed using anonymous credentials, and as they are not allowed to, Java exceptions are thrown.
I modified the classes "org.alfresco.repo.module.ModuleComponentHelper", "org.alfresco.repo.module.ModuleServiceImpl", "org.alfresco.repo.admin.registry.RegistryServiceImpl" and several XML files, rewriting the references concerning "AuthenticationComponent" objects which existed on the previous software releases.

It seems to work fine on my development server, but I advice you to wait for a new official release of the software to deploy on your production server, all the more since there is probably a good (security) reason why Alfresco developers removed system user credentials for modules launcher.

Mederic

Medric,
Any chance you could/would share your changes?  We need to get moving with a MediaWiki on Alfresco deployment and hate reinventing the wheel.

Thanks in advance,
     -nic  Smiley Very Happy

ebayer
Champ in-the-making
Champ in-the-making
Hello

I have looked at the Java source code to see what changed between the 3.0.0c and the 3.0.0stable. These are my conclusions:

In the 3.0.0c, modules were executed using system user credentials. This is not the case with 3.0.0stable: modules are executed using anonymous credentials, and as they are not allowed to, Java exceptions are thrown.
I modified the classes "org.alfresco.repo.module.ModuleComponentHelper", "org.alfresco.repo.module.ModuleServiceImpl", "org.alfresco.repo.admin.registry.RegistryServiceImpl" and several XML files, rewriting the references concerning "AuthenticationComponent" objects which existed on the previous software releases.

It seems to work fine on my development server, but I advice you to wait for a new official release of the software to deploy on your production server, all the more since there is probably a good (security) reason why Alfresco developers removed system user credentials for modules launcher.

Mederic

Hi

I have tried your solution by reverting all the changes in the classes you mentioned, but when I deploy the new classses into alfresco, I get the following error:


11:56:27,614  ERROR [web.context.ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'moduleStarter' defined in class path resource [alfresco/bootstrap-context.xml]: Cannot resolve reference to bean 'ModuleService' while setting bean property 'moduleService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ModuleService' defined in class path resource [alfresco/public-services-context.xml]: Cannot resolve reference to bean 'moduleService' while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'moduleService' defined in URL [file:/opt/Alfresco/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/module-context.xml]: Cannot resolve reference to bean 'RegistryService' while setting bean property 'registryService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'RegistryService' defined in class path resource [alfresco/public-services-context.xml]: Cannot resolve reference to bean 'registryService' while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'registryService' defined in class path resource [alfresco/core-services-context.xml]: Invocation of init method failed; nested exception is org.alfresco.error.AlfrescoRuntimeException: Property 'authenticationComponent' has not been set: org.alfresco.repo.admin.registry.RegistryServiceImpl@198339a
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ModuleService' defined in class path resource [alfresco/public-services-context.xml]: Cannot resolve reference to bean 'moduleService' while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'moduleService' defined in URL [file:/opt/Alfresco/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/module-context.xml]: Cannot resolve reference to bean 'RegistryService' while setting bean property 'registryService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'RegistryService' defined in class path resource [alfresco/public-services-context.xml]: Cannot resolve reference to bean 'registryService' while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'registryService' defined in class path resource [alfresco/core-services-context.xml]: Invocation of init method failed; nested exception is org.alfresco.error.AlfrescoRuntimeException: Property 'authenticationComponent' has not been set: org.alfresco.repo.admin.registry.RegistryServiceImpl@198339a
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'moduleService' defined in URL [file:/opt/Alfresco/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/module-context.xml]: Cannot resolve reference to bean 'RegistryService' while setting bean property 'registryService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'RegistryService' defined in class path resource [alfresco/public-services-context.xml]: Cannot resolve reference to bean 'registryService' while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'registryService' defined in class path resource [alfresco/core-services-context.xml]: Invocation of init method failed; nested exception is org.alfresco.error.AlfrescoRuntimeException: Property 'authenticationComponent' has not been set: org.alfresco.repo.admin.registry.RegistryServiceImpl@198339a
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'RegistryService' defined in class path resource [alfresco/public-services-context.xml]: Cannot resolve reference to bean 'registryService' while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'registryService' defined in class path resource [alfresco/core-services-context.xml]: Invocation of init method failed; nested exception is org.alfresco.error.AlfrescoRuntimeException: Property 'authenticationComponent' has not been set: org.alfresco.repo.admin.registry.RegistryServiceImpl@198339a
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'registryService' defined in class path resource [alfresco/core-services-context.xml]: Invocation of init method failed; nested exception is org.alfresco.error.AlfrescoRuntimeException: Property 'authenticationComponent' has not been set: org.alfresco.repo.admin.registry.RegistryServiceImpl@198339a
Caused by: org.alfresco.error.AlfrescoRuntimeException: Property 'authenticationComponent' has not been set: org.alfresco.repo.admin.registry.RegistryServiceImpl@198339a
   at org.alfresco.util.PropertyCheck.mandatory(PropertyCheck.java:50)
   at org.alfresco.repo.admin.registry.RegistryServiceImpl.init(RegistryServiceImpl.java:122)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1240)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1205)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1171)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:425)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:261)
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:109)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1099)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:861)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:421)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:261)
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:109)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1099)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:861)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:421)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:261)
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:109)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1099)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:861)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:421)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:261)
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:109)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1099)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:861)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:421)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
   at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:247)
   at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:796)
   at org.springframework.context.support.AbstractApplicationContext.registerListeners(AbstractApplicationContext.java:592)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:349)
   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:244)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:187)
   at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
   at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:830)
   at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:719)
   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
   at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
   at org.apache.catalina.core.StandardService.start(StandardService.java:516)
   at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Apr 8, 2009 11:56:27 AM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Apr 8, 2009 11:56:27 AM org.apache.catalina.core.StandardContext start
SEVERE: Context [/alfresco] startup failed due to previous errors
log4j:ERROR LogMananger.repositorySelector was null likely due to error in class reloading, using NOPLoggerRepository.
Apr 8, 2009 11:56:29 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Apr 8, 2009 11:56:29 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-80
Apr 8, 2009 11:56:29 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 89240 ms

It seems I am not setting properties for this right, but I could not find out how or where should I set them. Can you share your changes in several XML files that you mentioned so I can make this work?

Kind Regards
Erdem Bayer

plexi
Champ in-the-making
Champ in-the-making
Did anyone get this working? Could you share a patch?

aluxh
Champ in-the-making
Champ in-the-making
I am looking for the solution to get the Mediawiki work in Labs (Stable) as well. Any kind souls to guide me?

ecmeins
Champ in-the-making
Champ in-the-making
I too am looking to implement the mediawiki amp file against Labs 3 (stable).  Vote has been cast in the JIRA for a fix and I will gladly test any patch recipes against my dev install while awaiting an update.

Thanks,

Eric

philnicholls
Champ in-the-making
Champ in-the-making
Wow, I'm sort of a bit gobsmacked that it's nine months later, we're now on Alfresco v3.2, and this is still broken.

If it's not been fixed, then why is the amp file included in the download area? Or am I missing something?

miudon
Champ in-the-making
Champ in-the-making
Hi!
Unfortunately, I have the same problem with Alfresco Community 3.3.0 (2765) schema 4009 - Originally installed version 3.3.0 (2765).

mfischer
Champ in-the-making
Champ in-the-making
Same for me (3.2r, 3.3g) - would be fine if anyone could upload the modified class-files…