cancel
Showing results for 
Search instead for 
Did you mean: 

Missing Share Services after upgrade SDK 2.2.0 from 5.1.e to 5.2.e

zxdev777
Confirmed Champ
Confirmed Champ

Hi all,

I created maven project from repository archetype. It works fine with default configuration of alfresco = 5.1.e

After upgrading according to documentation Upgrading SDK 2.2.0 projects from Community 5.1.e to 5.2.a | Alfresco Documentation 

I can't see Share services, when I run maven with profile amp-to-war.

So what I changed:

<alfresco.version>5.2.e</alfresco.version>
<alfresco.repo.artifactId>alfresco-platform</alfresco.repo.artifactId>

+ added dependency manually:

<dependency>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-share-services</artifactId>
<version>5.2.e</version>
<type>amp</type>
</dependency>

but it didn't help.

what is wrong with my configuration? 

Thanks

9 REPLIES 9

jpotts
World-Class Innovator
World-Class Innovator

I didn't think 2.2.0 was compatible with 5.2.e. Try using 3.0.0 which you'll have to get from github. I know 3.0.0 works with 5.2.e.

I cloned all-in-one project with SDK 3.0.0-beta-5 and just AMPs for Share works fine. 

In AMPs for Alfresco/Repo it seems spring beans are not initialized properly

jpotts
World-Class Innovator
World-Class Innovator

So using 3.0.0 everything is working fine now, correct?

I built my AMPs for Share / Repo on sdk 2.2.0. and it works fine on alfresco 5.2.e

The reason why I wanted to upgrade SDK is support for higher version of alfresco during development (sdk 2.2.0 supports just 5.1.e)

Repository's amps didn't work for me on SDK 3.0.0. As I am few days before of our pilot I decided to downgrade back to sdk 2.2.0 and develop against 5.1.e, but deploy on 5.2.e

jpotts
World-Class Innovator
World-Class Innovator

Strange, 3.0.0 is building repo AMPs without a problem for me. Your workaround should be fine unless you are developing Java classes against Alfresco classes that have method signature changes.

If you have something specific you want me to try to recreate on my 3.0.0 then provide those details. If there's a bug it would be good to report it to the SDK team via the github project.

Hi,

I have two AMPs and it seems in repo amp spring beans are not initialized..

The strange is that the same package is functioning on sdk 2.2.0 (alfresco 5.1.e) and after installation with mmt tool also on alfresco 5.2.e.

I have really simple module with structure:

/src/main/amp:

   config

      alfresco

         module

            my-module

               context

                  service-context.xml

               messages

                  xxx.properties

               module-context.xml

      module.properties

module-context:

<beans>

<bean id="document-xxxxx.resources"
class="org.springframework.extensions.surf.util.ResourceBundleBootstrapComponent">
<property name="resourceBundles">
<list>
<value>alfresco.module. ....</value>
</list>
</property>
</bean>

<import resource="classpath:alfresco/module/${project.artifactId}/context/service-context.xml" />

</beans>

service-context.xml:

<bean id="standard-creation" class="...*CreationActionExecuter" parent="action-executer">
   <property name="serviceRegistry" ref="ServiceRegistry" />
   <property name="docxTemplate" ref="docx-template" />
</bean>

In SDK 3.0.0 I put my-module to src/main/resources/alfresco/module as it used different structure

jpotts
World-Class Innovator
World-Class Innovator

I don't see your Java class anywhere.

My class is simple:

public class ...CreationActionExecuter extends ActionExecuterAbstractBase {

   private static final Log LOGGER = LogFactory.getLog(...CreationActionExecuter.class);

   private DocxTemplate docxTemplate;

   private ServiceRegistry serviceRegistry;

   public static final String NAME = "....";

   @Override
   protected void executeImpl(Action alfAction, NodeRef nodeRef) {
      ...
   }

jpotts
World-Class Innovator
World-Class Innovator

I meant, I don't see your Java class in your project structure.

Can you confirm which version of the SDK you are using and list your full project structure? I can't tell for sure whether you are using 2.2.0 or 3.0.0 and if it is 3.0.0, which project structure you are using, because it has definitely changed between the two versions.

Also, provide the error message or whatever it is that is telling you that your beans aren't being initialized.

And maybe do an MMT "list" to confirm that your repo AMP is indeed installed in your alfresco.war.