protege server warning: missing projects

Post Reply
pvarman
Posts: 3
Joined: 16 Mar 2011, 17:07

Hi,
I'm having problems when starting Protege server. The metaproject is configured with one project and it's annotations project, both created ok via the local protege client in the database using the following settings
JDBC driver = com.microsoft.sqlserver.jdbc.SQLServerDriver
JDBC URL = jdbc:sqlserver://rsamssql;databaseName=Essential;integratedSecurity=true;

The server is reading the metaproj file and then gives the Warnings can't find baseline project and annotations project. I've checked that both the file and database tables exist. The protege server comes up ok after the error statements.

If I then use the protege client to look for the project via the server, the list is blank. the server log records the same error about missing files as a result of this action.
It looks like the server can't find or read the database.
I am running on a Windows server 2008 R2 environment, Tomcat and protege on one server, and my SQL server 2008 on another.
Here's the Log file
=========================================================
2014.08.14 11:24:48.219 EDT INFO: *** SYSTEM START *** -- Server.startServer()
2014.08.14 11:24:48.221 EDT INFO: Protege server is starting... -- Server.startServer()
2014.08.14 11:24:48.222 EDT CONFIG: Protege 3.5 Build 663, JVM 1.7.0_09-b05, memory=506M, Windows Server 2008 R2, encoding=UTF-8, language=en, country=US -- SystemUtilities.logSystemInfo()
2014.08.14 11:24:48.252 EDT CONFIG: Server port = 0, registry port = 1099, compressed stream -- RmiSocketFactory.reportPorts()
2014.08.14 11:24:48.306 EDT INFO: Using metaproject from: file:/C:/Program%20Files%20(x86)/Essential%20Architecture%20Manager/Repository/csc_metaproject.pprj -- Server.initialize()
2014.08.14 11:24:48.685 EDT WARNING: Missing project at c:/Program Files (x86)/Essential Architecture Manager/Repository/csc_essential_baseline_v4.3.pprj -- Server.getAvailableProjectNames()
2014.08.14 11:24:48.686 EDT WARNING: Missing project at c:/Program Files (x86)/Essential Architecture Manager/Repository/annotation_csc_essential_baseline_v4.3.pprj -- Server.getAvailableProjectNames()
2014.08.14 11:24:48.694 EDT INFO: Protege server ready to accept connections... -- Server.startServer()
2014.08.14 11:25:50.662 EDT WARNING: Failed login for user admin IP: 10.200.1.5 -- Server.openSession()
2014.08.14 11:26:03.120 EDT WARNING: Missing project at c:/Program Files (x86)/Essential Architecture Manager/Repository/csc_essential_baseline_v4.3.pprj -- Server.getAvailableProjectNames()
2014.08.14 11:26:03.121 EDT WARNING: Missing project at c:/Program Files (x86)/Essential Architecture Manager/Repository/annotation_csc_essential_baseline_v4.3.pprj -- Server.getAvailableProjectNames()
2014.08.14 11:32:06.603 EDT INFO: Received shutdown request. -- Server.shutdown()
2014.08.14 11:32:06.841 EDT INFO: Server exiting. -- Server$5.run()
=====================================================

Protege server bat file is
------------------------
set JDKBIN="c:\program files (x86)\java\jre7\bin"


rem set JDKBIN=jre\bin


rem Note that a space character in the following path must be replaced with '%%20' in

rem a batch file. If you are typing directly on the command line, a space must be
rem replaced with '%20'.

rem
set CODEBASE_URL=file:/c:/program%%20files%%20(86)/protege_3.5/protege.jar

start /D %JDKBIN% /min rmiregistry.exe

set CODEBASE_URL=http://localhost:8080/essential_viewer/protege.jar

start /D %JDKBIN% /min rmiregistry.exe


set CLASSPATH=protege.jar;looks.jar;unicode_panel.jar;sqljdbc4.jar;driver.jar;driver0.jar;driver1.jar

set MAINCLASS=edu.stanford.smi.protege.server.Server

set METAPROJECT="c:\program files (x86)\Essential Architecture Manager\repository\csc_metaproject.pprj"


set MAX_MEMORY=-Xmx500M

set HEADLESS=-Djava.awt.headless=true

set CODEBASE=-Djava.rmi.server.codebase=%CODEBASE_URL%

set LOG4J_OPT=-Dlog4j.configuration=file:log4j.xml


rem --- Optional arguments; uncomment if necessary ---

rem set HOSTNAME=-Djava.rmi.server.hostname=localhost

rem set "PORTOPTS=-Dprotege.rmi.server.port=5200 -Dprotege.rmi.registry.port=5100"
rem TX=-Dtransaction.level=READ_COMMITTED

rem "DEBUG_OPT=-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"


set OPTIONS=%MAX_MEMORY% %CODEBASE% %HEADLESS% %LOG4J_OPT% %HOSTNAME% %PORTOPTS% %TX% %DEBUG_OPT%


rem ------------------- Cmd Options -------------------

rem If you want automatic saving of the project,

rem setup the number of seconds in SAVE_INTERVAL_VALUE

rem set SAVE_INTERVAL=-saveIntervalSec=120

rem ------------------- Cmd Options -------------------



%JDKBIN%\java %OPTIONS% -cp %CLASSPATH% %MAINCLASS% %SAVE_INTERVAL% %METAPROJECT%
---------------------------------------------------------

Note the database uses integrated AD authentication.
User avatar
neil.walsh
Posts: 444
Joined: 16 Feb 2009, 13:45
Contact:

Hi,

Not sure this is the answer to the problem but you look like you have a typo (a missing 'x") in your server bat file

CODEBASE_URL=file:/c:/program%%20files%%20(86)/protege_3.5/protege.jar
Should be
CODEBASE_URL=file:/c:/program%%20files%%20(x86)/protege_3.5/protege.jar
Can you try this change and let me know

Thanks

Neil
pvarman
Posts: 3
Joined: 16 Mar 2011, 17:07

Hi Neil - thanks for spotting that, however it's on the rem'ed out line so wouldn't affect the server - the 'set codebase_url' line following it is the active line (one pointing to the Tomcat essential_viewer directory).
Sorry if the paste has disrupted the readability...

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

Thanks for the details of the log.

The warning messages can be ignored - in fact you can resolve them by removing the Annotations project definition on your Project in the meta project. Unless of course, you are using the annotations project / Collaborative Protege, in which case check the full path to the annotations project file, making sure to use Unix-style directory separators ( ‘/‘ ), rather than the Windows ‘\’

We’ve seen behaviour like this before and I think the first thing to try is to find the RMI Registry process and kill it. The run_protege_server.bat will restart it but the shutdown script does not stop it. Sometimes it needs a restart.

Let me know how you get on after that.

Jonathan
Essential Project Team
pvarman
Posts: 3
Joined: 16 Mar 2011, 17:07

Hi Jonathan,
I've tried your suggestions, but continue to get the error. Tried various formats to the file, even using %20 instead of separators.

I am setting up a multiuser project, storing the project in a database, so need the collaboration function.

Restarting the RMI Registry process doesn't help.

After starting the Protege server (ignoring the file errors), I try to look for the projects stored on the server using the 'open project/server' option in the protege client. There are no projects visible in the list (there should be some stored on the database). The behaviour is akin to the protege server not being able to see into the database. (note the two project files defined in the meta project are stored in the database, as well as others stored via the client successfully.
My question would be how does the Server know where to look for the database. I assume the pprj files point there, BUT is the full database connector detail stored in these files? The Run_Server.bat file classpath variable includes the MS sql driver.jar (sqljdbc4), but not the sqljdbc_auth.dll it needs (although that actual file is in the root directory of Protege_3.5 system). Note when using the client to store projects in the database, I have a special string on the JDBC URL that allow AD credentials to be used when accessing the database server (in the same domain but separate server, db only allows domain authentication (integrated security) ).

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

Hi Paul,

Thanks for all the information.

Let me start by playing back my understanding of where you're at. You've set up the project to use the database back end and turned on the Collaborative Protege capabilities, which has created the Annotations project. All this is working fine in 'standalone' mode, running in Protege Client.

Both these projects have been defined in the Meta Project with a full path (e.g. C:/Program Files/....) using Unix-style directory separators (which we can see in the log trace) and the definition for the Project points to the Annotations project within the metaproject settings. In the metaproject, you have mapped the roles that can READ / WRITE etc. these projects and also defined new User instances for the users who will be accessing the server, which have also been mapped to their relevant roles / groups, enabling them to have access to the server projects. Note that Protege server does not integrate with AD and you will need to define all the users that you wish to have access to the repository in the metaproject.

You're using MS SQLServer database with an extra parameter telling it to use Active Directory for authentication and access control - which I assume is working in 'standalone' mode.

Let me know if I've got any of this wrong.

Looking back at the trace, the warnings about the missing project are for both the project and the annotations project and if these are the only two projects defined, this would mean that no projects were available on the server. The warnings are generated when the server cannot successfully test the existence of that file - so basically it cannot see a file at the specified location.

I notice that you have the repositories (projects) stored under C:/Program Files. I wonder, therefore, if there's some security / access issue going on which means that the server cannot access files in that location?

As you rightly say, the database connection settings are held in the PPRJ file. This means that we can easily try locating both the project and annotations projects (just the .PPRJ files) to somewhere else on the server filesystem. On a user workstation, I normally put these in a folder within the 'My Documents' branch or on a server, create a new top-level folder that has easy access on the data drive.

Try moving these 2 PPRJ files out of the 'application' folder into a data folder elsewhere on the server (with full access rights). You will have to tweak the meta project to specify these new file locations but otherwise, that's all that's required.

Hopefully, this will clear the warnings and the project will appear in the list.

The other thought I had was around the AD option on the database connection and whether it would be worth trying to run the server with project settings that use a simple username / password rather than the AD integration in case that's something that the server doesn't support.

Let me know if moving the project files resolves the warnings and then whether the project appears in the list.

Jonathan
Essential Project Team
Post Reply