cancel
Showing results for 
Search instead for 
Did you mean: 

help with unzipping .ANT file for activiti share connector

bizilux
Champ on-the-rise
Champ on-the-rise
Hello everyone,

we have activiti v1.3.3 installed, and alfresco 5.0.2.5   I believe both are latest.

so I managed to get AD working on alfresco, that was monumental success… anyways, now im trying to connect activiti to alfresco… and im having problems… or rather, I am stuck and have no clue what to do.

Provided documentation gives VERY LITTLE useful information when it comes to using .AMP files

It says:
Unzip the activiti.alfresco.repo-demo-ldap-X.X.X.amp file and take a look at the files, the settings you should pay most attention to are the ones marked with ACTIVITI SHARE CONNECTOR DEMO inside the ldap-authentication.properties file. Configure it to match your own LDAP, turn it back into an amp and finally drop it into your Alfresco One repository´s amps folder.


Well thank you very much, but how do I do all of that? I have searched for over an hour online and everywhere, and i cannot find useful information about how to unzip this damn .AMP file… all I saw was some command lines, but where the heck do I put them in? I tried CMD and everything, and downloaded ANT and all that… no luck.


Can you please tell me how to open this god forsaken amp file? Smiley Happy
19 REPLIES 19

erikwinlof
Confirmed Champ
Confirmed Champ
The demo setup uses an Apache DS LDAP server which is started automatically from the webapps-ldap/activiti-demo-ldap.war. It will have some default persons and groups that the Activiti and Alfresco can use.

The LDAP settings inside activiti.alfresco.repo-demo-ldap-1.0.0.amp is configured to use this Apache DS server and the sample groups it will contain.

bizilux
Champ on-the-rise
Champ on-the-rise
Ok, I assumed its something like that yes… I'm wondering about one thing though… right now I have AD and SSO settings inside alfresco-global.properties in tomcat/shared/classes.

When i will be configuring share connector to use my AD and SSO settings, I simply ignore alfresco-global.properties file on demo setup?

Alfresco uses AD settings inside ldap-authentication.properties file in .amp?  
and activiti uses AD settings in webapps/activiti-app/WEB-INF/classes/META-INF/activiti-app/activiti-ldap.properties?
Well, I will see in demo setup anyways.

I do hope activiti will work with H2 database, I can see in docs for "demo setup" that one should/could configure it differently… but I'm planning to do that at later stage, and with Oracle databases that we have here in the bank.

erikwinlof
Confirmed Champ
Confirmed Champ
> When i will be configuring share connector to use my AD and SSO settings, I simply ignore alfresco-global.properties file on demo setup?

If you have Alfresco working against your LDAP using your own settings and it works then that's great and you don't need that file. The share connector doesn't really know anything about LDAP, it just assumes that users in both systems are the same (which happens to be achieved by using an LDAP in the middle). In other words yes, the alfresco-global.properties found in activiti.alfresco.repo-demo-ldap-1.0.0.amp can be ignored.

If you however don't yet have Alfresco working against your LDAP, then the activiti.alfresco.repo-demo-ldap-1.0.0.amp could work as a starting point that you can configure to work against your own LDAP, if you wish. But that .amp is just for demo purposes and nothing we in Activiti officially support.


> Alfresco uses AD settings inside ldap-authentication.properties file in .amp?

Yes if activiti.alfresco.repo-demo-ldap-1.0.0.amp is deployed then that file will be deployed as well since that is where it is coming from.
So again, if you have you already have your own LDAP configurations working with Alfresco, you don't need the activiti.alfresco.repo-demo-ldap-1.0.0.amp  and thus the ldap-authentication.properties file can also be ignored.


> and activiti uses AD settings in webapps/activiti-app/WEB-INF/classes/META-INF/activiti-app/activiti-ldap.properties?

Yes it is using that file, but you should not add your own modifications to that file since it might change if you upgrade and you then have to merge your changes with the new version. Instead you should create a new activiti-ldap.properties file in your Activiti tomcat's lib folder as described in the "LDAP settings" section on the following page:
https://docs.alfresco.com/activiti/docs/admin-guide/1.4.0/

Oracle is officially supported by Activiti so that should be fine.

bizilux
Champ on-the-rise
Champ on-the-rise
ok i followed "demo setup" by the book… share connector is working. I can see tasks under "my tasks" tab… but why cant i see them under "My Workflow Tasks" in dashboard… will need to research this.

edit: ok i can see tasks if i add dashlet "My Process Tasks"… I need to research what is the difference between process and workflow. I would very much like these two to be combined i think. I suppose workflows are Alfresco share only thing… but yeah i think thats pointless… will need to research in docs

