Installing multi-user help

Post Reply
iWeb
Posts: 3
Joined: 29 Jul 2013, 12:56

hi,
I am following the instructions from http://www.enterprise-architecture.org/ ... multi-user and I have reached section 14 - Repository Database Configuration. I am not familiar with Protege and I am really struggling.
1. I don't know whether I should have the metaproject or the Repository project open when trying to 'Convert Project to Format ...'?
2. No matter which project I try to convert and use the following:
Driver Class Name
com.microsoft.sqlserver.jdbc.SQLServerDriver
JDBC URL
jdbc:microsoft:sqlserver://localhost:1433/essentialdb

I get the following 'The JDBC driver is not the classpath' message. I have copied the jtds-1.3.1.jar file, renamed it driver.jar. The database is created in 'Microsoft SQL Server 2005 - 9.00.5000.00 (X64)
Dec 10 2010 10:38:40
Copyright (c) 1988-2005 Microsoft Corporation
Standard Edition (64-bit) on Windows NT 6.1 (Build 7601: Service Pack 1)
' and the essential user has been created as owner of the databsase.

Can you help me get past this step in the installation. Any help would be most appreciated.

Thanks
User avatar
jonathan.carter
Posts: 1087
Joined: 04 Feb 2009, 15:44

You can convert the Protege project to use the database before or after you define the metaproject. I normally do this before defining the meta project but it's no problem if you have already defined the meta project.

As some more background, the metaproject tells the Protege server which projects to serve but does this by pointing the server to the relevant projects. Each of these can be backed by a database (recommended) or via the Protege files (not recommended), so they are not intrinsically linked.

Just to be clear, the JDBC driver needs to be in the Protege install root folder, e.g. C:\Program Files\Protege_3.4.8
On the database driver, I've had some trouble in the past getting the URL correct for MS SQL Server. I'm also not familiar with that particular JDBC driver file. I have successfully used:

- Driver: sqljdbc4.jar (copied to <PROTEGE INSTALL>/driver.jar) from the latest version 4 JDBC drivers for MS SQL.

Parameters in the 'convert' panel:
- Driver Class Name: com.microsoft.sqlserver.jdbc.SQLServerDriver
- URL: jdbc:sqlserver://localhost;databaseName=essentialdb

It's very important to get the syntax of the URL correct. I have spent hours in the past when I hadn't noticed the ';' character in there!

Hope this helps

Jonathan
Essential Project Team
iWeb
Posts: 3
Joined: 29 Jul 2013, 12:56

Thanks, that helped. I have come accross another stumbling block.

Tried to run the following run_protege_server.bat file as instructions on http://www.enterprise-architecture.org/ ... multi-user, Step 18. The server startup failed (java.lang.RuntimeException) I have attached a zip file of what appeared in the command prompt window.

Have I missed something, can you help.
Thanks
You do not have the required permissions to view the files attached to this post.
User avatar
neil.walsh
Posts: 444
Joined: 16 Feb 2009, 13:45
Contact:

Hi,

Again, I'm also unfamiliar with this particular JDBC driver. Looking at the logs it appears there remains a problem with JDBC drive installation.

Code: Select all

Unable to load knowledgebase jdbc:sqlserver://localhost;databaseName=es
sentialdb  -- java.lang.RuntimeException: class not found: com.microsoft.sqlserver.jdbc.SQLServerDriver

Code: Select all

SEVERE: server startup failed -- java.lang.RuntimeException: class not found: com.microsoft.sqlserver.jdbc.SQLServerDriver
I'd suggest taking another look at the documentation for the driver. Have you properly set the class path? On Windows, this is in the environment variables.

Cheers

Neil
iWeb
Posts: 3
Joined: 29 Jul 2013, 12:56

Hi,

When I converted the project, the database table was created in the SQL Server database following the advice from Jonathan in the previous post.

Do you know of any other people installing on a SQL Server that I could contact?

thanks
Cat
monetti
Posts: 7
Joined: 15 Jan 2013, 21:11

I'm using SQL Server 2012 on Azure, using Protege' 3.5, because Essential won't recognize the later version of Protege'.
I finally got all the strings correct and I don't get any errors. However, nothing happens either; it just hangs there, no error message whatsoever. I verified that the DB is reachable and I manually created a test table in essentialdb to verify that the permissions were correct.
User avatar
neil.walsh
Posts: 444
Joined: 16 Feb 2009, 13:45
Contact:

Hi,

It might be worth trying with Protege version 3.4.8 as we haven't done any testing with 3.5 yet.

Just to be clear, the phrase "Essential won't recognise later versions of Protege" is not incorrect but more specifically that version 4.x of Protege is a different product to version 3.x. The v3.x branch remains in active development and is required as the version 4.x branch does not have Frames support.

Cheers

Neil
monetti
Posts: 7
Joined: 15 Jan 2013, 21:11

Thank you, Neil. I appreciate the clarification on Protégé 3.x vs. 4.x.

Concerning the 3.x release, I tried both 3.4.8 as 3.5, both with a clean install. Both have the same issue.
It may be an issue of OS (Win Server 2012)or some other system software. Maybe I'll try using a Linux VM instead.
User avatar
jonathan.carter
Posts: 1087
Joined: 04 Feb 2009, 15:44

We have many successful installs using MS SQLServer as the database.

There are some things to watch out for - in particular the format of the JDBC URL is different, compared to MySQL for example, and I've spent a lot of time checking and double checking that before getting the convert to database to work correctly.

Also, make sure you have the correct MS SQLServer JDBC drivers. There are two versions of them and you need to take account for 64-bit or 32-bit Windows. Having said that I've used SQLServer on both 32 and 64 Windows with Protege.

Neil is correct about Cat's post, Protege seems unable to find the driver. Make sure to copy JDBC driver JAR files to the Protege root folder and rename them 'driver.jar', 'driver1.jar' etc. This is simpler than editing Protege's class path to pick up the specific JAR files.

We haven't really tested Protege 3.5 yet but I do note that there are some modifications around the convert to database project which may be relevant here. Try downloading and using Protege 3.4.8 (you can have as many Protege installs as you like), loading the same repository and converting it to your SQLServer database. Let me know whether this works or not.

We will do some further testing with Protege 3.5 and report any issues that we find.

Jonathan
Essential Project Team
monetti
Posts: 7
Joined: 15 Jan 2013, 21:11

Jonathan,

Thanks for your reply. Sorry I wasn't clear. I tried both 3.4.8 and 3.5.
I got the jdbc driver files from the MS website for the version of MMSSQL I am using. I renamed them as driver.jar and driver0.jar.
I know the strings (jdbc and URL) are correct because it took me quite a bit to get them right; when they are not I receive an error message.
The database is up with the firewall rule in place; I tested connectivity from my local machine and it works. Both the EA server and the MSSQL server are on Azure; maybe there is some other configuration I need to worry about if it's an Azure environment?

Thanks! Gabriele
User avatar
jonathan.carter
Posts: 1087
Joined: 04 Feb 2009, 15:44

Thanks for posting back and telling us more about your setup.

It could well be something about the Azure setup but I wonder if we should look at that firewall. It sounds like there is a firewall between the Protege server and the database server. Is that correct?

Also, are there any messages in the Protege logs that report any problems communicating with the database? You will find these in the Protege root folder in a folder called 'logs'. Are there any exceptions reported in there?

This article might be of some help, in particular connecting a local Java application to an Azure SQLServer.

Jonathan
Essential Project Team
monetti
Posts: 7
Joined: 15 Jan 2013, 21:11

Jonathan,

I finally succeeded by performing the installation directly on the SQL Server VM. It worked like a charm, which seems to indicate that the issue is with Azure to Azure communication. Even when I put the two VMs on the same Cloud Service, it still didn't work.
Now I look at the DB and I only see one table with 9 columns, which doesn't seem right.. Am I suppose to convert the metaproject (metaproject.pprj) or the project itself (essential_baseline_v4.3.1.pprj)? I converted the latter.
User avatar
jonathan.carter
Posts: 1087
Joined: 04 Feb 2009, 15:44

Great to hear that you resolved the SQL Server issue and thanks for posting back. It’s good to have this sort of experience shared with the community.

What you’ve got in the DB is correct. The underlying meta-meta- model is very simple and is one of the key reasons that the Essential Meta Model can be so extensible and flexible. This means that each Protege project (Essential repository) is stored in a single table with just the 9 columns.

It’s very normalised which makes it difficult to get much by “reading” the database - but people have done it, e.g. for reporting using more traditional reporting / BI tools.

You have converted the correct project (essential_baseline_v4.3.1.pprj). What Protege does is save the content in the .PINS and .PONT files in the database table. The .PPRJ file is still required and this file tells Protege how to connect to the database etc. The metaproject (which controls the configuration of the Protege Server (multi-user mode)) is very small and is only read by the Protege Server, so does not need to be converted to the database.

To use your converted project, continue using Protege as normal. Open the .PPRJ file and Protege will connect to the database and read/write from/to it as you work with the repository.

You can use the same logical database for all your Essential repositories with a single table (preserving the extensibility) for each one. So, you could store test repositories, archived repositories etc. all in the same database.

Jonathan
Essential Project Team
monetti
Posts: 7
Joined: 15 Jan 2013, 21:11

I'm encountering more problems. I installed the client and I'm trying to access the server. I opened ports 5200 and 1099 in the firewall, modified the run_protege_server.bat file accordingly, restarted the server, but I still get a "Cannot connect to the server" message. I will check with support to see whether our network is preventing the outgoing connection from reaching the DB.
More importantly, when I use the client locally (on the server) and try to connect using the "Server" option instead of clicking on the metaproject.pprj file, it seems the Guest/guest password combination is the only one that works. I even defined a new user with a brand new password, and the dialog box tells me "Invalid userid password combination." When I open the metaproject.pprj file, the userid is indeed there. What am I doing wrong?
User avatar
jonathan.carter
Posts: 1087
Joined: 04 Feb 2009, 15:44

On the firewall side, this can be a bit tricky but this post describing how to configure Protege Server and the RMI Registry will be very helpful.

In particular, when you modified the run_protege_server.bat file, I wanted to check that the RMI Registry setting matches what you’ve defined for the firewall ports. By default, when telling Protege server which specific ports to use, the default for the RMI Registry is 5200, not 1099.

Note that when trying to connect to the server, we need to append the RMI Registry port number to the hostname in the Protege Client (in the ‘Host Machine Name’ field on the Open Project dialog) to tell it where to connect to the server. e.g.

Code: Select all

myserverhostname
becomes:

Code: Select all

myserverhostname:1099
when the RMI Registry is running on port 1099.

The user name / password problem could be that perhaps the Protege Server is not reading the metaproject.pprj that you are editing. By default, the run_protege_server.bat file reads the metaproject in <PROTEGE INSTALL>\examples\server. You can edit or replace this file (if you have not already) or you can change the run_protege_server.bat to read from an alternative metaproject.pprj.

When you do use the Guest user account, can you see your Essential repository in the list of available projects to open?

If the Protege Server is reading from the correct metaproject, check that there is something in the password field for your user account - there could be an issue there.

Note that any change you make to the metaproject.pprj is not picked up by the server until it is restarted. Once you have your Admin account set up, you can control all this more interactively using the ‘Administer Server’ checkbox on the Open Server dialog panel. This opens the metaproject in client-server mode and enables you to remotely restart the server. However, you do need to have a working user account with Admin privileges to use this feature.

Jonathan
Essential Project Team
monetti
Posts: 7
Joined: 15 Jan 2013, 21:11

Jonathan, thanks for your reply, always prompt and always helpful.
I didn't realize I had to restart the Protégé server to make the password and id changes take effect. Now I can get in but, as you suspected, the project list is empty.
When I use the "File" option and I click on metaproject.pprj it just logs me in: what userid am I accessing the project with at that point? When I do that, I can see two projects, the EAM repository and the Annotations, but it doesn' take me through the "Select Project" dialog box.
The metaproject.* files are indeed under Protégé 3.5\examples\server. There is no other file in that folder: is that correct? There is no other metaproject.pprj file on my system.
User avatar
jonathan.carter
Posts: 1087
Joined: 04 Feb 2009, 15:44

The metaproject is used to control the configuration of the server for things like the user accounts and the projects that the server will host.

In our installer, the "server" package installs a starter metaproject that contains the Essential AM Repository and the Annotations projects. However, in addition to creating a user account, you need to complete the definitions of the Essential AM Repository (see Section 13.2 of the multi-user install guide)

If there are any errors in the configuration of a project, e.g. the path to the project file (that needs to be completed on the Essential AM Repository instance), then the server will not offer that project.

This tutorial describing how to access a repository in multi-user mode has some screenshots that should help explain what you should expect to see and how to select a server-based repository.

When you use the File option, you are loading the Protege project directly (not using the server). This is how to open your Essential Repository in stand-alone mode and how to open the meta project. As you are loading the file directly, you do not require a user ID to access it.

On the Open Project dialog, clicking the 'Server' button tells the Protege Client that you want to connect to a Protege Server in order to open the repository. You need to specify the hostname (where the Protege Server is deployed), your username and your password. You will then be presented with a list of all of the projects that your ID has access to.

If you are seeing an empty list at this point, either your account does not have access to the projects or there is a problem with loading those projects within the server.

Check your account is mapped to the relevant Groups in the metaproject - e.g. the 'Architects' or 'AdminGroup' groups.

It is also worth looking in the server logs for more clues about what might be happening. Go to your Protege install folder on the server and in there you will find a folder called "logs" which will contain the latest log files. These can be easily viewed in any text editor.

Jonathan
Essential Project Team
monetti
Posts: 7
Joined: 15 Jan 2013, 21:11

Very interesting. I executed section 13.2 back when I performed the installation, and it didn't give me any trouble.
The ID I am using belongs to Architects and Admin-Group, so permissions should not be an issue.
However, there is one thing to note. When I installed essential, for step "10. Install the Essential Repository" I simply used the default: C:\Program Files\Essential Architecture Manager. However, when I use the "File" option to open metaproject.pprj and I go to "PolicyControlledObject/Project" and I open the "Essential AM Repository" the location field contains "/Essential/Repository/essential_baseline_v4.3.pprj". Is that correct? Did I miss a configuration step somewhere?

Thanks again.
User avatar
jonathan.carter
Posts: 1087
Joined: 04 Feb 2009, 15:44

That location field in the meta project for the Essential AM Repository instance must point to the location (using the full file path) of the project file for your Essential repository.

Let’s say I have created a folder on the D: drive for holding my repositories, called “Essential Repository”. My Protege project file for the repository is “essential_baseline_4.3.pprj”.

I can open this directly using Protege client by FIle->Open and selecting:
D:/Essential Repostiory/essential_baseline_4.3.pprj

To provide access to this same repository in the multi-user mode, I must specify that location in the metaproject for the instance of ‘Project’ that represents my repository, e.g. by default ‘Essential AM Repository’.

I open metaproject.pprj and navigate through the PolicyControlledObjects to Project and then select the ‘Essential AM Repository’ instance. In the location field, I must enter:

D:/Essential Repostiory/essential_baseline_4.3.pprj

Note that as this is a Java system, we should use the Unix-style directory characters ‘/‘ rather than ‘\’

I then save the changes to the metaproject and restart the Protege Server to force it to re-read the configuration in the metaproject.

To host more repositories (e.g. test, development, scope 1, scope 2) you can create a new instance of the Project class in the metaproject and then point to the location of the PPRJ file in the location field.

More specifically, with what you’ve told me, your repository project file is:

C:\Program Files\Essential Architecture Manager\essential_baseline_4.3.pprj

Therefore, your location field in the metaproject should be:

C:/Program FIles/Essential Architecture Manager/essential_baseline_4.3.pprj

In terms of what you are seeing with your Protege Server, having the location value pointing at an incorrect location would cause the problems.
Hopefully, using this last value in there will resolve the issue.

Without wanting to confuse things I think it is also important to note that this means that you can locate the repository project file anywhere that the server can read from / write to. You can also move it but if you do, you must update the location field in the metaproject.

One last thought is that depending on the particular version of Windows that you’re using, you may find that having the repository (which is data) in the ‘Program Files’ can cause problems. You might want to consider moving it to a more ‘data-oriented’ location such as ‘Documents’ or similar.

Jonathan
Essential Project Team
gknarra
Posts: 1
Joined: 21 Mar 2014, 15:40

Jonathan,

I am still confused on what project needs to be converted to the database? Is it the metaproject.pprj or essential_baseline_v4.3.1.pprj? The confusion arises because both are Protege projects.

I have already setup metaproject.pprj to point to right location of the essential_baseline_v4.3.1.pprj.

thanks
-gopal
User avatar
jonathan.carter
Posts: 1087
Joined: 04 Feb 2009, 15:44

In this case, 'project' means that Protege project in which your repository is being managed. That is: essential_baseline_v4.3.1.pprj

The conversion process is about getting Protege to save the contents of this repository (project) in a database instead of in the essential_baseline_v4.3.1.pins and essential_baseline_v4.3.1.pont files, which we strongly recommend for any multiuser deployment.

This is separate from the settings of the meta project that you have already completed - indeed you can still run the project in multi-user mode without performing the database conversion but as I mentioned, we strongly recommend that you do use a database.

Open essential_baseline_v4.3.1.pprj in Protege and then follow the instructions to 'convert' this project to use your chosen database. Please note that you must have a database with a user with access rights to create tables available before starting the convert step. Protege will take care of creating all the required table details.

Jonathan
Essential Project Team
Post Reply