You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@uima.apache.org by Joshua Eisenberg <je...@fiu.edu> on 2015/08/17 16:32:58 UTC

Getting UIMA working with Eclipse-- Cannot find main for Document Analyzer

I am trying to set up UIMA for Java with Eclipse.

I downloaded the UIMA binary zip from Apache, unzipped it, put it in a
directory that I configured as
the UIMA_HOME environment variable in my bash profile and in eclipse. I
also set my paths as the
UIMA readme instructs. I ran adjustExamplePaths.sh from the terminal with
no errors. I am able to run
the document analyzer through the terminal with no errors; I am able to see
the example annotations.

In eclipse I downloaded the EMF plugin and both UIMA plugins. Then to test
if everything works in
Eclipse, I imported (from existing projects) the examples folder in
UIMA_HOME. I run it, select
document analyzer from the list and I get the following error:

Error: could not find or load main class
org.apach.uima.tools.docanalyzer.DocumentAnalyzer

Since tehn I've added the uima-tools.jar to the class path for doc analyzer
and I am still getting the
same error.

Any advice would help.

Thanks!

Re: Getting UIMA working with Eclipse-- Cannot find main for Document Analyzer

Posted by Marshall Schor <ms...@schor.com>.
tracked this down to a couple of lines that have sneaked into the launch
configurations that are associated with Maven / eclipse integration.

When those lines are removed, the launchers work.

I'll enter a Jira to fix this (tomorrow).  Thanks for reporting this issue.

-Marshall

On 8/17/2015 10:32 AM, Joshua Eisenberg wrote:
> I am trying to set up UIMA for Java with Eclipse.
>
> I downloaded the UIMA binary zip from Apache, unzipped it, put it in a
> directory that I configured as
> the UIMA_HOME environment variable in my bash profile and in eclipse. I
> also set my paths as the
> UIMA readme instructs. I ran adjustExamplePaths.sh from the terminal with
> no errors. I am able to run
> the document analyzer through the terminal with no errors; I am able to see
> the example annotations.
>
> In eclipse I downloaded the EMF plugin and both UIMA plugins. Then to test
> if everything works in
> Eclipse, I imported (from existing projects) the examples folder in
> UIMA_HOME. I run it, select
> document analyzer from the list and I get the following error:
>
> Error: could not find or load main class
> org.apach.uima.tools.docanalyzer.DocumentAnalyzer
>
> Since tehn I've added the uima-tools.jar to the class path for doc analyzer
> and I am still getting the
> same error.
>
> Any advice would help.
>
> Thanks!
>


Re: Getting UIMA working with Eclipse-- Cannot find main for Document Analyzer

Posted by Marshall Schor <ms...@schor.com>.
I think you did everything right.

I tried this, and got the same error.

The imported examples project from the UIMA binary un-tarred distribution has
the class path set to include the jars from UIMA_HOME.  With UIMA_HOME properly
set, I don't see any compile errors in the uimaj-examples project in Eclipse.

And I see all these jar files from the UIMA_HOME/lib directory are in the classpath.

However, the Eclipse launcher doesn't seem to be picking up these.

Here's a workaround until we discover what's going on:

Pick the Eclipse menu "run" -> Run configurations, and then type
documentanalyzer into the search bar to find the UIMA Document Analyzer.  In
that launcher, pick the "Classpath" tab, and there, click the "User Entries, and
then manually add "External Jars".  Pick the two Jars that are in
UIMA_HOME/lib/uima-core and UIMA_HOME/lib/uimaj-tools

These should already be in the class path due to the "Build Path", buf for some
reason, are not.

Then try running.  When I did this, it ran.

-Marshall

On 8/17/2015 10:32 AM, Joshua Eisenberg wrote:
> I am trying to set up UIMA for Java with Eclipse.
>
> I downloaded the UIMA binary zip from Apache, unzipped it, put it in a
> directory that I configured as
> the UIMA_HOME environment variable in my bash profile and in eclipse. I
> also set my paths as the
> UIMA readme instructs. I ran adjustExamplePaths.sh from the terminal with
> no errors. I am able to run
> the document analyzer through the terminal with no errors; I am able to see
> the example annotations.
>
> In eclipse I downloaded the EMF plugin and both UIMA plugins. Then to test
> if everything works in
> Eclipse, I imported (from existing projects) the examples folder in
> UIMA_HOME. I run it, select
> document analyzer from the list and I get the following error:
>
> Error: could not find or load main class
> org.apach.uima.tools.docanalyzer.DocumentAnalyzer
>
> Since tehn I've added the uima-tools.jar to the class path for doc analyzer
> and I am still getting the
> same error.
>
> Any advice would help.
>
> Thanks!
>


Re: Getting UIMA working with Eclipse-- Cannot find main for Document Analyzer

Posted by Marshall Schor <ms...@schor.com>.
Jira https://issues.apache.org/jira/browse/UIMA-4562.

There was an accidental commit of changes to the launchers, that caused this
problem.  The fix is to revert those launcher changes.  This is now committed to
the trunk.

Thanks for reporting the error :-)

-Marshall

On 8/17/2015 10:32 AM, Joshua Eisenberg wrote:
> I am trying to set up UIMA for Java with Eclipse.
>
> I downloaded the UIMA binary zip from Apache, unzipped it, put it in a
> directory that I configured as
> the UIMA_HOME environment variable in my bash profile and in eclipse. I
> also set my paths as the
> UIMA readme instructs. I ran adjustExamplePaths.sh from the terminal with
> no errors. I am able to run
> the document analyzer through the terminal with no errors; I am able to see
> the example annotations.
>
> In eclipse I downloaded the EMF plugin and both UIMA plugins. Then to test
> if everything works in
> Eclipse, I imported (from existing projects) the examples folder in
> UIMA_HOME. I run it, select
> document analyzer from the list and I get the following error:
>
> Error: could not find or load main class
> org.apach.uima.tools.docanalyzer.DocumentAnalyzer
>
> Since tehn I've added the uima-tools.jar to the class path for doc analyzer
> and I am still getting the
> same error.
>
> Any advice would help.
>
> Thanks!
>