You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by Marshall Schor <ms...@schor.com> on 2018/11/05 22:39:04 UTC

[VOTE] uimaj-3.0.1 rc1

Hi,

uimaj-3.0.1 rc1 is posted and ready for voting.

By doing this and the v2 2.10.3 together, I hope to gain some efficiency, and
use only one code-signing-credit when the eclipse plugin jars are signed after the vote passes.

The issues fixed are here:
https://issues.apache.org/jira/projects/UIMA/versions/12340377

Major changes are:
----------------- 
The code and the build was adjusted to work ok using both Java 8 and Java 11.
The fixes for 2.10.3 were merged.
Several select framework bugs were fixed; it should align well with uimaFIT's implementation

The source and binary tar/zips are here:
https://dist.apache.org/repos/dist/dev/uima/uimaj-v3/3.0.1-rc1/artifacts/

The eclipse update subsite is here:
https://dist.apache.org/repos/dist/dev/uima/uimaj-v3/3.0.1-rc1/uimaj

The maven staging repo is here:
https://repository.apache.org/content/repositories/orgapacheuima-1204/

SVN tag: https://svn.apache.org/repos/asf/uima/uv3/uimaj-v3/tags/uimaj-3.0.1/

Built using the latest maven (version 3.6.0), and the latest uima-wide parent
pom (version 12).
Built using Java 11 :-) !

Please vote on release:

[ ] +1 OK to release
[ ] 0   Don't care
[ ] -1 Not OK to release, because ...

Thanks.

-Marshall



[VOTE][CANCEL] uimaj-3.0.1 rc1

Posted by Marshall Schor <ms...@schor.com>.
Cancelling the vote in order to fix issue with ByteBuffer and compiling with
Java 11 then running with Java 8.  https://issues.apache.org/jira/browse/UIMA-5904

-Marshall

On 11/5/2018 5:39 PM, Marshall Schor wrote:
> Hi,
>
> uimaj-3.0.1 rc1 is posted and ready for voting.
>
> By doing this and the v2 2.10.3 together, I hope to gain some efficiency, and
> use only one code-signing-credit when the eclipse plugin jars are signed after the vote passes.
>
> The issues fixed are here:
> https://issues.apache.org/jira/projects/UIMA/versions/12340377
>
> Major changes are:
> ----------------- 
> The code and the build was adjusted to work ok using both Java 8 and Java 11.
> The fixes for 2.10.3 were merged.
> Several select framework bugs were fixed; it should align well with uimaFIT's implementation
>
> The source and binary tar/zips are here:
> https://dist.apache.org/repos/dist/dev/uima/uimaj-v3/3.0.1-rc1/artifacts/
>
> The eclipse update subsite is here:
> https://dist.apache.org/repos/dist/dev/uima/uimaj-v3/3.0.1-rc1/uimaj
>
> The maven staging repo is here:
> https://repository.apache.org/content/repositories/orgapacheuima-1204/
>
> SVN tag: https://svn.apache.org/repos/asf/uima/uv3/uimaj-v3/tags/uimaj-3.0.1/
>
> Built using the latest maven (version 3.6.0), and the latest uima-wide parent
> pom (version 12).
> Built using Java 11 :-) !
>
> Please vote on release:
>
> [ ] +1 OK to release
> [ ] 0   Don't care
> [ ] -1 Not OK to release, because ...
>
> Thanks.
>
> -Marshall
>
>
>

Re: building with Java 11 - incompatibility workaround

Posted by Marshall Schor <ms...@schor.com>.
ok, great, thanks!  That enabled me to find the problem.

I'll cancel the v3 vote, and fix this and rebuild with java 8.

Before I do the next release candidate, I plan to rebuild uimaj-core with Java
11, and get it to you for retesting, with the "workaround", which I hope you'll
retest to see if everything works on Java 8 :-).

-Marshall


On 11/12/2018 8:35 AM, Richard Eckart de Castilho wrote:
> Hi,
>
> so when I run one of the tests in Eclipse, the stack trace is more complete:
>
> java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
> 	at org.apache.uima.util.impl.DataIO.decodeUTF8(DataIO.java:68)
> 	at org.apache.uima.util.impl.DataIO.readUTFv(DataIO.java:124)
> 	at org.apache.uima.cas.impl.BinaryCasSerDes4$Deserializer.deserialize(BinaryCasSerDes4.java:1647)
> 	at org.apache.uima.cas.impl.BinaryCasSerDes4$Deserializer.access$200(BinaryCasSerDes4.java:1472)
> 	at org.apache.uima.cas.impl.BinaryCasSerDes4.deserialize(BinaryCasSerDes4.java:281)
> 	at org.apache.uima.cas.impl.BinaryCasSerDes.reinit(BinaryCasSerDes.java:569)
> 	at org.apache.uima.util.CasIOUtils.load(CasIOUtils.java:381)
> 	at org.apache.uima.util.CasIOUtils.load(CasIOUtils.java:312)
> 	at org.apache.uima.util.CasIOUtils.load(CasIOUtils.java:236)
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasReader.getNext(BinaryCasReader.java:211)
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.read(BinaryCasWriterReaderTest.java:527)
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.test4Preinitialized(BinaryCasWriterReaderTest.java:150)
>
> DataIO.java:68:
> 68:      in.position(in.position() + length);
> 69:      return sb.toString();  // doesn't copy the string char array
>
> The signature of Buffer.position(int) in Java 1.8 is:
>
>       public final Buffer position(int newPosition) {...
>
> ... and ByteBuffer does not override it.
>
> E.g. looking at Java 10, I can see this method signature in ByteBuffer overiding
> the position(int) method from Buffer using a co-variant return type:
>
>     ByteBuffer position(int newPosition) {
>         super.position(newPosition);
>         return this;
>     }
>
> The trouble is that when we compile UIMAv3 against a recent Java, DataIO binds against
> this co-variant override which causes the exception when we actually trying to run that
> on a Java 8 then.
>
> The verbose option logs all the loaded classes to the console, but I'm not sure 
> what information would be of interest to you.
>
> Cheers,
>
> -- Richard
>
>> On 10. Nov 2018, at 20:42, Marshall Schor <ms...@schor.com> wrote:
>>
>> Hi, you're very kind to keep trying things :-)  One more thing to try:
>>
>> Rerun the failing scenario, but start the JVM with the -verbose:class JVM
>> parameter, so we could see what was loading the class that caused the error. 
>> The JVM loads classes in parallel by default I think, so in the trace it might
>> not be the immediately preceding class...
>>
>> Cheers. -Marshall
>

Re: [VOTE] uimaj-3.0.1 rc1

Posted by Richard Eckart de Castilho <re...@apache.org>.
Hi,

so when I run one of the tests in Eclipse, the stack trace is more complete:

java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
	at org.apache.uima.util.impl.DataIO.decodeUTF8(DataIO.java:68)
	at org.apache.uima.util.impl.DataIO.readUTFv(DataIO.java:124)
	at org.apache.uima.cas.impl.BinaryCasSerDes4$Deserializer.deserialize(BinaryCasSerDes4.java:1647)
	at org.apache.uima.cas.impl.BinaryCasSerDes4$Deserializer.access$200(BinaryCasSerDes4.java:1472)
	at org.apache.uima.cas.impl.BinaryCasSerDes4.deserialize(BinaryCasSerDes4.java:281)
	at org.apache.uima.cas.impl.BinaryCasSerDes.reinit(BinaryCasSerDes.java:569)
	at org.apache.uima.util.CasIOUtils.load(CasIOUtils.java:381)
	at org.apache.uima.util.CasIOUtils.load(CasIOUtils.java:312)
	at org.apache.uima.util.CasIOUtils.load(CasIOUtils.java:236)
	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasReader.getNext(BinaryCasReader.java:211)
	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.read(BinaryCasWriterReaderTest.java:527)
	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.test4Preinitialized(BinaryCasWriterReaderTest.java:150)

DataIO.java:68:
68:      in.position(in.position() + length);
69:      return sb.toString();  // doesn't copy the string char array

The signature of Buffer.position(int) in Java 1.8 is:

      public final Buffer position(int newPosition) {...

... and ByteBuffer does not override it.

E.g. looking at Java 10, I can see this method signature in ByteBuffer overiding
the position(int) method from Buffer using a co-variant return type:

    ByteBuffer position(int newPosition) {
        super.position(newPosition);
        return this;
    }

The trouble is that when we compile UIMAv3 against a recent Java, DataIO binds against
this co-variant override which causes the exception when we actually trying to run that
on a Java 8 then.

The verbose option logs all the loaded classes to the console, but I'm not sure 
what information would be of interest to you.

Cheers,

-- Richard

> On 10. Nov 2018, at 20:42, Marshall Schor <ms...@schor.com> wrote:
> 
> Hi, you're very kind to keep trying things :-)  One more thing to try:
> 
> Rerun the failing scenario, but start the JVM with the -verbose:class JVM
> parameter, so we could see what was loading the class that caused the error. 
> The JVM loads classes in parallel by default I think, so in the trace it might
> not be the immediately preceding class...
> 
> Cheers. -Marshall


Re: [VOTE] uimaj-3.0.1 rc1

Posted by Marshall Schor <ms...@schor.com>.
Hi, you're very kind to keep trying things :-)  One more thing to try:

Rerun the failing scenario, but start the JVM with the -verbose:class JVM
parameter, so we could see what was loading the class that caused the error. 
The JVM loads classes in parallel by default I think, so in the trace it might
not be the immediately preceding class...

Cheers. -Marshall

On 11/10/2018 1:34 PM, Richard Eckart de Castilho wrote:
>
>> On 9. Nov 2018, at 20:55, Marshall Schor <ms...@schor.com> wrote:
>>
>> hi, I've cloned the dkpro repo, which branch is this in?
> DKPro Core branch "2.0.x" 
>
>> position(int) method signature wasn't changed,
>>
>> position() was.
> Thanks for digging into it! Do you still need me to try anything?
>
> -- Richard
>
>

Re: [VOTE] uimaj-3.0.1 rc1

Posted by Richard Eckart de Castilho <re...@apache.org>.

> On 9. Nov 2018, at 20:55, Marshall Schor <ms...@schor.com> wrote:
> 
> hi, I've cloned the dkpro repo, which branch is this in?

DKPro Core branch "2.0.x" 

> position(int) method signature wasn't changed,
> 
> position() was.

Thanks for digging into it! Do you still need me to try anything?

-- Richard


Re: [VOTE] uimaj-3.0.1 rc1

Posted by Marshall Schor <ms...@schor.com>.
position(int) method signature wasn't changed,

position() was.

-M

On 11/8/2018 6:44 PM, Richard Eckart de Castilho wrote:
> On 8. Nov 2018, at 15:44, Marshall Schor <ms...@schor.com> wrote:
>> I'm wondering about the workaround you mentioned earlier.  From the previously
>> posted stack trace, it seems the issue is in DKPro.  In looking at CasIOUtils, I
>> don't see any use of ByteBuffer.  Can you post a stack trace or some other
>> evidence, that helps me figure out where to put the workaround?
> The stack trace ends in DKPro Core code, but as far as I can tell, it isn't caused there. 
>
> This is one of the lines which are reported in the stack trace is this one (no ByteBuffer here):
>
>         CasIOUtils.load(new ByteArrayInputStream(bos.toByteArray()), target);
>
> The only code in UIMA that I found where the problematic method is being used
> is in DataIO - lines like:
>
>       in.position(in.position() + length);
>
> It is very strange that the stack traces simply stop like that. My guess would be that
> the error is triggered as the respective class (e.g. indirectly via the loading of CasIOUtils)
> is being loaded/resolved. 
>
> At the end of the mail is a full list of all the exceptions being thrown by in the particular
> setup that I have described. The line numbers resolve to the following file in the given commit:
>
> https://github.com/dkpro/dkpro-core/blob/277d7a8bcc69c5c0ea6150c49566b524c1017d61/dkpro-core-io-bincas-asl/src/test/java/de/tudarmstadt/ukp/dkpro/core/io/bincas/BinaryCasWriterReaderTest.java
>
> You'll note that none of the lines mentions a ByteBuffer. The only place in the entire DKPro Core
> where a ByteBuffer is used is in another module (...api-embeddings) - and even there the
> `position(int)` method isn't used.
>
> At the moment, that is all the intelligence I can provide. 
>
> Cheers,
>
> -- Richard
>
>
> ------
>
> -------------------------------------------------------------------------------
> Test set: de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest
> -------------------------------------------------------------------------------
> Tests run: 22, Failures: 0, Errors: 12, Skipped: 1, Time elapsed: 11.377 s <<< FAILURE! - in de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest
> test4Preinitialized(de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest)  Time elapsed: 0.269 s  <<< ERROR!
> java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.read(BinaryCasWriterReaderTest.java:527)
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.test4Preinitialized(BinaryCasWriterReaderTest.java:150)
>
> test_COMPRESSED_FILTERED_TSI_preinitialized(de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest)  Time elapsed: 0.232 s  <<< ERROR!
> java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.read(BinaryCasWriterReaderTest.java:527)
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.test_COMPRESSED_FILTERED_TSI_preinitialized(BinaryCasWriterReaderTest.java:214)
>
> readWriteZipMinimal(de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest)  Time elapsed: 0.257 s  <<< ERROR!
> java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.readWriteZipMinimal(BinaryCasWriterReaderTest.java:294)
>
> test_COMPRESSED_FILTERED_TSI_lenient(de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest)  Time elapsed: 0.157 s  <<< ERROR!
> java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.read(BinaryCasWriterReaderTest.java:527)
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.test_COMPRESSED_FILTERED_TSI_lenient(BinaryCasWriterReaderTest.java:223)
>
> test6plusLenient(de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest)  Time elapsed: 0.122 s  <<< ERROR!
> java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.read(BinaryCasWriterReaderTest.java:527)
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.test6plusLenient(BinaryCasWriterReaderTest.java:241)
>
> test6Preinitialized(de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest)  Time elapsed: 0.089 s  <<< ERROR!
> java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.read(BinaryCasWriterReaderTest.java:527)
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.test6Preinitialized(BinaryCasWriterReaderTest.java:205)
>
> testReadingFileWithoutDocumentMetaData(de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest)  Time elapsed: 0.079 s  <<< ERROR!
> java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.testReadingFileWithoutDocumentMetaData(BinaryCasWriterReaderTest.java:351)
>
> test6plusPreinitialized(de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest)  Time elapsed: 0.098 s  <<< ERROR!
> java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.read(BinaryCasWriterReaderTest.java:527)
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.test6plusPreinitialized(BinaryCasWriterReaderTest.java:232)
>
> testReadingFileWithDocumentMetaData(de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest)  Time elapsed: 0.074 s  <<< ERROR!
> java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.testReadingFileWithDocumentMetaData(BinaryCasWriterReaderTest.java:320)
>
> test6Lenient(de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest)  Time elapsed: 0.076 s  <<< ERROR!
> java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.read(BinaryCasWriterReaderTest.java:527)
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.test6Lenient(BinaryCasWriterReaderTest.java:163)
>
> testReadingFileOverridingDocumentMetaData(de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest)  Time elapsed: 0.079 s  <<< ERROR!
> java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.testReadingFileOverridingDocumentMetaData(BinaryCasWriterReaderTest.java:389)
>
> test6LenientPlainUima(de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest)  Time elapsed: 0.038 s  <<< ERROR!
> java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.test6LenientPlainUima(BinaryCasWriterReaderTest.java:197)

Re: [VOTE] uimaj-3.0.1 rc1

Posted by Marshall Schor <ms...@schor.com>.
could you try running this with  class loading tracing turned on, so we can
(maybe) see what's causing the bad version to be loaded?

add this parameter to the JVM args:  -verbose:class

Cheers. -Marshall

On 11/8/2018 6:44 PM, Richard Eckart de Castilho wrote:
> On 8. Nov 2018, at 15:44, Marshall Schor <ms...@schor.com> wrote:
>> I'm wondering about the workaround you mentioned earlier.  From the previously
>> posted stack trace, it seems the issue is in DKPro.  In looking at CasIOUtils, I
>> don't see any use of ByteBuffer.  Can you post a stack trace or some other
>> evidence, that helps me figure out where to put the workaround?
> The stack trace ends in DKPro Core code, but as far as I can tell, it isn't caused there. 
>
> This is one of the lines which are reported in the stack trace is this one (no ByteBuffer here):
>
>         CasIOUtils.load(new ByteArrayInputStream(bos.toByteArray()), target);
>
> The only code in UIMA that I found where the problematic method is being used
> is in DataIO - lines like:
>
>       in.position(in.position() + length);
>
> It is very strange that the stack traces simply stop like that. My guess would be that
> the error is triggered as the respective class (e.g. indirectly via the loading of CasIOUtils)
> is being loaded/resolved. 
>
> At the end of the mail is a full list of all the exceptions being thrown by in the particular
> setup that I have described. The line numbers resolve to the following file in the given commit:
>
> https://github.com/dkpro/dkpro-core/blob/277d7a8bcc69c5c0ea6150c49566b524c1017d61/dkpro-core-io-bincas-asl/src/test/java/de/tudarmstadt/ukp/dkpro/core/io/bincas/BinaryCasWriterReaderTest.java
>
> You'll note that none of the lines mentions a ByteBuffer. The only place in the entire DKPro Core
> where a ByteBuffer is used is in another module (...api-embeddings) - and even there the
> `position(int)` method isn't used.
>
> At the moment, that is all the intelligence I can provide. 
>
> Cheers,
>
> -- Richard
>
>
> ------
>
> -------------------------------------------------------------------------------
> Test set: de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest
> -------------------------------------------------------------------------------
> Tests run: 22, Failures: 0, Errors: 12, Skipped: 1, Time elapsed: 11.377 s <<< FAILURE! - in de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest
> test4Preinitialized(de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest)  Time elapsed: 0.269 s  <<< ERROR!
> java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.read(BinaryCasWriterReaderTest.java:527)
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.test4Preinitialized(BinaryCasWriterReaderTest.java:150)
>
> test_COMPRESSED_FILTERED_TSI_preinitialized(de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest)  Time elapsed: 0.232 s  <<< ERROR!
> java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.read(BinaryCasWriterReaderTest.java:527)
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.test_COMPRESSED_FILTERED_TSI_preinitialized(BinaryCasWriterReaderTest.java:214)
>
> readWriteZipMinimal(de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest)  Time elapsed: 0.257 s  <<< ERROR!
> java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.readWriteZipMinimal(BinaryCasWriterReaderTest.java:294)
>
> test_COMPRESSED_FILTERED_TSI_lenient(de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest)  Time elapsed: 0.157 s  <<< ERROR!
> java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.read(BinaryCasWriterReaderTest.java:527)
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.test_COMPRESSED_FILTERED_TSI_lenient(BinaryCasWriterReaderTest.java:223)
>
> test6plusLenient(de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest)  Time elapsed: 0.122 s  <<< ERROR!
> java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.read(BinaryCasWriterReaderTest.java:527)
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.test6plusLenient(BinaryCasWriterReaderTest.java:241)
>
> test6Preinitialized(de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest)  Time elapsed: 0.089 s  <<< ERROR!
> java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.read(BinaryCasWriterReaderTest.java:527)
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.test6Preinitialized(BinaryCasWriterReaderTest.java:205)
>
> testReadingFileWithoutDocumentMetaData(de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest)  Time elapsed: 0.079 s  <<< ERROR!
> java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.testReadingFileWithoutDocumentMetaData(BinaryCasWriterReaderTest.java:351)
>
> test6plusPreinitialized(de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest)  Time elapsed: 0.098 s  <<< ERROR!
> java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.read(BinaryCasWriterReaderTest.java:527)
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.test6plusPreinitialized(BinaryCasWriterReaderTest.java:232)
>
> testReadingFileWithDocumentMetaData(de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest)  Time elapsed: 0.074 s  <<< ERROR!
> java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.testReadingFileWithDocumentMetaData(BinaryCasWriterReaderTest.java:320)
>
> test6Lenient(de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest)  Time elapsed: 0.076 s  <<< ERROR!
> java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.read(BinaryCasWriterReaderTest.java:527)
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.test6Lenient(BinaryCasWriterReaderTest.java:163)
>
> testReadingFileOverridingDocumentMetaData(de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest)  Time elapsed: 0.079 s  <<< ERROR!
> java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.testReadingFileOverridingDocumentMetaData(BinaryCasWriterReaderTest.java:389)
>
> test6LenientPlainUima(de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest)  Time elapsed: 0.038 s  <<< ERROR!
> java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.test6LenientPlainUima(BinaryCasWriterReaderTest.java:197)

Re: [VOTE] uimaj-3.0.1 rc1

Posted by Marshall Schor <ms...@schor.com>.
hi, I've cloned the dkpro repo, which branch is this in?

-M

On 11/8/2018 6:44 PM, Richard Eckart de Castilho wrote:
> On 8. Nov 2018, at 15:44, Marshall Schor <ms...@schor.com> wrote:
>> I'm wondering about the workaround you mentioned earlier.  From the previously
>> posted stack trace, it seems the issue is in DKPro.  In looking at CasIOUtils, I
>> don't see any use of ByteBuffer.  Can you post a stack trace or some other
>> evidence, that helps me figure out where to put the workaround?
> The stack trace ends in DKPro Core code, but as far as I can tell, it isn't caused there. 
>
> This is one of the lines which are reported in the stack trace is this one (no ByteBuffer here):
>
>         CasIOUtils.load(new ByteArrayInputStream(bos.toByteArray()), target);
>
> The only code in UIMA that I found where the problematic method is being used
> is in DataIO - lines like:
>
>       in.position(in.position() + length);
>
> It is very strange that the stack traces simply stop like that. My guess would be that
> the error is triggered as the respective class (e.g. indirectly via the loading of CasIOUtils)
> is being loaded/resolved. 
>
> At the end of the mail is a full list of all the exceptions being thrown by in the particular
> setup that I have described. The line numbers resolve to the following file in the given commit:
>
> https://github.com/dkpro/dkpro-core/blob/277d7a8bcc69c5c0ea6150c49566b524c1017d61/dkpro-core-io-bincas-asl/src/test/java/de/tudarmstadt/ukp/dkpro/core/io/bincas/BinaryCasWriterReaderTest.java
>
> You'll note that none of the lines mentions a ByteBuffer. The only place in the entire DKPro Core
> where a ByteBuffer is used is in another module (...api-embeddings) - and even there the
> `position(int)` method isn't used.
>
> At the moment, that is all the intelligence I can provide. 
>
> Cheers,
>
> -- Richard
>
>
> ------
>
> -------------------------------------------------------------------------------
> Test set: de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest
> -------------------------------------------------------------------------------
> Tests run: 22, Failures: 0, Errors: 12, Skipped: 1, Time elapsed: 11.377 s <<< FAILURE! - in de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest
> test4Preinitialized(de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest)  Time elapsed: 0.269 s  <<< ERROR!
> java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.read(BinaryCasWriterReaderTest.java:527)
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.test4Preinitialized(BinaryCasWriterReaderTest.java:150)
>
> test_COMPRESSED_FILTERED_TSI_preinitialized(de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest)  Time elapsed: 0.232 s  <<< ERROR!
> java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.read(BinaryCasWriterReaderTest.java:527)
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.test_COMPRESSED_FILTERED_TSI_preinitialized(BinaryCasWriterReaderTest.java:214)
>
> readWriteZipMinimal(de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest)  Time elapsed: 0.257 s  <<< ERROR!
> java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.readWriteZipMinimal(BinaryCasWriterReaderTest.java:294)
>
> test_COMPRESSED_FILTERED_TSI_lenient(de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest)  Time elapsed: 0.157 s  <<< ERROR!
> java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.read(BinaryCasWriterReaderTest.java:527)
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.test_COMPRESSED_FILTERED_TSI_lenient(BinaryCasWriterReaderTest.java:223)
>
> test6plusLenient(de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest)  Time elapsed: 0.122 s  <<< ERROR!
> java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.read(BinaryCasWriterReaderTest.java:527)
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.test6plusLenient(BinaryCasWriterReaderTest.java:241)
>
> test6Preinitialized(de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest)  Time elapsed: 0.089 s  <<< ERROR!
> java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.read(BinaryCasWriterReaderTest.java:527)
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.test6Preinitialized(BinaryCasWriterReaderTest.java:205)
>
> testReadingFileWithoutDocumentMetaData(de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest)  Time elapsed: 0.079 s  <<< ERROR!
> java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.testReadingFileWithoutDocumentMetaData(BinaryCasWriterReaderTest.java:351)
>
> test6plusPreinitialized(de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest)  Time elapsed: 0.098 s  <<< ERROR!
> java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.read(BinaryCasWriterReaderTest.java:527)
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.test6plusPreinitialized(BinaryCasWriterReaderTest.java:232)
>
> testReadingFileWithDocumentMetaData(de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest)  Time elapsed: 0.074 s  <<< ERROR!
> java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.testReadingFileWithDocumentMetaData(BinaryCasWriterReaderTest.java:320)
>
> test6Lenient(de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest)  Time elapsed: 0.076 s  <<< ERROR!
> java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.read(BinaryCasWriterReaderTest.java:527)
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.test6Lenient(BinaryCasWriterReaderTest.java:163)
>
> testReadingFileOverridingDocumentMetaData(de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest)  Time elapsed: 0.079 s  <<< ERROR!
> java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.testReadingFileOverridingDocumentMetaData(BinaryCasWriterReaderTest.java:389)
>
> test6LenientPlainUima(de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest)  Time elapsed: 0.038 s  <<< ERROR!
> java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.test6LenientPlainUima(BinaryCasWriterReaderTest.java:197)

Re: [VOTE] uimaj-3.0.1 rc1

Posted by Richard Eckart de Castilho <re...@apache.org>.
On 8. Nov 2018, at 15:44, Marshall Schor <ms...@schor.com> wrote:
> 
> I'm wondering about the workaround you mentioned earlier.  From the previously
> posted stack trace, it seems the issue is in DKPro.  In looking at CasIOUtils, I
> don't see any use of ByteBuffer.  Can you post a stack trace or some other
> evidence, that helps me figure out where to put the workaround?

The stack trace ends in DKPro Core code, but as far as I can tell, it isn't caused there. 

This is one of the lines which are reported in the stack trace is this one (no ByteBuffer here):

        CasIOUtils.load(new ByteArrayInputStream(bos.toByteArray()), target);

The only code in UIMA that I found where the problematic method is being used
is in DataIO - lines like:

      in.position(in.position() + length);

It is very strange that the stack traces simply stop like that. My guess would be that
the error is triggered as the respective class (e.g. indirectly via the loading of CasIOUtils)
is being loaded/resolved. 

At the end of the mail is a full list of all the exceptions being thrown by in the particular
setup that I have described. The line numbers resolve to the following file in the given commit:

https://github.com/dkpro/dkpro-core/blob/277d7a8bcc69c5c0ea6150c49566b524c1017d61/dkpro-core-io-bincas-asl/src/test/java/de/tudarmstadt/ukp/dkpro/core/io/bincas/BinaryCasWriterReaderTest.java

You'll note that none of the lines mentions a ByteBuffer. The only place in the entire DKPro Core
where a ByteBuffer is used is in another module (...api-embeddings) - and even there the
`position(int)` method isn't used.

At the moment, that is all the intelligence I can provide. 

Cheers,

-- Richard


------

-------------------------------------------------------------------------------
Test set: de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest
-------------------------------------------------------------------------------
Tests run: 22, Failures: 0, Errors: 12, Skipped: 1, Time elapsed: 11.377 s <<< FAILURE! - in de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest
test4Preinitialized(de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest)  Time elapsed: 0.269 s  <<< ERROR!
java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.read(BinaryCasWriterReaderTest.java:527)
	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.test4Preinitialized(BinaryCasWriterReaderTest.java:150)

test_COMPRESSED_FILTERED_TSI_preinitialized(de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest)  Time elapsed: 0.232 s  <<< ERROR!
java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.read(BinaryCasWriterReaderTest.java:527)
	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.test_COMPRESSED_FILTERED_TSI_preinitialized(BinaryCasWriterReaderTest.java:214)

readWriteZipMinimal(de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest)  Time elapsed: 0.257 s  <<< ERROR!
java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.readWriteZipMinimal(BinaryCasWriterReaderTest.java:294)

test_COMPRESSED_FILTERED_TSI_lenient(de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest)  Time elapsed: 0.157 s  <<< ERROR!
java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.read(BinaryCasWriterReaderTest.java:527)
	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.test_COMPRESSED_FILTERED_TSI_lenient(BinaryCasWriterReaderTest.java:223)

test6plusLenient(de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest)  Time elapsed: 0.122 s  <<< ERROR!
java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.read(BinaryCasWriterReaderTest.java:527)
	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.test6plusLenient(BinaryCasWriterReaderTest.java:241)

test6Preinitialized(de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest)  Time elapsed: 0.089 s  <<< ERROR!
java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.read(BinaryCasWriterReaderTest.java:527)
	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.test6Preinitialized(BinaryCasWriterReaderTest.java:205)

testReadingFileWithoutDocumentMetaData(de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest)  Time elapsed: 0.079 s  <<< ERROR!
java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.testReadingFileWithoutDocumentMetaData(BinaryCasWriterReaderTest.java:351)

test6plusPreinitialized(de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest)  Time elapsed: 0.098 s  <<< ERROR!
java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.read(BinaryCasWriterReaderTest.java:527)
	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.test6plusPreinitialized(BinaryCasWriterReaderTest.java:232)

testReadingFileWithDocumentMetaData(de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest)  Time elapsed: 0.074 s  <<< ERROR!
java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.testReadingFileWithDocumentMetaData(BinaryCasWriterReaderTest.java:320)

test6Lenient(de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest)  Time elapsed: 0.076 s  <<< ERROR!
java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.read(BinaryCasWriterReaderTest.java:527)
	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.test6Lenient(BinaryCasWriterReaderTest.java:163)

testReadingFileOverridingDocumentMetaData(de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest)  Time elapsed: 0.079 s  <<< ERROR!
java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.testReadingFileOverridingDocumentMetaData(BinaryCasWriterReaderTest.java:389)

test6LenientPlainUima(de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest)  Time elapsed: 0.038 s  <<< ERROR!
java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.test6LenientPlainUima(BinaryCasWriterReaderTest.java:197)

Re: [VOTE] uimaj-3.0.1 rc1

Posted by Marshall Schor <ms...@schor.com>.
Thanks for your testing!

OK, I'd like to do 2 things: add the workaround to uimaj code, and also build
under Java 8 in case there are other issues.

I'm wondering about the workaround you mentioned earlier.  From the previously
posted stack trace, it seems the issue is in DKPro.  In looking at CasIOUtils, I
don't see any use of ByteBuffer.  Can you post a stack trace or some other
evidence, that helps me figure out where to put the workaround?

Thank you very much :-)  -Marshall

On 11/7/2018 6:21 PM, Richard Eckart de Castilho wrote:
> On 7. Nov 2018, at 23:19, Richard Eckart de Castilho <re...@apache.org> wrote:
>> I didn't yet test against the artifacts that you staged (which were built with
>> JDK 11 if I remember correctly). If they do not exhibit the problem, I'd say
>> we can go forward checking the RC. However, if they do exhibit the problem
>> and if they cannot be used in a Java 8 context, then I'd say we have to re-do the RC.
>>
>> I'll keep you posted.
> Built now against the artifacts in the staging area. Again the setup:
>
> 1. UIMA v3.0.1 artifacts from RC1 staging Maven repo accessed by adding corresponding repository/pluginRepository entries to uimaFIT and DKPro Core in the two steps below
>
> 2. locally built version of uimaFIT branch "release/3.0.0" (which is release in preparation, not actually released) using Oracle Java 1.8.0_181
>
> 3. locally built DKPro Core branch "2.0.x" (largely compatible with UIMAv3) using Oracle Java 1.8.0_181
>
> In step 3, the build fails again with 
>
>   java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
>
> Note that DKPro Core has an extensive test for the different (binary) file formats supported by UIMA which in this form does not exist in uimaFIT, so the problem is not triggered in step 2, only in step 3.
>
> Looks to me that people who would use the CasIOUtils from the current RC1 in a Java 8 environment would have trouble.
>
> Cheers,
>
> -- Richard
>
>

