Alfresco / alfresco-sdk

The Alfresco In-Process SDK is based on Apache Maven, includes support for rapid and standard development, testing, packaging, versioning and release of your Alfresco integration and extension projects
Apache License 2.0
185 stars 113 forks source link

SDK 4.3 - Alfresco AIO jar archetype is including activemq-all jar at module level instead of docker project level #630

Open abhinavmishra14 opened 2 years ago

abhinavmishra14 commented 2 years ago

SDK 4.3 - Alfresco AIO jar archetype is including active-mq all jar at module level instead of docker project level

Expected Behavior

When i try to build amp and deploy to remote server it should work correctly.

Current Behavior

Alfresco fails to start after applying the amp and following error is thrown that relates to "activemq-all-xx.jar"

[web.context.ContextLoader] [main] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'handlerMappings' defined in URL [jar:file:/opt/alfresco7/tomcat/webapps/alfresco/WEB-INF/lib/spring-webscripts-8.22.jar!/org/springframework/extensions/webscripts/spring-webscripts-mvc-context.xml]: Initialization of bean failed; nested exception is java.lang.NoSuchMethodError: org.springframework.web.servlet.handler.AbstractHandlerMapping.obtainApplicationContext()Lorg/springframework/context/ApplicationContext;

See full detail here: https://hub.alfresco.com/t5/alfresco-content-services-forum/error-deploying-aio-with-sdk-4-3/m-p/310967/highlight/false#M26453

Possible Solution

Moved the activemq-all dependency from parent pom.xml to platform-docker pom.xml in order to avoid it being included in the amp. Inclusion in the amp caused issues when amp is deployed on a server.

Solution : https://hub.alfresco.com/t5/alfresco-content-services-forum/error-deploying-aio-with-sdk-4-3/m-p/310991#M26467

See the PR: https://github.com/Alfresco/alfresco-sdk/pull/628

Steps to Reproduce (for bugs)

  1. Generate alfresco AIO archetype
  2. Build the amp out of the project (no changes made)
  3. Deploy/Apply the amp to a remote server
  4. Server fails to startup.

Your Environment