How to get OpenMAINT and Alfresco DMS on Win 10 PC & Win VPS


(note-updated 9 oct 2017- dms.conf file altered and dms in openmaint altered- see below)

After reading the CMDBuild Technical Manual on how to set up DMS (Document management System) Alfresco and integrate the two, I attempted to have a go at it.

I did a separate install for Alfresco 3.4d (this was the one suggested in openMAINT specs) and the challenge was to have TWO Tomcat Servers running side by side.

Since the Environmental Variable setting CATELINA_HOME pointed towards the openMAINT Tomcat you had to use CATALINA_BASE to point to the Alfresco instance, and in the Tomcat docs it told you which files to use /leave /hide to allow the two instances to work.

Well I didn’t get very far with that!!

So I thought, The Alfresco directory is setup C:\alfesco\tomcat   and the openMAINT is a setup as C:\tomcat. So how about running the 2 off the same instance.

In “Kicking Tech” blog Charanya talks about writing a blog on how to have CMDBuild & Alfresco working off the same Tomcat instance, but hasn’t got around to it yet.  But he has written a few blogs on CMDBuild and Alfresco setups that are pretty useful.  As openMAINT is a reconfigured CMDBuild a lot of the things in the posts are relevant to this setup.

The blog I followed for setting up Alfresco as far as setting went was this one: alfresco-community-edition-4-2-step-by-step-manual-installation which I found really helpful, thank you Charanya.

So since there is a deeper tree in alfresco, I decided to move my openMAINT tomcat under that. Basically I changed the existing C:\alfesco\tomcat to C:\alfesco\Xtomcat and copied my C:\tomcat setup that already had openMAINT running into the C:\alfesco\tomcat  directory, and did a few edits to files to acknowledge the new path.

In one of my VPS’s I had an instance of openMAINT, with shark and alfresco all running, I used my test AWS instance to do this, but have not been able to create attachments in the openMAINT “Demo” DB with the cards , I keep on getting errors. Somewhere on the way, some of the Inventory Items tree got passed across to Alfresco and I was able to upload attachments in Alfresco and associate them with “Rooms”? in openMAINT, but still cannot view them in openMAINT, although they do seem to be in the alfresco db.  So a partial solution to date on the VPS side. The 2nd instance on my main Conrtabo server is crashing and burning big time (the issue was the openMaint DMS page setup paths -fixed- so this applies to windows server VPS’s too)