Re: [VOTE] uimaj-3.0.1 rc1

Posted by Richard Eckart de Castilho <re...@apache.org>.
On 7. Nov 2018, at 23:19, Richard Eckart de Castilho <re...@apache.org> wrote:
> 
> I didn't yet test against the artifacts that you staged (which were built with
> JDK 11 if I remember correctly). If they do not exhibit the problem, I'd say
> we can go forward checking the RC. However, if they do exhibit the problem
> and if they cannot be used in a Java 8 context, then I'd say we have to re-do the RC.
> 
> I'll keep you posted.

Built now against the artifacts in the staging area. Again the setup:

1. UIMA v3.0.1 artifacts from RC1 staging Maven repo accessed by adding corresponding repository/pluginRepository entries to uimaFIT and DKPro Core in the two steps below

2. locally built version of uimaFIT branch "release/3.0.0" (which is release in preparation, not actually released) using Oracle Java 1.8.0_181

3. locally built DKPro Core branch "2.0.x" (largely compatible with UIMAv3) using Oracle Java 1.8.0_181

In step 3, the build fails again with 

  java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;

Note that DKPro Core has an extensive test for the different (binary) file formats supported by UIMA which in this form does not exist in uimaFIT, so the problem is not triggered in step 2, only in step 3.

Looks to me that people who would use the CasIOUtils from the current RC1 in a Java 8 environment would have trouble.

Cheers,

-- Richard


Re: [VOTE] uimaj-3.0.1 rc1

Posted by Marshall Schor <ms...@schor.com>.
The xml descriptor differences that I remember involved some different treatment
of white-space and new lines, when generating xml.

I think the errors involved test cases which were fixed by using some xml
compare utility that had a parameter to relax the compare to allow for
differences in whitespace / new lines.

See for example: https://fisheye.apache.org/changelog/uimaj?cs=1843960

-Marshall

On 11/7/2018 5:19 PM, Richard Eckart de Castilho wrote:
> On 7. Nov 2018, at 22:00, Marshall Schor <ms...@schor.com> wrote:
>> I did a scan of uimaj code to see if we make use of the changed methods for
>> ByteBuffer and didn't find any; so I'm inclined to *not* redo RC1 at this time.
>>
>> Let me know if you think I should redo it.
> I tested against a locally built version of the RC source using JDK 11 - and that did
> not work out.
>
> I tested against a locally build version of the RC source using JDK 8 - that seemed ok.
>
> I didn't yet test against the artifacts that you staged (which were built with
> JDK 11 if I remember correctly). If they do not exhibit the problem, I'd say
> we can go forward checking the RC. However, if they do exhibit the problem
> and if they cannot be used in a Java 8 context, then I'd say we have to re-do the RC.
>
> I'll keep you posted.
>
> Unrelated question: if I remember correctly, there were some tests involving XML descriptors
> where Java <= 8 and Java >= 9 produced slightly different XML files. (How) did you fix these
> cases when you enabled the successful build using Java 11?
>
> -- Richard

