Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

commons-logging / slf4j / commons discovery - Non fatal Classloading issue when Axis (in the alfresco.war) starts up in Tomcat7 maven plugin #150

Closed
mindthegab opened this issue Jul 20, 2014 · 5 comments

Comments

@mindthegab
Copy link
Contributor

From colum...@gmail.com on October 30, 2013 02:29:49

What steps will reproduce the problem? For the AMP archetype:
1.mvn clean install -Pamp-to-war,run
2.At the end end of the Alfresco (successful) startup, the following exception is thrown when loading the Axis servlet:

SEVERE: Servlet /alfresco threw load() exception
org.apache.commons.discovery.DiscoveryException: Class org.apache.commons.logging.impl.SLF4JLogFactory does not implement org.apache.commons.logging.LogFactory
at org.apache.commons.discovery.tools.ClassUtils.verifyAncestory(ClassUtils.java:180)
at org.apache.commons.discovery.tools.SPInterface.verifyAncestory(SPInterface.java:201)
at org.apache.commons.discovery.tools.SPInterface.newInstance(SPInterface.java:195)
at org.apache.commons.discovery.tools.DiscoverClass.newInstance(DiscoverClass.java:579)
at org.apache.commons.discovery.tools.DiscoverSingleton.find(DiscoverSingleton.java:418)
at org.apache.commons.discovery.tools.DiscoverSingleton.find(DiscoverSingleton.java:378)
at org.apache.axis.components.logger.LogFactory$1.run(LogFactory.java:45)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.axis.components.logger.LogFactory.getLogFactory(LogFactory.java:41)
at org.apache.axis.components.logger.LogFactory.(LogFactory.java:33)
at org.apache.axis.transport.http.AxisServletBase.(AxisServletBase.java:58)
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 org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:138)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1144)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5033)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5317)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)

  1. Alfresco works, but (most likely, not tested) Axis won't. What is the expected output? What do you see instead? No exceptions, Axis working.

More investigation:
We clearly have a classloading issue. I tried to remove some of the commons-logging stuff following some posts on not having two commons-logging versions on the classpath, but unsuccessfully. Maybe could also be related to slf4j itself ( https://confluence.atlassian.com/pages/viewpage.action?pageId=227414216 ), not entirely sure at this time.

Original issue: http://code.google.com/p/maven-alfresco-archetypes/issues/detail?id=150

@mindthegab
Copy link
Contributor Author

From colum...@gmail.com on November 05, 2013 08:45:51

Labels: -Milestone-Release-sdk-unscheduled Milestone-Release-sdk-1.1.1

@mindthegab
Copy link
Contributor Author

From haas...@gmail.com on November 14, 2013 04:06:44

i managed to get rid of the exception by adding the bridge between commons logging and slf4j as dependency in the pom of my amp project:

org.slf4j
jcl-over-slf4j
1.5.11

@see http://www.slf4j.org/legacy.html#jclOverSLF4J

@mindthegab
Copy link
Contributor Author

From bulat.ya...@gmail.com on November 17, 2013 05:45:37

This worked for me as well, thanks!

@mindthegab
Copy link
Contributor Author

From colum...@gmail.com on November 17, 2013 05:51:09

You guys Rock!

I will look to make sure this is added both to the -Pamp-to-war profile (for the AMP) and to the -Prun profile (for the all-in-one)

Labels: -Milestone-Release-sdk-1.1.1 Milestone-Release-sdk-1.1.2

@mindthegab
Copy link
Contributor Author

From colum...@gmail.com on November 17, 2013 06:53:53

This issue was closed by revision r732 .

Status: Fixed

@mindthegab mindthegab added this to the Release-sdk-2.0.0 milestone Jul 20, 2014
@mindthegab mindthegab modified the milestones: 2.0.0-beta-1, 2.0.0-beta-3 Sep 9, 2014
@mindthegab mindthegab modified the milestones: 2.0.0-beta-4, 2.0.0 Dec 23, 2014
gehriga pushed a commit to hannecke-its/alfresco-sdk that referenced this issue May 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant