Closed OpenPj closed 2 years ago
Hi, I'm using version 2.3.0 but unit testing doesn't work. I have deposited a valid license in the 'license' directory as recommended here https://github.com/OpenPj/alfresco-process-services-project-sdk/wiki/Adding-the-License-Management-to-your-current-project-(only-for-APS-SDK-versions-earlier-than-2.0.9-or-1.7.4)
I have this error message:
12:39:43 [main] INFO org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl - Replacing default BpmnParseHandler org.activiti.engine.impl.bpmn.parser.handler.ServiceTaskParseHandler with com.activiti.runtime.activiti.bean.ServiceTaskParseHandlerForPublishTasks 12:39:45 [main] INFO org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl - Executing configure() of class com.alfresco.process.engine.cfg.AlfrescoProcessEngineConfigurator (priority:0) 12:39:45 [main] INFO com.alfresco.license.LicenseHolder - Using custom license loader to load license 12:39:45 [main] INFO com.alfresco.license.LicenseHolder - Trying to load license from user home C:\Users\mnian\.activiti\enterprise-license\activiti.lic 12:39:46 [main] ERROR com.alfresco.license.LicenseHolder - License file could not be validated: com.alfresco.license.LicenseException: Expected holder info is not present at com.alfresco.license.LicenseHolder.validateLicense(LicenseHolder.java:100) at com.alfresco.license.LicenseHolder.isLicenseValid(LicenseHolder.java:72) at com.alfresco.license.LicenseHolder.verifyLicense(LicenseHolder.java:85) at com.alfresco.process.engine.cfg.AlfrescoProcessEngineConfigurator.configure(AlfrescoProcessEngineConfigurator.java:32) at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.configuratorsAfterInit(ProcessEngineConfigurationImpl.java:1586) at com.activiti.conf.AlfrescoSpringProcessEngineConfiguration.configuratorsAfterInit(AlfrescoSpringProcessEngineConfiguration.java:101) at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.init(ProcessEngineConfigurationImpl.java:920) at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:860) at org.activiti.spring.SpringProcessEngineConfiguration.buildProcessEngine(SpringProcessEngineConfiguration.java:81) at org.activiti.spring.ProcessEngineFactoryBean.getObject(ProcessEngineFactoryBean.java:61) at org.activiti.spring.ProcessEngineFactoryBean.getObject(ProcessEngineFactoryBean.java:36) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:169) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:101) at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1884) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getObjectForBeanInstance(AbstractAutowireCapableBeanFactory.java:1266) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:267) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
FYI unit tests worked before with version 1.11. do you know how to make them work with version 2.x?
Hi,
that link is needed only for people that are currently using APS SDK earlier than 2.0.9 (for APS SDK 2.x) and earlier than 1.7.4 (for APS SDK 1.x).
If you are using APS SDK 2.3.0 you don't need to follow that article because the license management is included.
Which version of the APS SDK are you using?
I use APS SDK 2.3.0 I didn't change anything on project APS SDK 2.3.0 I just put my license in ${project.parent.basedir}/license
Hi,
there is no APS SDK 2.3.0, if you look at all the releases, the latest version of APS SDK 2.x is currently 2.1.2: https://github.com/OpenPj/alfresco-process-services-project-sdk/releases
Please check in your root pom.xml and check the version. I suggest to use the latest version 2.1.2: https://github.com/OpenPj/alfresco-process-services-project-sdk/releases/tag/v2.1.2
Anyway you probably need to download an updated license file for using APS 2.x
Sorry I am using APS SDK 2.1.2
Try to execute the following command from the root once:
mvn clean package
and then the usual build:
mvn clean install docker:build docker:start -Pactiviti-admin
I found an issue when you drop for the first time the license files in the project but after the execution of mvn clean package
, license files should be copied in the right locations.
If you have issues, as a workaround you can copy license files by yourself in the following locations:
Hope this helps 😄
When I execute the command :
mvn clean package
I installed this license on an APS 2.3.0 instance and it works.
Ok it seems that your license is invalid for APS 2.x, you have to update the license file downloading it from the Hyland portal.
Be sure to have just one license (activiti.lic and transform.lic) in the following paths:
My license works well on an APS 2.3 standalone instance. I downloaded it from Hyland
Ok but probably you could have something wrong in the APS SDK project, try to download from scratch APS SDK 2.1.2. The license check is something included in the APS platform, the SDK is only using that component provided by Alfresco. I'm also testing it today because I'm working on the next version for supporting the new version 2.3.1 and it works correctly.
Do you have a unique license bundle (activiti.lic and transform.lic) inside these folders?
yes see screenshot
The error message is esplicative that something is wrong with your license. The license holder that is a field in the license descriptor is missing. Probably the license checker used in the activiti-app UI doesn't include all the checks. Try to regenerate the license file. I mean I can't do nothing because it is related to the LicenseService created by Alfresco.
Anyway it seems that the APS SDK is trying to use another license in your host machine at the following address:
C:\Users\mnian\.activiti\enterprise-license\activiti.lic
Please remove or rename that license from that path because otherwise the license checker is considering that one instead of the new one in the APS SDK project.
New versions of APS added starting from release 2.1.4: https://github.com/OpenPj/alfresco-process-services-project-sdk/releases/tag/v2.1.4
We have to add support for the following APS 2.x versions: