4

I'm trying to try reactor for the first time. So I clone and build (as in https://github.com/reactor/reactor).

I'm using windows XP and jdk 8. However, when I run the ./gradlew test, I got the following error:

reactor.queue.PersistentQueueSpec > Java Chronicle-based PersistentQueue is performant FAILED
java.lang.IllegalStateException: com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'test': was expecting 'null', 'true', 'false' or NaN
 at [Source: reactor.io.Buffer$BufferInputStream@136ec72; line: 1, column: 6]
    at reactor.io.encoding.json.JsonCodec$JsonDecoder.apply(JsonCodec.java:112)
    at reactor.io.encoding.json.JsonCodec$JsonDecoder.apply(JsonCodec.java:88)
    at reactor.queue.IndexedChronicleQueuePersistor.read(IndexedChronicleQueuePersistor.java:189)
    at reactor.queue.IndexedChronicleQueuePersistor.access$900(IndexedChronicleQueuePersistor.java:27)
    at reactor.queue.IndexedChronicleQueuePersistor$ChronicleRemoveFunction.get(IndexedChronicleQueuePersistor.java:253)
    at reactor.queue.IndexedChronicleQueuePersistor$1.next(IndexedChronicleQueuePersistor.java:172)
    at reactor.queue.PersistentQueueSpec.Java Chronicle-based PersistentQueue is performant(PersistentQueueSpec.groovy:103)
    Caused by:
    com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'test': was expecting 'null', 'true', 'false' or NaN
     at [Source: reactor.io.Buffer$BufferInputStream@136ec72; line: 1, column: 6]
        at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1524)
        at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:557)
        at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._reportInvalidToken(UTF8StreamJsonParser.java:3095)
        at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._reportInvalidToken(UTF8StreamJsonParser.java:3073)
        at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._matchToken(UTF8StreamJsonParser.java:2479)
        at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._nextTokenNotInObject(UTF8StreamJsonParser.java:793)
        at com.fasterxml.jackson.core.json.UTF8StreamJsonParser.nextToken(UTF8StreamJsonParser.java:698)
        at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:3024)
        at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:2971)
        at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2137)
        at reactor.io.encoding.json.JsonCodec$JsonDecoder.apply(JsonCodec.java:103)
        ... 6 more

Seems like I get similar error with the question in this post. In this post, it's suggested to @Ignore the test if the feature is not used. But I'm not sure whether will use the features in the future or not.

Anyone knows how to build & test successfully without having to @Ignore?

Peter Lawrey
  • 525,659
  • 79
  • 751
  • 1,130
kasyauqi
  • 635
  • 1
  • 6
  • 17

1 Answers1

2

It's not clear why this test fails for some Windows users. It likely has to do with using the Java Chronicle on that platform. The OpenHFT libraries rely on Unsafe to gain their speed for some functions and, in all honesty, I'm not sure how well-supported Java Chronicle is on Windows platforms.

It would be good to have a GitHub issue detailing this failure and including important details about OS, hardware, JVM version, etc... and we'll try to loop in some of the OpenHFT folks and see if there's anything they can point us toward.

Update: It seems that the issue with the test is actually in the cleanup which may fail on some OSs if the file descriptors aren't correctly released. That is a benign error and one we'll try and get a good fix for. In the meantime, I'd say it's safe to add @Ignore to the test and not worry that the PersistentQueue stuff isn't working since it's just test cleanup that's failing and not the functionality of the Java Chronicle itself.

Jon Brisbin
  • 741
  • 4
  • 7
  • When you memory map a file, close it and try to delete it on Windows 32-bit usually this works, but sometimes it doesn't. This happened all the in earlier versions of Chronicle but the latest versions this should happen rarely. Unfortunately for Win 32-bit, you have to use a different file for each test. I haven't see this problem on 64-bit windows or Linux or Mac OSX. – Peter Lawrey Mar 25 '14 at 07:54
  • In answer to your question re Windows 32-bit support, it works with some restrictions but if you want high performance I suggest a 64-bit platform. Note: even on Win 7 & 8 you will see this above issue with a 32-bit JVM as it runs in the Win XP emulator. – Peter Lawrey Mar 25 '14 at 07:55
  • I have added notes here to help cover what is supported http://stackoverflow.com/tags/chronicle/info – Peter Lawrey Mar 25 '14 at 08:15