Hi Akram,

I think that the problem is your classpath.


When you run a main(..) class in intellij, it uses the classpath of the module 
in which that class lies.


For the PIperRunnerGui it uses the classpath of ctakes-gui.

ctakes-gui does not have any dependency upon modules such as ctakes-chunker.

Running PiperRunnerGui.main(..) in ctakes-gui module has no ctakes-chunker 
classes or files in the classpath.


Getting used to running with maven can take a little while.

Intellij does have some things that can help.


Instead of running just by main(..) methods, use specific run configurations.

   
https://www.jetbrains.com/help/idea/creating-and-editing-run-debug-configurations.html


1.  In the top toolbar, select    Run > Edit Configurations ...

    This should launch a Run/Debug Configurations dialog.

2.  Above the left panel, click the   +   button

    This should pop up a list of Configuration types.

3.  Select   Application

    This should populate the right panel with options.

4.  The important items:


Main class :   RunPiperGui

VM Options: -Xmx3g

Use classpath of Module:       ctakes-examples



Sean



________________________________
From: Akram <as...@yahoo.com>
Sent: Sunday, December 22, 2019 7:54 PM
To: dev@ctakes.apache.org; Finan, Sean
Subject: Re: "No piper file found for ChunkerSubPipe" on debug [EXTERNAL]

* External Email - Caution *


I have checked the file ChunkerSubPipe.piper for sure exists in 
ctakes-chunker-res\target\classes\org\apache\ctakes\chunker\pipeline

and in \ctakes-chunker-res\src\main\resources\org\apache\ctakes\chunker\pipeline

loading DefaultTokenizerPipeline shows no errors, the problem only with 
ChunkerSubPipe.piper

I tried to install cTAKES on 2 different computers and got same issue on both.

it only happens when I run from PiperRunnerGui (same as the image attached)

No problems if I use Profilers


[Inline image]



On Monday, 23 December 2019, 4:54:05 am AEDT, Finan, Sean 
<sean.fi...@childrens.harvard.edu> wrote:



?Hi Akram,


I am not sure why you are seeing that error message.


That method will search the classpath for "ChunkerSubPipe.piper", which 
includes the ctakes-chunker-res*.jar in the lib/ directory of a binary 
installation or the ctakes-chunker-res/src/main/resources/ directory tree in a 
source sandbox.   It should also traverse the resources/ directory tree in both 
installation types.


As long as the file exists in there and the classpath is set it should find it.


Can you check your installation and see if that file is missing for some reason?


The path is something like org.apache.ctakes.chunker.pipeline.


Sean

________________________________
From: Akram <as...@yahoo.com.INVALID>
Sent: Sunday, December 22, 2019 3:50 AM
To: dev@ctakes.apache.org
Subject: "No piper file found for ChunkerSubPipe" on debug [EXTERNAL]

* External Email - Caution *


I followed Sean's instructions to run "runPiperGUI" from Profiles using 
"DefaultFastPipeline_Test.piper" file

works perfectly.


I tried to debug the process ( I will do some changes later )

I run "PiperRunnerGUI"  using "DefaultFastPipeline_Test.piper" file

but I get this error !

"No piper file found for ChunkerSubPipe"


Then this error "Piper File not found: ChunkerSubPipe"

Then this error "Could not load Piper File 
J:\cTAKES\ctakes-clinical-res\src\main\resources\org\apache\ctakes\clinical\pipeline\DefaultFastPipeline_Test.piper"

I tried to debug. and limited the problem in Line 319 in PiperFileReader.java


stream = FileLocator.getStreamQuiet( packageName.replace( '.', '/' ) + 
"/pipeline/" + filePath );

Then stopped at getStreamQuietfunction and could not know why it does not find 
the ChunkerSubPipe.piper!

Can someone help me identifying what is the cause of this problem?

Appreciate your help.


[Inline image]

Reply via email to