Databases and stuff. If you try and install later versions of alfresco-community it wants to load  a postgreSQL 9.4 database with the installation. I didn’t want that as I would have to use different ports for them and have them both running (due to my earlier decision to run with postgresql 9.3. This may not be an issue to you but it was to me. So that is why I stuck with the alfresco-community 3.4d edition, you have a choice to connect to an existing DB. Much easier.

Setting up DMS (Document Management System) Alfresco

I have a current setup on my computer of PostgreSQL 9.3, with openMAINT  2.4.3 & Shark workflow working. There are blogs about these on this site. Look at those for setup prior to exploring this one.

The setup I have is based in a directory C:\tomcat. It is all running happily.

  1. Download & Install Alfresco-community 3.4d edition.

Go to HERE for download. I have 64 Bit version. Install it.

Below, this was originally C:\Alfresco but I hate upper case unless necessary & I altered it. In my file I didn’t notice that it was still pathing to C:\Alfresco and that caught me out for a little while, so be aware.

See my note about DB’s at the end of the Background waffle section above.

Leave whats there andf press next, we do this setup later (thanks Kicking tech for that)

Dont bother changing, leave as 6060, the instance where I changed(VPS) lots of grief, other instance not changed, no problems.

Whatever you want, just dont forget it.

Then the install happens.

2. Repoint CATALINA_HOME to C:\alfresco\tomcat instance (and also database.manager.configuration (one below- ((for SHARK)))

3. Role & Database setup

Setup a new  Role alfresco (1)- Just right click on Login Roles and add.

Add Database  alfresco.(2). Right click on the Databases icon (above alfresco DB) and add new DB.

(3) if you click on Schema & Public  you will see that there are no tables, it is empty. We will manage this later on one of our settings in the C:\alfresco\tomcat\shared\classes\ file later

This will be a blank database.

Make the Owner of alfresco database alfresco (role)

In Kicking Tech Alfresco setup blog Charanya give more privileges  to the public role, so please do that.

4. Directories and stuff. Musical Chairs

The alfresco setup on install looks like this. You see that there is a tomcat directory inside the alfresco directory.

Now lets mess around with them.

The existing C:\alfresco\tomcat change to say C:\alfresco\Xtomcat  (we need the shared folder inside it, so don’t delete it yet.

Copy the existing version of tomcat from C:\tomcat to  C:\alfresco\tomcat . This will have your working openMAINT setup inside. So if  you stopped at this point and fired up

C:\alfresco\tomcat\bin\startup.bat it should  let you open a browser to http://localhost:8080/openmaint it should fire up your openMAINT (as long as you have your database open and have changed the envirnomental variable to point CATELINA_HOME to the new tomcat location) quite happily.

You can check that out and then shut it down C:\alfresco\tomcat\bin\shutdown.bat

We have a few things to do yet.

From Xtomcat directory, copy across the shared directory to the new tomcat directory

From the Xtomcat\webapps directory  copy across the 4 war files as shown below

BELOW THIS IS IMPORTANT IF YOU DO NOT WANT “WQS cannot connect to repository” error at end of startup

In the alfresco directory make the following subdirectory User Homes  (misspelt in the image below) and inside that make a subdirectory cmdbuild

So you will have C:\alfresco\User Homes\cmdbuild

Now, a couple of things to mention here.

  1. Catalina cannot see the tomcat\shared directory, so we will need to point to it.
  2. inside tomcat\lib we should be copying the postgresql-9.4.1207.jar file, but as we’ve already set that up with our opernMAINT install and copied that whole directory across, we do not need to. (This is the driver that Alfresco needs to link to the PostgreSQL database,so an important file).

5. Now lets do some configuring

I use 2 references here for the setup.

1 . The kicking Tech  alfresco-community-edition-4-2-step-by-step-manual-installation

2. The CMDBuild Technical Manual pages 31 to 32 shown below


I basically followed the Kicking Tech process, but that is for the alfresco install only. One thing to note with that, is that you need to make sure that in the file there is the line that is mentioned in the Tech manual :

db.schema.update = true (( to begin with,  so when you run the WAR files (on tomcat startup) it will populate the Database with tables)  then after we’ve checked that its done its job we can REM(#) it out or change it to db.schema.update = false, items 9 & 10 in the image above)

Change the catelina file below as per Kicking Tech

“Then, we need to tell Catalina to use those 2 directories when starting up Tomcat. Open up <Tomcat Home>/conf/ and edit the shared.loader property as below

Add Heap Space as per Kicking Tech

add Heap Space to Tomcat to prevent heap errors during operation. For this, go to <Tomcat Home>/bin/startup.bat (assuming you are on a Windows system, else edit and add this line at the top.
set "CATALINA_OPTS=-Xms256m -Xmx512m -XX:MaxPermSize=196m"

Then we have to configure the  C:\alfresco\tomcat\webapps\openmaint\WEB-INF\conf\dms.conf file to reflect what CMDBuild is doing above.

#dms.conf  file setup (updated 9 oct 2017)







# (Changed) Homes/cmdbuild Homes/cmdbuild

# next line altered too

# Changed- Remove C: repository.fspath=C:/alfresco/User Homes/cmdbuild

repository.fspath=/alfresco/User Homes/cmdbuild

dms.service.cmis.path=/User Homes/cmdbuild


# file setup



### database connection properties ###


### FTP Server Configuration ###

### RMI service ports ###

### External executable locations ###

### Initial admin password ###

So now we are ready to fire up tomcat, so:

C:\alfresco\tomcat\bin\startup.bat ( note I make a desktop shortcut to this and the shutdown.bat and the PgAdmin3.exe files, so they are handy icons to fire up).

So now, hopefully the following happens:

  1. The 4 war files are unpacked
  2. The tables are created in the database alfresco.
  3. The tomcat server is running without problems.

As you can see above , the tables have been created.

And below, all seem to be operating in Tomcat

So we go back to file setup

and make:


Then save that file.

So, lets shut it down and remove the war files ( I put them in a directory C:\alfresco\tomcat\HIDE just in case I need to blow the directories they made away and rebuild them).


Remove war files from  C:\alfresco\tomcat\webapps

There should be directories with the same names as the war files (if there arn’t then something Not Good Happened- fix it)

So, now that is all cleaned out , refire up tomcat again: C:\alfresco\tomcat\bin\startup.bat

And now lets go to the browser, fire up 4 tabs:

  1. http://localhost:8080/openmaint – login as Administrator (username : admin, password: admin are default)
  2. http://localhost:8080/openmaint- login as Administrator (username : admin, password: admin are default) then change to Data Management Module.
  3. http://localhost:8080/alfresco- login as Administrator (username : admin, password: admin are default)
  4. http://localhost:8080/share- login as Administrator (username : admin, password: admin are default)

Yes, two tabs of openMAINT, we need one to be in the Administration module and one to be in the Data Management Module.

Go to the OpenMAINT Data Management Module. Most of this would have been configured in the dms.conf file.

(9th Oct update– Image below slightly incorrect. Item 10– remove C:, it should start /alfresco/User Homes/cmdbuild.

Item 14 should read cm:cmdbuild )

Go to the OpenMAINT Administration module

The key point, is the attachments tab NOT Greyed out.

This is the Alfresco page.

We go into My Home on panel on the left, then User Homes and create space cmdbuild (to mirror what is in openmaint DMS setup above).

We then go into Administration Console , the little square icon, choose category management and Add category AlfrescoCategory to match openMAINT DMS setup.

(Added 9th Oct 2017-Also, check that there are 2 categories under AlfrescoCategory, namely Image & Document. I have 3 instancs running and on one I needed to create these categories)

Close all the lot down and restart the Tomcat server. Then fire it up again.  Open the openMAINT browser tab and in the example below, I have gone to floor, Clicked on upper flor in the database rows, Clicked on attachments tab, then clicked on add attachment

This gives you a pop-up where you can choose doc type, select a file from your computer, and fill in description. All 3 items required, then click on OK at bottom.

You will see that there is now a new row with the attachment in openMAINT. There is a butto to the RIGHT where you can choose to download the document from open MAINT. Actually the Download Button opens another tab to display the PD. Not sure how many file types it can view, an exploration for another day.

If we jump back to Alfresco, you will see that there is now a Tree with the elements that have attachments shown, I have made attachments for Building, Floor and Unit so far, you can see these three shown below.

If we click on floor, we will see there is a document t there, and if we click on  the filename (keyPlan.pdf) it will open another tab to show a preview from within Alfresco. A point to note. The floor reference in Alfresco is Id261731 , see 3 slides below

And below is the preview tab for the 2D pdf. It doesn’t do it for 3d pdf’s, you have to actually download to view the 3D models ( a shame, but a browser issue)

Ok, so the The floor reference in Alfresco is Id261731  is the ID reference in the openMAINT Database Table Floor that refers to the Upper Floor. So that is right, just not very clear. Maybe there can be a better referencing to allow for previewing information in Alfresco.

Since I have only got the tool running now, I’ll need to explore it further. Nice linkage and its all held in the Same instance of PostgreSQL so the 2 databases, alfresco and the openmaint are linked together. Very elegant.

One other thing about Alfresco is the share page. I think you have to have Alfresco open before you can open Share. The thing I tried to get running was sites and that has the OK button greyed out, so I’m not too sure what you would use it for. I’ll need to watch a few youtube vids to figure the Alfresco side out

Another cool thing is that Filezilla links to the Alfresco site so that may be a handy way to upload lots of files.

That is an interesting thought! I’m not sure whether openMAINT will read the files if you push them up through Alfresco.

That is going to be an interesting exercise. I will most probably break it, and since I have only just got the toy working, it will have to wait for another day. ( I couldn’t resist it- see below)

I hope this is a help to others.

I started on the VPS’s to get this up and running and still having a lot of grief over those. If anyone has any insights into how to get them running I’d appreciate some help.

I have been trying to get the email side going prior to focussing on the DMS but sort of crashed and burned so far on that one. When I get the email up and running and the DMS both on the server I think openMAINT will be a pretty comprehensive tool.  Just a shame the documentation is hard to find.

Can you push attachments backwards?

A test. Using Filezilla to upload files to Alfresco and push into openMAINT

Filezilla- Copied file from PC to Alfresco

Alfresco- File is showing

openMAINT. There it is. Note, no author and no Description, no category or version. I suppose its good for bulk uploads on setup.

Not sure if I’ve broken the toy but its fun to try these things.


Add a Comment

Your email address will not be published. Required fields are marked *