first i want to fix these errors if i can… are these errors something to worry about?

when i start alfresco… this is what i get in stdout.log

<code> 2016-01-06 09:06:30,003  ERROR [solr.core.SolrCore] [SolrTrackerScheduler_Worker-2] org.apache.solr.common.SolrException: openNewSearcher called on closed core
at org.apache.solr.core.SolrCore.openNewSearcher(SolrCore.java:1433)
at org.apache.solr.core.SolrCore.getRealtimeSearcher(SolrCore.java:1408)
at org.apache.solr.handler.component.RealTimeGetComponent.process(RealTimeGetComponent.java:169)
at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:218)
at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
at org.alfresco.solr.SolrInformationServer.getTrackerInitialState(SolrInformationServer.java:1056)
at org.alfresco.solr.tracker.AbstractTracker.getTrackerState(AbstractTracker.java:248)
at org.alfresco.solr.tracker.AbstractTracker.track(AbstractTracker.java:141)
at org.alfresco.solr.tracker.TrackerJob.execute(TrackerJob.java:47)
at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:563)

2016-01-06 09:06:30,003  ERROR [quartz.core.JobRunShell] [SolrTrackerScheduler_Worker-2] Job Solr.ModelTracker-alfresco threw an unhandled Exception:
java.lang.NullPointerException
at org.alfresco.solr.SolrInformationServer.getTrackerInitialState(SolrInformationServer.java:1063)
at org.alfresco.solr.tracker.AbstractTracker.getTrackerState(AbstractTracker.java:248)
at org.alfresco.solr.tracker.AbstractTracker.track(AbstractTracker.java:141)
at org.alfresco.solr.tracker.TrackerJob.execute(TrackerJob.java:47)
at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:563)
2016-01-06 09:06:30,003  ERROR [quartz.core.ErrorLogger] [SolrTrackerScheduler_Worker-2] Job (Solr.ModelTracker-alfresco threw an exception.
org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: java.lang.NullPointerException]
at org.quartz.core.JobRunShell.run(JobRunShell.java:227)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:563)
Caused by: java.lang.NullPointerException
at org.alfresco.solr.SolrInformationServer.getTrackerInitialState(SolrInformationServer.java:1063)
at org.alfresco.solr.tracker.AbstractTracker.getTrackerState(AbstractTracker.java:248)
at org.alfresco.solr.tracker.AbstractTracker.track(AbstractTracker.java:141)
at org.alfresco.solr.tracker.TrackerJob.execute(TrackerJob.java:47)
at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
… 1 more
</code>

stderr.log
<code>jan. 06, 2016 9:07:04 AM org.apache.catalina.core.StandardContext resourcesStart
SEVERE: Error starting static Resources
java.lang.IllegalArgumentException: Document base C:\Alfresco\ALFRES~1.5-J\tomcat\webapps-ldap\solr4 does not exist or is not a readable directory
at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:136)
at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:5141)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5326)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:672)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1859)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

jan. 06, 2016 9:07:04 AM org.apache.catalina.core.ContainerBase addChildInternal
SEVERE: ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/solr4]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:672)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1859)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.catalina.LifecycleException: Error in resourceStart()
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5327)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
… 10 more

jan. 06, 2016 9:07:04 AM org.apache.catalina.startup.HostConfig deployDescriptor
SEVERE: Error deploying configuration descriptor C:\Alfresco\Alfresco-5.0.2.5-january\tomcat\conf\Catalina\localhost\solr4.xml
java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/solr4]]
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:904)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:672)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1859)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)</code>

EDIT 2: one more question…   The most important one actually…

I want to change "demo setup" LDAP information, to my AD information that was working before on other alfresco, so that it syncs with our AD database, and then i can start working on some test processes…
Which file do I need to chose? I have all AD settings ready to go. I just need the name of file or files to change. I used to do it in alfresco-global.properties,  but right now, that file doesnt have any LDAP info in it… I fear that i will need to use .amp files and that might break stuff for me again.
Do i need to redeploy .AMP file again or is there some file in alfresco that i can change. Because i have bad experience with .amp files and if i could, i would rather just change some simple .properties file… that would be nice Smiley Happy

Do i really need to change .amp file to .zip, unzip it, change properties to that file to match my AD, zip it again, rename it to .adp, and install it onto .war? is there better option to change AD settings for both alfresco and activiti now that they are connected?

erikwinlof
Confirmed Champ
Confirmed Champ
The newest version of the share connector makes it possible to use both the new external activiti server and its processes (known as "proceesses" and available under "My Processes") BUT also the old embedded activiti processes that are available form Alresco out of the box (these old embedded processes are known as "workflows" and are available under "My Workflows"). WHen you look at the header menu in share you shall see "My Tasks" and "My Processes" which shall take you to the new external Activiti processes but it is also possible to reach the new ones by using a link up in the right corner.

#1. The error logs you are seeing are actually nothing to worry about I think since they are related to SOLR, but I'm pretty sure I know what the problem is. There was a recent change in the server-ldap-snippet.xml that is supplied by the connector for the demo setup. When adding in the new <Service> element into server.xml the <Host> element should NOT use autoDeploy="true" OR deployOnStartup="true", so please change both of those attributes to contain "false" as value instead. The problem that seems to occur is that solr gets deployed to webapps-ldap instead of to webapps, therefor also remove any solr  files that might have been dployed/copied into the webapps-ldap folder. After that restart your server and they shall hopefully be gone. If not i wouldn't worry about it anyway.

#2.To make Alfresco use your AD you have to modify ldap-authentication.properties. It lives as you know inside the activiti.alfresco.repo-demo-ldap-1.0.0.amp so either re-create the amp by unzipping and later zipping it (and bump up the amp's version number in module.properties alternatively use the "bin/applyamps.sh -force" command to re-apply an already deployed version) OR it is probably possible to instead overriding that file on the classpath by creating the following directories and file and paste in the content of the original file and then apply your changes (note i have not tested this myself):
alfresco-5.0.1.3/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/extension/subsystems/Authentication/ldap/ldap1/ldap-authentication.properties
To make Activiti use your AD just do what we discussed before and described in the Activiti ldap docs, create a tomcat/lib/activiti-ldap.properties file and type in only the properties that you want to override.

bizilux
Champ on-the-rise
Champ on-the-rise
nice thanks… I already found out about where to change ldap settings for share connector instead of doing it via .amps…

its like you said, a file <aflresco>\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\extension\subsystems\Authentication\ldap\ldap1\ldap-authentication.properties
and it does work by changing its properties… so that is great news, i dont need to mess around with .amp files.


you are writing documentation as i ask questions right? Thats nice… me getting answers, and you completing documentation based on problems from real world users and not just development team who knows much more than likes of me do. Smiley Happy

Im quite certain that this wasnt in docs before, or there might be possibility that i was blind Smiley Happy
I did find "My Activiti Tasks dashlet" on my own before you wrote last reply and also process app that is "shared with me", but yeah, it surely was confusing for a while there… I actually didnt think share connector was working, until i stumbled upon a blog by zaizi, and there was a brief mention of menu navigation "tasks", so i dug a bit deeper and found the rest. Nice to see it in docs for future people.
<code>On your Alfresco One personal dashboard page, go into customize dashboard by clicking on the cogwheel and make sure to add the My Activiti Tasks dashlet.

When logging into Activiti as admin it is possible to view the Process definitions and Review Processes app inside the Kickstart application by selecting the Shared with Me filter.</code>

——————–

One thing i have question with… Whatever process you put in app "Review Processes", that process will be shown in alfresco, and can then be deployed from there… fair enough… but what if i wanted to change name from "Review Processes" to obivously something more suiting, like "Alfresco share"… after i renamed it, it broke "My Activiti Tasks dashlet"… so i assume this is written in code somewhere? where?

I do know that some settings are written in <activiti>\tomcat\lib\activiti-app.properties  such as
<code># Enable the Alfresco Share Connector process app
app.review-workflows.enabled=true</code>
but i couldnt find any other info related to what im trying to do. I really dont know how to rename this app, or add my own app, and then that app would show into alfresco. I suppose i would have to change some alfresco files aswell.

——————–

another question: I cannot find it in docs either. How to enable more extensive logging for LDAP/AD… Right now i succesfully integrated AD with Alfresco… but on activiti, its not yet working, so some of settings are wrong, and i need help from log to see whats wrong. Basically i changed activity\tomcat\lib\activiti-ldap.properties… but something is not working, basically i cant login anymore to activiti, which means some setting is wrong, but its very hard to detect which one without logs… i dont see anything in tomcat/logs about LDAP/ad.
so how do i enable log4j for AD for Activiti?

I suspect it has to do something with Alfresco and Activiti using different login configurations… alfresco uses lukabizjak as username, but activiti wants luka.bizjak@skb.si, so yeah I think here is the problem… but i really need some more logs to confirm it. I wonder why activiti doesnt simply use lukabizjak aswell… what was the decision to use emails here, instead of the same as on alfresco… makes no sense

Or problem might be that activiti doesnt even connect and pull database of users from AD. Like i say, i dont know, i cant see any logs for this.
——————–

another quick question: when i use manager-windows.exe to stop and start alfresco again…i often need to click multiple times on stop all, for both of servers to stop… sometimes both stay on, sometimes just first ones stops, etc… any reason to worry about that, or its normal?

erikwinlof
Confirmed Champ
Confirmed Champ
Hi again, 

Alfresco uses a file activiti.properties which is mentioned in http://localhost:1313/docs/admin-guide/1.4.0/#_activiti_settings

In this file there are a number of properties that can be overridden but only the most important ones are listed in the docs linked above (not the property you are looking for though, but it will soon). As described in that link its possible to override those properties by adding the following file <alfresco-tomcat>/shared/classes/alfresco-global.properties (or using a jndi console). To change the app to use form within Alfresco Share  set the following property and restart Alfresco:
—-
activiti.appDefinitionName=Some Custom App


There is a log4j.properties in webapps/activiti-app/WEB-INF/classes that you can use to add loggers for the com.activti.idm.ldap package which is handling Activiti's LDAP integration.

Re start/stop on Alfresco, no nothing to worry about, in production you wouldn't use that app to start and stop the app anyway.
Sometimes you just need to be a little patient but indeed it does happen that the processes won't shut down.

bizilux
Champ on-the-rise
Champ on-the-rise
Hi Erik, thanks for reply.

will look into other stuff in future, but right now im still battling with AD not working on Activiti. (remember it works on alfresco)

i enabled logging by writting "log4j.logger.com.activiti.alfresco=debug" in that file.

and i do get a bit more debugging info… but still very vague in my opinion 😕

this is all i get:
<code>08:50:31,717 [http-nio-8080-exec-7] DEBUG com.activti.idm.ldap.auth.ActivitiActiveDirectoryAuthenticationProvider  - Processing authentication request for user: luka.bizjak
08:50:31,750 [http-nio-8080-exec-7] DEBUG com.activti.idm.ldap.auth.ActivitiActiveDirectoryAuthenticationProvider  - Authentication for luka.bizjak@skb.si failed:javax.naming.AuthenticationException: [LDAP: error code 49 - 80090308: LdapErr: DSID-0C0903A9, comment: AcceptSecurityContext error, data 52e, v1db108:50:31,753 [http-nio-8080-exec-7] INFO  com.activti.idm.ldap.auth.ActivitiActiveDirectoryAuthenticationProvider  - Active Directory authentication failed: Supplied password was invalid
</code>

Now it says Supplied password was invalid, does this mean my activiti mapped passwords wrongly?

or is problem with these two settings (im using exactly same AD login as for Alfresco, which might be a problem?)
ldap.synchronization.java.naming.security.principal=AppAlfresco$*******@SKB.LOCAL
ldap.synchronization.java.naming.security.credentials=*******

i've omitted some info for security reasons and whatnot…but these two values are exactly the same as for Alfresco. Should I contact AD admins to create new AD principal and credentials?
The thing is… I dont even know if users get imported from AD… there is no mention of that anywhere, of it synchronizing users… is there a way to check how many users there are in Activit database? Is there some file where i can check this?  Because I will see right away if its even fetching AD database when there are 5 users instead of 1500 users.

erikwinlof
Confirmed Champ
Confirmed Champ
Hello again,

I'm sorry when it comes to connecting to your own AD I am of little help. The settings should indeed be the same form both systems so if those settings are working from Alfresco and you can login as luka.bizjak there I'm not sure what the problem is.

Feel free to connect to the Activiti database, you will find the DB in the datasource.xxx properties in the activiti-app.properties file.

bizilux
Champ on-the-rise
Champ on-the-rise
Ok thanks

Well in alfresco we login as  "lukabizjak" and password.  Activiti expects emails… so mine would be "luka.bizjak@skb.si"

but i think problem is elswhere… I tried using Reset password option that is available if you login to activiti, and i can reset password for "admin@app.activiti.com"  the one that comes already with activiti… but i could not reset password for "luka.bizjak@skb.si". Which leads me to believe that users from AD are not fetched.

Now i've sent in request to add new principal to AD… so that it wont be ldap.synchronization.java.naming.security.principal=AppAlfresco$***@SKB.LOCAL  anymore… but
ldap.synchronization.java.naming.security.principal=AppActiviti$***@SKB.LOCAL

…I think it wont change anything…but im really at the point where I will try every single option and do restarts all the time until i get in.

I will report back when i hopefully make some progress.

I couldnt really check database… not sure how to even open it… I'm not database kind of guy heh… I tried putting that address in various forms into browser, with no luck… any tips? Smiley Happy

datasource.driver=org.h2.Driver
datasource.url=jdbc:h2:tcp://localhost:9092/activiti
datasource.username=alfresco
datasource.password=alfresco