Skip to content
This repository was archived by the owner on Oct 25, 2024. It is now read-only.
This repository was archived by the owner on Oct 25, 2024. It is now read-only.

java.io.EOFException creating a FileObjectQueue #125

@jzonthemtn

Description

@jzonthemtn

I feel like I am doing something wrong. I get the following exception when trying to create a FileObjectQueue:

java.io.EOFException
        at java.io.RandomAccessFile.readFully(Unknown Source) ~[?:1.8.0_92]
        at java.io.RandomAccessFile.readFully(Unknown Source) ~[?:1.8.0_92]
        at com.squareup.tape.QueueFile.readHeader(QueueFile.java:160) ~[tape-1.2.3.jar!/:?]
        at com.squareup.tape.QueueFile.<init>(QueueFile.java:117) ~[tape-1.2.3.jar!/:?]
        at com.squareup.tape.FileObjectQueue.<init>(FileObjectQueue.java:35) ~[tape-1.2.3.jar!/:?]

I'm trying to use a temporary file for the queue:

File file = File.createTempFile(System.getProperty("java.io.tmpdir"), UUID.randomUUID().toString());

And then I create the queue:

ObjectQueue<Message> queue = new FileObjectQueue<Message>(file, new GsonConverter<Message>(gson, Message.class));

I changed to the InMemoryObjectQueue and it works fine. I'm using Java 8 and currently on a Windows VM at the moment. I'm using version 1.2.3. Any ideas what I could be doing wrong? Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions