StardogException - needs a boundary value

3 views
Skip to first unread message

Becky Tauber

unread,
Feb 6, 2017, 2:08:34 PM2/6/17
to Stardog
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;



Full stack trace below:

com.complexible.stardog.StardogException: Needs a boundary value

at com.complexible.stardog.protocols.http.client.BaseHttpClient.checkResponseCode(BaseHttpClient.java:433) ~[stardog-protocols-http-client-4.2.2.jar:na]

at com.complexible.stardog.protocols.http.client.BaseHttpClient.execute(BaseHttpClient.java:304) ~[stardog-protocols-http-client-4.2.2.jar:na]

at com.complexible.stardog.protocols.http.client.BaseHttpClient.executeHttpPostMultipart(BaseHttpClient.java:586) ~[stardog-protocols-http-client-4.2.2.jar:na]

at com.complexible.stardog.protocols.http.client.HttpAdminClientImpl.create(HttpAdminClientImpl.java:252) ~[stardog-protocols-http-client-4.2.2.jar:na]

at com.complexible.stardog.protocols.http.client.HttpAdminClientImpl.create(HttpAdminClientImpl.java:68) ~[stardog-protocols-http-client-4.2.2.jar:na]

at com.complexible.stardog.protocols.client.admin.StatefulAdminClient.create(StatefulAdminClient.java:171) ~[stardog-protocols-spec-client-4.2.2.jar:na]

at com.complexible.stardog.api.admin.AdminConnectionImpl$RemoteDbBuilder.create(AdminConnectionImpl.java:491) ~[stardog-api-4.2.2.jar:na]

at com.complexible.stardog.api.admin.AdminConnectionImpl$RemoteDbBuilder.create(AdminConnectionImpl.java:459) ~[stardog-api-4.2.2.jar:na]

at utils.Utils.loadFileToDB(Utils.java:269) ~[bin/:na]

at graph.OntologyGraph.classGraph(OntologyGraph.java:60) ~[bin/:na]

at graph.GraphController.graph(GraphController.java:102) ~[bin/:na]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_74]

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_74]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_74]

at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_74]

at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:220) ~[spring-web-4.3.4.RELEASE.jar:4.3.4.RELEASE]

at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:134) ~[spring-web-4.3.4.RELEASE.jar:4.3.4.RELEASE]

at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:116) ~[spring-webmvc-4.3.4.RELEASE.jar:4.3.4.RELEASE]

at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827) ~[spring-webmvc-4.3.4.RELEASE.jar:4.3.4.RELEASE]

at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738) ~[spring-webmvc-4.3.4.RELEASE.jar:4.3.4.RELEASE]

at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) ~[spring-webmvc-4.3.4.RELEASE.jar:4.3.4.RELEASE]

at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963) ~[spring-webmvc-4.3.4.RELEASE.jar:4.3.4.RELEASE]

at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897) ~[spring-webmvc-4.3.4.RELEASE.jar:4.3.4.RELEASE]

at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) ~[spring-webmvc-4.3.4.RELEASE.jar:4.3.4.RELEASE]

at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872) ~[spring-webmvc-4.3.4.RELEASE.jar:4.3.4.RELEASE]

at javax.servlet.http.HttpServlet.service(HttpServlet.java:648) ~[tomcat-embed-core-8.5.6.jar:8.5.6]

at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) ~[spring-webmvc-4.3.4.RELEASE.jar:4.3.4.RELEASE]

at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) ~[tomcat-embed-core-8.5.6.jar:8.5.6]

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230) ~[tomcat-embed-core-8.5.6.jar:8.5.6]

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) ~[tomcat-embed-core-8.5.6.jar:8.5.6]

at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) ~[tomcat-embed-websocket-8.5.6.jar:8.5.6]

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) ~[tomcat-embed-core-8.5.6.jar:8.5.6]

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) ~[tomcat-embed-core-8.5.6.jar:8.5.6]

at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) ~[spring-web-4.3.4.RELEASE.jar:4.3.4.RELEASE]

at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.4.RELEASE.jar:4.3.4.RELEASE]

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) ~[tomcat-embed-core-8.5.6.jar:8.5.6]

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) ~[tomcat-embed-core-8.5.6.jar:8.5.6]

at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:89) ~[spring-web-4.3.4.RELEASE.jar:4.3.4.RELEASE]

at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.4.RELEASE.jar:4.3.4.RELEASE]

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) ~[tomcat-embed-core-8.5.6.jar:8.5.6]

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) ~[tomcat-embed-core-8.5.6.jar:8.5.6]

at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77) ~[spring-web-4.3.4.RELEASE.jar:4.3.4.RELEASE]

at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.4.RELEASE.jar:4.3.4.RELEASE]

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) ~[tomcat-embed-core-8.5.6.jar:8.5.6]

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) ~[tomcat-embed-core-8.5.6.jar:8.5.6]

at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197) ~[spring-web-4.3.4.RELEASE.jar:4.3.4.RELEASE]

