Re: [jira] [Commented] (UIMA-6247) Ruta: not able to check label expression on null as implicit condition

2020-06-22 Thread Marshall Schor
yep, wrong ticket... sorry.


On 6/22/2020 2:36 AM, Peter Klügl (Jira) wrote:
> [ 
> https://issues.apache.org/jira/browse/UIMA-6247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17141768#comment-17141768
>  ] 
>
> Peter Klügl commented on UIMA-6247:
> ---
>
> Hi
>
> This is maybe the wrong ticket? I created it for some problems writing rules 
> rules. Do you mean UIMA-6243?
>
>> Ruta: not able to check label expression on null as implicit condition
>> --
>>
>> Key: UIMA-6247
>> URL: https://issues.apache.org/jira/browse/UIMA-6247
>> Project: UIMA
>>  Issue Type: Bug
>>  Components: Ruta
>>Reporter: Peter Klügl
>>Priority: Major
>>
>
>
>
> --
> This message was sent by Atlassian Jira
> (v8.3.4#803005)


[jira] [Commented] (UIMA-6247) Ruta: not able to check label expression on null as implicit condition

2020-06-22 Thread Jira


[ 
https://issues.apache.org/jira/browse/UIMA-6247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17141768#comment-17141768
 ] 

Peter Klügl commented on UIMA-6247:
---

Hi

This is maybe the wrong ticket? I created it for some problems writing rules 
rules. Do you mean UIMA-6243?

> Ruta: not able to check label expression on null as implicit condition
> --
>
> Key: UIMA-6247
> URL: https://issues.apache.org/jira/browse/UIMA-6247
> Project: UIMA
>  Issue Type: Bug
>  Components: Ruta
>Reporter: Peter Klügl
>Priority: Major
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (UIMA-6247) Ruta: not able to check label expression on null as implicit condition

2020-06-21 Thread Marshall Schor (Jira)


[ 
https://issues.apache.org/jira/browse/UIMA-6247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17141501#comment-17141501
 ] 

Marshall Schor commented on UIMA-6247:
--

Running this gave errors on all 3 test cases:

Caused by: org.apache.uima.cas.CASRuntimeException: The JCAS cover class 
"org.apache.uima.cas.test.Token_Type" could not be loaded. at 

Caused by: java.lang.ClassCastException: org.apache.uima.jcas.tcas.Annotation 
cannot be cast to org.apache.uima.cas.test.Token at 

Caused by: java.lang.ClassCastException: org.apache.uima.jcas.tcas.Annotation 
cannot be cast to org.apache.uima.cas.test.Token at 

 

Fixing the likely little typo bug in IsolatingClassLoader redefining(...), to 
add the pattern to "redefineClassesPatterns", makes 2 of the tests pass, and 
the one that fails now fails with:

Caused by: java.lang.ClassCastException: org.apache.uima.cas.test.Token cannot 
be cast to org.apache.uima.cas.test.Token at

 

Looking at this code, it is attempting to cast to the Token class, which is 
being loaded by the class loader that loaded the JCasClassLoaderTest code 
itself, which I'm guessing is different from the test's version of that class 
which was probably loaded with the IsolatingClassLoader (I haven't traced the 
code, so this is just an educated guess).  This of course would cause a class 
cast exception.

 

Perhaps the test needs to a) not do a class cast, b) do instead a test to see 
if the object is the expected class, using some test for example, from the 
"Class" class: isAssignableFrom or isInstance, and not use any reference to 
"Token" in the testcase as a class itself.

WDYT?

> Ruta: not able to check label expression on null as implicit condition
> --
>
> Key: UIMA-6247
> URL: https://issues.apache.org/jira/browse/UIMA-6247
> Project: UIMA
>  Issue Type: Bug
>  Components: Ruta
>Reporter: Peter Klügl
>Priority: Major
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)