cancel
Showing results for 
Search instead for 
Did you mean: 

sdk and records management

davidraines
Champ on-the-rise
Champ on-the-rise
I'm trying to add Records Management support to an Alfresco project created from the SDK 2.0.0 all-in-one archetype, and I get the error "Bean property 'useLocalCaches' is not writable".  This was discussed before, but solution isn't working for me.  I'm stuck.

When I run:
    
$mvn integration-test -Prun

my application loads correctly, but when I run
    
$mvn integration-test -Prun,rm

it fails.

And it works, but when I add "rm" to the list of profiles, I get the error "Context initialization failed"
caused by:
Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'useLocalCaches' of bean class [org.alfresco.ibatis.HierarchicalSqlSessionFactoryBean]: Bean property 'useLocalCaches' is not writable or has an invalid setter method.


I see that this was discussed <a href="https://forums.alfresco.com/forum/developer-discussions/development-environment/records-management-p...
">before</a>

The solution was to run the command:
$mvn clean install -Prm


I can run that command without error.  But that command doesn't actually launch my server.  When I try to <b>run</b> the All-in-one project I've created:
$mvn install -Prun,rm
   OR
$mvn integration-test -Prun,rm


The error occurs, and Alfresco doesn't launch correctly.
Am I missing something?

Thanks,
David
1 REPLY 1

davidraines
Champ on-the-rise
Champ on-the-rise
Replying to my own question.

I changed the central pom.xml file of my project to reference alfresco-rm 2.3, instead of 2.3.a.1, and the problem went away.  The version generated by the Maven archetype had the "rm" profile specified as:

<profile>
            <id>rm</id>
             <properties>
                <alfresco.rm.version>2.3.a.1</alfresco.rm.version>
                <app.rm.amps.location>${project.build.directory}/rm-amps</app.rm.amps.location>
                <app.rm.war.location>${project.build.directory}/${project.build.finalName}.war</app.rm.war.location>
                <app.rm.artifact>org.alfresco:${alfresco.rm.artifactId}:${alfresco.rm.version}:amp</app.rm.artifact>
             </properties>
        </profile>


and I replaced it with:

<profile>
            <id>rm</id>
             <properties>
                <alfresco.rm.version>2.3</alfresco.rm.version>
                <app.rm.amps.location>${project.build.directory}/rm-amps</app.rm.amps.location>
                <app.rm.war.location>${project.build.directory}/${project.build.finalName}.war</app.rm.war.location>
                <app.rm.artifact>org.alfresco:${alfresco.rm.artifactId}:${alfresco.rm.version}:amp</app.rm.artifact>
             </properties>
        </profile>


Its odd that the archetype seems to have shipped with a bad version specified, maybe I'm still missing something, but this seems to have worked.

-David