at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.4.RELEASE.jar:4.3.4.RELEASE]

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) ~[tomcat-embed-core-8.5.6.jar:8.5.6]

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) ~[tomcat-embed-core-8.5.6.jar:8.5.6]

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) ~[tomcat-embed-core-8.5.6.jar:8.5.6]

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:108) [tomcat-embed-core-8.5.6.jar:8.5.6]

at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) [tomcat-embed-core-8.5.6.jar:8.5.6]

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) [tomcat-embed-core-8.5.6.jar:8.5.6]

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [tomcat-embed-core-8.5.6.jar:8.5.6]

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) [tomcat-embed-core-8.5.6.jar:8.5.6]

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349) [tomcat-embed-core-8.5.6.jar:8.5.6]

at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:784) [tomcat-embed-core-8.5.6.jar:8.5.6]

at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-embed-core-8.5.6.jar:8.5.6]

at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:802) [tomcat-embed-core-8.5.6.jar:8.5.6]

at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1410) [tomcat-embed-core-8.5.6.jar:8.5.6]

at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-8.5.6.jar:8.5.6]

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_74]

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_74]

at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-8.5.6.jar:8.5.6]

at java.lang.Thread.run(Thread.java:745) [na:1.8.0_74]

Zachary Whitley

unread,
Feb 6, 2017, 2:53:24 PM2/6/17
to Stardog
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.

--
-- --
You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to
stardog+unsubscribe@clarkparsia.com
For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en
---
You received this message because you are subscribed to the Google Groups "Stardog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stardog+unsubscribe@clarkparsia.com.

Becky Tauber

unread,
Feb 7, 2017, 8:39:36 AM2/7/17
to Stardog
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?


For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en
---
You received this message because you are subscribed to the Google Groups "Stardog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stardog+u...@clarkparsia.com.

Zachary Whitley

unread,
Feb 7, 2017, 9:06:28 AM2/7/17
to Stardog
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 https://docs.gradle.org/current/userguide/dependency_management.html#sub:exclude_transitive_dependencies

$> gradle dependencies
$> gradle htmlDependencyReport




For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en
---
You received this message because you are subscribed to the Google Groups "Stardog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stardog+unsubscribe@clarkparsia.com.

Håvard Ottestad

unread,
Feb 7, 2017, 10:11:41 AM2/7/17
to Stardog
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.

Håvard Ottestad

unread,
Feb 7, 2017, 10:12:22 AM2/7/17
to Stardog

Becky Tauber

unread,
Feb 7, 2017, 10:39:17 AM2/7/17
to sta...@clarkparsia.com
It looks like all the transitive 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?

Håvard Ottestad

unread,
Feb 7, 2017, 10:57:54 AM2/7/17
to Stardog
Might be something else in org.apache.httpcomponents

Zachary Whitley

unread,
Feb 7, 2017, 11:04:50 AM2/7/17
to Stardog
Don't exclude it. Stardog has a dependency on it. I'd keep looking around to see if you're pulling in any other artifacts with newer versions that Stardog depends on.

On Tue, Feb 7, 2017 at 10:57 AM, Håvard Ottestad <hmott...@gmail.com> wrote:
Might be something else in org.apache.httpcomponents

--
-- --
You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en
---
You received this message because you are subscribed to the Google Groups "Stardog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stardog+unsubscribe@clarkparsia.com.

Becky Tauber

unread,
Feb 8, 2017, 3:19:08 PM2/8/17
to Stardog
Hi again,

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.

On Tuesday, February 7, 2017 at 11:04:50 AM UTC-5, Zachary Whitley wrote:
Don't exclude it. Stardog has a dependency on it. I'd keep looking around to see if you're pulling in any other artifacts with newer versions that Stardog depends on.
On Tue, Feb 7, 2017 at 10:57 AM, Håvard Ottestad <hmott...@gmail.com> wrote:
Might be something else in org.apache.httpcomponents

--
-- --
You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en
---
You received this message because you are subscribed to the Google Groups "Stardog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stardog+u...@clarkparsia.com.

Håvard Ottestad

unread,
Feb 9, 2017, 5:11:32 AM2/9/17
to Stardog
Just found out that this happens if you are running stardog 4.2.2 and using the java libraries for 4.2.3.

Becky Tauber

unread,
Feb 9, 2017, 7:34:36 AM2/9/17
to Stardog
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.

Zachary Whitley

unread,
Feb 9, 2017, 7:46:03 AM2/9/17
to sta...@clarkparsia.com
Can you share your build.gradle file?
--

Stephen Nowell

unread,
Feb 9, 2017, 7:47:46 AM2/9/17
to sta...@clarkparsia.com, becky....@ninepts.com, zachary...@gmail.com
Hi all,

We are moving from this mailing list over to community.stardog.com. I have pasted this thread in what I hope is a legible manner here: https://community.stardog.com/t/stardogexception-needs-a-boundary-value/83.

Please move all further discussion on this over to there. Thanks!

Cheers,
Stephen
Reply all
Reply to author
Forward
0 new messages