You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@uima.apache.org by Ahmed Abdeen Hamed <ah...@gmail.com> on 2008/08/15 15:55:58 UTC
Class-Path issues - Previously: Making JAR files reading from within
Hi again Marshall: We need to deploy our applications as a JAR so that it
can be run from the command-line. The UIMA AE descriptor is not the main
application entry-point. In fact, AE gets built on the fly. I am attaching
my directory structure after I unpack the deployed JAR. I am also copying
the contents of the MANIFEST.MF file to see if you can identify any funny
part in it.
============================================
Manifest-Version: 1.0
Main-Class: oboannotator.application.OBO_DocumentAnalyzerApplication
Class-Path: lib/uima-core.jar lib/jVinci.jar lib/maxent-2.4.0.jar
lib/opennlp-tools-1.3.0.jar lib/uima-adapter-soap.jar
lib/uima-adapter-vinci.jar lib/uima-cpe.jar lib/uima-
document-annotation.jar lib/uima-tools.jar lib/xerces.jar
============================================
Here is the RUNTIME error that I am getting:
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/uima/resource/ResourceInitializationException
at
oboannotator.application.OBO_DocumentAnalyzerApplication.main(OBO_DocumentAnalyzerApplication.java:168)
I have been struggling with this issue for more than a week now. I would
appreciate any insight!
Ahmed
P.S. Please see the attached project directory structure screenshot.
On Thu, Aug 14, 2008 at 4:46 PM, Marshall Schor <ms...@schor.com> wrote:
> Hi Ahmed -
>
> Did you consider UIMA's "PEAR" packaging and the pear installer utilities
> that are part of UIMA?
>
> That's how many people make annotator components available to others.
>
> -Marshall
>
>
> Ahmed Abdeen Hamed wrote:
>
>> Dear Marshall: Thank you for taking the time to response to this. You have
>> inspired a couple of suggestions that we ended up using here to deploy our
>> application. So, it's finally usable by someone else except myself, yay
>> :)Best
>> wishes,
>> -Ahmed
>>
>>
>>
>
Re: Class-Path issues - Previously: Making JAR files reading from within
Posted by Ahmed Abdeen Hamed <ah...@gmail.com>.
Hi Marshall, I was writing again as you message below popped up. I finally
figured out what the problem was!!! I had two MANIFEST.MF files and the one
I was modifying was correct but the internal one that the jar was reading
from wasn't. This is due to the fact that I was extracting the jar and
playing with the external copy vs the one that the jar sees. So, at last I
can see my application running from outside eclipse on a shell!! Amazing :)
Thank you very much for your assistance. I appreciate it greatly!
Best wishes,
-Ahmed
On Fri, Aug 15, 2008 at 11:34 AM, Marshall Schor <ms...@schor.com> wrote:
> Hi Ahmed -
>
> I'm not an expert here - so please take this advice with caution.
>
> I assume your command line looks something like:
> java -jar main-jar.jar
>
> Look at the internal file structure of that "main-jar.jar" jar that
> you're running, using the command:
>
> jar -tvf the-main-jar-file.jar
>
> (of course, replace that funny name with the path/name of your jar file).
>
> It should show entries like
> lib/uima-core.jar
>
> If it doesn't, that's the problem.
>
> Hope this helps. -Marshall
>
>
>
> Ahmed Abdeen Hamed wrote:
> > Hi again Marshall: We need to deploy our applications as a JAR so that
> > it can be run from the command-line. The UIMA AE descriptor is not the
> > main application entry-point. In fact, AE gets built on the fly. I am
> > attaching my directory structure after I unpack the deployed JAR. I am
> > also copying the contents of the MANIFEST.MF file to see if you can
> > identify any funny part in it.
> >
> > ============================================
> > Manifest-Version: 1.0
> > Main-Class: oboannotator.application.OBO_DocumentAnalyzerApplication
> >
> > Class-Path: lib/uima-core.jar lib/jVinci.jar lib/maxent-2.4.0.jar
> > lib/opennlp-tools-1.3.0.jar lib/uima-adapter-soap.jar
> > lib/uima-adapter-vinci.jar lib/uima-cpe.jar lib/uima-
> > document-annotation.jar lib/uima-tools.jar lib/xerces.jar
> >
> >
> > ============================================
> >
> > Here is the RUNTIME error that I am getting:
> > Exception in thread "main" java.lang.NoClassDefFoundError:
> > org/apache/uima/resource/ResourceInitializationException
> > at
> >
> oboannotator.application.OBO_DocumentAnalyzerApplication.main(OBO_DocumentAnalyzerApplication.java:168)
> >
> > I have been struggling with this issue for more than a week now. I
> > would appreciate any insight!
> > Ahmed
> > P.S. Please see the attached project directory structure screenshot.
> >
> >
> >
> > On Thu, Aug 14, 2008 at 4:46 PM, Marshall Schor <msa@schor.com
> > <ma...@schor.com>> wrote:
> >
> > Hi Ahmed -
> >
> > Did you consider UIMA's "PEAR" packaging and the pear installer
> > utilities that are part of UIMA?
> >
> > That's how many people make annotator components available to others.
> >
> > -Marshall
> >
> >
> > Ahmed Abdeen Hamed wrote:
> >
> > Dear Marshall: Thank you for taking the time to response to
> > this. You have
> > inspired a couple of suggestions that we ended up using here
> > to deploy our
> > application. So, it's finally usable by someone else except
> > myself, yay :)Best
> > wishes,
> > -Ahmed
> >
> >
> >
> >
>
Re: Class-Path issues - Previously: Making JAR files reading from
within
Posted by Marshall Schor <ms...@schor.com>.
Hi Ahmed -
I'm not an expert here - so please take this advice with caution.
I assume your command line looks something like:
java -jar main-jar.jar
Look at the internal file structure of that "main-jar.jar" jar that
you're running, using the command:
jar -tvf the-main-jar-file.jar
(of course, replace that funny name with the path/name of your jar file).
It should show entries like
lib/uima-core.jar
If it doesn't, that's the problem.
Hope this helps. -Marshall
Ahmed Abdeen Hamed wrote:
> Hi again Marshall: We need to deploy our applications as a JAR so that
> it can be run from the command-line. The UIMA AE descriptor is not the
> main application entry-point. In fact, AE gets built on the fly. I am
> attaching my directory structure after I unpack the deployed JAR. I am
> also copying the contents of the MANIFEST.MF file to see if you can
> identify any funny part in it.
>
> ============================================
> Manifest-Version: 1.0
> Main-Class: oboannotator.application.OBO_DocumentAnalyzerApplication
>
> Class-Path: lib/uima-core.jar lib/jVinci.jar lib/maxent-2.4.0.jar
> lib/opennlp-tools-1.3.0.jar lib/uima-adapter-soap.jar
> lib/uima-adapter-vinci.jar lib/uima-cpe.jar lib/uima-
> document-annotation.jar lib/uima-tools.jar lib/xerces.jar
>
>
> ============================================
>
> Here is the RUNTIME error that I am getting:
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/apache/uima/resource/ResourceInitializationException
> at
> oboannotator.application.OBO_DocumentAnalyzerApplication.main(OBO_DocumentAnalyzerApplication.java:168)
>
> I have been struggling with this issue for more than a week now. I
> would appreciate any insight!
> Ahmed
> P.S. Please see the attached project directory structure screenshot.
>
>
>
> On Thu, Aug 14, 2008 at 4:46 PM, Marshall Schor <msa@schor.com
> <ma...@schor.com>> wrote:
>
> Hi Ahmed -
>
> Did you consider UIMA's "PEAR" packaging and the pear installer
> utilities that are part of UIMA?
>
> That's how many people make annotator components available to others.
>
> -Marshall
>
>
> Ahmed Abdeen Hamed wrote:
>
> Dear Marshall: Thank you for taking the time to response to
> this. You have
> inspired a couple of suggestions that we ended up using here
> to deploy our
> application. So, it's finally usable by someone else except
> myself, yay :)Best
> wishes,
> -Ahmed
>
>
>
>