cancel
Showing results for 
Search instead for 
Did you mean: 

Scheduled action : templateActionModelFactory not defined

thibaut
Champ in-the-making
Champ in-the-making
Hello,

i'm trying to instantiate the bean templateActionModelFactory in order to test the scheduled simple Example of Afresco Wiki but an error occured : "
no bean named "templateActionModelFactory"  is defined . Maybe has it an other ref in v2.1 ?

Have you got this problem ?


Thanks for your answer
2 REPLIES 2

hbf
Champ on-the-rise
Champ on-the-rise
I think you need to provide it yourself.

Have a look at this post.

Kaspar

yusuf
Champ in-the-making
Champ in-the-making
Check if there is any spaces within your code itself.
for example:
18:47:35,383 ERROR [web.context.ContextLoader] Context initialization failed
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.alfresco.repo.action.scheduled.  FreeMarkerWithLuceneExtensionsModelFactory] for bean with name 'templateActionModelFactory' defined in file [C:\Alfresco
\tomcat\shared\classes\alfresco\extension\scheduled-action-services-context.xml]; nested exception is java.lang.ClassNotFoundException: org.alfresco.repo.action.scheduled.  FreeMarkerWithLuceneExtensionsModelFactory


If you look closely you'll see spacing between scheduled. and FreeMarkerWithLuceneExtensionsModelFactory.
This can be caused if the package name is on multiple lines.
For example:
Bad:
   <bean id="templateActionModelFactory" class="org.alfresco.repo.action.scheduled.
   FreeMarkerWithLuceneExtensionsModelFactory">
Good:
   <bean id="templateActionModelFactory" class="org.alfresco.repo.action.scheduled.FreeMarkerWithLuceneExtensionsModelFactory">

Hope this helps.