You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@uima.apache.org by Thomas Heitz <th...@googlemail.com> on 2011/01/26 17:29:09 UTC

How to use a pear package, classpath problem with CAS Visual Debugger

Dear UIMA users,

What is the correct way to use a PEAR package for a final customer?

We used the following tools:
- Pear Installer
- CAS Visual Debugger

Unfortunately we need to add the CLASSPATH contained in the
metada/setenv.txt file when calling the CAS Visual Debugger.
Something like:
export CLASSPATH=...
java -cp ${UIMA_HOME}/lib/uima-core.jar:${UIMA_HOME}/lib/uima-examples.jar:${UIMA_HOME}/lib/uima-tools.jar:${CLASSPATH}
org.apache.uima.tools.cvd.CVD

Any idea why it is not automatized and notably why we cannot just
click on the "Run your AE in the CAS Visual ..." button from the Pear
Installer GUI?

I've read that the setenv.txt should'nt be used and that the UIMA
tools read the classpath from metadata/install.xml.

Is there a way to verify that the correct classpath is used in these tools?

I'm using UIMA 2.3.1 on linux kubuntu 9.04 with jdk1.6.0_17.

Thanks,

Thomas Heitz

Re: How to use a pear package, classpath problem with CAS Visual Debugger

Posted by Thilo Götz <tw...@gmx.de>.
I had to moderate your messag through, please
subscribe to the list.

On 1/26/2011 17:29, Thomas Heitz wrote:
> Dear UIMA users,
> 
> What is the correct way to use a PEAR package for a final customer?
> 
> We used the following tools:
> - Pear Installer
> - CAS Visual Debugger
> 
> Unfortunately we need to add the CLASSPATH contained in the
> metada/setenv.txt file when calling the CAS Visual Debugger.
> Something like:
> export CLASSPATH=...
> java -cp ${UIMA_HOME}/lib/uima-core.jar:${UIMA_HOME}/lib/uima-examples.jar:${UIMA_HOME}/lib/uima-tools.jar:${CLASSPATH}
> org.apache.uima.tools.cvd.CVD
> 
> Any idea why it is not automatized and notably why we cannot just
> click on the "Run your AE in the CAS Visual ..." button from the Pear
> Installer GUI?

You're possibly not using the correct descriptor.  The
xml file you need to point to when loading it in CVD
(or any other application) is the one in the top-level
pear directory, not the one you created yourself.

--Thilo

> 
> I've read that the setenv.txt should'nt be used and that the UIMA
> tools read the classpath from metadata/install.xml.
> 
> Is there a way to verify that the correct classpath is used in these tools?
> 
> I'm using UIMA 2.3.1 on linux kubuntu 9.04 with jdk1.6.0_17.
> 
> Thanks,
> 
> Thomas Heitz

Re: How to use a pear package, classpath problem with CAS Visual Debugger

Posted by Thomas Heitz <th...@googlemail.com>.
Before it was:

<PROCESS>
      <ACTION>set_env_variable</ACTION>
      <PARAMETERS>
              <VAR_VALUE>$main_root/lib;</VAR_VALUE>
              <COMMENTS></COMMENTS>
              <VAR_NAME>CLASSPATH</VAR_NAME>
       </PARAMETERS>
</PROCESS>

Now it is (I've just put the 3 first librairies):

<PROCESS>
      <ACTION>set_env_variable</ACTION>
      <PARAMETERS>
              <VAR_VALUE>$main_root/lib/activation.jar;$main_root/lib/fontbox-1.1.0.jar;$main_root/lib/mail.jar;</VAR_VALUE>
              <COMMENTS></COMMENTS>
              <VAR_NAME>CLASSPATH</VAR_NAME>
       </PARAMETERS>
</PROCESS>


2011/1/27 Thilo Götz <tw...@gmx.de>:
> On 1/27/2011 16:51, Thomas Heitz wrote:
>> Using directory paths instead of file paths for the classpath of the
>> install.xml is the reason why it was not working.
>>
>> What was very confusing is that the setenv.txt that is generated from
>> the install.xml was correctly expanding the directory paths.
>
> I'm not following.  What's the difference between directory
> and file paths?  Can you give us an example?
>
>>
>> I think it would be very useful to have the same expansion mechanism
>> for the classpath of the VM.
>>
>> Thomas
>>
>> 2011/1/27 Thilo Götz <tw...@gmx.de>:
>>>
>>>
>>> On 1/26/2011 19:20, Thomas Heitz wrote:
>>>>>> Dear UIMA users,
>>>>>>
>>>>>> What is the correct way to use a PEAR package for a final customer?
>>>>
>>>> So I runPearInstaller.sh/bat is the normal way to install a pear
>>>> package for a final customer.
>>>> And any other tools not provided by Apache UIMA should work if
>>>> runPearInstaller works.
>>>>
>>>>>> We used the following tools:
>>>>>> - Pear Installer
>>>>>> - CAS Visual Debugger
>>>>>>
>>>>>> Unfortunately we need to add the CLASSPATH contained in the
>>>>>> metada/setenv.txt file when calling the CAS Visual Debugger.
>>>>>> Something like:
>>>>>> export CLASSPATH=...
>>>>>> java -cp ${UIMA_HOME}/lib/uima-core.jar:${UIMA_HOME}/lib/uima-examples.jar:${UIMA_HOME}/lib/uima-tools.jar:${CLASSPATH}
>>>>>> org.apache.uima.tools.cvd.CVD
>>>>>>
>>>>>> Any idea why it is not automatized and notably why we cannot just
>>>>>> click on the "Run your AE in the CAS Visual ..." button from the Pear
>>>>>> Installer GUI?
>>>>
>>>>> You're possibly not using the correct descriptor.  The
>>>>> xml file you need to point to when loading it in CVD
>>>>> (or any other application) is the one in the top-level
>>>>> pear directory, not the one you created yourself.
>>>>> --Thilo
>>>>
>>>> I have used the generated top level descriptor projectid_pear.xml
>>>> which contains:
>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>> <pearSpecifier xmlns="http://uima.apache.org/resourceSpecifier">
>>>>     <pearPath>/home/thomas/.tmp/uima-eclipse</pearPath>
>>>> </pearSpecifier>
>>>>
>>>> I thought the CVD would read metada/install.xml to know the classpath
>>>
>>> It does.  It doesn't even have to do this itself, the
>>> core UIMA framework takes care of that.  I don't know
>>> what could be going wrong in your case.  I even tried
>>> installing a pear into a .tmp dir on linux, no problem.
>>>
>>> Try setting the log level to "ALL" in CVD before you
>>> load the pear.  Maybe that will turn up something useful.
>>>
>>> --Thilo
>>>
>>>> but it doesn't seem to do so as I got a class not found error.
>>>>  when using the menu Run -> Load AE on the top-level descriptor.
>>>> It works correctly when I add the aforementioned parameters when
>>>> calling the CVD.
>>>>
>>>> The metadata/install.xml contains this section when installed with the
>>>> pear installer:
>>>> <PROCESS>
>>>>       <ACTION>set_env_variable</ACTION>
>>>>       <PARAMETERS>
>>>>               <VAR_VALUE>/home/thomas/.tmp/uima-eclipse/target/classes:/home/thomas/.tmp/uima-eclipse/src:/home/thomas/.tmp/uima-eclipse/lib:/home/thomas/.tmp/uima-eclipse/resources:/home/thomas/.tmp/uima-eclipse/conf:</VAR_VALUE>
>>>>               <COMMENTS></COMMENTS>
>>>>               <VAR_NAME>CLASSPATH</VAR_NAME>
>>>>       </PARAMETERS>
>>>> </PROCESS>
>>>>
>>>>
>>>> Thanks,
>>>>
>>>> Thomas Heitz
>>>>
>>>>
>>>>>> I've read that the setenv.txt should'nt be used and that the UIMA
>>>>>> tools read the classpath from metadata/install.xml.
>>>>>>
>>>>>> Is there a way to verify that the correct classpath is used in these tools?
>>>>>>
>>>>>> I'm using UIMA 2.3.1 on linux kubuntu 9.04 with jdk1.6.0_17.
>>>
>

Re: How to use a pear package, classpath problem with CAS Visual Debugger

Posted by Thilo Götz <tw...@gmx.de>.
On 1/27/2011 16:51, Thomas Heitz wrote:
> Using directory paths instead of file paths for the classpath of the
> install.xml is the reason why it was not working.
> 
> What was very confusing is that the setenv.txt that is generated from
> the install.xml was correctly expanding the directory paths.

I'm not following.  What's the difference between directory
and file paths?  Can you give us an example?

> 
> I think it would be very useful to have the same expansion mechanism
> for the classpath of the VM.
> 
> Thomas
> 
> 2011/1/27 Thilo Götz <tw...@gmx.de>:
>>
>>
>> On 1/26/2011 19:20, Thomas Heitz wrote:
>>>>> Dear UIMA users,
>>>>>
>>>>> What is the correct way to use a PEAR package for a final customer?
>>>
>>> So I runPearInstaller.sh/bat is the normal way to install a pear
>>> package for a final customer.
>>> And any other tools not provided by Apache UIMA should work if
>>> runPearInstaller works.
>>>
>>>>> We used the following tools:
>>>>> - Pear Installer
>>>>> - CAS Visual Debugger
>>>>>
>>>>> Unfortunately we need to add the CLASSPATH contained in the
>>>>> metada/setenv.txt file when calling the CAS Visual Debugger.
>>>>> Something like:
>>>>> export CLASSPATH=...
>>>>> java -cp ${UIMA_HOME}/lib/uima-core.jar:${UIMA_HOME}/lib/uima-examples.jar:${UIMA_HOME}/lib/uima-tools.jar:${CLASSPATH}
>>>>> org.apache.uima.tools.cvd.CVD
>>>>>
>>>>> Any idea why it is not automatized and notably why we cannot just
>>>>> click on the "Run your AE in the CAS Visual ..." button from the Pear
>>>>> Installer GUI?
>>>
>>>> You're possibly not using the correct descriptor.  The
>>>> xml file you need to point to when loading it in CVD
>>>> (or any other application) is the one in the top-level
>>>> pear directory, not the one you created yourself.
>>>> --Thilo
>>>
>>> I have used the generated top level descriptor projectid_pear.xml
>>> which contains:
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <pearSpecifier xmlns="http://uima.apache.org/resourceSpecifier">
>>>     <pearPath>/home/thomas/.tmp/uima-eclipse</pearPath>
>>> </pearSpecifier>
>>>
>>> I thought the CVD would read metada/install.xml to know the classpath
>>
>> It does.  It doesn't even have to do this itself, the
>> core UIMA framework takes care of that.  I don't know
>> what could be going wrong in your case.  I even tried
>> installing a pear into a .tmp dir on linux, no problem.
>>
>> Try setting the log level to "ALL" in CVD before you
>> load the pear.  Maybe that will turn up something useful.
>>
>> --Thilo
>>
>>> but it doesn't seem to do so as I got a class not found error.
>>>  when using the menu Run -> Load AE on the top-level descriptor.
>>> It works correctly when I add the aforementioned parameters when
>>> calling the CVD.
>>>
>>> The metadata/install.xml contains this section when installed with the
>>> pear installer:
>>> <PROCESS>
>>>       <ACTION>set_env_variable</ACTION>
>>>       <PARAMETERS>
>>>               <VAR_VALUE>/home/thomas/.tmp/uima-eclipse/target/classes:/home/thomas/.tmp/uima-eclipse/src:/home/thomas/.tmp/uima-eclipse/lib:/home/thomas/.tmp/uima-eclipse/resources:/home/thomas/.tmp/uima-eclipse/conf:</VAR_VALUE>
>>>               <COMMENTS></COMMENTS>
>>>               <VAR_NAME>CLASSPATH</VAR_NAME>
>>>       </PARAMETERS>
>>> </PROCESS>
>>>
>>>
>>> Thanks,
>>>
>>> Thomas Heitz
>>>
>>>
>>>>> I've read that the setenv.txt should'nt be used and that the UIMA
>>>>> tools read the classpath from metadata/install.xml.
>>>>>
>>>>> Is there a way to verify that the correct classpath is used in these tools?
>>>>>
>>>>> I'm using UIMA 2.3.1 on linux kubuntu 9.04 with jdk1.6.0_17.
>>

Re: How to use a pear package, classpath problem with CAS Visual Debugger

Posted by Thomas Heitz <th...@googlemail.com>.
Using directory paths instead of file paths for the classpath of the
install.xml is the reason why it was not working.

What was very confusing is that the setenv.txt that is generated from
the install.xml was correctly expanding the directory paths.

I think it would be very useful to have the same expansion mechanism
for the classpath of the VM.

Thomas

2011/1/27 Thilo Götz <tw...@gmx.de>:
>
>
> On 1/26/2011 19:20, Thomas Heitz wrote:
>>>> Dear UIMA users,
>>>>
>>>> What is the correct way to use a PEAR package for a final customer?
>>
>> So I runPearInstaller.sh/bat is the normal way to install a pear
>> package for a final customer.
>> And any other tools not provided by Apache UIMA should work if
>> runPearInstaller works.
>>
>>>> We used the following tools:
>>>> - Pear Installer
>>>> - CAS Visual Debugger
>>>>
>>>> Unfortunately we need to add the CLASSPATH contained in the
>>>> metada/setenv.txt file when calling the CAS Visual Debugger.
>>>> Something like:
>>>> export CLASSPATH=...
>>>> java -cp ${UIMA_HOME}/lib/uima-core.jar:${UIMA_HOME}/lib/uima-examples.jar:${UIMA_HOME}/lib/uima-tools.jar:${CLASSPATH}
>>>> org.apache.uima.tools.cvd.CVD
>>>>
>>>> Any idea why it is not automatized and notably why we cannot just
>>>> click on the "Run your AE in the CAS Visual ..." button from the Pear
>>>> Installer GUI?
>>
>>> You're possibly not using the correct descriptor.  The
>>> xml file you need to point to when loading it in CVD
>>> (or any other application) is the one in the top-level
>>> pear directory, not the one you created yourself.
>>> --Thilo
>>
>> I have used the generated top level descriptor projectid_pear.xml
>> which contains:
>> <?xml version="1.0" encoding="UTF-8"?>
>> <pearSpecifier xmlns="http://uima.apache.org/resourceSpecifier">
>>     <pearPath>/home/thomas/.tmp/uima-eclipse</pearPath>
>> </pearSpecifier>
>>
>> I thought the CVD would read metada/install.xml to know the classpath
>
> It does.  It doesn't even have to do this itself, the
> core UIMA framework takes care of that.  I don't know
> what could be going wrong in your case.  I even tried
> installing a pear into a .tmp dir on linux, no problem.
>
> Try setting the log level to "ALL" in CVD before you
> load the pear.  Maybe that will turn up something useful.
>
> --Thilo
>
>> but it doesn't seem to do so as I got a class not found error.
>>  when using the menu Run -> Load AE on the top-level descriptor.
>> It works correctly when I add the aforementioned parameters when
>> calling the CVD.
>>
>> The metadata/install.xml contains this section when installed with the
>> pear installer:
>> <PROCESS>
>>       <ACTION>set_env_variable</ACTION>
>>       <PARAMETERS>
>>               <VAR_VALUE>/home/thomas/.tmp/uima-eclipse/target/classes:/home/thomas/.tmp/uima-eclipse/src:/home/thomas/.tmp/uima-eclipse/lib:/home/thomas/.tmp/uima-eclipse/resources:/home/thomas/.tmp/uima-eclipse/conf:</VAR_VALUE>
>>               <COMMENTS></COMMENTS>
>>               <VAR_NAME>CLASSPATH</VAR_NAME>
>>       </PARAMETERS>
>> </PROCESS>
>>
>>
>> Thanks,
>>
>> Thomas Heitz
>>
>>
>>>> I've read that the setenv.txt should'nt be used and that the UIMA
>>>> tools read the classpath from metadata/install.xml.
>>>>
>>>> Is there a way to verify that the correct classpath is used in these tools?
>>>>
>>>> I'm using UIMA 2.3.1 on linux kubuntu 9.04 with jdk1.6.0_17.
>

Re: How to use a pear package, classpath problem with CAS Visual Debugger

Posted by Thilo Götz <tw...@gmx.de>.

On 1/26/2011 19:20, Thomas Heitz wrote:
>>> Dear UIMA users,
>>>
>>> What is the correct way to use a PEAR package for a final customer?
> 
> So I runPearInstaller.sh/bat is the normal way to install a pear
> package for a final customer.
> And any other tools not provided by Apache UIMA should work if
> runPearInstaller works.
> 
>>> We used the following tools:
>>> - Pear Installer
>>> - CAS Visual Debugger
>>>
>>> Unfortunately we need to add the CLASSPATH contained in the
>>> metada/setenv.txt file when calling the CAS Visual Debugger.
>>> Something like:
>>> export CLASSPATH=...
>>> java -cp ${UIMA_HOME}/lib/uima-core.jar:${UIMA_HOME}/lib/uima-examples.jar:${UIMA_HOME}/lib/uima-tools.jar:${CLASSPATH}
>>> org.apache.uima.tools.cvd.CVD
>>>
>>> Any idea why it is not automatized and notably why we cannot just
>>> click on the "Run your AE in the CAS Visual ..." button from the Pear
>>> Installer GUI?
> 
>> You're possibly not using the correct descriptor.  The
>> xml file you need to point to when loading it in CVD
>> (or any other application) is the one in the top-level
>> pear directory, not the one you created yourself.
>> --Thilo
> 
> I have used the generated top level descriptor projectid_pear.xml
> which contains:
> <?xml version="1.0" encoding="UTF-8"?>
> <pearSpecifier xmlns="http://uima.apache.org/resourceSpecifier">
>     <pearPath>/home/thomas/.tmp/uima-eclipse</pearPath>
> </pearSpecifier>
> 
> I thought the CVD would read metada/install.xml to know the classpath

It does.  It doesn't even have to do this itself, the
core UIMA framework takes care of that.  I don't know
what could be going wrong in your case.  I even tried
installing a pear into a .tmp dir on linux, no problem.

Try setting the log level to "ALL" in CVD before you
load the pear.  Maybe that will turn up something useful.

--Thilo

> but it doesn't seem to do so as I got a class not found error.
>  when using the menu Run -> Load AE on the top-level descriptor.
> It works correctly when I add the aforementioned parameters when
> calling the CVD.
> 
> The metadata/install.xml contains this section when installed with the
> pear installer:
> <PROCESS>
> 	<ACTION>set_env_variable</ACTION>
> 	<PARAMETERS>
> 		<VAR_VALUE>/home/thomas/.tmp/uima-eclipse/target/classes:/home/thomas/.tmp/uima-eclipse/src:/home/thomas/.tmp/uima-eclipse/lib:/home/thomas/.tmp/uima-eclipse/resources:/home/thomas/.tmp/uima-eclipse/conf:</VAR_VALUE>
> 		<COMMENTS></COMMENTS>
> 		<VAR_NAME>CLASSPATH</VAR_NAME>
> 	</PARAMETERS>
> </PROCESS>
> 
> 
> Thanks,
> 
> Thomas Heitz
> 
> 
>>> I've read that the setenv.txt should'nt be used and that the UIMA
>>> tools read the classpath from metadata/install.xml.
>>>
>>> Is there a way to verify that the correct classpath is used in these tools?
>>>
>>> I'm using UIMA 2.3.1 on linux kubuntu 9.04 with jdk1.6.0_17.

Re: How to use a pear package, classpath problem with CAS Visual Debugger

Posted by Thomas Heitz <th...@googlemail.com>.
> > Dear UIMA users,
> >
> > What is the correct way to use a PEAR package for a final customer?

So I runPearInstaller.sh/bat is the normal way to install a pear
package for a final customer.
And any other tools not provided by Apache UIMA should work if
runPearInstaller works.

> > We used the following tools:
> > - Pear Installer
> > - CAS Visual Debugger
> >
> > Unfortunately we need to add the CLASSPATH contained in the
> > metada/setenv.txt file when calling the CAS Visual Debugger.
> > Something like:
> > export CLASSPATH=...
> > java -cp ${UIMA_HOME}/lib/uima-core.jar:${UIMA_HOME}/lib/uima-examples.jar:${UIMA_HOME}/lib/uima-tools.jar:${CLASSPATH}
> > org.apache.uima.tools.cvd.CVD
> >
> > Any idea why it is not automatized and notably why we cannot just
> > click on the "Run your AE in the CAS Visual ..." button from the Pear
> > Installer GUI?

> You're possibly not using the correct descriptor.  The
> xml file you need to point to when loading it in CVD
> (or any other application) is the one in the top-level
> pear directory, not the one you created yourself.
> --Thilo

I have used the generated top level descriptor projectid_pear.xml
which contains:
<?xml version="1.0" encoding="UTF-8"?>
<pearSpecifier xmlns="http://uima.apache.org/resourceSpecifier">
    <pearPath>/home/thomas/.tmp/uima-eclipse</pearPath>
</pearSpecifier>

I thought the CVD would read metada/install.xml to know the classpath
but it doesn't seem to do so as I got a class not found error.
 when using the menu Run -> Load AE on the top-level descriptor.
It works correctly when I add the aforementioned parameters when
calling the CVD.

The metadata/install.xml contains this section when installed with the
pear installer:
<PROCESS>
	<ACTION>set_env_variable</ACTION>
	<PARAMETERS>
		<VAR_VALUE>/home/thomas/.tmp/uima-eclipse/target/classes:/home/thomas/.tmp/uima-eclipse/src:/home/thomas/.tmp/uima-eclipse/lib:/home/thomas/.tmp/uima-eclipse/resources:/home/thomas/.tmp/uima-eclipse/conf:</VAR_VALUE>
		<COMMENTS></COMMENTS>
		<VAR_NAME>CLASSPATH</VAR_NAME>
	</PARAMETERS>
</PROCESS>


Thanks,

Thomas Heitz


> > I've read that the setenv.txt should'nt be used and that the UIMA
> > tools read the classpath from metadata/install.xml.
> >
> > Is there a way to verify that the correct classpath is used in these tools?
> >
> > I'm using UIMA 2.3.1 on linux kubuntu 9.04 with jdk1.6.0_17.