android font not showing

I recently changed my app from using to hosted in and now the font is not showing properly.
i’ve included abel.ttf in font/ using google’s add font to project option

apply plugin: ''

android {
compileSdkVersion 26
defaultConfig {
    applicationId "com.baros.barosserver"
    minSdkVersion 19
    targetSdkVersion 26
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner ""
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), ''


dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation ''
implementation ''
implementation ''
implementation ''
testImplementation 'junit:junit:4.12'
androidTestImplementation ''
androidTestImplementation ''
compile 'com.journeyapps:zxing-android-embedded:3.5.0'


using the font in my project.

Why retrofit Authenticator is not called?

I want to change response from server to 423 -> 401, and then call refreshToken by using Authenticator.

The method is called if response code is 401

But why the method Authenticator.authenticate(Route route, Response response) is not called in my case?


OkHttpClient httpClient = new OkHttpClient.Builder()
            .connectTimeout(10, TimeUnit.SECONDS)
            .writeTimeout(60, TimeUnit.SECONDS)
            .readTimeout(60, TimeUnit.SECONDS)
            .addInterceptor(new Interceptor() {
                public Response intercept(Chain chain) throws IOException {
                    //Adding token to request
                    Request request = chain.request();
                    Request.Builder builder = request.newBuilder();
                    builder.header("Authorization", "access_token");
                    return chain.proceed(;
            .addInterceptor(new Interceptor() {
                public Response intercept(Chain chain) throws IOException {
                    //changing response code from server 423 -> 401
                    Request request = chain.request();
                    Response response = chain.proceed(request);
                    if (response.code() == 423)
                        return response.newBuilder().code(401).build();
                    return response;
            .authenticator(new Authenticator() {
                //THE METHOD IS NOT CALLED, WHY?
                public Request authenticate(Route route, Response response) throws IOException {
                    // Refresh access_token using a synchronous api request
                    String newAccessToken = refreshToken();
                    // Add new header to rejected request and retry it
                    return response.request().newBuilder()
                            .header("Authorization", newAccessToken)

Retrofit interface:

 ApiService mApiService = new Retrofit.Builder()

error with hibernate update property

I am very new to hibernate and java

I am working on an assignment and everything was working fine but then the teacher asked me to change

<property name="">create</property>


<property name="">update</property>

and now I am receiving the following error after the first attempt to write on the Database,

org.hibernate.hql.internal.QueryTranslatorFactoryInitiator initiateService

INFO: HHH000397: Using ASTQueryTranslatorFactory

I am really not sure what is the problem and how to fix it, I know that create is used to create the tables if they are not already created before and that update only update the already exists tables. But i am not sure why I am getting this problem.

I am using hibernate with mysql on Mac

cannot find activator-launcher during ci pipeline

i’m currently using play 2.3.X and i’m trying to implement continues integration in my project with gitlab.

I installed oracle java on my red hat server, as well as activator (offline – my server is not connected to the internet).
when i’m copying the project to the server and executing “activator clean” everything works fine, but through the ci pipeline i get the following message:

 Getting com.typesafe.activator activator-launcher 1.2.12 ...

:: problems summary ::
        module not found: com.typesafe.activator#activator-launcher;1.2.12

    ==== local: tried


      -- artifact com.typesafe.activator#activator-launcher;1.2.12!activator-launcher.jar:


    ==== activator-launcher-local: tried


    ==== Maven Central: tried

      -- artifact com.typesafe.activator#activator-launcher;1.2.12!activator-launcher.jar:

    ==== typesafe-releases: tried

      -- artifact com.typesafe.activator#activator-launcher;1.2.12!activator-launcher.jar:

    ==== typesafe-ivy-releasez: tried


        ::          UNRESOLVED DEPENDENCIES         ::


        :: com.typesafe.activator#activator-launcher;1.2.12: not found


    Server Access Error: Connection timed out

unresolved dependency: com.typesafe.activator#activator-launcher;1.2.12: not found
Error during sbt execution: Error retrieving required libraries
  (see /home/j3d/.sbt/boot/update.log for complete log)
Error: Could not retrieve activator-launcher 1.2.12

anybody knows what it the problem?

thanks in advance,

Using TimeZone.getDefault(), what does your device return?

What will be the value of getDisplayName(false, TimeZone.SHORT)?

I reckon the value is GMToffset, for example in Singapore it will be GMT+08:00.

However, on one device (Google Pixel 2 XL) I am getting SGT.

Why the difference? Could it be Android Oreo or perhaps the SIM card supplying a network-provided time zone? I also thought that such abbreviations or 3/4 letter ids are deprecated already.

Skipping @Param as List in @Query if is null in Spring Data JPA : antlr.NoViableAltException: unexpected AST node

@Query(value = "select count(distinct d.documentId) " +
        "from TrainingDocument d " +
        "where d.language = :language " +
        "and (:docTypes is null or d.documentTypeName in :docTypes )" +
        "and d.documentId in (" +
        "select documentId from TrainingExampleTag " +
        "where (:extract is null or value = :extract) " +
        "group by documentId)")
Long countDocumentByLangTypeExtract(
        @Param("language") String language,
        @Param("docTypes") List<String> docTypes,
        @Param("extract") String value);

I have a query above, where I check parameters whether there are null or not. With String it works fine, but when I add skipping @Param("docTypes") List<String> docTypes if it is null I got:

org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected AST node: {vector} [select count(distinct d.documentId) from d where d.language = :language and (:docTypes_0_, :docTypes_1_ is null or d.documentTypeName in (:docTypes_0_, :docTypes_1_) )and d.documentId in (select documentId from where (:extract is null or value = :extract) group by documentId)]
    at org.hibernate.hql.internal.ast.QuerySyntaxException.convert( ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
    at org.hibernate.hql.internal.ast.ErrorCounter.throwQueryException( ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
    at org.hibernate.hql.internal.ast.QueryTranslatorImpl.analyze( ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
    at org.hibernate.hql.internal.ast.QueryTranslatorImpl.doCompile( ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
    at org.hibernate.hql.internal.ast.QueryTranslatorImpl.compile( ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
    at org.hibernate.engine.query.spi.HQLQueryPlan.( ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
    at org.hibernate.engine.query.spi.HQLQueryPlan.( ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
    at org.hibernate.engine.query.spi.QueryPlanCache.getHQLQueryPlan( ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
    at org.hibernate.internal.AbstractSessionImpl.getHQLQueryPlan( ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
    at org.hibernate.internal.SessionImpl.list( ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
    at org.hibernate.internal.QueryImpl.list( ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
    at org.hibernate.jpa.internal.QueryImpl.list( ~[hibernate-entitymanager-5.0.12.Final.jar:5.0.12.Final]
    at org.hibernate.jpa.internal.QueryImpl.getSingleResult( ~[hibernate-entitymanager-5.0.12.Final.jar:5.0.12.Final]

As soon as I change and (:docTypes is null or d.documentTypeName in :docTypes ) to and d.documentTypeName in :docTypes it works fine.

I already found this solution How to skip @Param in @Query if is null or empty in Spring Data JPA
It describes my case but doesn’t work for me.
I’m using spring-boot 1.5.9.RELEASE

Transfer java variable to php post request

include 'connectDatabase.php';

    //Retrive Data
    $g = $_POST["g1"];

    //Insert data into database
    mysql_query("INSERT INTO g1 (g1) VALUES ('$g')") or die(mysql_error());


Anyone know how to write a java code such that the java variable can be posted to the database using the php code shown above?

Why do I get a HelpSetException – NoClassDefFoundError when trying to run a Swing desktop application?

The application and the help system runs ok from the netbeans IDE but when deployed the exception is returned on the help set. I have checked that the three help jars jh.har, jhall.jar and jhbasic.jar are in the project > Properties > Libraries > Compiling. I have checked the contents of the distribution created from the NetBeans and verified that the three help files are in the lib folder. I have checked and verified that the Windows 8.1 CLASSPATH includes:

    CLASSPATH=C:Program FilesJavajdk1.8.0_72bin; 

This is the dump from the run:

    C:Program Files (x86)NewDawn4>java -jar Newdawn.jar
    Error: A JNI error has occurred, please check your installation and try again
    Exception in thread "main" java.lang.NoClassDefFoundError: javax/help/HelpSetException
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
    at java.lang.Class.privateGetMethodRecursive(Unknown Source)
    at java.lang.Class.getMethod0(Unknown Source)
    at java.lang.Class.getMethod(Unknown Source)
    at sun.launcher.LauncherHelper.validateMainClass(Unknown Source)
    at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
    Caused by: java.lang.ClassNotFoundException:
    at Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 7 more 

Having researched this problem in depth and followed the recommendations of others, I am still without a solution and unable to see what I am doing wrong.