Moved from the mailing list: Portions of relevant emails included for context, with initials to distinguish who said what.
BT:
I just updated to 4.2.2 and am running into some issues with code that previously worked.
I saw that this was a previous issue that was solved by changing HTTPClient to 4.4.x. I did this
and rebuilt my project, but I'm still getting "Needs a boundary value".
The AdminConnection (admin) is fine, my project is actually failing when making a Connection from admin. Here's the code:
File file = new File(path);
Connection conn = null;
// Load file and then delete it
try {
FileWriter fw = new FileWriter(file);
BufferedWriter bw = new BufferedWriter(fw);
bw.write(inputFile);
bw.close();
fw.close();
conn = admin.memory(graphTitle).create(file.toPath()).connect();
file.delete();
} catch (StardogException|IOException e) {
file.delete();
throw e;
}
return conn;
ZW:
Looks like the actual error is probably coming from netty having a problem decoding multipart form data. I'd double check to make sure you actually reverted the HTTPClient version then you might want to check other dependencies starting with netty.
Hope this helps.
Since you just upgraded you might want to grab the latest 4.2.3 while you're at it.
BT:
Thanks for getting back to me. I upgraded to 4.2.3 and made sure the old HTTPClient files were deleted from my system. While I was at it, I also deleted the old Stardog files and recompiled.
I wasn't using Netty previously so I put the following in my dependencies to see if it helped:
compile "io.netty:netty-all:4.1.8.Final"
compile "org.jboss.netty:netty:3.2.10.Final"
Still getting the same error, though. Is there another dependency I might be missing that's required for 4.x that wasn't used in earlier versions?
ZW:
If you're not using netty you definitely don't want to put it in there. Stardog uses netty and I was just pointing out that the stack trace was throwing a StardogException but the underlying problem was probably coming from netty which Stardog uses. I didn't know what your dependencies are so I was just suggesting that it was something you might want to look at it if it was in there. Just deleting HTTPClient isn't going to help if it's being pulled in as a transitive dependency. It appears as though you're using gradle. To check your dependencies try running one of the following and exclude any dependencies that are causing problems Learning the Basics
HO:
We've had this issue, and discovered that we were getting in newer versions of HttpClient through our Elasticsearch dependency in the pom.
Search in your dependency tree to see if you can find other HttpClients, and then exclude them.
Previous discussion: Redirecting to Google Groups
BT:
It looks like all the transient dependencies for HTTPClient are 4.4.1, which is the version I reverted back to. Nothing is bringing in a newer version. Should I still exclude it?
I've been looking around trying to figure it out and I'm at a loss. I ran a dependencyInsight for httpclient and it's all 4.4.1. Netty is all the same version as well. I'm still getting the "needs a boundary value" error after trying a variety of different things. I'm not quite sure what else to check.
HO:
Just found out that this happens if you are running stardog 4.2.2 and using the java libraries for 4.2.3.
BT:
I'm running 4.2.3 and using the libraries for 4.2.3 - I got a different error when I forgot to change them.