cancel
Showing results for 
Search instead for 
Did you mean: 

Locked out after installing RM module with customizations

to-nee-t
Champ in-the-making
Champ in-the-making
Hello, I am trying to customize the RM module to include some additional metadata. I started with the custom sample project at <a>github.com/Alfresco/alfresco-sdk-samples/tree/master/samples</a>. I used the project as is with no changes.
I ran
mvn clean integration-test -Prm,run
to build it and then copied the repo and share amps from sample-dir\alfresco-rm-custom\repo-amp and sample-dir\alfresco-rm-custom\share-amp and placed in C:\Alfresco\amps and C:\Alfresco\amps-share. [In case this was not the way to do it, I also tried running mvn install from inside the sample-dir\alfresco-rm-custom directory and copied the amp files the same way]

I think the custom sample project is based on RM v2.3.a, so based on the info at this link <a>https://wiki.alfresco.com/wiki/Community_file_list_5.0.a</a> I installed Alfresco Community 5.0.a on my machine. I used the MMT tool to install the amps  using these commands.
<blockcode>
java -jar alfresco-mmt.jar install ..\amps\repo-amp.amp ..\tomcat\webapps\alfresco.war
java -jar alfresco-mmt.jar install ..\amps_share\share-amp.amp ..\tomcat\webapps\share.war
</blockcode>

On starting back up alfresco and trying to log in I get the error <blockcode>Your authentication details have not been recognized or Alfresco may not be available at this time.</blockcode> Has anyone else seen something like this and knows a solution?

I attached alfrescotomcat-stdout and alfrescotomcat-stderr log files.
4 REPLIES 4

afaust
Legendary Innovator
Legendary Innovator
Hello,

your Alfresco Repository did in fact not start up and is thus not available. This is due to the initialization order of the modules which is not guaranteed. Your custom model has a dependency on the RM model, but the RM model may not have been bootstrapped yet. To prevent something like this from happening, you should add a "depends-on" config to your model bootstrap bean and make it dependant on the RM model bootstrap bean.

Regards
Axel

to-nee-t
Champ in-the-making
Champ in-the-making
Thanks for this reply. How do I find the right RM model bootstrap bean. I did a quick search on google for RM bootstrap model alfresco and found RMDataDictionaryBootstrap.xml I found the bean that loads this to be org_alfresco_module_rm_bootstrapData.

So I tried this code to bootstrap my model.
<blockcode>
   <!– Register my model –>
   <bean id="my_rm_dictionaryBootstrap" parent="dictionaryModelBootstrap"
      depends-on="org_alfresco_module_rm_bootstrapData">
      <property name="models">
         <list>
            <value>alfresco/module/my_rm/model/my-rm-model.xml</value>
         </list>
      </property>
      <property name="labels">
         <list>
            <value>alfresco/module/my_rm/messages/my-rm-model</value>
         </list>
      </property>
   </bean>
</blockcode>

Is this the right approach to find the bean? I need some help here.

The situation is the same: I'm locked out and I get this error
Context initialization failed
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'org_alfresco_module_rm_bootstrapData' is defined

to-nee-t
Champ in-the-making
Champ in-the-making
I'm still working at this. This is what I've done
I've scrapped the Alfresco installation so I could start fresh.
I started with a fresh copy of the sample code and changed
depends-on="dictionaryBootstrap"
in the module-context.xml that loads the custom model. See code block.
<blockcode>
    <!– Register my model –>
   <bean id="my_rm_dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="org_alfresco_module_rm_bootstrapData">
      <property name="models">
         <list>
            <value>alfresco/module/my_rm/model/my-rm-model.xml</value>
         </list>
      </property>
      <property name="labels">
         <list>
            <value>alfresco/module/my_rm/messages/my-rm-model</value>
         </list>
      </property>
   </bean>
</blockcode>

I ran mvn clean integration-test -Prm,run and was able to load and log into Alfresco. The output of that command is attached in output.log.

Then I tried, as mentioned before in my first post, to install the two amps created (share and repo) into the live Alfresco. I notice the error after restarting alfresco.
Context initialization failed
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'org_alfresco_module_rm_bootstrapData' is defined

and I am not able to log in due to same error. I've attached two log files from alfresco.

Should I be installing more stuff into the live site? When I compare both sets of files (the live alfresco and the samples files) I found the bean org_alfresco_module_rm_bootstrapData in sample-dir\alfresco-rm-custom\runner\target\tomcat\webapps\repo\WEB-INF\classes\alfresco\module\org_alfresco_module_rm\bootstrap but there is no reference to the same bean anywhere in my live Alfresco site. It seems like some stuff is missing. How do I ensure that I have all the dependencies for my customization downloaded in the live Alfresco?

to-nee-t
Champ in-the-making
Champ in-the-making
This is an update. I got it to work by installing Alfresco Records Management 2.3.a.1 linked here <a>  https://wiki.alfresco.com/wiki/Community_file_list_5.0.a</a> before applying my customizations. I thought that the customization had the base RM module already built into it.