Alfresco -Module 'myModule' version 1.0.19.01xxxx is currently installed and must be uninstalled before version 1.0.19.00xx

Alfresco -Module 'myModule' version 1.0.19.01xxxx is currently installed and must be uninstalled before version 1.0.19.00xx

Alfresco -Module 'myModule' version 1.0.19.01xxxx is currently installed and must be uninstalled before version 1.0.19.00xx

Ever noticed the frustrating error at Alfresco start?



Caused by: org.alfresco.error.AlfrescoRuntimeException: 11100010
Downgrading of modules is not supported.
Module 'myModule' version 1.0.19.01xxxx  is currently installed and must be uninstalled before version 1.0.19.00xx can be installed.
        at org.alfresco.error.AlfrescoRuntimeException.create(AlfrescoRuntimeException.java:51)
        at org.alfresco.repo.module.ModuleComponentHelper.startModule(ModuleComponentHelper.java:632)
        at org.alfresco.repo.module.ModuleComponentHelper.access$500(ModuleComponentHelper.java:61)
        at org.alfresco.repo.module.ModuleComponentHelper$1$1.execute(ModuleComponentHelper.java:259)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:457)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:345)
        at org.alfresco.repo.module.ModuleComponentHelper$1.doWork(ModuleComponentHelper.java:280)
        at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:548)
        at org.alfresco.repo.module.ModuleComponentHelper.startModules(ModuleComponentHelper.java:209)
        at org.alfresco.repo.module.ModuleServiceImpl.startModules(ModuleServiceImpl.java:142)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)



You can fix this couple of ways either updating the corresponding node in DB as mentioned here by Sujit, or by running a simple javascript snippet at the repository to update the nodes(module.currentVersion) property as a script or in javascript console.

What if this occurs at your development environment using Maven SDK at startup. The repository is not up yet so you cant execute a script or is difficult to connect to H2 db instance and perform an update.

Alternatively try this :

At the root of your project execute
mvn versions:set -DnewVersion=1.0.19.02xxx

The issue should be resolved :-)
Alfresco Activiti workflow deployment issues: Form key null,

Alfresco Activiti workflow deployment issues: Form key null,


Alfresco workflow :

Ever noticed below errors?

http://localhost:8080/alfresco/service/api/workflow-instances/activiti$3422

Find the workflow id from the workflow console:

Error as below?

{
    "status" : 
  {
    "code" : 404,
    "name" : "Not Found",
    "description" : "Requested resource is not available."
  },  
  
  "message" : "09090002 Unable to find workflow instance with id: activiti$ContentApprovalFlow:1:5605",  
  "exception" : "",
  
  "callstack" : 
  [ 
      
  ],
  
  "server" : "Community v6.1.2 (r589dc49b-b205) schema 13,001",
  "time" : "Oct 9, 2019, 1:35:17 PM"
}


Solution encode the request and access like
http://localhost:8080/alfresco/service/api/workflow-instances/activiti%245905?includeTasks=true


Error as below?

{
    "status" : 
  {
    "code" : 500,
    "name" : "Internal Error",
    "description" : "An error inside the HTTP server which prevented it from fulfilling the request."
  },  
  
  "message" : "09090001 Wrapped Exception (with status template): null",  
  "exception" : "",
  
  "callstack" : 
  [ 
      
  ],
  
  "server" : "Community v6.1.2 (r589dc49b-b205) schema 13,001",
  "time" : "Oct 9, 2019, 2:24:32 PM"
}

Solution: Check your definition if it is missing formkeys are configured.
alfresco formkey 
Alfresco Webscripts with PostMan (Chrome ) vs RestClient (Mozilla)

Alfresco Webscripts with PostMan (Chrome ) vs RestClient (Mozilla)


Alfresco Webscripts with PostMan (Chrome ) vs RestClient (Mozilla)


Chrome might give you a hard time while you try to execute certain webscript calls in Alfresco with 
Cross-Origin Resource Sharing (CORS) Filter: CORS origin denied: chrome-extension://coohjcphdfgbiolnekdpbcijmhambjff

Use Mozilla rest client and do a submit by setting Content-type: application/json
For example :
Below post request adds a user(with userid -userid774) to the Alfresco Administrators
Grab a ticket and submit along :

Alfresco AMP installation error

Alfresco AMP installation error

Alfresco AMP installation : java.io.FileNotFoundException: /tmp/alfresco_amps/alfresco/alfresco-consulting-repo-utils-0.5.0.amp/module.properties


java.io.FileNotFoundException: /tmp/alfresco_amps/alfresco/alfresco-consulting-repo-utils-0.5.0.amp/module.properties
        at de.schlichtherle.truezip.file.TFileInputStream.newInputStream(TFileInputStream.java:108)
        at de.schlichtherle.truezip.file.TFileInputStream.<init>(TFileInputStream.java:81)
        at org.alfresco.repo.module.tool.ModuleDetailsHelper.createModuleDetailsFromPropertyLocation(ModuleDetailsHelper.java:105)
        at org.alfresco.repo.module.tool.ModuleManagementTool.installModule(ModuleManagementTool.java:229)
        at org.alfresco.repo.module.tool.ModuleManagementTool.main(ModuleManagementTool.java:832)
Caused by: java.util.zip.ZipException: Expected 40 more entries in the Central Directory!
        at de.schlichtherle.truezip.zip.RawZipFile.mountCentralDirectory(RawZipFile.java:480)
        at de.schlichtherle.truezip.zip.RawZipFile.<init>(RawZipFile.java:150)
        at de.schlichtherle.truezip.zip.RawZipFile.<init>(RawZipFile.java:129)
        at de.schlichtherle.truezip.fs.archive.zip.ZipInputShop.<init>(ZipInputShop.java:45)
        at de.schlichtherle.truezip.fs.archive.zip.ZipDriver.newInputShop(ZipDriver.java:498)
        at de.schlichtherle.truezip.fs.archive.zip.ZipDriver.newInputShop(ZipDriver.java:481)
        at de.schlichtherle.truezip.fs.FsTargetArchiveController.mount0(FsTargetArchiveController.java:197)
        at de.schlichtherle.truezip.fs.FsTargetArchiveController.mount(FsTargetArchiveController.java:155)
        at de.schlichtherle.truezip.fs.FsFileSystemArchiveController$ResetFileSystem.autoMount(FsFileSystemArchiveController.java:85)
        at de.schlichtherle.truezip.fs.FsFileSystemArchiveController.autoMount(FsFileSystemArchiveController.java:37)
        at de.schlichtherle.truezip.fs.FsBasicArchiveController.autoMount(FsBasicArchiveController.java:113)
        at de.schlichtherle.truezip.fs.FsBasicArchiveController$1Input.getLocalTarget(FsBasicArchiveController.java:185)
        at de.schlichtherle.truezip.fs.FsBasicArchiveController$1Input.getDelegate(FsBasicArchiveController.java:200)
        at de.schlichtherle.truezip.socket.DelegatingInputSocket.getBoundSocket(DelegatingInputSocket.java:43)
        at de.schlichtherle.truezip.socket.DelegatingInputSocket.newInputStream(DelegatingInputSocket.java:63)
        at de.schlichtherle.truezip.fs.FsContextController$Input.newInputStream(FsContextController.java:273)
        at de.schlichtherle.truezip.fs.FsResourceController$Input.newInputStream(FsResourceController.java:252)
        at de.schlichtherle.truezip.socket.DelegatingInputSocket.newInputStream(DelegatingInputSocket.java:63)
        at de.schlichtherle.truezip.fs.FsSyncController$Input.newInputStream(FsSyncController.java:400)
        at de.schlichtherle.truezip.fs.FsLockController$Input$1NewInputStream.call(FsLockController.java:455)
        at de.schlichtherle.truezip.fs.FsLockController$Input$1NewInputStream.call(FsLockController.java:452)
        at de.schlichtherle.truezip.fs.FsLockController.locked(FsLockController.java:328)
        at de.schlichtherle.truezip.fs.FsLockController.writeLocked(FsLockController.java:268)
        at de.schlichtherle.truezip.fs.FsLockController$Input.newInputStream(FsLockController.java:459)
        at de.schlichtherle.truezip.fs.FsFinalizeController$Input.newInputStream(FsFinalizeController.java:177)
        at de.schlichtherle.truezip.fs.FsFalsePositiveArchiveController$1Input$NewInputStream.call(FsFalsePositiveArchiveController.java:333)
        at de.schlichtherle.truezip.fs.FsFalsePositiveArchiveController$1Input$NewInputStream.call(FsFalsePositiveArchiveController.java:326)
        at de.schlichtherle.truezip.fs.FsFalsePositiveArchiveController$TryChild.call(FsFalsePositiveArchiveController.java:507)
        at de.schlichtherle.truezip.fs.FsFalsePositiveArchiveController.call(FsFalsePositiveArchiveController.java:104)
        at de.schlichtherle.truezip.fs.FsFalsePositiveArchiveController$1Input.newInputStream(FsFalsePositiveArchiveController.java:323)
        at de.schlichtherle.truezip.file.TFileInputStream.newInputStream(TFileInputStream.java:104)
        ... 4 more
        Suppressed: java.nio.file.FileSystemException: /tmp/alfresco_amps/alfresco/alfresco-consulting-repo-utils-0.5.0.amp/module.properties: Not a directory
                at sun.nio.fs.UnixException.translateToIOException(UnixException.java:91)
                at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
                at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
                at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214)
                at java.nio.file.Files.newByteChannel(Files.java:361)

Solution:


Verified the s3 bucket where amps were unpacked and copied for deployment was corrupt!

Amazon RDS DB Update Allocated Storage -Alfresco MySQL

Amazon RDS 


DB update appear to be stuck in the modifying state when attempting to increase allocated storage.

Last week, bulk import following a content migration effort from Sharepoint to alfresco landed us in filling up of Alfresco DB metadata table aggressively and left us with no option but increase the allocated story for our MySQL DB.

This caused an enormous amount of delay in updating RDS DB instance update to increase an allocated storage of 200GB to 2000 from 30 mins to 1.35 hours. It is advisable to have this planned for off hours to have lower business impacts.

Options leveraged :

1. AWS Console




2. CLI command:

    https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ModifyInstance.MySQL.html


3. Bamboo Deployment


How to update Java Heap Size Alfresco Windows Service

How to update Java Heap Size Alfresco Windows Service


Options:
1. Update the setenv.bat/setenv.sh file
2. Update the alfrescoTomcatw.exe(service) file

Option 1: Update the setenv.bat/setenv.sh file


Step 1: Go to the <alfresco-home>tomcat\bin folder
Step 2: Edit the file setenv.bat to update the value starting with SET JAVA_OPTS.. to have the value - --JvmMx 4095 replaced with the desired maximum value, say --JvmMx 8129

Option 2: Update the alfrescoTomcatw.exe(service) file


Step1. Go to the <alfresco-home>tomcat\bin folder
Step 2: Find and right-click on the alfrescoTomcatw.exe file, click on Open

Step 3: Click on the Java tab



Step 4: Update the Maximum memory pool to the desired RAM.
Step 5: Restart the server.


Alfresco Illegal key size Issue - Solved


Alfresco Illegal key size Issue 


Ever had to add a crypto key in alfresco configurations and ran into below issue? You can try the fix mentioned below to come out of it.

Caused by: java.security.InvalidKeyException: Illegal key size or default parameters
                at javax.crypto.Cipher.checkCryptoPerm(Cipher.java:1026)
                at javax.crypto.Cipher.implInit(Cipher.java:801)
                at javax.crypto.Cipher.chooseProvider(Cipher.java:864)
                at javax.crypto.Cipher.init(Cipher.java:1249)
                at javax.crypto.Cipher.init(Cipher.java:1186)
                at org.alfresco.consulting.module.distobj.impl.DefaultConfigurationService.validateCrypto(DefaultConfigurationService.java:371)



Solution

                Step 1: Download the JCE Unlimited jars from oracle downloads 
                Step 2: Add to your JDK or JRE lib under \lib\security\
                Step 3: Set below property in the <jdk or jre home>\lib\security\java.security
crypto.policy=unlimited

                Step 4: Restart the server