Closed CharlieUnderwood closed 4 years ago
@AlbertoParravicini can you look into this error?
./gradlew runPreprocess --args="-i Users/charlieunderwood/Documents/repository/program_YD/repository/pgx_samples_master/entity_linking/data/graph_data/graph.json -g test111 -p -n 100"
Configuration on demand is an incubating feature.
Task :runPreprocessor 18:05:26.180 INFO : Starting graph preprocessing... 18:05:26.263 INFO : Setting up graph preprocessor... 18:05:26.265 INFO : Input graph: Users/charlieunderwood/Documents/repository/program_YD/repository/pgx_samples_master/entity_linking/data/graph_data/graph.json 18:05:26.273 INFO : Creating Pgx session... Exception in thread "main" java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: the datasource white list should not be empty when local file system usage is allowed at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357) at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1908) at oracle.pgx.api.PgxFuture.get(PgxFuture.java:99) at oracle.pgx.api.ServerInstance.createSession(ServerInstance.java:578) at oracle.pgx.api.Pgx.createSession(Pgx.java:270) at oracle.pgx.api.Pgx.createSession(Pgx.java:284) at utils.PgxManager.
(PgxManager.scala:21) at graph_preprocessor.GraphPreprocessor. (GraphPreprocessor.scala:36) at graph_preprocessor.GraphPreprocessorMain$.main(GraphPreprocessorMain.scala:62) at graph_preprocessor.GraphPreprocessorMain.main(GraphPreprocessorMain.scala) Caused by: java.lang.IllegalArgumentException: the datasource white list should not be empty when local file system usage is allowed at oracle.pgx.config.AbstractEngineConfig.validateAllowLocalFileSystemSettings(AbstractEngineConfig.java:34) at oracle.pgx.config.AbstractEngineConfig.validate(AbstractEngineConfig.java:26) at oracle.pgx.config.AbstractConfig.initialize(AbstractConfig.java:107) at oracle.pgx.config.PgxConfig. (PgxConfig.java:511) at oracle.pgx.config.PgxConfig.parse(PgxConfig.java:475) at oracle.pgx.config.AbstractPgxConfig.initPgxConfig(AbstractPgxConfig.java:87) at oracle.pgx.config.AbstractPgxConfig.getInstance(AbstractPgxConfig.java:72) at oracle.pgx.engine.admin.Ctrl.doLoadConfig(Ctrl.java:316) at oracle.pgx.engine.admin.Ctrl.doLoadConfig(Ctrl.java:84) at oracle.pgx.api.admin.AbstractEmbeddedControl.loadConfig(AbstractEmbeddedControl.java:55) at oracle.pgx.engine.admin.Ctrl.access$600(Ctrl.java:84) at oracle.pgx.engine.admin.Ctrl$1.call(Ctrl.java:185) at oracle.pgx.engine.admin.Ctrl$1.call(Ctrl.java:171) at oracle.pgx.api.admin.AbstractControl.runOnCallerThread(AbstractControl.java:38) at oracle.pgx.engine.admin.Ctrl.start(Ctrl.java:171) at oracle.pgx.api.admin.AbstractControl.start(AbstractControl.java:97) at java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:995) at java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:2137) at oracle.pgx.api.PgxFuture.thenCompose(PgxFuture.java:152) at oracle.pgx.api.admin.AbstractControl.start(AbstractControl.java:84) at oracle.pgx.api.admin.AbstractControl.lambda$start$1(AbstractControl.java:64) at java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:995) at java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:2137) at oracle.pgx.api.PgxFuture.thenCompose(PgxFuture.java:152) at oracle.pgx.api.admin.AbstractControl.start(AbstractControl.java:60) at java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:995) at java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:2137) at oracle.pgx.api.PgxFuture.thenCompose(PgxFuture.java:152) at oracle.pgx.api.ServerInstance.onControl(ServerInstance.java:224) at oracle.pgx.api.ServerInstance.startEngineAsync(ServerInstance.java:283) at oracle.pgx.api.ServerInstance.lambda$getCore$0(ServerInstance.java:185) at java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:995) at java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:2137) at oracle.pgx.api.PgxFuture.thenCompose(PgxFuture.java:152) at oracle.pgx.api.ServerInstance.getCore(ServerInstance.java:178) at oracle.pgx.api.ServerInstance.createSessionAsync(ServerInstance.java:211) at oracle.pgx.api.ServerInstance.createSessionAsync(ServerInstance.java:162) ... 7 more Task :runPreprocessor FAILED
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':runPreprocessor'.
Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/4.10.1/userguide/command_line_interface.html#sec:command_line_warnings
It seems that the error is coming from the following line
val session: PgxSession = Pgx.createSession("session_1")
located in https://github.com/oracle/pgx-samples/blob/master/entity-linking/src/main/scala/utils/PgxManager.scala
It's not related to the input arguments, but to something wrong in the Pgx startup. @CharlieUnderwood can you provide additional information about your config, Pgx version, os, etc... Also, are you able to start a Pgx session inside a minimal example (either in java or scala)?
The error message Caused by: java.lang.IllegalArgumentException: the datasource white list should not be empty when local file system usage is allowed
makes me think that the error is related to the allow_local_filesystem": true,
setting in https://github.com/oracle/pgx-samples/blob/master/entity-linking/conf/pgx.conf
@rpatra do you know if there was some recent change in the behaviour of this setting?
@CharlieUnderwood you could try setting that flag to false, or specifying the data directory in the datasource_dir_whitelist
setting (see https://docs.oracle.com/cd/E56133_01/latest/reference/config/pgx.html)
@CharlieUnderwood below is an example
{ "datasource_dir_whitelist" : ["PUT_THE_ABSOLUTE_PATH_TO_DATA_DIRECTORY_HERE"], "allow_local_filesystem": true, "tmp_dir": "tmp_data" }
@AlbertoParravicini I am using mac os 10.14.1 with java version "11.0.6". After chaning the `allow_local_filesystem" from true to false, the code is running OK. Thank you for your kind help. @AlbertoParravicini @rpatra
Hello, I encountered this java.lang.IllegalArgumentException error when building entity-linking. I successfully generate following files through "create_graph_full_pagelinks.sh". But when I tried
./gradlew runPreprocess --args="-i Users/charlieunderwood/Documents/repository/program_YD/repository/pgx_samples_master/entity_linking/data/graph_data/graph.json -g test111 -p -n 100" ###,
the error shows as the following pic: I have tried to modify GraphPreprocessingMain.scala as follows:
The error stiil occurs. Appreciate for your answer.