alfresco-system-usage-statistics

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

alfresco-system-usage-statistics

Jump to solution

Hi

I'm trying to get alfresco-system-usage-statistics from Redpill-Linpro https://github.com/Redpill-Linpro/alfresco-system-usage-statistics working, but when I put the jar files (alfresco-system-usage-statistics-repo-1.1.4.jar, alfresco-system-usage-statistics-repo-1.1.4-javadoc.jar, alfresco-system-usage-statistics-share-1.1.4.jar) in tomat/shared/lib, I'm unable to login to Alfresco.

tomcat/logs/catalina.out shows that the Authentication subsystem has failed to start (or more accurately, it started and then stopped). The error is: 

2020-03-30 10:22:17,280 INFO [management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Starting 'Authentication' subsystem, ID: [Authentication, managed, ldap-ad1]
2020-03-30 10:22:17,359 WARN [authentication.ldap.LDAPInitialDirContextFactoryImpl] [localhost-startStop-1] LDAP server supports anonymous bind ldap://192.168.10.11:389
2020-03-30 10:22:17,421 INFO [management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Startup of 'Authentication' subsystem, ID: [Authentication, managed, ldap-ad1] complete
2020-03-30 10:22:17,422 INFO [management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Starting 'Authentication' subsystem, ID: [Authentication, managed, alfrescoNtlm1]
2020-03-30 10:22:17,515 INFO [management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Startup of 'Authentication' subsystem, ID: [Authentication, managed, alfrescoNtlm1] complete
2020-03-30 10:22:17,781 WARN [context.support.XmlWebApplicationContext] [localhost-startStop-1] Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'patch.updateAdminUserWhenDefault' defined in URL [jar:file:/opt/alfresco-community/tomcat/work/Catalina/localhost/alfresco.war/WEB-INF/lib/alfresco-repository-5.2.g.jar!/alfresco/patch/patch-services-context.xml]: Invocation of init method failed; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [org.redpill.alfresco.repo.statistics.service.ReportSiteUsage] for bean with name 'rl.reportSiteUsage' defined in URL [jar:file:/opt/alfresco-community/tomcat/shared/lib/alfresco-system-usage-statistics-repo-1.1.4.jar!/alfresco/module/system-usage-statistics/context/bean-context.xml]: problem with class file or dependent class; nested exception is java.lang.NoClassDefFoundError: org/springframework/beans/factory/InitializingBean
2020-03-30 10:22:18,273 INFO [management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Stopping 'Authentication' subsystem, ID: [Authentication, managed, ldap-ad1]
2020-03-30 10:22:18,274 INFO [management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Stopped 'Authentication' subsystem, ID: [Authentication, managed, ldap-ad1]
2020-03-30 10:22:18,274 INFO [management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Stopping 'Authentication' subsystem, ID: [Authentication, managed, alfrescoNtlm1]
2020-03-30 10:22:18,274 INFO [management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Stopped 'Authentication' subsystem, ID: [Authentication, managed, alfrescoNtlm1]
2020-03-30 10:22:18,277 ERROR [web.context.ContextLoader] [localhost-startStop-1] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'patch.updateAdminUserWhenDefault' defined in URL [jar:file:/opt/alfresco-community/tomcat/work/Catalina/localhost/alfresco.war/WEB-INF/lib/alfresco-repository-5.2.g.jar!/alfresco/patch/patch-services-context.xml]: Invocation of init method failed; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [org.redpill.alfresco.repo.statistics.service.ReportSiteUsage] for bean with name 'rl.reportSiteUsage' defined in URL [jar:file:/opt/alfresco-community/tomcat/shared/lib/alfresco-system-usage-statistics-repo-1.1.4.jar!/alfresco/module/system-usage-statistics/context/bean-context.xml]: problem with class file or dependent class; nested exception is java.lang.NoClassDefFoundError: org/springframework/beans/factory/InitializingBean
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1514)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:636)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:938)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:113)
at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:70)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5118)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5634)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1092)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1984)
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:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [org.redpill.alfresco.repo.statistics.service.ReportSiteUsage] for bean with name 'rl.reportSiteUsage' defined in URL [jar:file:/opt/alfresco-community/tomcat/shared/lib/alfresco-system-usage-statistics-repo-1.1.4.jar!/alfresco/module/system-usage-statistics/context/bean-context.xml]: problem with class file or dependent class; nested exception is java.lang.NoClassDefFoundError: org/springframework/beans/factory/InitializingBean
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1281)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:575)
at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1347)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:358)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:322)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:260)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:293)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1131)
at org.alfresco.repo.admin.patch.impl.AdminUserPatch.afterPropertiesSet(AdminUserPatch.java:117)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1573)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1511)
... 26 more
Caused by: java.lang.NoClassDefFoundError: org/springframework/beans/factory/InitializingBean
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1878)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1735)
at org.springframework.util.ClassUtils.forName(ClassUtils.java:265)
at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:419)
at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1299)
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1270)
... 37 more
Caused by: java.lang.ClassNotFoundException: org.springframework.beans.factory.InitializingBean
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 56 more

and I added:

rl.statistics.internalUsersZoneName=AUTH.EXT.ldap1
rl.statistics.minLoginsTrackingLimit=1
rl.statistics.daysBackTrackingLimit=30

audit.stats-authentication=true

#Run each saturday at 03.00
rl.statistics.jobs.userStatistics.cron=0 0 3 ? * SAT
rl.statistics.jobs.userStatistics.enabled=true
#Run each sunday at 03.00
rl.statistics.jobs.siteStatistics.cron=0 0 3 ? * SUN
rl.statistics.jobs.siteStatistics.enabled=true
#Run each sunday at 13.00
rl.statistics.jobs.summaryStatistics.cron=0 0 13 ? * SUN
rl.statistics.jobs.summaryStatistics.enabled=true
#Run each sunday at 09.00
rl.statistics.jobs.userEmailStatistics.cron=0 0 9 ? * SUN
rl.statistics.jobs.userEmailStatistics.enabled=true
                                                        

to tomcat/shared/classes/alfresco-global.properties.

Does anybody have any idea what I'm missing? Is it anything to do with the entry below?

rl.statistics.internalUsersZoneName=AUTH.EXT.ldap1

Note: I didn't set this up so although I've been told they're using LDAP, I don't know anything about it.

Thanks

1 Solution

Accepted Solutions
Highlighted
Active Member II

Re: alfresco-system-usage-statistics

Jump to solution

This turned out to be an issue with the stats package being written for a different version of Alfresco to the one I was trying to use it with.

View solution in original post

3 Replies
Highlighted
Active Member II

Re: alfresco-system-usage-statistics

Jump to solution

Looking at this more closely, the actual problem seems to be:

nested exception is java.lang.NoClassDefFoundError: org/springframework/beans/factory/InitializingBean

but I'm not sure if that means the problem is in spring or the thing calling it.

Highlighted
Active Member II

Re: alfresco-system-usage-statistics

Jump to solution

This turned out to be an issue with the stats package being written for a different version of Alfresco to the one I was trying to use it with.

View solution in original post

Highlighted
Community Manager
Community Manager

Re: alfresco-system-usage-statistics

Jump to solution

Hi @wshomeworker10,

We've all been there! Glad you got it sorted and thanks for updating us - useful for other community members.

Cheers,  

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!