protege api - error getting knowledgebase

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

protege api - error getting knowledgebase

Thomas Amundsen
Hi,

 

I have an application that connects to a protégé ontology in order to retrieve data.

 

Here are the lines of code that cause the problem:

 

Collection errors = new ArrayList();

Project project = new Project(this.projectFileName, errors);

               

this.knowledgeBase = project.getKnowledgeBase();

 

Here is the output:

 

CONFIG: Protege 3.1.1 Build 216, JVM 1.5.0_06-b05, memory=66M, Windows XP, encod

ing=UTF-8, language=en, country=US

WARNING: Look and feel not found: com.jgoodies.plaf.plastic.PlasticLookAndFeel -

- SystemUtilities.setLookAndFeel()

WARNING: Plugins directory not found: C:\wsm\plugins -- PluginUtilities.findPlug

insDirectory()

 

When I place a copy of the plugins directory in the base directory for my project, it works fine. But, I would not like to have to keep a duplicate directory just to make this work. I have included all of the protégé .jar files in my classpath, so I believe it is not even really using the plugins directory, but it just thinks that it needs to have it.

 

If anyone can help me resolve this issue, I'd greatly appreciate it.

 

Thanks!


-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html

Reply | Threaded
Open this post in threaded view
|

Re: protege api - error getting knowledgebase

samsontu


Set the Java property "protege.dir" to a directory containing a
subdirectory called "plugins"

 From Protege Frame FAQ

06.09 - Does the "plugins" directory have to be a subdirectory of the
Protégé installation directory?
Not exactly. Protégé looks for the "plugins" subdirectory of the
installation directory and adds all the JAR files contained within it to
the classpath. The intention here is to make it easy to just drop a JAR
file into the "plugins" directory and have it work. If absolutely
necessary, you can override this behavior by setting the Java property
"protege.dir" to a directory containing a subdirectory called "plugins".
We realize that this level of indirection is unfortunate since a user
must have a directory called exactly "plugins" and the "protege.dir"
property must be set to the parent directory of that directory.


Thomas Amundsen wrote:

> Hi,
>
>  
>
> I have an application that connects to a protégé ontology in order to retrieve data.
>
>  
>
> Here are the lines of code that cause the problem:
>
>  
>
> Collection errors = new ArrayList();
>
> Project project = new Project(this.projectFileName, errors);
>
>                
>
> this.knowledgeBase = project.getKnowledgeBase();
>
>  
>
> Here is the output:
>
>  
>
> CONFIG: Protege 3.1.1 Build 216, JVM 1.5.0_06-b05, memory=66M, Windows XP, encod
>
> ing=UTF-8, language=en, country=US
>
> WARNING: Look and feel not found: com.jgoodies.plaf.plastic.PlasticLookAndFeel -
>
> - SystemUtilities.setLookAndFeel()
>
> WARNING: Plugins directory not found: C:\wsm\plugins -- PluginUtilities.findPlug
>
> insDirectory()
>
>  
>
> When I place a copy of the plugins directory in the base directory for my project, it works fine. But, I would not like to have to keep a duplicate directory just to make this work. I have included all of the protégé .jar files in my classpath, so I believe it is not even really using the plugins directory, but it just thinks that it needs to have it.
>
>  
>
> If anyone can help me resolve this issue, I'd greatly appreciate it.
>
>  
>
> Thanks!
>
>
> -------------------------------------------------------------------------
> To unsubscribe go to http://protege.stanford.edu/community/subscribe.html
>
>


--
Samson Tu                    email: [hidden email]
Senior Research Scientist    web: www.stanford.edu/~swt/
Stanford Medical Informatics phone: 1-650-725-3391
Stanford University          fax: 1-650-725-7944

-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html

Reply | Threaded
Open this post in threaded view
|

Re: protege api - error getting knowledgebase

Arno Hartholt
In reply to this post by Thomas Amundsen

Hi,

Can anyone offer some insights to the problem below?

To recap: an in-house developed application (called WSM) that connects to Protégé only works when there's a copy of the plugins directory present. This plugins directory needs to be in the root of the WSM directory and can be empty (i.e., none of it's code is actually being used).

Why and where is there a check for the plugins directory? If it is really needed, how can we make sure our application uses the directory in the regular Protégé installation instead of a copy in the WSM directory?

Thanks,

Arno




> -----Original Message-----
> From: [hidden email] [mailto:protege-
> [hidden email]] On Behalf Of Thomas Amundsen
> Sent: Tuesday, July 25, 2006 11:33 AM
> To: [hidden email]
> Subject: [protege-discussion] protege api - error getting knowledgebase
>
> Hi,
>
>
>
> I have an application that connects to a protégé ontology in order to
> retrieve data.
>
>
>
> Here are the lines of code that cause the problem:
>
>
>
> Collection errors = new ArrayList();
>
> Project project = new Project(this.projectFileName, errors);
>
>
>
> this.knowledgeBase = project.getKnowledgeBase();
>
>
>
> Here is the output:
>
>
>
> CONFIG: Protege 3.1.1 Build 216, JVM 1.5.0_06-b05, memory=66M, Windows XP,
> encod
>
> ing=UTF-8, language=en, country=US
>
> WARNING: Look and feel not found:
> com.jgoodies.plaf.plastic.PlasticLookAndFeel -
>
> - SystemUtilities.setLookAndFeel()
>
> WARNING: Plugins directory not found: C:\wsm\plugins --
> PluginUtilities.findPlug
>
> insDirectory()
>
>
>
> When I place a copy of the plugins directory in the base directory for my
> project, it works fine. But, I would not like to have to keep a duplicate
> directory just to make this work. I have included all of the protégé .jar
> files in my classpath, so I believe it is not even really using the
> plugins directory, but it just thinks that it needs to have it.
>
>
>
> If anyone can help me resolve this issue, I'd greatly appreciate it.
>
>
>
> Thanks!
>
>
> -------------------------------------------------------------------------
> To unsubscribe go to http://protege.stanford.edu/community/subscribe.html
>

-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html