Terrier Users :  Terrier Forum terrier.org
General discussion about using/developing applications using Terrier 
Can't run using batch files
Posted by: gabriel ()
Date: November 17, 2014 03:30AM

Hi,

I have been trying to get started with the desktop_terrier. So, I followed the instruction from [terrier.org]. But whenever I double-click the desktop_terrier.bat, the cmd shows up and says "Set TERRIER_HOME to be C:\terrier-4.0-win" (this path is where I extracted terrier), and then nothing will happen or show up after that.

Similar thing happened when I tried the "Tutorial: How to use the Batch (TREC) Terrier" from [terrier.org]. I could run trec_setup.bat as mentioned in the tutorial without any problem, and it also created the files in the etc\. But when I continue to the "trec_terrier.bat -i" step, the message "Set TERRIER_HOME to be C:\terrier-4.0-win" will shows up and nothing appears after that.

I was wondering if you know why this is happening, and if there is any solution.

Thanks,

Gabriel

Options: ReplyQuote
Re: Can't run using batch files
Posted by: Coldyoda ()
Date: November 17, 2014 11:47AM

This might not be correct, but have you added Terrier to your enviroment path?

Options: ReplyQuote
Re: Can't run using batch files
Posted by: gabriel ()
Date: November 17, 2014 04:26PM

Yes, I have also tried adding Terrier to environment path. But in that case, nothing will show up in the cmd, neither will the message.

In both cases, if I check the resources consumption I can see that the cmd process using up about 30% of the CPU. It apparently is working, but nothing just shows up on the screen.

I am using terrier 4.0.
My system is running Windows 8.1 64 bit
I also have the latest JRE (jre-8u25-windows-x64) installed.

Options: ReplyQuote
Re: Can't run using batch files
Posted by: craigm ()
Date: November 19, 2014 05:28PM

I have had other reports of this, there appears to be problem with the batch files in the Windows download.

Craig

Options: ReplyQuote
Re: Can't run using batch files
Posted by: gpapadop79 ()
Date: March 10, 2015 09:48AM

The problem is in the file bin\anyclass.bat

In line 81 the "goto log4jxml" creates an infinite loop.

Line 81 should be changed to:

if not EXIST "%TERRIER_ETC%\log4j.xml" goto log4jproperties


after that edit it launches correctly

Options: ReplyQuote
Re: Can't run using batch files
Posted by: Maxblake ()
Date: March 11, 2015 10:50PM

I changed line 81 but still doesn't work

Options: ReplyQuote
Re: Can't run using batch files
Posted by: gpapadop79 ()
Date: March 12, 2015 09:46PM

You mean that after the edit it behaves the same way as before or it displays some other error message or something?


That's strange.... Are you sure you did the right edit?


the code snippet in question is the one below (anyclass.bat: lines 80-82):
:log4jxml
if not EXIST "%TERRIER_ETC%\log4j.xml" goto log4jxml
SET LOGGING_OPTIONS=-Dlog4j.configuration=file:%TERRIER_ETC%\log4j.xml

After the edit should look like this:
:log4jxml
if not EXIST "%TERRIER_ETC%\log4j.xml" goto log4jproperties
SET LOGGING_OPTIONS=-Dlog4j.configuration=file:%TERRIER_ETC%\log4j.xml


I've done this a number of times in different terrier 4.0 installations and worked every time....

Options: ReplyQuote
Re: Can't run using batch files
Posted by: Maxblake ()
Date: March 13, 2015 12:48AM

Sorry! I'm blind, line 81 I changed for:
if not EXIST "%TERRIER_ETC%\log4j.xml" goto log4properties

Thanks

Options: ReplyQuote
Re: Can't run using batch files
Posted by: craigm ()
Date: March 13, 2015 09:17AM

At last, thanks for finding this gpapadop79!

Craig

Options: ReplyQuote
Re: Can't run using batch files
Posted by: gpapadop79 ()
Date: March 13, 2015 10:08AM

craigm Wrote:
-------------------------------------------------------
> At last, thanks for finding this gpapadop79!
>
> Craig


No problem! Easy fix!

Options: ReplyQuote


Sorry, only registered users may post in this forum.
This forum powered by Phorum.