Re: [VOTE] uimaj-3.0.1 rc1

Posted by Richard Eckart de Castilho <re...@apache.org>.
On 7. Nov 2018, at 22:00, Marshall Schor <ms...@schor.com> wrote:
> 
> I did a scan of uimaj code to see if we make use of the changed methods for
> ByteBuffer and didn't find any; so I'm inclined to *not* redo RC1 at this time.
> 
> Let me know if you think I should redo it.

I tested against a locally built version of the RC source using JDK 11 - and that did
not work out.

I tested against a locally build version of the RC source using JDK 8 - that seemed ok.

I didn't yet test against the artifacts that you staged (which were built with
JDK 11 if I remember correctly). If they do not exhibit the problem, I'd say
we can go forward checking the RC. However, if they do exhibit the problem
and if they cannot be used in a Java 8 context, then I'd say we have to re-do the RC.

I'll keep you posted.

Unrelated question: if I remember correctly, there were some tests involving XML descriptors
where Java <= 8 and Java >= 9 produced slightly different XML files. (How) did you fix these
cases when you enabled the successful build using Java 11?

-- Richard

Re: [VOTE] uimaj-3.0.1 rc1

Posted by Marshall Schor <ms...@schor.com>.
After a bit more thought, the build configuration for the compile step specifies
a source and target level of Java 8. 

Reading the docs for maven-compiler-plugin: it says it uses
javax.tools.JavaCompiler of the java environment.

For Java 11, the javac tool says:

Cross-Compilation Options for javac

By default, for releases prior to JDK 9, classes were compiled against the
bootstrap classes of the platform that shipped with the javac command. But javac
also supports cross-compiling, in which classes are compiled against bootstrap
classes of a different Java platform implementation. It’s important to use the
-bootclasspath and -extdirs options when cross-compiling.

I'm guessing the maven-compiler-plugin may not use these options.

So - I agree with your suggestion to use Java 8 when building.

I did a scan of uimaj code to see if we make use of the changed methods for
ByteBuffer and didn't find any; so I'm inclined to *not* redo RC1 at this time.

Let me know if you think I should redo it.

-Marshall


On 11/7/2018 3:29 PM, Richard Eckart de Castilho wrote:
> On 7. Nov 2018, at 16:45, Marshall Schor <ms...@schor.com> wrote:
>> Interesting...
>>
>> I'm thinking that to get our code base to work with Java 11, we'll need to scan
>> our code for all uses of ByteBuffer, and if any of those uses calls the 7
>> changed methods, we'll need to fix those; is that your take?
>>
>> I did scan our code, and found some uses of ByteBuffer, but haven't yet explored
>> further to see if we use these methods...
> I have tried building UIMA v3.0.1 using JDK 8 and then built DKPro Core v2 using
> this version -> that seems to be working ok - no ByteBuffer problem in the module 
> that previously failed.
>
> So I'd guess just because we *can* build on Java 11 doesn't mean we should.
> Building on a proper JDK 8 solves the problem and also ensures that we would not
> accidentally use any APIs that were only introduced after Java 8. 
>
> We could probably still introduce a cast to allow UIMA code built using JDK 11
> to work in a Java 8 project - but IMHO that would be an additional measure. I think
> it should not replace building our code with our target-level JDK.
>
> -- Richard

Re: [VOTE] uimaj-3.0.1 rc1

Posted by Richard Eckart de Castilho <re...@apache.org>.
On 7. Nov 2018, at 16:45, Marshall Schor <ms...@schor.com> wrote:
> 
> Interesting...
> 
> I'm thinking that to get our code base to work with Java 11, we'll need to scan
> our code for all uses of ByteBuffer, and if any of those uses calls the 7
> changed methods, we'll need to fix those; is that your take?
> 
> I did scan our code, and found some uses of ByteBuffer, but haven't yet explored
> further to see if we use these methods...

I have tried building UIMA v3.0.1 using JDK 8 and then built DKPro Core v2 using
this version -> that seems to be working ok - no ByteBuffer problem in the module 
that previously failed.

So I'd guess just because we *can* build on Java 11 doesn't mean we should.
Building on a proper JDK 8 solves the problem and also ensures that we would not
accidentally use any APIs that were only introduced after Java 8. 

We could probably still introduce a cast to allow UIMA code built using JDK 11
to work in a Java 8 project - but IMHO that would be an additional measure. I think
it should not replace building our code with our target-level JDK.

-- Richard

Re: [VOTE] uimaj-3.0.1 rc1

Posted by Marshall Schor <ms...@schor.com>.
Interesting...

I'm thinking that to get our code base to work with Java 11, we'll need to scan
our code for all uses of ByteBuffer, and if any of those uses calls the 7
changed methods, we'll need to fix those; is that your take?

I did scan our code, and found some uses of ByteBuffer, but haven't yet explored
further to see if we use these methods...

-Marshall

On 11/7/2018 9:06 AM, Richard Eckart de Castilho wrote:
> I'm trying to test the RC.
>
> The UIMAv3 core builds nicely under Java 11.
> I can also use it as a dependency for uimaFIT v3.0.0-SNAPSHOT and build under Java 8.
> However, when I try to build DKPro Core v2 against UIMAv3.0.1 and uimaFIT 3.0.0-SNAPSHOT, I get
> problems such as this:
>
> [ERROR] test4Preinitialized(de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest)  Time elapsed: 0.177 s  <<< ERROR!
> java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.read(BinaryCasWriterReaderTest.java:527)
> 	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.test4Preinitialized(BinaryCasWriterReaderTest.java:150)
>
> It seems these are caused by the addition of new methods in JDK9. See the link below
>
>   https://github.com/apache/felix/pull/114
>
> Searching for the error message above on Google yields more results. It seems a workaround
> can be to introduce an explicit cast to Buffer - but it seems fragile to me.
>
> I guess that in order to be properly backwards compatible with Java 1.8, we may want to
> continue preparing releases on a JDK8.
>
> Cheers,
>
> -- Richard
>
>> On 5. Nov 2018, at 23:39, Marshall Schor <ms...@schor.com> wrote:
>>
>> Hi,
>>
>> uimaj-3.0.1 rc1 is posted and ready for voting.
>>
>> By doing this and the v2 2.10.3 together, I hope to gain some efficiency, and
>> use only one code-signing-credit when the eclipse plugin jars are signed after the vote passes.
>>
>> The issues fixed are here:
>> https://issues.apache.org/jira/projects/UIMA/versions/12340377
>>
>> Major changes are:
>> ----------------- 
>> The code and the build was adjusted to work ok using both Java 8 and Java 11.
>> The fixes for 2.10.3 were merged.
>> Several select framework bugs were fixed; it should align well with uimaFIT's implementation
>>
>> The source and binary tar/zips are here:
>> https://dist.apache.org/repos/dist/dev/uima/uimaj-v3/3.0.1-rc1/artifacts/
>>
>> The eclipse update subsite is here:
>> https://dist.apache.org/repos/dist/dev/uima/uimaj-v3/3.0.1-rc1/uimaj
>>
>> The maven staging repo is here:
>> https://repository.apache.org/content/repositories/orgapacheuima-1204/
>>
>> SVN tag: https://svn.apache.org/repos/asf/uima/uv3/uimaj-v3/tags/uimaj-3.0.1/
>>
>> Built using the latest maven (version 3.6.0), and the latest uima-wide parent
>> pom (version 12).
>> Built using Java 11 :-) !
>>
>> Please vote on release:
>>
>> [ ] +1 OK to release
>> [ ] 0   Don't care
>> [ ] -1 Not OK to release, because ...
>>
>> Thanks.
>>
>> -Marshall
>

Re: [VOTE] uimaj-3.0.1 rc1

Posted by Richard Eckart de Castilho <re...@apache.org>.
I'm trying to test the RC.

The UIMAv3 core builds nicely under Java 11.
I can also use it as a dependency for uimaFIT v3.0.0-SNAPSHOT and build under Java 8.
However, when I try to build DKPro Core v2 against UIMAv3.0.1 and uimaFIT 3.0.0-SNAPSHOT, I get
problems such as this:

[ERROR] test4Preinitialized(de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest)  Time elapsed: 0.177 s  <<< ERROR!
java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.read(BinaryCasWriterReaderTest.java:527)
	at de.tudarmstadt.ukp.dkpro.core.io.bincas.BinaryCasWriterReaderTest.test4Preinitialized(BinaryCasWriterReaderTest.java:150)

It seems these are caused by the addition of new methods in JDK9. See the link below

  https://github.com/apache/felix/pull/114

Searching for the error message above on Google yields more results. It seems a workaround
can be to introduce an explicit cast to Buffer - but it seems fragile to me.

I guess that in order to be properly backwards compatible with Java 1.8, we may want to
continue preparing releases on a JDK8.

Cheers,

-- Richard

> On 5. Nov 2018, at 23:39, Marshall Schor <ms...@schor.com> wrote:
> 
> Hi,
> 
> uimaj-3.0.1 rc1 is posted and ready for voting.
> 
> By doing this and the v2 2.10.3 together, I hope to gain some efficiency, and
> use only one code-signing-credit when the eclipse plugin jars are signed after the vote passes.
> 
> The issues fixed are here:
> https://issues.apache.org/jira/projects/UIMA/versions/12340377
> 
> Major changes are:
> ----------------- 
> The code and the build was adjusted to work ok using both Java 8 and Java 11.
> The fixes for 2.10.3 were merged.
> Several select framework bugs were fixed; it should align well with uimaFIT's implementation
> 
> The source and binary tar/zips are here:
> https://dist.apache.org/repos/dist/dev/uima/uimaj-v3/3.0.1-rc1/artifacts/
> 
> The eclipse update subsite is here:
> https://dist.apache.org/repos/dist/dev/uima/uimaj-v3/3.0.1-rc1/uimaj
> 
> The maven staging repo is here:
> https://repository.apache.org/content/repositories/orgapacheuima-1204/
> 
> SVN tag: https://svn.apache.org/repos/asf/uima/uv3/uimaj-v3/tags/uimaj-3.0.1/
> 
> Built using the latest maven (version 3.6.0), and the latest uima-wide parent
> pom (version 12).
> Built using Java 11 :-) !
> 
> Please vote on release:
> 
> [ ] +1 OK to release
> [ ] 0   Don't care
> [ ] -1 Not OK to release, because ...
> 
> Thanks.
> 
> -Marshall


Re: [VOTE] uimaj-3.0.1 rc1

Posted by Marshall Schor <ms...@schor.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
 
signatures OK
compare to svntag: OK
api-change-reports: OK
issues-fixed report: OK
no change to license/notices vs 3.0.0
spot check licenses in staging repo: ok
Note: artifacts put in staging repo have .sha1 and md5 checksums added, probably
by the "deploy" step?  Not planning to fix.

(using Java 11)
ran document analyzer from bin package, viewed results- OK
installed into eclipse 490 - ran configurator, made type system - OK
eclipse: installed "examples" project from binary distr, and ran
documentAnalyzer, viewed results - OK
eclipse: ran JCasGen - OK

   Note:  0-element jcas constructors are marked @Deprecated
              except for TOP, causes warning on all generated JCas classes.
              Probably unnecessary.  not a blocker.  only in v3
   Note: unused imports in jcasgend classes, not a blocker.

build from source: OK

[X] +1 OK to release

- -Marshall Schor

-----BEGIN PGP SIGNATURE-----
 
iQIzBAEBCgAdFiEEOn/mVSh3S1eNEDz+zHYv/c0Ez9YFAlvhsrsACgkQzHYv/c0E
z9YrKg//bLRuzTUe2x/LLdkjA+6jN6izGZ69r5dnKVioGEdui92Pen2ky49iDE0T
4+ylGdipoNCJkS3mcad+HRUGW5hixC4mOvdeq45WFCDpAiHZjAqXyryPLYe8vcfQ
WTV7F+0l3lpT6T+/dPCvtFFFH9rIuMwtE/gs+GZlzuMRp2tb0OOT9/BvWsp87dsl
Otd7gsI1TduPK+TJmHWY6K2ykEyU9oOpRw0A0WMSTJtRSHZTosFGdcHpDco2DzUG
e1A4fKSnTpHVKWXn1fFzbWByLDPmqbHuwXTTLnUbkq/bfwyRCOBWPg6CaftJFsjD
9UVe0mUO9V2QjTHoIYyaYf3sgXHZAwGYHQhOJrFbzpJYMIYhzaXeceM4HsHXoBiI
EEZU3HeM0Fliad/JcOuWp0dvSaGXEonLZ9ql2V+0z7dVbDJBORlImuT4NXJZS6C8
CVZT683IV1TQkyvB9fl4J5xQT6TswyXQOswFbGTtMKxdCbgL34cNIsj1j3ktdcG0
IU0fDBMlsv7UqMYuE3Go7a2aefhxqaz2gPGVLXmFgawef1i0iYVjaS03+9hYX0Tr
72POXtJxIobUwv265DFYObtP25jsg18m2gyz8JjSBDWlZsR0kiXPiq4jiR1mXQ5Q
CJs75fC4oZsZn41HfDb6scwHgu/3a2F5KLmIRfsMOAGdQDUWAx0=
=TzqU
-----END PGP SIGNATURE-----