New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trying to write metadata with JacksonHandle causes IOException: "Attempted write to closed stream" #92
Comments
Niko, thanks for submitting this issue. I've pushed a fix. Our process is to have QA test & validate the fix before we ship it. Since our patch release, 7.0.4, is almost out the door, it may be too late to include this. I'll see what can be done. But worst case scenario, if we have the code on the b2_0 branch and you can build with the fix, does that get you what you need for the short term? |
Thanks very much, Sam, for your fast response and fixing this problem. Pulling from the b2_0 branch and build the Java client on my own isn't a big deal. Thanks again. |
Just to get a better understanding: is there a 1:1 relation between the Java Client API version (2.0-3) and ML server version (7.0.3)? I just wonder if a new maven version of Java Client API is possible (say 2.0-3.1) to be released to maven... |
Yes, for now there is that 1:1 relation between the Java Client API version (2.0-3) and ML server version (7.0.3). Whether or not we release a new 2.0-3.1 or 2.0-4 to align with 7.0.4, we'd like to have full QA on our releases. We're discussing internally what makes the most sense in this case. If any other customers run across this issue but aren't as able as Niko to build the b2_0 branch, here is a work-around. After instantiating a new JacksonHandle, configure the ObjectMapper with AUTO_CLOSE set to false for both the JsonGenerator and the JsonParser: This is exactly what the patched version of the JacksonHandle does for you. |
added a functional test in Master |
When using Java Client API version 2.0-3 with JDK 1.7.0-67 and attempting to write a document with the JSON Document Manager including a metadata handle an java.io.IOException is thrown.
Sample java code (from ProductRepositoryJSON.java) to demonstrate the problem:
The full stacktrace:
The text was updated successfully, but these errors were encountered: