I have built a native image application using (GraalVM 22.1.0) in Mac OS environment and it worked, but when trying to build the same application on linux the gluonfx:links fails, with an error of
undefined reference to Java_com_sun_security_auth_module_UnixSystem_getUnixInfo
undefined reference to JNI_OnLoad_jaas
I thought the problem was the libjaas.a not linking as it was not presented in the log file, so i added <arg>-ljaas</arg> but gave me another error which was /usr/bin/ld: cannot find -ljaas
Here is the POM file:
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<junit.version>5.8.1</junit.version>
</properties>
<dependencies>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>17.0.1</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-fxml</artifactId>
<version>17.0.1</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>2.1.214</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>17</source>
<target>17</target>
</configuration>
</plugin>
<plugin>
<groupId>com.gluonhq</groupId>
<artifactId>gluonfx-maven-plugin</artifactId>
<version>1.0.15</version>
<configuration>
<mainClass>com.example.demo4.Driver</mainClass>
<linkerArgs>
<arg>-ljaas</arg>
</linkerArgs>
</configuration>
</plugin>
<plugin>
<groupId>org.openjfx</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>0.0.8</version>
<executions>
<execution>
<!-- Default configuration for running with: mvn clean javafx:run -->
<id>default-cli</id>
<configuration>
<mainClass>com.example.demo4/com.example.demo4.HelloApplication</mainClass>
<launcher>app</launcher>
<jlinkZipName>app</jlinkZipName>
<jlinkImageName>app</jlinkImageName>
<noManPages>true</noManPages>
<stripDebug>true</stripDebug>
<noHeaderFiles>true</noHeaderFiles>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
Main Class:
package com.example.demo4;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.stage.Stage;
import java.sql.*;
public class Driver extends Application {
#Override
public void start(Stage stage) throws Exception {
Class.forName("org.h2.Driver");
Connection connection =DriverManager.getConnection("","","");
String str = connection.toString();
connection.close();
Scene scene = new Scene(new Label(str),500,500);
stage.setScene(scene);
stage.show();
}
public static void main(String[] args) {
launch(args);
}
}
Error gluonfx:link
[Mon Sep 05 11:37:26 EEST 2022][INFO] We will now compile your code for x86_64-linux-linux. This may take some time.
[Mon Sep 05 11:37:27 EEST 2022][INFO] [SUB] Warning: Ignoring server-mode native-image argument --no-server.
[Mon Sep 05 11:37:29 EEST 2022][INFO] [SUB] ========================================================================================================================
[Mon Sep 05 11:37:29 EEST 2022][INFO] [SUB] GraalVM Native Image: Generating 'com.example.demo4.driver' (shared library)...
[Mon Sep 05 11:37:29 EEST 2022][INFO] [SUB] ========================================================================================================================
[Mon Sep 05 11:37:29 EEST 2022][INFO] [SUB] [GluonFeature] enabled for config com.oracle.svm.hosted.FeatureImpl$IsInConfigurationAccessImpl#7cc586a8
[Mon Sep 05 11:37:30 EEST 2022][INFO] [SUB] GluonFeature enabled in setup com.oracle.svm.hosted.FeatureImpl$DuringSetupAccessImpl#65f58c6e
[Mon Sep 05 11:37:31 EEST 2022][INFO] [SUB] [1/7] Initializing... (3.7s # 0.20GB)
[Mon Sep 05 11:37:31 EEST 2022][INFO] [SUB] Version info: 'GraalVM 22.1.0 Java 17 CE'
[Mon Sep 05 11:37:31 EEST 2022][INFO] [SUB] C compiler: gcc (linux, x86_64, 9.3.0)
[Mon Sep 05 11:37:31 EEST 2022][INFO] [SUB] Garbage collector: Serial GC
[Mon Sep 05 11:37:31 EEST 2022][INFO] [SUB] 1 user-provided feature(s)
[Mon Sep 05 11:37:31 EEST 2022][INFO] [SUB] - com.gluonhq.substrate.feature.GluonFeature
[Mon Sep 05 11:38:17 EEST 2022][INFO] [SUB] [2/7] Performing analysis... [***********] (45.6s # 3.08GB)
[Mon Sep 05 11:38:17 EEST 2022][INFO] [SUB] 13,299 (91.34%) of 14,560 classes reachable
[Mon Sep 05 11:38:17 EEST 2022][INFO] [SUB] 25,151 (67.63%) of 37,189 fields reachable
[Mon Sep 05 11:38:17 EEST 2022][INFO] [SUB] 70,391 (66.36%) of 106,070 methods reachable
[Mon Sep 05 11:38:17 EEST 2022][INFO] [SUB] 663 classes, 185 fields, and 2,147 methods registered for reflection
[Mon Sep 05 11:38:17 EEST 2022][INFO] [SUB] 114 classes, 144 fields, and 182 methods registered for JNI access
[Mon Sep 05 11:38:20 EEST 2022][INFO] [SUB] [3/7] Building universe... (3.2s # 2.60GB)
[Mon Sep 05 11:38:23 EEST 2022][INFO] [SUB] [4/7] Parsing methods... [**] (3.0s # 3.00GB)
[Mon Sep 05 11:38:30 EEST 2022][INFO] [SUB] [5/7] Inlining methods... [****] (6.2s # 2.27GB)
[Mon Sep 05 11:39:03 EEST 2022][INFO] [SUB] [6/7] Compiling methods... [******] (32.8s # 3.51GB)
[Mon Sep 05 11:39:11 EEST 2022][INFO] [SUB]
[Mon Sep 05 11:39:11 EEST 2022][INFO] [SUB] ------------------------------------------------------------------------------------------------------------------------
[Mon Sep 05 11:39:11 EEST 2022][INFO] [SUB] 10.0s (9.6% of total time) in 59 GCs | Peak RSS: 5.27GB | CPU load: 6.42
[Mon Sep 05 11:39:11 EEST 2022][INFO] [SUB] ------------------------------------------------------------------------------------------------------------------------
[Mon Sep 05 11:39:11 EEST 2022][INFO] [SUB] Produced artifacts:
[Mon Sep 05 11:39:11 EEST 2022][INFO] [SUB] /home/yousef66/Desktop/demo4/target/gluonfx/x86_64-linux/gvm/demo4/graal_isolate.h (header)
[Mon Sep 05 11:39:11 EEST 2022][INFO] [SUB] /home/yousef66/Desktop/demo4/target/gluonfx/x86_64-linux/gvm/demo4/com.example.demo4.driver.h (header)
[Mon Sep 05 11:39:11 EEST 2022][INFO] [SUB] /home/yousef66/Desktop/demo4/target/gluonfx/x86_64-linux/gvm/demo4/graal_isolate_dynamic.h (header)
[Mon Sep 05 11:39:11 EEST 2022][INFO] [SUB] /home/yousef66/Desktop/demo4/target/gluonfx/x86_64-linux/gvm/demo4/com.example.demo4.driver_dynamic.h (header)
[Mon Sep 05 11:39:11 EEST 2022][INFO] [SUB] /home/yousef66/Desktop/demo4/target/gluonfx/x86_64-linux/gvm/demo4/com.example.demo4.driver.build_artifacts.txt
[Mon Sep 05 11:39:11 EEST 2022][INFO] [SUB] ========================================================================================================================
[Mon Sep 05 11:39:11 EEST 2022][INFO] [SUB] Finished generating 'com.example.demo4.driver' in 1m 43s.
[INFO]
[INFO] --- gluonfx-maven-plugin:1.0.15:link (default-cli) # demo4 ---
[Mon Sep 05 11:39:12 EEST 2022][INFO] Substrate is tested with the Gluon's GraalVM build which you can find at https://github.com/gluonhq/graal/releases.
While you can still use other GraalVM builds, there is no guarantee that these will work properly with Substrate
[Mon Sep 05 11:39:12 EEST 2022][INFO] ==================== LINK TASK ====================
[Mon Sep 05 11:39:13 EEST 2022][INFO] [SUB] /usr/bin/ld: /home/yousef66/Desktop/demo4/target/gluonfx/x86_64-linux/gvm/tmp/SVM-1662367049997/com.example.demo4.driver.o:(.data+0x6d8): undefined reference to `JNI_OnLoad_jaas'
[Mon Sep 05 11:39:13 EEST 2022][INFO] [SUB] /usr/bin/ld: /home/yousef66/Desktop/demo4/target/gluonfx/x86_64-linux/gvm/tmp/SVM-1662367049997/com.example.demo4.driver.o:(.data+0x1050): undefined reference to `Java_com_sun_security_auth_module_UnixSystem_getUnixInfo'
[Mon Sep 05 11:39:13 EEST 2022][INFO] [SUB] collect2: error: ld returned 1 exit status
[Mon Sep 05 11:39:13 EEST 2022][SEVERE] Process link failed with result: 1
Check the log files under /home/yousef66/Desktop/demo4/target/gluonfx/x86_64-linux/gvm/log
And please check https://docs.gluonhq.com/ for more information.
[Mon Sep 05 11:39:13 EEST 2022][INFO] Logging process [link] to file: /home/yousef66/Desktop/demo4/target/gluonfx/log/process-link-1662367153279.log
[Mon Sep 05 11:39:13 EEST 2022][SEVERE] Linking failed.
Check the log files under /home/yousef66/Desktop/demo4/target/gluonfx/x86_64-linux/gvm/log
And please check https://docs.gluonhq.com/ for more information.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:49 min
[INFO] Finished at: 2022-09-05T11:39:13+03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.gluonhq:gluonfx-maven-plugin:1.0.15:link (default-cli) on project demo4: Linking failed -> [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
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:50 min
[INFO] Finished at: 2022-09-05T11:39:13+03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.gluonhq:gluonfx-maven-plugin:1.0.15:build (default-cli) on project demo4: Error, gluonfx:build failed -> [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
Log file
[Mon Sep 05 12:46:34 EEST 2022][INFO] ==================== LINK TASK ====================
[Mon Sep 05 12:46:34 EEST 2022][FINE] Looking for resource: /native/linux/launcher.c
[Mon Sep 05 12:46:34 EEST 2022][FINE] PB Command for compile-additional-sources: gcc -c -DSUBSTRATE -I/home/yousef66/Desktop/graalvm-ce-java17-22.1.0/include -I/home/yousef66/Desktop/graalvm-ce-java17-22.1.0/include/linux -DGVM_17 -I/home/yousef66/Desktop/demo4/target/gluonfx/x86_64-linux/gvm/demo4 launcher.c
[Mon Sep 05 12:46:34 EEST 2022][FINE] Start process compile-additional-sources...
[Mon Sep 05 12:46:34 EEST 2022][FINE] Result for compile-additional-sources: 0
[Mon Sep 05 12:46:34 EEST 2022][FINE] PB Command for Get config for libavcodec: /usr/bin/pkg-config --libs libavcodec
[Mon Sep 05 12:46:34 EEST 2022][FINE] Start process Get config for libavcodec...
[Mon Sep 05 12:46:34 EEST 2022][FINE] [SUB] -lavcodec
[Mon Sep 05 12:46:34 EEST 2022][FINE] Result for Get config for libavcodec: 0
[Mon Sep 05 12:46:34 EEST 2022][FINE] Pkg libavcodec provided flags: [-lavcodec]
[Mon Sep 05 12:46:34 EEST 2022][FINE] PB Command for Get config for libavformat: /usr/bin/pkg-config --libs libavformat
[Mon Sep 05 12:46:34 EEST 2022][FINE] Start process Get config for libavformat...
[Mon Sep 05 12:46:34 EEST 2022][FINE] [SUB] -lavformat
[Mon Sep 05 12:46:34 EEST 2022][FINE] Result for Get config for libavformat: 0
[Mon Sep 05 12:46:34 EEST 2022][FINE] Pkg libavformat provided flags: [-lavformat]
[Mon Sep 05 12:46:34 EEST 2022][FINE] PB Command for Get config for libavutil: /usr/bin/pkg-config --libs libavutil
[Mon Sep 05 12:46:34 EEST 2022][FINE] Start process Get config for libavutil...
[Mon Sep 05 12:46:34 EEST 2022][FINE] [SUB] -lavutil
[Mon Sep 05 12:46:34 EEST 2022][FINE] Result for Get config for libavutil: 0
[Mon Sep 05 12:46:34 EEST 2022][FINE] Pkg libavutil provided flags: [-lavutil]
[Mon Sep 05 12:46:34 EEST 2022][FINE] PB Command for Get config for alsa: /usr/bin/pkg-config --libs alsa
[Mon Sep 05 12:46:34 EEST 2022][FINE] Start process Get config for alsa...
[Mon Sep 05 12:46:34 EEST 2022][FINE] [SUB] -lasound
[Mon Sep 05 12:46:34 EEST 2022][FINE] Result for Get config for alsa: 0
[Mon Sep 05 12:46:34 EEST 2022][FINE] Pkg alsa provided flags: [-lasound]
[Mon Sep 05 12:46:34 EEST 2022][FINE] All flags: [-lgstreamer-lite, -lavcodec, -lavformat, -lavutil, -lasound]
[Mon Sep 05 12:46:34 EEST 2022][FINE] PB Command for Get config for gl: /usr/bin/pkg-config --libs gl
[Mon Sep 05 12:46:34 EEST 2022][FINE] Start process Get config for gl...
[Mon Sep 05 12:46:34 EEST 2022][FINE] [SUB] -lGL
[Mon Sep 05 12:46:34 EEST 2022][FINE] Result for Get config for gl: 0
[Mon Sep 05 12:46:34 EEST 2022][FINE] Pkg gl provided flags: [-lGL]
[Mon Sep 05 12:46:34 EEST 2022][FINE] PB Command for Get config for x11: /usr/bin/pkg-config --libs x11
[Mon Sep 05 12:46:34 EEST 2022][FINE] Start process Get config for x11...
[Mon Sep 05 12:46:34 EEST 2022][FINE] [SUB] -lX11
[Mon Sep 05 12:46:34 EEST 2022][FINE] Result for Get config for x11: 0
[Mon Sep 05 12:46:34 EEST 2022][FINE] Pkg x11 provided flags: [-lX11]
[Mon Sep 05 12:46:34 EEST 2022][FINE] PB Command for Get config for gtk+-x11-3.0: /usr/bin/pkg-config --libs gtk+-x11-3.0
[Mon Sep 05 12:46:34 EEST 2022][FINE] Start process Get config for gtk+-x11-3.0...
[Mon Sep 05 12:46:34 EEST 2022][FINE] [SUB] -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0
[Mon Sep 05 12:46:34 EEST 2022][FINE] Result for Get config for gtk+-x11-3.0: 0
[Mon Sep 05 12:46:34 EEST 2022][FINE] Pkg gtk+-x11-3.0 provided flags: [-lgtk-3, -lgdk-3, -lpangocairo-1.0, -lpango-1.0, -lharfbuzz, -latk-1.0, -lcairo-gobject, -lcairo, -lgdk_pixbuf-2.0, -lgio-2.0, -lgobject-2.0, -lglib-2.0]
[Mon Sep 05 12:46:34 EEST 2022][FINE] PB Command for Get config for freetype2: /usr/bin/pkg-config --libs freetype2
[Mon Sep 05 12:46:34 EEST 2022][FINE] Start process Get config for freetype2...
[Mon Sep 05 12:46:34 EEST 2022][FINE] [SUB] -lfreetype
[Mon Sep 05 12:46:34 EEST 2022][FINE] Result for Get config for freetype2: 0
[Mon Sep 05 12:46:34 EEST 2022][FINE] Pkg freetype2 provided flags: [-lfreetype]
[Mon Sep 05 12:46:34 EEST 2022][FINE] PB Command for Get config for pangoft2: /usr/bin/pkg-config --libs pangoft2
[Mon Sep 05 12:46:34 EEST 2022][FINE] Start process Get config for pangoft2...
[Mon Sep 05 12:46:34 EEST 2022][FINE] [SUB] -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lharfbuzz -lfontconfig -lfreetype
[Mon Sep 05 12:46:34 EEST 2022][FINE] Result for Get config for pangoft2: 0
[Mon Sep 05 12:46:34 EEST 2022][FINE] Pkg pangoft2 provided flags: [-lpangoft2-1.0, -lpango-1.0, -lgobject-2.0, -lglib-2.0, -lharfbuzz, -lfontconfig, -lfreetype]
[Mon Sep 05 12:46:34 EEST 2022][FINE] PB Command for Get config for gthread-2.0: /usr/bin/pkg-config --libs gthread-2.0
[Mon Sep 05 12:46:34 EEST 2022][FINE] Start process Get config for gthread-2.0...
[Mon Sep 05 12:46:34 EEST 2022][FINE] [SUB] -lgthread-2.0 -pthread -lglib-2.0
[Mon Sep 05 12:46:34 EEST 2022][FINE] Result for Get config for gthread-2.0: 0
[Mon Sep 05 12:46:34 EEST 2022][FINE] Pkg gthread-2.0 provided flags: [-lgthread-2.0, -pthread, -lglib-2.0]
[Mon Sep 05 12:46:34 EEST 2022][FINE] PB Command for Get config for zlib: /usr/bin/pkg-config --libs zlib
[Mon Sep 05 12:46:34 EEST 2022][FINE] Start process Get config for zlib...
[Mon Sep 05 12:46:34 EEST 2022][FINE] [SUB] -lz
[Mon Sep 05 12:46:34 EEST 2022][FINE] Result for Get config for zlib: 0
[Mon Sep 05 12:46:34 EEST 2022][FINE] Pkg zlib provided flags: [-lz]
[Mon Sep 05 12:46:34 EEST 2022][FINE] PB Command for Get config for xtst: /usr/bin/pkg-config --libs xtst
[Mon Sep 05 12:46:34 EEST 2022][FINE] Start process Get config for xtst...
[Mon Sep 05 12:46:34 EEST 2022][FINE] [SUB] -lXtst
[Mon Sep 05 12:46:34 EEST 2022][FINE] Result for Get config for xtst: 0
[Mon Sep 05 12:46:34 EEST 2022][FINE] Pkg xtst provided flags: [-lXtst]
[Mon Sep 05 12:46:34 EEST 2022][FINE] PB Command for Get config for gmodule-no-export-2.0: /usr/bin/pkg-config --libs gmodule-no-export-2.0
[Mon Sep 05 12:46:34 EEST 2022][FINE] Start process Get config for gmodule-no-export-2.0...
[Mon Sep 05 12:46:34 EEST 2022][FINE] [SUB] -lgmodule-2.0 -pthread -lglib-2.0
[Mon Sep 05 12:46:34 EEST 2022][FINE] Result for Get config for gmodule-no-export-2.0: 0
[Mon Sep 05 12:46:34 EEST 2022][FINE] Pkg gmodule-no-export-2.0 provided flags: [-lgmodule-2.0, -pthread, -lglib-2.0]
[Mon Sep 05 12:46:34 EEST 2022][FINE] All flags: [-Wl,--no-whole-archive, -lGL, -lX11, -lgtk-3, -lgdk-3, -lpangocairo-1.0, -lpango-1.0, -lharfbuzz, -latk-1.0, -lcairo-gobject, -lcairo, -lgdk_pixbuf-2.0, -lgio-2.0, -lgobject-2.0, -lglib-2.0, -lfreetype, -lpangoft2-1.0, -lpango-1.0, -lgobject-2.0, -lglib-2.0, -lharfbuzz, -lfontconfig, -lfreetype, -lgthread-2.0, -pthread, -lglib-2.0, -lstdc++, -lz, -lXtst, -lm, -lgmodule-2.0, -pthread, -lglib-2.0]
[Mon Sep 05 12:46:34 EEST 2022][FINE] PB Command for link: gcc /home/yousef66/Desktop/demo4/target/gluonfx/x86_64-linux/gvm/demo4/launcher.o /home/yousef66/Desktop/demo4/target/gluonfx/x86_64-linux/gvm/tmp/SVM-1662371091887/com.example.demo4.driver.o /home/yousef66/Desktop/graalvm-ce-java17-22.1.0/lib/static/linux-amd64/glibc/libjava.a /home/yousef66/Desktop/graalvm-ce-java17-22.1.0/lib/static/linux-amd64/glibc/libnio.a /home/yousef66/Desktop/graalvm-ce-java17-22.1.0/lib/static/linux-amd64/glibc/libzip.a /home/yousef66/Desktop/graalvm-ce-java17-22.1.0/lib/static/linux-amd64/glibc/libnet.a /home/yousef66/Desktop/graalvm-ce-java17-22.1.0/lib/static/linux-amd64/glibc/libprefs.a /home/yousef66/Desktop/graalvm-ce-java17-22.1.0/lib/static/linux-amd64/glibc/libj2pkcs11.a /home/yousef66/Desktop/graalvm-ce-java17-22.1.0/lib/static/linux-amd64/glibc/libextnet.a /home/yousef66/Desktop/graalvm-ce-java17-22.1.0/lib/static/linux-amd64/glibc/libfdlibm.a /home/yousef66/Desktop/graalvm-ce-java17-22.1.0/lib/static/linux-amd64/glibc/libfontmanager.a /home/yousef66/Desktop/graalvm-ce-java17-22.1.0/lib/static/linux-amd64/glibc/libjavajpeg.a /home/yousef66/Desktop/graalvm-ce-java17-22.1.0/lib/static/linux-amd64/glibc/liblcms.a /home/yousef66/Desktop/graalvm-ce-java17-22.1.0/lib/static/linux-amd64/glibc/libawt_headless.a /home/yousef66/Desktop/graalvm-ce-java17-22.1.0/lib/static/linux-amd64/glibc/libawt.a -l:libjvm.a -l:liblibchelper.a -lz -ldl -lstdc++ -lpthread -Wl,--wrap=pow -rdynamic -lprism_es2 -lglass -lglassgtk3 -ljavafx_font -ljavafx_font_freetype -ljavafx_font_pango -ljavafx_iio -lgstreamer-lite -lavcodec -lavformat -lavutil -lasound -Wl,--no-whole-archive -lGL -lX11 -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lfreetype -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lharfbuzz -lfontconfig -lfreetype -lgthread-2.0 -pthread -lglib-2.0 -lstdc++ -lz -lXtst -lm -lgmodule-2.0 -pthread -lglib-2.0 -lm -ldl -o /home/yousef66/Desktop/demo4/target/gluonfx/x86_64-linux/demo4 -L/home/yousef66/Desktop/graalvm-ce-java17-22.1.0/lib/svm/clibraries/linux-amd64 -L/home/yousef66/.gluon/substrate/javafxStaticSdk/19-ea+8/linux-x86_64/sdk/lib -ljaas
[Mon Sep 05 12:46:34 EEST 2022][FINE] Start process link...
[Mon Sep 05 12:46:34 EEST 2022][INFO] [SUB] /usr/bin/ld: cannot find -ljaas
[Mon Sep 05 12:46:34 EEST 2022][INFO] [SUB] collect2: error: ld returned 1 exit status
[Mon Sep 05 12:46:34 EEST 2022][FINE] Result for link: 1
[Mon Sep 05 12:46:34 EEST 2022][SEVERE] Process link failed with result: 1
Check the log files under /home/yousef66/Desktop/demo4/target/gluonfx/x86_64-linux/gvm/log
And please check https://docs.gluonhq.com/ for more information.
[Mon Sep 05 12:46:34 EEST 2022][INFO] Logging process [link] to file: /home/yousef66/Desktop/demo4/target/gluonfx/log/process-link-1662371194695.log
[Mon Sep 05 12:46:34 EEST 2022][SEVERE] Linking failed.
Check the log files under /home/yousef66/Desktop/demo4/target/gluonfx/x86_64-linux/gvm/log
And please check https://docs.gluonhq.com/ for more information.
My twitter4j streaming works when I am using track and user queries but when I use location queries, It returns a 404, i.e.
$ java -cp .:twitter4j-core-4.0.4.jar:twitter4j-media-support-4.0.4.jar:twitter4j-async-4.0.4.jar:twitter4j-examples-4.0.4.jar:twitter4j-stream-4.0.4.jar PrintFilterLocationStream "{1,2}"
[Wed Jul 06 00:05:41 SGT 2016]serialVersionUID: 6175546394599249696
[Wed Jul 06 00:05:41 SGT 2016]debug: true
[Wed Jul 06 00:05:41 SGT 2016]user: null
[Wed Jul 06 00:05:41 SGT 2016]password: null
[Wed Jul 06 00:05:41 SGT 2016]httpConf: MyHttpClientConfiguration{httpProxyHost='null', httpProxyUser='null', httpProxyPassword='null', httpProxyPort=-1, httpConnectionTimeout=20000, httpReadTimeout=120000, prettyDebug=false, gzipEnabled=true}
[Wed Jul 06 00:05:41 SGT 2016]httpStreamingReadTimeout: 40000
[Wed Jul 06 00:05:41 SGT 2016]httpRetryCount: 0
[Wed Jul 06 00:05:41 SGT 2016]httpRetryIntervalSeconds: 5
[Wed Jul 06 00:05:41 SGT 2016]oAuthConsumerKey: XXX
[Wed Jul 06 00:05:41 SGT 2016]oAuthConsumerSecret: **************************************************
[Wed Jul 06 00:05:41 SGT 2016]oAuthAccessToken: XXX-XXX
[Wed Jul 06 00:05:41 SGT 2016]oAuthAccessTokenSecret: *********************************************
[Wed Jul 06 00:05:41 SGT 2016]oAuth2TokenType: null
[Wed Jul 06 00:05:41 SGT 2016]oAuth2AccessToken: null
[Wed Jul 06 00:05:41 SGT 2016]oAuth2Scope: null
[Wed Jul 06 00:05:41 SGT 2016]oAuthRequestTokenURL: https://api.twitter.com/oauth/request_token
[Wed Jul 06 00:05:41 SGT 2016]oAuthAuthorizationURL: https://api.twitter.com/oauth/authorize
[Wed Jul 06 00:05:41 SGT 2016]oAuthAccessTokenURL: https://api.twitter.com/oauth/access_token
[Wed Jul 06 00:05:41 SGT 2016]oAuthAuthenticationURL: https://api.twitter.com/oauth/authenticate
[Wed Jul 06 00:05:41 SGT 2016]oAuth2TokenURL: https://api.twitter.com/oauth2/token
[Wed Jul 06 00:05:41 SGT 2016]oAuth2InvalidateTokenURL: https://api.twitter.com/oauth2/invalidate_token
[Wed Jul 06 00:05:41 SGT 2016]restBaseURL: https://api.twitter.com/1.1/
[Wed Jul 06 00:05:41 SGT 2016]streamBaseURL: https://stream.twitter.com/1.1/
[Wed Jul 06 00:05:41 SGT 2016]userStreamBaseURL: https://userstream.twitter.com/1.1/
[Wed Jul 06 00:05:41 SGT 2016]siteStreamBaseURL: https://sitestream.twitter.com/1.1/
[Wed Jul 06 00:05:41 SGT 2016]uploadBaseURL: https://upload.twitter.com/1.1/
[Wed Jul 06 00:05:41 SGT 2016]dispatcherImpl: twitter4j.DispatcherImpl
[Wed Jul 06 00:05:41 SGT 2016]asyncNumThreads: 1
[Wed Jul 06 00:05:41 SGT 2016]loggerFactory: null
[Wed Jul 06 00:05:41 SGT 2016]contributingTo: -1
[Wed Jul 06 00:05:41 SGT 2016]includeMyRetweetEnabled: true
[Wed Jul 06 00:05:41 SGT 2016]includeEntitiesEnabled: true
[Wed Jul 06 00:05:41 SGT 2016]trimUserEnabled: false
[Wed Jul 06 00:05:41 SGT 2016]jsonStoreEnabled: false
[Wed Jul 06 00:05:41 SGT 2016]mbeanEnabled: false
[Wed Jul 06 00:05:41 SGT 2016]userStreamRepliesAllEnabled: false
[Wed Jul 06 00:05:41 SGT 2016]userStreamWithFollowingsEnabled: true
[Wed Jul 06 00:05:41 SGT 2016]stallWarningsEnabled: true
[Wed Jul 06 00:05:41 SGT 2016]applicationOnlyAuthEnabled: false
[Wed Jul 06 00:05:41 SGT 2016]mediaProvider: TWITTER
[Wed Jul 06 00:05:41 SGT 2016]mediaProviderAPIKey: null
[Wed Jul 06 00:05:41 SGT 2016]mediaProviderParameters: null
[Wed Jul 06 00:05:41 SGT 2016]daemonEnabled: true
[Wed Jul 06 00:05:41 SGT 2016]instances: [ConfigurationBase{debug=true, user='null', password='null', httpConf=MyHttpClientConfiguration{httpProxyHost='null', httpProxyUser='null', httpProxyPassword='null', httpProxyPort=-1, httpConnectionTimeout=20000, httpReadTimeout=120000, prettyDebug=false, gzipEnabled=true}, httpStreamingReadTimeout=40000, httpRetryCount=0, httpRetryIntervalSeconds=5, oAuthConsumerKey='zptB1VLNbNguInk3HqKHvc55H', oAuthConsumerSecret='8lyjsT2PsIkG5Ada5axh5k7H8B9lOQM67jizv90tSlasrOGun6', oAuthAccessToken='2550568801-AgwQ31S2DgJ6lyVrZSlMPqBEweTnFk4fn17BLH1', oAuthAccessTokenSecret='3yKlKp6fWvuzAQkgthZbXCB5aMOt3vg1nrVlgQDh9atJV', oAuth2TokenType='null', oAuth2AccessToken='null', oAuth2Scope='null', oAuthRequestTokenURL='https://api.twitter.com/oauth/request_token', oAuthAuthorizationURL='https://api.twitter.com/oauth/authorize', oAuthAccessTokenURL='https://api.twitter.com/oauth/access_token', oAuthAuthenticationURL='https://api.twitter.com/oauth/authenticate', oAuth2TokenURL='https://api.twitter.com/oauth2/token', oAuth2InvalidateTokenURL='https://api.twitter.com/oauth2/invalidate_token', restBaseURL='https://api.twitter.com/1.1/', uploadBaseURL='https://upload.twitter.com/1.1/', streamBaseURL='https://stream.twitter.com/1.1/', userStreamBaseURL='https://userstream.twitter.com/1.1/', siteStreamBaseURL='https://sitestream.twitter.com/1.1/', dispatcherImpl='twitter4j.DispatcherImpl', asyncNumThreads=1, loggerFactory='null', contributingTo=-1, includeMyRetweetEnabled=true, includeEntitiesEnabled=true, trimUserEnabled=false, jsonStoreEnabled=false, mbeanEnabled=false, userStreamRepliesAllEnabled=false, userStreamWithFollowingsEnabled=true, stallWarningsEnabled=true, applicationOnlyAuthEnabled=false, mediaProvider='TWITTER', mediaProviderAPIKey='null', mediaProviderParameters=null, daemonEnabled=true}]
[Wed Jul 06 00:05:41 SGT 2016]Establishing connection.
[Wed Jul 06 00:05:41 SGT 2016]Twitter Stream consumer-1[Establishing connection]
[Wed Jul 06 00:05:42 SGT 2016]Request:
[Wed Jul 06 00:05:42 SGT 2016]POST https://stream.twitter.com/1.1/statuses/filter.json
[Wed Jul 06 00:05:42 SGT 2016]OAuth base string: POST&https%3A%2F%2Fstream.twitter.com%2F1.1%2Fstatuses%2Ffilter.json&count%3D0%26locations%3D1.0%252C2.0%26oauth_consumer_key%3DzptB1VLNbNguInk3HqKHvc55H%26oauth_nonce%3D3352799096%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1467734742%26oauth_token%3D2550568801-AgwQ31S2DgJ6lyVrZSlMPqBEweTnFk4fn17BLH1%26oauth_version%3D1.0%26stall_warnings%3Dtrue
[Wed Jul 06 00:05:42 SGT 2016]OAuth signature: qf36pAFObnNP+VwCR88h0fEjbbk=
[Wed Jul 06 00:05:42 SGT 2016]Authorization: *************************************************************************************************************************************************************************************************************************************************************************************
[Wed Jul 06 00:05:42 SGT 2016]X-Twitter-Client-Version: 4.0.4
[Wed Jul 06 00:05:42 SGT 2016]X-Twitter-Client-URL: http://twitter4j.org/en/twitter4j-4.0.4.xml
[Wed Jul 06 00:05:42 SGT 2016]X-Twitter-Client: Twitter4J
[Wed Jul 06 00:05:42 SGT 2016]User-Agent: twitter4j http://twitter4j.org/ /4.0.4
[Wed Jul 06 00:05:42 SGT 2016]Connection: close
[Wed Jul 06 00:05:42 SGT 2016]Accept-Encoding: gzip
[Wed Jul 06 00:05:42 SGT 2016]Post Params: count=0&locations=1.0%2C2.0&stall_warnings=true
[Wed Jul 06 00:05:43 SGT 2016]Response:
[Wed Jul 06 00:05:43 SGT 2016]date: Tue, 05 Jul 2016 16:05:42 GMT
[Wed Jul 06 00:05:43 SGT 2016]HTTP/1.1 406 Not Acceptable
[Wed Jul 06 00:05:43 SGT 2016]server: tsa
[Wed Jul 06 00:05:43 SGT 2016]content-length: 103
[Wed Jul 06 00:05:43 SGT 2016]x-connection-hash: f255dee017473bf8d62e136ea40e9247
[Wed Jul 06 00:05:43 SGT 2016]content-type: text/html
[Wed Jul 06 00:05:43 SGT 2016]connection: close
[Wed Jul 06 00:05:43 SGT 2016]Location track items must be given as pairs of comma separated lat/longs: [Ljava.lang.String;#640a54b
[Wed Jul 06 00:05:43 SGT 2016]406:Returned by the Search API when an invalid format is specified in the request.
Returned by the Streaming API when one or more of the parameters are not suitable for the resource. The track parameter, for example, would throw this error if:
The track keyword is too long or too short.
The bounding box specified is invalid.
No predicates defined for filtered resource, for example, neither track nor follow parameter defined.
Follow userid cannot be read.
Location track items must be given as pairs of comma separated lat/longs: [Ljava.lang.String;#640a54b
[Wed Jul 06 00:05:43 SGT 2016]Parameter not accepted with the role. 406:Returned by the Search API when an invalid format is specified in the request.
Returned by the Streaming API when one or more of the parameters are not suitable for the resource. The track parameter, for example, would throw this error if:
The track keyword is too long or too short.
The bounding box specified is invalid.
No predicates defined for filtered resource, for example, neither track nor follow parameter defined.
Follow userid cannot be read.
Location track items must be given as pairs of comma separated lat/longs: [Ljava.lang.String;#640a54b
406:Returned by the Search API when an invalid format is specified in the request.
Returned by the Streaming API when one or more of the parameters are not suitable for the resource. The track parameter, for example, would throw this error if:
The track keyword is too long or too short.
The bounding box specified is invalid.
No predicates defined for filtered resource, for example, neither track nor follow parameter defined.
Follow userid cannot be read.
Location track items must be given as pairs of comma separated lat/longs: [Ljava.lang.String;#640a54b
Relevant discussions can be found on the Internet at:
http://www.google.co.jp/search?q=1169356e or
http://www.google.co.jp/search?q=c04b39e1
TwitterException{exceptionCode=[1169356e-c04b39e1], statusCode=406, message=null, code=-1, retryAfter=-1, rateLimitStatus=null, version=4.0.4}
at twitter4j.HttpClientImpl.handleRequest(HttpClientImpl.java:164)
at twitter4j.HttpClientBase.request(HttpClientBase.java:57)
at twitter4j.HttpClientBase.post(HttpClientBase.java:86)
at twitter4j.TwitterStreamImpl.getFilterStream(TwitterStreamImpl.java:346)
at twitter4j.TwitterStreamImpl$8.getStream(TwitterStreamImpl.java:322)
at twitter4j.TwitterStreamImpl$TwitterStreamConsumer.run(TwitterStreamImpl.java:552)
I have compiled modified the base example code from twitter4j and I compiled it as such:
$ javac -classpath twitter4j-core-4.0.4.jar:twitter4j-media-support-4.0.4.jar:twitter4j-async-4.0.4.jar:twitter4j-examples-4.0.4.jar:twitter4j-stream-4.0.4.jar PrintFilterLocationStream.java
My code can be found on https://www.dropbox.com/s/gj75fghtqy5jajf/tweity.zip?dl=0
Is it because the v1.1 endpoint doesn't support location?
Without the location filter, it works fine:
$ java -cp .:twitter4j-core-4.0.4.jar:twitter4j-media-support-4.0.4.jar:twitter4j-async-4.0.4.jar:twitter4j-examples-4.0.4.jar:twitter4j-stream-4.0.4.jar PrintFilterLocationStream "Singapore"
[Wed Jul 06 00:15:36 SGT 2016]serialVersionUID: 6175546394599249696
[Wed Jul 06 00:15:36 SGT 2016]debug: true
[Wed Jul 06 00:15:36 SGT 2016]user: null
[Wed Jul 06 00:15:36 SGT 2016]password: null
[Wed Jul 06 00:15:36 SGT 2016]httpConf: MyHttpClientConfiguration{httpProxyHost='null', httpProxyUser='null', httpProxyPassword='null', httpProxyPort=-1, httpConnectionTimeout=20000, httpReadTimeout=120000, prettyDebug=false, gzipEnabled=true}
[Wed Jul 06 00:15:36 SGT 2016]httpStreamingReadTimeout: 40000
[Wed Jul 06 00:15:36 SGT 2016]httpRetryCount: 0
[Wed Jul 06 00:15:36 SGT 2016]httpRetryIntervalSeconds: 5
[Wed Jul 06 00:15:36 SGT 2016]oAuthConsumerKey: XXX
[Wed Jul 06 00:15:36 SGT 2016]oAuthConsumerSecret: **************************************************
[Wed Jul 06 00:15:36 SGT 2016]oAuthAccessToken: XXX
[Wed Jul 06 00:15:36 SGT 2016]oAuthAccessTokenSecret: *********************************************
[Wed Jul 06 00:15:36 SGT 2016]oAuth2TokenType: null
[Wed Jul 06 00:15:36 SGT 2016]oAuth2AccessToken: null
[Wed Jul 06 00:15:36 SGT 2016]oAuth2Scope: null
[Wed Jul 06 00:15:36 SGT 2016]oAuthRequestTokenURL: https://api.twitter.com/oauth/request_token
[Wed Jul 06 00:15:36 SGT 2016]oAuthAuthorizationURL: https://api.twitter.com/oauth/authorize
[Wed Jul 06 00:15:36 SGT 2016]oAuthAccessTokenURL: https://api.twitter.com/oauth/access_token
[Wed Jul 06 00:15:36 SGT 2016]oAuthAuthenticationURL: https://api.twitter.com/oauth/authenticate
[Wed Jul 06 00:15:36 SGT 2016]oAuth2TokenURL: https://api.twitter.com/oauth2/token
[Wed Jul 06 00:15:36 SGT 2016]oAuth2InvalidateTokenURL: https://api.twitter.com/oauth2/invalidate_token
[Wed Jul 06 00:15:36 SGT 2016]restBaseURL: https://api.twitter.com/1.1/
[Wed Jul 06 00:15:36 SGT 2016]streamBaseURL: https://stream.twitter.com/1.1/
[Wed Jul 06 00:15:36 SGT 2016]userStreamBaseURL: https://userstream.twitter.com/1.1/
[Wed Jul 06 00:15:36 SGT 2016]siteStreamBaseURL: https://sitestream.twitter.com/1.1/
[Wed Jul 06 00:15:36 SGT 2016]uploadBaseURL: https://upload.twitter.com/1.1/
[Wed Jul 06 00:15:36 SGT 2016]dispatcherImpl: twitter4j.DispatcherImpl
[Wed Jul 06 00:15:36 SGT 2016]asyncNumThreads: 1
[Wed Jul 06 00:15:36 SGT 2016]loggerFactory: null
[Wed Jul 06 00:15:36 SGT 2016]contributingTo: -1
[Wed Jul 06 00:15:36 SGT 2016]includeMyRetweetEnabled: true
[Wed Jul 06 00:15:36 SGT 2016]includeEntitiesEnabled: true
[Wed Jul 06 00:15:36 SGT 2016]trimUserEnabled: false
[Wed Jul 06 00:15:36 SGT 2016]jsonStoreEnabled: false
[Wed Jul 06 00:15:36 SGT 2016]mbeanEnabled: false
[Wed Jul 06 00:15:36 SGT 2016]userStreamRepliesAllEnabled: false
[Wed Jul 06 00:15:36 SGT 2016]userStreamWithFollowingsEnabled: true
[Wed Jul 06 00:15:36 SGT 2016]stallWarningsEnabled: true
[Wed Jul 06 00:15:36 SGT 2016]applicationOnlyAuthEnabled: false
[Wed Jul 06 00:15:36 SGT 2016]mediaProvider: TWITTER
[Wed Jul 06 00:15:36 SGT 2016]mediaProviderAPIKey: null
[Wed Jul 06 00:15:36 SGT 2016]mediaProviderParameters: null
[Wed Jul 06 00:15:36 SGT 2016]daemonEnabled: true
[Wed Jul 06 00:15:36 SGT 2016]instances: [ConfigurationBase{debug=true, user='null', password='null', httpConf=MyHttpClientConfiguration{httpProxyHost='null', httpProxyUser='null', httpProxyPassword='null', httpProxyPort=-1, httpConnectionTimeout=20000, httpReadTimeout=120000, prettyDebug=false, gzipEnabled=true}, httpStreamingReadTimeout=40000, httpRetryCount=0, httpRetryIntervalSeconds=5, oAuthConsumerKey='zptB1VLNbNguInk3HqKHvc55H', oAuthConsumerSecret='8lyjsT2PsIkG5Ada5axh5k7H8B9lOQM67jizv90tSlasrOGun6', oAuthAccessToken='2550568801-AgwQ31S2DgJ6lyVrZSlMPqBEweTnFk4fn17BLH1', oAuthAccessTokenSecret='3yKlKp6fWvuzAQkgthZbXCB5aMOt3vg1nrVlgQDh9atJV', oAuth2TokenType='null', oAuth2AccessToken='null', oAuth2Scope='null', oAuthRequestTokenURL='https://api.twitter.com/oauth/request_token', oAuthAuthorizationURL='https://api.twitter.com/oauth/authorize', oAuthAccessTokenURL='https://api.twitter.com/oauth/access_token', oAuthAuthenticationURL='https://api.twitter.com/oauth/authenticate', oAuth2TokenURL='https://api.twitter.com/oauth2/token', oAuth2InvalidateTokenURL='https://api.twitter.com/oauth2/invalidate_token', restBaseURL='https://api.twitter.com/1.1/', uploadBaseURL='https://upload.twitter.com/1.1/', streamBaseURL='https://stream.twitter.com/1.1/', userStreamBaseURL='https://userstream.twitter.com/1.1/', siteStreamBaseURL='https://sitestream.twitter.com/1.1/', dispatcherImpl='twitter4j.DispatcherImpl', asyncNumThreads=1, loggerFactory='null', contributingTo=-1, includeMyRetweetEnabled=true, includeEntitiesEnabled=true, trimUserEnabled=false, jsonStoreEnabled=false, mbeanEnabled=false, userStreamRepliesAllEnabled=false, userStreamWithFollowingsEnabled=true, stallWarningsEnabled=true, applicationOnlyAuthEnabled=false, mediaProvider='TWITTER', mediaProviderAPIKey='null', mediaProviderParameters=null, daemonEnabled=true}]
[Wed Jul 06 00:15:36 SGT 2016]Establishing connection.
[Wed Jul 06 00:15:36 SGT 2016]Twitter Stream consumer-1[Establishing connection]
[Wed Jul 06 00:15:37 SGT 2016]Request:
[Wed Jul 06 00:15:37 SGT 2016]POST https://stream.twitter.com/1.1/statuses/filter.json
[Wed Jul 06 00:15:37 SGT 2016]OAuth base string: POST&https%3A%2F%2Fstream.twitter.com%2F1.1%2Fstatuses%2Ffilter.json&count%3D0%26oauth_consumer_key%3DzptB1VLNbNguInk3HqKHvc55H%26oauth_nonce%3D749948799%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1467735337%26oauth_token%3D2550568801-AgwQ31S2DgJ6lyVrZSlMPqBEweTnFk4fn17BLH1%26oauth_version%3D1.0%26stall_warnings%3Dtrue%26track%3DSingapore
[Wed Jul 06 00:15:37 SGT 2016]OAuth signature: g9tQwPICKe2EsuZ2EPJ2Mv4AblE=
[Wed Jul 06 00:15:37 SGT 2016]Authorization: **********************************************************************************************************************************************************************************************************************************************************************************
[Wed Jul 06 00:15:37 SGT 2016]X-Twitter-Client-Version: 4.0.4
[Wed Jul 06 00:15:37 SGT 2016]X-Twitter-Client-URL: http://twitter4j.org/en/twitter4j-4.0.4.xml
[Wed Jul 06 00:15:37 SGT 2016]X-Twitter-Client: Twitter4J
[Wed Jul 06 00:15:37 SGT 2016]User-Agent: twitter4j http://twitter4j.org/ /4.0.4
[Wed Jul 06 00:15:37 SGT 2016]Connection: close
[Wed Jul 06 00:15:37 SGT 2016]Accept-Encoding: gzip
[Wed Jul 06 00:15:37 SGT 2016]Post Params: count=0&track=Singapore&stall_warnings=true
[Wed Jul 06 00:15:41 SGT 2016]Response:
[Wed Jul 06 00:15:41 SGT 2016]date: Tue, 05 Jul 2016 16:15:38 GMT
[Wed Jul 06 00:15:41 SGT 2016]HTTP/1.1 200 OK
[Wed Jul 06 00:15:41 SGT 2016]server: tsa
[Wed Jul 06 00:15:41 SGT 2016]transfer-encoding: chunked
[Wed Jul 06 00:15:41 SGT 2016]x-connection-hash: e3e1c8a44e63290ee879f576ba038d89
[Wed Jul 06 00:15:41 SGT 2016]content-type: application/json
[Wed Jul 06 00:15:41 SGT 2016]connection: close
[Wed Jul 06 00:15:41 SGT 2016]content-Encoding: gzip
[Wed Jul 06 00:15:41 SGT 2016]Connection established.
[Wed Jul 06 00:15:41 SGT 2016]Receiving status stream.
[Wed Jul 06 00:15:41 SGT 2016]Twitter Stream consumer-1[Receiving stream]
[Wed Jul 06 00:15:42 SGT 2016]Received:{"extended_entities":{"media":[{"display_url":"pic.twitter.com/JIj8bGhdQG","source_user_id":1011604327,"type":"video","media_url":"http://pbs.twimg.com/ext_tw_video_thumb/747254503640948736/pu/img/Rgn5TCJHfPTmvias.jpg","source_status_id":747254708255940609,"url":"","indices":[109,132],"sizes":{"small":{"w":340,"h":604,"resize":"fit"},"large":{"w":360,"h":640,"resize":"fit"},"thumb":{"w":150,"h":150,"resize":"crop"},"medium":{"w":360,"h":640,"resize":"fit"}},"id_str":"747254503640948736","expanded_url":"http://twitter.com/missgerrard/status/747254708255940609/video/1","source_status_id_str":"747254708255940609","media_url_https":"https://pbs.twimg.com/ext_tw_video_thumb/747254503640948736/pu/img/Rgn5TCJHfPTmvias.jpg","id":747254503640948736,"source_user_id_str":"1011604327","video_info":{"aspect_ratio":[9,16],"duration_millis":18467,"variants":[{"content_type":"video/mp4","bitrate":320000,"url":"https://video.twimg.com/ext_tw_video/747254503640948736/pu/vid/180x320/QZlqdGzyH822t3ap.mp4"},{"content_type":"application/dash+xml","url":"https://video.twimg.com/ext_tw_video/747254503640948736/pu/pl/M--8lK60Ire7nnAU.mpd"},{"content_type":"application/x-mpegURL","url":"https://video.twimg.com/ext_tw_video/747254503640948736/pu/pl/M--8lK60Ire7nnAU.m3u8"},{"content_type":"video/mp4","bitrate":832000,"url":"https://video.twimg.com/ext_tw_video/747254503640948736/pu/vid/360x640/-v1mnPdAGvM0EYbH.mp4"}]}}]},"in_reply_to_status_id_str":null,"in_reply_to_status_id":null,"created_at":"Tue Jul 05 16:15:41 +0000 2016","in_reply_to_user_id_str":null,"source":"<a href=\"http://twitter.com/download/iphone\" rel=\"nofollow\">Twitter for iPhone<\/a>","retweeted_status":{"extended_entities":{"media":[{"display_url":"pic.twitter.com/JIj8bGhdQG","indices":[92,115],"sizes":{"small":{"w":340,"h":604,"resize":"fit"},"large":{"w":360,"h":640,"resize":"fit"},"thumb":{"w":150,"h":150,"resize":"crop"},"medium":{"w":360,"h":640,"resize":"fit"}},"id_str":"747254503640948736","expanded_url":"http://twitter.com/missgerrard/status/747254708255940609/video/1","media_url_https":"https://pbs.twimg.com/ext_tw_video_thumb/747254503640948736/pu/img/Rgn5TCJHfPTmvias.jpg","id":747254503640948736,"type":"video","media_url":"http://pbs.twimg.com/ext_tw_video_thumb/747254503640948736/pu/img/Rgn5TCJHfPTmvias.jpg","url":"/JIj8bGhdQG","video_info":{"aspect_ratio":[9,16],"duration_millis":18467,"variants":[{"content_type":"video/mp4","bitrate":320000,"url":"https://video.twimg.com/ext_tw_video/747254503640948736/pu/vid/180x320/QZlqdGzyH822t3ap.mp4"},{"content_type":"application/dash+xml","url":"https://video.twimg.com/ext_tw_video/747254503640948736/pu/pl/M--8lK60Ire7nnAU.mpd"},{"content_type":"application/x-mpegURL","url":"https://video.twimg.com/ext_tw_video/747254503640948736/pu/pl/M--8lK60Ire7nnAU.m3u8"},{"content_type":"video/mp4","bitrate":832000,"url":"https://video.twimg.com/ext_tw_video/747254503640948736/pu/vid/360x640/-v1mnPdAGvM0EYbH.mp4"}]}}]},"in_reply_to_status_id_str":null,"in_reply_to_status_id":null,"created_at":"Mon Jun 27 02:26:20 +0000 2016","in_reply_to_user_id_str":null,"source":"<a href=\"http://twitter.com/download/android\" rel=\"nofollow\">Twitter for Android<\/a>","retweet_count":19,"retweeted":false,"geo":null,"filter_level":"low","in_reply_to_screen_name":null,"is_quote_status":false,"id_str":"747254708255940609","in_reply_to_user_id":null,"favorite_count":25,"id":747254708255940609,"text":"Yeay cant wait to see u in singapore Alif Satar 23rd July #diasemanishoney #DiaSemanisHoney https://////JIj8bGhdQG","place":null,"lang":"en","favorited":false,"possibly_sensitive":false,"coordinates":null,"truncated":false,"entities":{"urls":[],"hashtags":[{"indices":[58,74],"text":"diasemanishoney"}],"media":
#ita891210 - RT #Hyukkiss: 130706 SS5 Singapore #WaitingforEunHae https://////9hViCuSA9U
From twitter4j geo streaming latitude/longitude for Hongkong, it seems like it's because I'm using the locations wrongly, if I use the locations from this link https://dev.twitter.com/docs/streaming-apis/parameters#locations, the streaming works fine, e.g.
java -cp .:twitter4j-core-4.0.4.jar:twitter4j-media-support-4.0.4.jar:twitter4j-async-4.0.4.jar:twitter4j-examples-4.0.4.jar:twitter4j-stream-4.0.4.jar PrintFilterLocationStream "{{-126.562500,30.448674},{-61.171875,44.087585}}"
[out]:
[Wed Jul 06 05:27:05 SGT 2016]serialVersionUID: 6175546394599249696
[Wed Jul 06 05:27:05 SGT 2016]debug: true
[Wed Jul 06 05:27:05 SGT 2016]user: null
[Wed Jul 06 05:27:05 SGT 2016]password: null
[Wed Jul 06 05:27:05 SGT 2016]httpConf: MyHttpClientConfiguration{httpProxyHost='null', httpProxyUser='null', httpProxyPassword='null', httpProxyPort=-1, httpConnectionT
imeout=20000, httpReadTimeout=120000, prettyDebug=false, gzipEnabled=true}
[Wed Jul 06 05:27:05 SGT 2016]httpStreamingReadTimeout: 40000
[Wed Jul 06 05:27:05 SGT 2016]httpRetryCount: 0
[Wed Jul 06 05:27:05 SGT 2016]httpRetryIntervalSeconds: 5
[Wed Jul 06 05:27:05 SGT 2016]oAuthConsumerKey: zptB1VLNbNguInk3HqKHvc55H
[Wed Jul 06 05:27:05 SGT 2016]oAuthConsumerSecret: **************************************************
[Wed Jul 06 05:27:05 SGT 2016]oAuthAccessToken: 2550568801-AgwQ31S2DgJ6lyVrZSlMPqBEweTnFk4fn17BLH1
[Wed Jul 06 05:27:05 SGT 2016]oAuthAccessTokenSecret: *********************************************
[Wed Jul 06 05:27:05 SGT 2016]oAuth2TokenType: null
[Wed Jul 06 05:27:05 SGT 2016]oAuth2AccessToken: null
[Wed Jul 06 05:27:05 SGT 2016]oAuth2Scope: null
[Wed Jul 06 05:27:05 SGT 2016]oAuthRequestTokenURL: https://api.twitter.com/oauth/request_token
[Wed Jul 06 05:27:05 SGT 2016]oAuthAuthorizationURL: https://api.twitter.com/oauth/authorize
[Wed Jul 06 05:27:05 SGT 2016]oAuthAccessTokenURL: https://api.twitter.com/oauth/access_token
[Wed Jul 06 05:27:05 SGT 2016]oAuthAuthenticationURL: https://api.twitter.com/oauth/authenticate
[Wed Jul 06 05:27:05 SGT 2016]oAuth2TokenURL: https://api.twitter.com/oauth2/token
[Wed Jul 06 05:27:05 SGT 2016]oAuth2InvalidateTokenURL: https://api.twitter.com/oauth2/invalidate_token
[Wed Jul 06 05:27:05 SGT 2016]restBaseURL: https://api.twitter.com/1.1/
[Wed Jul 06 05:27:05 SGT 2016]streamBaseURL: https://stream.twitter.com/1.1/
[Wed Jul 06 05:27:05 SGT 2016]userStreamBaseURL: https://userstream.twitter.com/1.1/
[Wed Jul 06 05:27:05 SGT 2016]siteStreamBaseURL: https://sitestream.twitter.com/1.1/
[Wed Jul 06 05:27:05 SGT 2016]uploadBaseURL: https://upload.twitter.com/1.1/
[Wed Jul 06 05:27:05 SGT 2016]dispatcherImpl: twitter4j.DispatcherImpl
[Wed Jul 06 05:27:05 SGT 2016]asyncNumThreads: 1
[Wed Jul 06 05:27:05 SGT 2016]loggerFactory: null
[Wed Jul 06 05:27:05 SGT 2016]contributingTo: -1
[Wed Jul 06 05:27:05 SGT 2016]includeMyRetweetEnabled: true
[Wed Jul 06 05:27:05 SGT 2016]includeEntitiesEnabled: true
[Wed Jul 06 05:27:05 SGT 2016]trimUserEnabled: false
[Wed Jul 06 05:27:05 SGT 2016]jsonStoreEnabled: false
[Wed Jul 06 05:27:05 SGT 2016]mbeanEnabled: false
[Wed Jul 06 05:27:05 SGT 2016]userStreamRepliesAllEnabled: false
[Wed Jul 06 05:27:05 SGT 2016]userStreamWithFollowingsEnabled: true
[Wed Jul 06 05:27:05 SGT 2016]stallWarningsEnabled: true
[Wed Jul 06 05:27:05 SGT 2016]applicationOnlyAuthEnabled: false
[Wed Jul 06 05:27:05 SGT 2016]mediaProvider: TWITTER
[Wed Jul 06 05:27:05 SGT 2016]mediaProviderAPIKey: null
[Wed Jul 06 05:27:05 SGT 2016]mediaProviderParameters: null
[Wed Jul 06 05:27:05 SGT 2016]daemonEnabled: true
[Wed Jul 06 05:27:05 SGT 2016]instances: [ConfigurationBase{debug=true, user='null', password='null', httpConf=MyHttpClientConfiguration{httpProxyHost='null', httpProxyU
ser='null', httpProxyPassword='null', httpProxyPort=-1, httpConnectionTimeout=20000, httpReadTimeout=120000, prettyDebug=false, gzipEnabled=true}, httpStreamingReadTimeo
ut=40000, httpRetryCount=0, httpRetryIntervalSeconds=5, oAuthConsumerKey='zptB1VLNbNguInk3HqKHvc55H', oAuthConsumerSecret='8lyjsT2PsIkG5Ada5axh5k7H8B9lOQM67jizv90tSlasrO
Gun6', oAuthAccessToken='2550568801-AgwQ31S2DgJ6lyVrZSlMPqBEweTnFk4fn17BLH1', oAuthAccessTokenSecret='3yKlKp6fWvuzAQkgthZbXCB5aMOt3vg1nrVlgQDh9atJV', oAuth2TokenType='null', oAuth2AccessToken='null', oAuth2Scope='null', oAuthRequestTokenURL='https://api.twitter.com/oauth/request_token', oAuthAuthorizationURL='https://api.twitter.com/oauth/authorize', oAuthAccessTokenURL='https://api.twitter.com/oauth/access_token', oAuthAuthenticationURL='https://api.twitter.com/oauth/authenticate', oAuth2TokenURL='https://api.twitter.com/oauth2/token', oAuth2InvalidateTokenURL='https://api.twitter.com/oauth2/invalidate_token', restBaseURL='https://api.twitter.com/1.1/', uploadBaseURL='https://upload.twitter.com/1.1/', streamBaseURL='https://stream.twitter.com/1.1/', userStreamBaseURL='https://userstream.twitter.com/1.1/', siteStreamBaseURL='https://sitestream.twitter.com/1.1/', dispatcherImpl='twitter4j.DispatcherImpl', asyncNumThreads=1, loggerFactory='null', contributingTo=-1, includeMyRetweetEnabled=true, includeEntitiesEnabled=true, trimUserEnabled=false, jsonStoreEnabled=false, mbeanEnabled=false, userStreamRepliesAllEnabled=false, userStreamWithFollowingsEnabled=true, stallWarningsEnabled=true, applicationOnlyAuthEnabled=false, mediaProvider='TWITTER', mediaProviderAPIKey='null', mediaProviderParameters=null, daemonEnabled=true}]
[Wed Jul 06 05:27:06 SGT 2016]Establishing connection.
[Wed Jul 06 05:27:06 SGT 2016]Twitter Stream consumer-1[Establishing connection]
[Wed Jul 06 05:27:06 SGT 2016]Request:
[Wed Jul 06 05:27:06 SGT 2016]POST https://stream.twitter.com/1.1/statuses/filter.json
[Wed Jul 06 05:27:06 SGT 2016]OAuth base string: POST&https%3A%2F%2Fstream.twitter.com%2F1.1%2Fstatuses%2Ffilter.json&count%3D0%26locations%3D-126.5625%252C30.448674%252C-61.171875%252C44.087585%26oauth_consumer_key%3DzptB1VLNbNguInk3HqKHvc55H%26oauth_nonce%3D2467567040%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1467754026%26oauth_token%3D2550568801-AgwQ31S2DgJ6lyVrZSlMPqBEweTnFk4fn17BLH1%26oauth_version%3D1.0%26stall_warnings%3Dtrue
[Wed Jul 06 05:27:06 SGT 2016]OAuth signature: ccZ0rsHRmt8VMvUzlzZ43QVdSvw=
[Wed Jul 06 05:27:06 SGT 2016]Authorization: ***********************************************************************************************************************************************************************************************************************************************************************************
[Wed Jul 06 05:27:06 SGT 2016]X-Twitter-Client-Version: 4.0.4
[Wed Jul 06 05:27:06 SGT 2016]X-Twitter-Client-URL: http://twitter4j.org/en/twitter4j-4.0.4.xml
[Wed Jul 06 05:27:06 SGT 2016]X-Twitter-Client: Twitter4J
[Wed Jul 06 05:27:06 SGT 2016]User-Agent: twitter4j http://twitter4j.org/ /4.0.4
[Wed Jul 06 05:27:06 SGT 2016]Connection: close
[Wed Jul 06 05:27:06 SGT 2016]Accept-Encoding: gzip
[Wed Jul 06 05:27:06 SGT 2016]Post Params: count=0&locations=-126.5625%2C30.448674%2C-61.171875%2C44.087585&stall_warnings=true
[Wed Jul 06 05:27:07 SGT 2016]Response:
[Wed Jul 06 05:27:07 SGT 2016]date: Tue, 05 Jul 2016 21:27:07 GMT
[Wed Jul 06 05:27:07 SGT 2016]HTTP/1.1 200 OK
[Wed Jul 06 05:27:07 SGT 2016]server: tsa
[Wed Jul 06 05:27:07 SGT 2016]transfer-encoding: chunked
[Wed Jul 06 05:27:07 SGT 2016]x-connection-hash: 129d77a68486c304b7ff69e8c08b1102
[Wed Jul 06 05:27:07 SGT 2016]content-type: application/json
[Wed Jul 06 05:27:07 SGT 2016]connection: close
[Wed Jul 06 05:27:07 SGT 2016]content-Encoding: gzip
[Wed Jul 06 05:27:07 SGT 2016]Connection established.
[Wed Jul 06 05:27:07 SGT 2016]Receiving status stream.
[Wed Jul 06 05:27:07 SGT 2016]Twitter Stream consumer-1[Receiving stream]
[Wed Jul 06 05:27:07 SGT 2016]Received:{"in_reply_to_status_id_str":null,"in_reply_to_status_id":null,"created_at":"Tue Jul 05 21:27:07 +0000 2016","in_reply_to_user_id_str":null,"source":"<a href=\"http://twitter.com/download/iphone\" rel=\"nofollow\">Twitter for iPhone<\/a>","retweet_count":0,"retweeted":false,"geo":null,"filter_level":"low","in_reply_to_screen_name":null,"is_quote_status":false,"id_str":"750440897813155841","in_reply_to_user_id":null,"favorite_count":0,"id":750440897813155841,"text":"so annoyed","place":{"country_code":"US","country":"United States","full_name":"San Diego, CA","bounding_box":{"coordinates":[[[-117.282538,32.53962],[-117.282538,33.080404],[-116.92744,33.080404],[-116.92744,32.53962]]],"type":"Polygon"},"place_type":"city","name":"San Diego","attributes":{},"id":"a592bd6ceb1319f7","url":"https://api.twitter.com/1.1/geo/id/a592bd6ceb1319f7.json"},"lang":"en","favorited":false,"coordinates":null,"truncated":false,"timestamp_ms":"1467754027213","entities":{"urls":[],"hashtags":[],"user_mentions":[],"symbols":[]},"contributors":null,"user":{"utc_offset":-25200,"friends_count":406,"profile_image_url_https":"https://pbs.twimg.com/profile_images/750239874121293824/ncD2YISf_normal.jpg","listed_count":5,"profile_background_image_url":"http://abs.twimg.com/images/themes/theme1/bg.png","default_profile_image":false,"favourites_count":19080,"description":"im an angel","created_at":"Sat Sep 22 01:37:35 +0000 2012","is_translator":false,"profile_background_image_url_https":"https://abs.twimg.com/images/themes/theme1/bg.png","protected":false,"screen_name":"kayexcamille","id_str":"838869294","profile_link_color":"ABB8C2","id":838869294,"geo_enabled":true,"profile_background_color":"000000","lang":"en","profile_sidebar_border_color":"000000","profile_text_color":"000000","verified":false,"profile_image_url":"http://pbs.twimg.com/profile_images/750239874121293824/ncD2YISf_normal.jpg","time_zone":"Arizona","url":null,"contributors_enabled":false,"profile_background_tile":false,"profile_banner_url":"https://pbs.twimg.com/profile_banners/838869294/1467133604","statuses_count":22577,"follow_request_sent":null,"followers_count":787,"profile_use_background_image":false,"default_profile":false,"following":null,"name":"k","location":"San Diego, CA","profile_sidebar_fill_color":"000000","notifications":null}}
#kayexcamille - so annoyed