Page MenuHomePhabricator

Can't Set CORS with Blazegraph, which is needed to communicate with Wikidata Query Service GUI on Localhost
Closed, ResolvedPublicBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):

  • Install MediaWiki, Wikibase, Wikidata Query Service on remote server.
  • Test to make sure all are functional.
  • Install Wikidata Query Service GUI on same remote server.
  • Connect to MediaWiki.
  • Run, and then connect to, Blazegraph, check via localhost:9999 that it is functional.
  • Load data in Blazegraph and test sample query using the Blazegraph GUI.
  • Run Wikidata Query Service GUI.
  • Attempt to run query SELECT * where {?a ?b ?c} LIMIT 10

What happens?:

When using the GUI with any query (ex: SELECT * where {?a ?b ?c} LIMIT 10), the following trace is created:

jquery.js:10109          GET http://localhost:9999/bigdata/namespace/wdq/sparql?query=SELECT%20*%20where%20%7B%3Fa%20%3Fb%20%3Fc%7D%20LIMIT%2010 net::ERR_FAILED 200
send @ jquery.js:10109
ajax @ jquery.js:9690
wikibase.queryService.api.Sparql.SELF._query @ Sparql.js:181
(anonymous) @ Sparql.js:141
mightThrow @ jquery.js:3766
process @ jquery.js:3834
setTimeout (async)
(anonymous) @ jquery.js:3872
fire @ jquery.js:3500
add @ jquery.js:3559
(anonymous) @ jquery.js:3892
Deferred @ jquery.js:3983
then @ jquery.js:3877
wikibase.queryService.api.Sparql.SELF.query @ Sparql.js:140
wikibase.queryService.ui.ResultView.SELF.draw @ ResultView.js:304
wikibase.queryService.ui.App.SELF._handleQuerySubmit @ App.js:824
proxy @ jquery.js:10780
dispatch @ jquery.js:5430
elemData.handle @ jquery.js:5234
:600/#SELECT%20%2a%20where%20%7B%3Fa%20%3Fb%20%3Fc%7D%20LIMIT%2010:1 Access to XMLHttpRequest at 'http://localhost:9999/bigdata/namespace/wdq/sparql' from origin 'http://localhost:600' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
jquery.js:10109          POST http://localhost:9999/bigdata/namespace/wdq/sparql net::ERR_FAILED 200

And then, instead of a results appearing in the GUI, server error appears.

What should have happened instead?:

The results of SELECT * where {?a ?b ?c} LIMIT 10 should have been displayed in the GUI. The localhost GUI should be able to communicate with the localhost Blazegraph.

The Blazegraph is producing correct SPARQL output when a URL is manually run, and the GUI server has CORS enabled.

Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc.:

  • MediaWiki Version: 1.37
  • Wikibase Version: 1.37
  • Browser: Google Chrome, Version 101.0.4951.54 (Official Build) (64-bit)
  • Host OS: Ubuntu 20.04.4 LTS (GNU/Linux 5.13.0-1022-aws x86-64
  • Tunneling Info (between host and remote):
    • localhost:80 [MediaWiki] --> localhost:400
    • localhost:8080 [Wikidata Query Service GUI] --> localhost:600
    • localhost:9999 [Blazegraph] --> localhost:9999

Event Timeline

Additional information: so when I copy and paste the URL http://localhost:9999/bigdata/sparql?query=SELECT%20*%20where%20%7B%3Fa%20%3Fb%20%3Fc%7D%20LIMIT%2010 into the browser, it spits out valid XML, it just doesn't when the request is made from the GUI, which results in a net::ERR_FAILED 200, which I believe is a CORS issue.

Also potentially relevant: when the request SELECT * where {?a ?b ?c} LIMIT 10 is run in the Wikidata Query Service GUI at localhost:600, the command-line ./runBlazegraph.sh output prints the following:

23:12:59.555 [com.bigdata.journal.Journal.executorService47] ERROR com.bigdata.util.concurrent.Haltable IP: UA: - com.bigdata.bop.join.PipelineJoin$JoinTask{ joinOp=com.bigdata.bop.join.PipelineJoin[2]()[ BOp.bopId=2, JoinAnnotations.constraints=null, AST2BOpBase.simpleJoin=true, BOp.evaluationContext=ANY, AccessPathJoinAnnotations.predicate=com.bigdata.rdf.spo.SPOPredicate[1](a=null, b=null, c=null)[ IPredicate.relationName=[wdq.spo], IPredicate.timestamp=1652397179523, BOp.bopId=1, AST2BOpBase.estimatedCardinality=74533, AST2BOpBase.originalIndex=SPO, IPredicate.flags=[KEYS,VALS,READONLY,PARALLEL]]]} : isFirstCause=true : com.bigdata.rwstore.sector.MemoryManagerClosedException
com.bigdata.rwstore.sector.MemoryManagerClosedException: null
        at com.bigdata.rwstore.sector.MemoryManager.assertOpen(MemoryManager.java:110)
23:12:59.565 [com.bigdata.journal.Journal.executorService47] WARN  com.bigdata.util.concurrent.Haltable IP: UA: - com.bigdata.bop.join.PipelineJoin$JoinTask{ joinOp=com.bigdata.bop.join.PipelineJoin[2]()[ BOp.bopId=2, JoinAnnotations.constraints=null, AST2BOpBase.simpleJoin=true, BOp.evaluationContext=ANY, AccessPathJoinAnnotations.predicate=com.bigdata.rdf.spo.SPOPredicate[1](a=null, b=null, c=null)[ IPredicate.relationName=[wdq.spo], IPredicate.timestamp=1652397179523, BOp.bopId=1, AST2BOpBase.estimatedCardinality=74533, AST2BOpBase.originalIndex=SPO, IPredicate.flags=[KEYS,VALS,READONLY,PARALLEL]]]} : isFirstCause=false : java.lang.RuntimeException: com.bigdata.rwstore.sector.MemoryManagerClosedException
com.bigdata.rwstore.sector.MemoryManagerClosedException: null
        at com.bigdata.rwstore.sector.MemoryManager.assertOpen(MemoryManager.java:110)
Wrapped by: java.lang.RuntimeException: com.bigdata.rwstore.sector.MemoryManagerClosedException
        at com.bigdata.bop.join.PipelineJoin$JoinTask$AccessPathTask.handleJoin2(PipelineJoin.java:1961)
23:12:59.566 [com.bigdata.journal.Journal.executorService47] WARN  com.bigdata.util.concurrent.Haltable IP: UA: - com.bigdata.bop.join.PipelineJoin$JoinTask{ joinOp=com.bigdata.bop.join.PipelineJoin[2]()[ BOp.bopId=2, JoinAnnotations.constraints=null, AST2BOpBase.simpleJoin=true, BOp.evaluationContext=ANY, AccessPathJoinAnnotations.predicate=com.bigdata.rdf.spo.SPOPredicate[1](a=null, b=null, c=null)[ IPredicate.relationName=[wdq.spo], IPredicate.timestamp=1652397179523, BOp.bopId=1, AST2BOpBase.estimatedCardinality=74533, AST2BOpBase.originalIndex=SPO, IPredicate.flags=[KEYS,VALS,READONLY,PARALLEL]]]} : isFirstCause=false : java.lang.RuntimeException: java.lang.RuntimeException: com.bigdata.rwstore.sector.MemoryManagerClosedException
com.bigdata.rwstore.sector.MemoryManagerClosedException: null
        at com.bigdata.rwstore.sector.MemoryManager.assertOpen(MemoryManager.java:110)
Wrapped by: java.lang.RuntimeException: com.bigdata.rwstore.sector.MemoryManagerClosedException
        at com.bigdata.bop.join.PipelineJoin$JoinTask$AccessPathTask.handleJoin2(PipelineJoin.java:1961)
Wrapped by: java.lang.RuntimeException: java.lang.RuntimeException: com.bigdata.rwstore.sector.MemoryManagerClosedException
        at com.bigdata.bop.join.PipelineJoin$JoinTask$BindingSetConsumerTask.call(PipelineJoin.java:1027)
23:13:15.679 [com.bigdata.journal.Journal.executorService54] ERROR com.bigdata.util.concurrent.Haltable IP: UA: - com.bigdata.bop.join.PipelineJoin$JoinTask{ joinOp=com.bigdata.bop.join.PipelineJoin[2]()[ BOp.bopId=2, JoinAnnotations.constraints=null, AST2BOpBase.simpleJoin=true, BOp.evaluationContext=ANY, AccessPathJoinAnnotations.predicate=com.bigdata.rdf.spo.SPOPredicate[1](a=null, b=null, c=null)[ IPredicate.relationName=[wdq.spo], IPredicate.timestamp=1652397195663, BOp.bopId=1, AST2BOpBase.estimatedCardinality=74533, AST2BOpBase.originalIndex=SPO, IPredicate.flags=[KEYS,VALS,READONLY,PARALLEL]]]} : isFirstCause=true : com.bigdata.rwstore.sector.MemoryManagerClosedException
com.bigdata.rwstore.sector.MemoryManagerClosedException: null
        at com.bigdata.rwstore.sector.MemoryManager.assertOpen(MemoryManager.java:110)
23:13:15.686 [com.bigdata.journal.Journal.executorService54] WARN  com.bigdata.util.concurrent.Haltable IP: UA: - com.bigdata.bop.join.PipelineJoin$JoinTask{ joinOp=com.bigdata.bop.join.PipelineJoin[2]()[ BOp.bopId=2, JoinAnnotations.constraints=null, AST2BOpBase.simpleJoin=true, BOp.evaluationContext=ANY, AccessPathJoinAnnotations.predicate=com.bigdata.rdf.spo.SPOPredicate[1](a=null, b=null, c=null)[ IPredicate.relationName=[wdq.spo], IPredicate.timestamp=1652397195663, BOp.bopId=1, AST2BOpBase.estimatedCardinality=74533, AST2BOpBase.originalIndex=SPO, IPredicate.flags=[KEYS,VALS,READONLY,PARALLEL]]]} : isFirstCause=false : java.lang.RuntimeException: com.bigdata.rwstore.sector.MemoryManagerClosedException
com.bigdata.rwstore.sector.MemoryManagerClosedException: null
        at com.bigdata.rwstore.sector.MemoryManager.assertOpen(MemoryManager.java:110)
Wrapped by: java.lang.RuntimeException: com.bigdata.rwstore.sector.MemoryManagerClosedException
        at com.bigdata.bop.join.PipelineJoin$JoinTask$AccessPathTask.handleJoin2(PipelineJoin.java:1961)
23:13:15.687 [com.bigdata.journal.Journal.executorService54] WARN  com.bigdata.util.concurrent.Haltable IP: UA: - com.bigdata.bop.join.PipelineJoin$JoinTask{ joinOp=com.bigdata.bop.join.PipelineJoin[2]()[ BOp.bopId=2, JoinAnnotations.constraints=null, AST2BOpBase.simpleJoin=true, BOp.evaluationContext=ANY, AccessPathJoinAnnotations.predicate=com.bigdata.rdf.spo.SPOPredicate[1](a=null, b=null, c=null)[ IPredicate.relationName=[wdq.spo], IPredicate.timestamp=1652397195663, BOp.bopId=1, AST2BOpBase.estimatedCardinality=74533, AST2BOpBase.originalIndex=SPO, IPredicate.flags=[KEYS,VALS,READONLY,PARALLEL]]]} : isFirstCause=false : java.lang.RuntimeException: java.lang.RuntimeException: com.bigdata.rwstore.sector.MemoryManagerClosedException
com.bigdata.rwstore.sector.MemoryManagerClosedException: null
        at com.bigdata.rwstore.sector.MemoryManager.assertOpen(MemoryManager.java:110)
Wrapped by: java.lang.RuntimeException: com.bigdata.rwstore.sector.MemoryManagerClosedException
        at com.bigdata.bop.join.PipelineJoin$JoinTask$AccessPathTask.handleJoin2(PipelineJoin.java:1961)
Wrapped by: java.lang.RuntimeException: java.lang.RuntimeException: com.bigdata.rwstore.sector.MemoryManagerClosedException
        at com.bigdata.bop.join.PipelineJoin$JoinTask$BindingSetConsumerTask.call(PipelineJoin.java:1027)
23:13:40.338 [com.bigdata.journal.Journal.executorService54] ERROR com.bigdata.util.concurrent.Haltable IP: UA: - com.bigdata.bop.join.PipelineJoin$JoinTask{ joinOp=com.bigdata.bop.join.PipelineJoin[2]()[ BOp.bopId=2, JoinAnnotations.constraints=null, AST2BOpBase.simpleJoin=true, BOp.evaluationContext=ANY, AccessPathJoinAnnotations.predicate=com.bigdata.rdf.spo.SPOPredicate[1](a=null, b=null, c=null)[ IPredicate.relationName=[wdq.spo], IPredicate.timestamp=1652397220319, BOp.bopId=1, AST2BOpBase.estimatedCardinality=74533, AST2BOpBase.originalIndex=SPO, IPredicate.flags=[KEYS,VALS,READONLY,PARALLEL]]]} : isFirstCause=true : com.bigdata.rwstore.sector.MemoryManagerClosedException
com.bigdata.rwstore.sector.MemoryManagerClosedException: null
        at com.bigdata.rwstore.sector.MemoryManager.assertOpen(MemoryManager.java:110)
23:13:40.339 [com.bigdata.journal.Journal.executorService54] WARN  com.bigdata.util.concurrent.Haltable IP: UA: - com.bigdata.bop.join.PipelineJoin$JoinTask{ joinOp=com.bigdata.bop.join.PipelineJoin[2]()[ BOp.bopId=2, JoinAnnotations.constraints=null, AST2BOpBase.simpleJoin=true, BOp.evaluationContext=ANY, AccessPathJoinAnnotations.predicate=com.bigdata.rdf.spo.SPOPredicate[1](a=null, b=null, c=null)[ IPredicate.relationName=[wdq.spo], IPredicate.timestamp=1652397220319, BOp.bopId=1, AST2BOpBase.estimatedCardinality=74533, AST2BOpBase.originalIndex=SPO, IPredicate.flags=[KEYS,VALS,READONLY,PARALLEL]]]} : isFirstCause=false : java.lang.RuntimeException: com.bigdata.rwstore.sector.MemoryManagerClosedException
com.bigdata.rwstore.sector.MemoryManagerClosedException: null
        at com.bigdata.rwstore.sector.MemoryManager.assertOpen(MemoryManager.java:110)
Wrapped by: java.lang.RuntimeException: com.bigdata.rwstore.sector.MemoryManagerClosedException
        at com.bigdata.bop.join.PipelineJoin$JoinTask$AccessPathTask.handleJoin2(PipelineJoin.java:1961)
23:13:40.340 [com.bigdata.journal.Journal.executorService54] WARN  com.bigdata.util.concurrent.Haltable IP: UA: - com.bigdata.bop.join.PipelineJoin$JoinTask{ joinOp=com.bigdata.bop.join.PipelineJoin[2]()[ BOp.bopId=2, JoinAnnotations.constraints=null, AST2BOpBase.simpleJoin=true, BOp.evaluationContext=ANY, AccessPathJoinAnnotations.predicate=com.bigdata.rdf.spo.SPOPredicate[1](a=null, b=null, c=null)[ IPredicate.relationName=[wdq.spo], IPredicate.timestamp=1652397220319, BOp.bopId=1, AST2BOpBase.estimatedCardinality=74533, AST2BOpBase.originalIndex=SPO, IPredicate.flags=[KEYS,VALS,READONLY,PARALLEL]]]} : isFirstCause=false : java.lang.RuntimeException: java.lang.RuntimeException: com.bigdata.rwstore.sector.MemoryManagerClosedException
com.bigdata.rwstore.sector.MemoryManagerClosedException: null
        at com.bigdata.rwstore.sector.MemoryManager.assertOpen(MemoryManager.java:110)
Wrapped by: java.lang.RuntimeException: com.bigdata.rwstore.sector.MemoryManagerClosedException
        at com.bigdata.bop.join.PipelineJoin$JoinTask$AccessPathTask.handleJoin2(PipelineJoin.java:1961)
Wrapped by: java.lang.RuntimeException: java.lang.RuntimeException: com.bigdata.rwstore.sector.MemoryManagerClosedException
        at com.bigdata.bop.join.PipelineJoin$JoinTask$BindingSetConsumerTask.call(PipelineJoin.java:1027)

I'm not sure if this is helpful or not, but it's interesting to me that it prints when the GUI makes the request, but doesn't print when I copy and paste in the URL for the same request.

UPDATE #1: I don't believe the above stack trace is relevant. The only other post I've seen related to this trace is here, but it doesn't seem like a solution is necessary, since the prevailing thought in that thread was that the trace could be ignored, or even turned off.

I have attempted to change each web.xml to include the following, but it still isn't functional (same errors):

<filter>
   <filter-name>cross-origin</filter-name>
   <filter-class>org.eclipse.jetty.servlets.CrossOriginFilter</filter-class>
   <init-param>
       <param-name>allowedOrigins</param-name>
       <param-value>*</param-value>
   </init-param>
   <init-param>
       <param-name>allowedMethods</param-name>
       <param-value>GET,POST,OPTIONS,DELETE,PUT,HEAD</param-value>
   </init-param>
   <init-param>
       <param-name>allowedHeaders</param-name>
       <param-value>origin, content-type, accept, authorization</param-value>
   </init-param>
</filter>
<filter-mapping>
    <filter-name>cross-origin</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>

I think this is the correct way to go about cross-origin resource sharing for Jetty, but I'm not sure if there is something else that needs to be done or if there is something else that I am missing.

Update 1: This is probably the solution, but I still haven't gotten it to work (as of the most recent comment from 15 May 2022). It is certainly the closest to what is mentioned in the official documentation for Jetty 9, which is what I'm currently following (although without success as of yet).

I tried one other potential solution, as listed here:

  1. I took the .jar from here (jetty-servlets-9.4.12.v20180830.jar, which matches the version of jetty-runner-*.jar in ./wikidata-query-rdf/dist/target/service-0.3.111-SNAPSHOT/) and put it in the directory ./wikidata-query-rdf/war/target/war/work/com.blazegraph/bigdata-war/WEB-INF/lib.
  1. I made sure the XML code above in my last comment was in ./wikidata-query-rdf/war/target/war/work/com.blazegraph/bigdata-war/WEB-INF/web.xml.
  1. I reset and reloaded Blazegraph, and followed the steps in the original post, and the same errors were produced, including a net::ERR_FAILED 200 and the CORS issue, so I'm still having the same problems.

UPDATE 1: This solution was posted for a Jetty version before Jetty 9 which is used in the version of wikidata-query-rdf that I am using, so it was not useful.

Attempted another solution, listed here, still no dice. This potential solution involved:

  1. Downloading the .jar files, cors-filter-*.jar and java-property-utils-*.jar
  2. Putting those files in the ./wikidata-query-rdf/war/target/war/work/com.blazegraph/bigdata-war/WEB-INF/lib directory.
  3. Adding the following to ./wikidata-query-rdf/war/target/war/work/com.blazegraph/bigdata-war/WEB-INF/web.xml:
<filter>
	<filter-name>CORS</filter-name>
	<filter-class>com.thetransactioncompany.cors.CORSFilter</filter-class>
</filter>
  1. Attempting the Wikidata Query Service GUI query still fails, still results in net::ERR_FAILED 200 and the CORS issue persists.

So I've pulled apart the logs of mvn install clean, mvn install, and mvn package in the ./wikidata-query-rdf directory, and it turns out that it is deleting the jetty-servlets-9.4.12.v20180830.jar in ./wikidata-query-rdf/war/target/blazegraph-service-0.3.111-SNAPSHOT/WEB-INF/lib, as indicated with the following trace output:

[INFO] Packaging webapp
[INFO] Assembling webapp [blazegraph-service] in [/var/lib/mediawiki/extensions/wikidata-query-rdf/war/target/blazegraph-service-0.3.111-SNAPSHOT]
[INFO] Processing war project
[INFO] Copying webapp resources [/var/lib/mediawiki/extensions/wikidata-query-rdf/war/src/main/webapp]
[INFO] deleting outdated resource WEB-INF/lib/java-property-utils-1.16.jar
[INFO] deleting outdated resource WEB-INF/lib/jetty-servlets-9.4.12.v20180830.jar

Then, later in the trace, the following appears twice:

java.lang.ClassNotFoundException: org.eclipse.jetty.servlets.CrossOriginFilter
java.lang.ClassNotFoundException: org.eclipse.jetty.servlets.CrossOriginFilter

Along with:

Caused by: javax.servlet.UnavailableException: Class loading error for holder cross-origin

Which is probably because the Maven is removing the above Jar during the install process. I'm not sure how to prevent the behavior, but that is what I am attempting now. Any help regarding this would be incredible; I haven't found much online in relationship to this issue.

This bug continues to be pervasive... just in case, I've attempted several tests with mvn install, mvn clean install, and mvn package. mvn package runs without error, but the other two each produce the following error:

[INFO] Shared code 0.3.11-SNAPSHOT ........................ SUCCESS [ 21.977 s]
[INFO] Wikidata Query RDF Testing Tools 0.3.11-SNAPSHOT ... SUCCESS [ 10.373 s]
[INFO] Blazegraph extension to improve performance for Wikibase 0.3.11-SNAPSHOT SUCCESS [ 49.929 s]
[INFO] Blazegraph Service Package 0.3.11-SNAPSHOT ......... SUCCESS [ 18.286 s]
[INFO] Wikidata Query RDF Tools 0.3.11-SNAPSHOT ........... SUCCESS [02:15 min]
[INFO] Wikidata Query Service Streaming Updater - Common 0.3.11-SNAPSHOT SUCCESS [ 13.695 s]
[INFO] Wikidata Query Service Streaming Updater - Producer 0.3.11-SNAPSHOT FAILURE [02:06 min]
[INFO] Wikidata Query Service Streaming Updater - Consumer 0.3.11-SNAPSHOT SKIPPED
[INFO] MediaWiki OAuth 1.0a Proxy Service 0.3.11-SNAPSHOT . SKIPPED
[INFO] rdf-spark-tools 0.3.11-SNAPSHOT .................... SKIPPED
[INFO] Wikibase RDF Query Service 0.3.11-SNAPSHOT ......... SKIPPED
[INFO] Wikidata Query Service 0.3.110-SNAPSHOT ............ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  06:16 min
[INFO] Finished at: 2022-05-16T19:45:49Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:3.0.0-M5:verify (default) on project streaming-updater-producer: There are test failures.
[ERROR] 
[ERROR] Please refer to /var/lib/mediawiki/extensions/wikidata-query-rdf/streaming-updater-producer/target/failsafe-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
[ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException: There was an error in the forked process
[ERROR] org/wikidata/query/rdf/updater/RDFChunkSerializer
[ERROR] 	at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:733)
[ERROR] 	at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:305)
[ERROR] 	at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:265)
[ERROR] 	at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1314)
[ERROR] 	at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1159)
[ERROR] 	at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:932)
[ERROR] 	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
[ERROR] 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
[ERROR] 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
[ERROR] 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
[ERROR] 	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
[ERROR] 	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
[ERROR] 	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
[ERROR] 	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
[ERROR] 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
[ERROR] 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
[ERROR] 	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
[ERROR] 	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957)
[ERROR] 	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
[ERROR] 	at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
[ERROR] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[ERROR] 	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
[ERROR] 	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
[ERROR] 	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
[ERROR] 	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
[ERROR] 
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :streaming-updater-producer

I'm not sure if this is related to the auto-deletion of the servlets JAR mentioned above... I've attempted just about every solution mentioned in this StackOverflow question... but no dice. Any help or thoughts at all would be much appreciated. I'm trying to document everything to the best of my ability to self-diagnose, but this has been extremely difficult. Any advice or ideas would be amazing.

I haven't found a solution. I have tried rebuilding things from scratch multiple times encountering different, seemingly unrelated, errors each time. I think it's still useful for this to be considered, however, so a solution should still be sought after. For the time being, I am focused on one of those different errors which I've documented here.

After finally figuring out the other error, as documented here, I'm back at this error again, with the CORS issue. Any thoughts?

Okay, so I think I've figured out how to do this, based on a hint in this article here. You actually need to use a proxy server. This will be different for people running different servers, but since mine is Apache2, I was able to find a relatively simple guide here. What I did was set up a proxy server on port 9000, which redirects to port 9999 (where Blazegraph is located). After doing this, the Wikidata Query Service GUI actually returns results! However, the links are a bit wonky still, so some formatting needs to be done.

I'm still having other issues, but at least this one is solved!