Generator-jhipster: App with Elasticsearch doesn't work out-of-the-box with Heroku

Created on 19 Jun 2018  Â·  29Comments  Â·  Source: jhipster/generator-jhipster

Overview of the issue

I'm adding this issue because I believe @jkutner did work recently to make it so Elasticsearch was automatically configured when you deploy an app to Heroku. I see the following on startup, so I'm guessing provisioning Elasticseach is working.

2018-06-19T14:16:28.440721+00:00 app[api]: Attach SEARCHBOX (@ref:searchbox-adjacent-53104) by user [email protected]
However, when my app starts up, it fails to connect to this instance, and all CRUD functionality is broken.
2018-06-19T14:24:38.262001+00:00 app[web.1]: 2018-06-19 14:24:38.261 ERROR 4 --- [           main] .d.e.r.s.AbstractElasticsearchRepository : failed to load elasticsearch nodes : org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available: [{#transport#-1}{hR944JNITnub8FEFr6wLEQ}{localhost}{127.0.0.1:9300}]
2018-06-19T14:24:38.561165+00:00 app[web.1]: 2018-06-19 14:24:38.560 ERROR 4 --- [           main] .d.e.r.s.AbstractElasticsearchRepository : failed to load elasticsearch nodes : org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available: [{#transport#-1}{hR944JNITnub8FEFr6wLEQ}{localhost}{127.0.0.1:9300}]
2018-06-19T14:24:39.424443+00:00 app[web.1]: 2018-06-19 14:24:39.424 ERROR 4 --- [           main] .d.e.r.s.AbstractElasticsearchRepository : failed to load elasticsearch nodes : org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available: [{#transport#-1}{hR944JNITnub8FEFr6wLEQ}{localhost}{127.0.0.1:9300}]
2018-06-19T14:24:39.730791+00:00 app[web.1]: 2018-06-19 14:24:39.730 ERROR 4 --- [           main] .d.e.r.s.AbstractElasticsearchRepository : failed to load elasticsearch nodes : org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available: [{#transport#-1}{hR944JNITnub8FEFr6wLEQ}{localhost}{127.0.0.1:9300}]
2018-06-19T14:24:46.976031+00:00 app[web.1]: 2018-06-19 14:24:46.975  INFO 4 --- [           main] com.okta.developer.GalleryApp            : Started GalleryApp in 44.913 seconds (JVM running for 46.471)
##### **Motivation for or Use Case** I expected Elasticsearch to work on Heroku, without any configuration changes. Kinda like PostgreSQL does. ##### **Reproduce the error** Create a v5 project with Elasticsearch and deploy it to Heroku. ##### **JHipster Version(s)**
[email protected] /home/mraible/gallery
└── (empty)

##### **JHipster configuration, a `.yo-rc.json` file generated in the root folder**
.yo-rc.json file
{
  "generator-jhipster": {
    "promptValues": {
      "packageName": "com.okta.developer",
      "nativeLanguage": "en"
    },
    "jhipsterVersion": "5.0.0-beta.3",
    "applicationType": "monolith",
    "baseName": "gallery",
    "packageName": "com.okta.developer",
    "packageFolder": "com/okta/developer",
    "serverPort": "8080",
    "authenticationType": "oauth2",
    "cacheProvider": "ehcache",
    "enableHibernateCache": true,
    "websocket": false,
    "databaseType": "sql",
    "devDatabaseType": "h2Disk",
    "prodDatabaseType": "postgresql",
    "searchEngine": "elasticsearch",
    "messageBroker": false,
    "serviceDiscoveryType": false,
    "buildTool": "maven",
    "enableSwaggerCodegen": false,
    "clientFramework": "react",
    "useSass": false,
    "clientPackageManager": "yarn",
    "testFrameworks": [
      "protractor"
    ],
    "jhiPrefix": "jhi",
    "enableTranslation": true,
    "nativeLanguage": "en",
    "languages": [
      "en",
      "fr"
    ],
    "herokuDeployType": "git"
  }
}

JDL for the Entity configuration(s) entityName.json files generated in the .jhipster directory


JDL entity definitions

entity Album (album) {
  title String required,
  description TextBlob,
  created Instant
}
entity Photo (photo) {
  title String required,
  description TextBlob,
  image ImageBlob required,
  takenOn Instant,
  uploadedOn Instant
}
entity Tag (tag) {
  name String required minlength(2)
}
relationship ManyToOne {
  Album{user(login)} to User,
  Photo{album(title)} to Album
}
relationship ManyToMany {
  Photo{tag(name)} to Tag{photo}
}

paginate Album with pagination
paginate Photo, Tag with infinite-scroll

Environment and Tools

java version "1.8.0_171"
Java(TM) SE Runtime Environment (build 1.8.0_171-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.171-b11, mixed mode)

git version 2.17.0

node: v8.10.0

npm: 6.1.0

yarn: 1.6.0

Docker version 18.05.0-ce, build f150324

docker-compose version 1.13.0, build 1719ceb

$100 area Heroku

Most helpful comment

I can't believe all this:

  • Not being able to work with an embedded version of Elasticsearch is really annoying.
  • Not being to use the REST API is crazy, that's just the whole idea of Elasticsearch from the start.

So if Spring Data Jest solves both of those issues, let's use it. But I'm worried to add one more library, with probably a lot of dependencies. Besides, the project isn't very popular (105 stars at the moment), and is not an official Spring Data project, so this means we might have trouble in the future if it's not well maintained.

All 29 comments

It looks like this can't be fixed until the spring-data-elasticsearch lib offers support for the Elasticsearch REST API. Here are some relevant links:

As an alternative, we could integration Jest into JHipster.

I'm working on a project with JHipster and Elasticsearch in macOS. In development mode, it went fine with version 4.14.4. Using the same profile, version 5.0.0 doesn't work, it shows the same errors @mraible described.

I've installed a standalone Elasticsearch server (brew install elasticsearch), edited /usr/local/etc/elasticsearch/elasticsearch.yml to change cluster.name to elasticsearch and started the server with elasticsearch. After that the application launches in development mode without errors.

Please let me know if there is anything else I can help with.

Version 5.0.1 shows the same behaviour.

I had a problem with elasticsearch in AWS and most elasticsearch PaaS available. The only option is to use JEST, and then spring-data-jest instead of default spring's data-elasticsearch.

@jkutner how did you make elasticsearch works out of the box in heroku? Did you pick any Heroku's add-ons (bonsai, searchly) and then "add" it after dyno initialized?

This issue does not affect Heroku only. It affects AWS also. However now with JHipster v5, it affects development mode as well.

@ernsyn : just tried in dev, it works fine for me. But I use the elasticsearch.yml docker-compose file to start my Elasticsearch, which contains: command: -Enetwork.host=0.0.0.0 -Ediscovery.type=single-node

So maybe it's related to this, as we used some specific options to start Elasticsearch.

@pascalgrimaud: You started an ES instance manually? Or did I misunderstood you.

As for me, in previous versions, I did not need to start any ES instance manually in dev mode and it all works fine. I'm guessing this issue is due to the use of a newer version of ES hence the error. As suggested in above comments, using https://github.com/VanRoy/spring-data-jest fixes the problem.

Would be nice if this issue can be fixed so that the default project created using JHipster v5 with ES works again without manually starting any ES instance in dev mode.

The following is what I find
jHipster v <5** was using **Elasticsearch** **v 2.x** which had support for Elasticsearch in embedded mode (that's the reason we didn't need an instance of Elasticsearch running outside.)
With **jHipster** **v >= 5
the Elasticsearch has been upgraded to v 5.x (as a part of upgrade to spring-boot 2.x) which dropped embedded Elasticsearch, so it needs an instance running outside.
Any jHipster app with elasticsearch when started with _docker-compose_ didn't have any impact as it was starting Elasticsearch in docker container and not relying on embedded elasticsearch.

Now, when it comes to the issue with Heroku deployment, the respective sub-generator points the app to a real postgres db instance in the case of postgres, which does not happen with elasticsearch which became a problem with jHipster v >= 5

I haven't looked into the latest version of heroku sub-generator, But, I believe a lib like the following might be helpful in proving Elasticsearch which seems to have support for v 5.x
https://github.com/allegro/embedded-elasticsearch

I deployed a JHipster 5.1.0 app to Heroku this evening and while it does provision the searchbox add-on and set its config for the app (SEARCHBOX_SSL_URL and SEARCHBOX_URL variables), but the app still fails to find Elasticsearch.

I tried overriding the cluster nodes with the following:

heroku config:set SPRING_DATA_ELASTICSEARCH_CLUSTER_NODES=https://paas:[email protected]

But this fails with:

java.net.UnknownHostException: https://paas: Name or service not known

The searchbox docs seem to indicate there's more that's needed.

In the meantime, I've added the following to my app's application-heroku.yml as a workaround.

spring:
    data:
        elasticsearch:
            cluster-name:
            cluster-nodes:
            properties:
                path:
                    logs: target/elasticsearch/log
                    data: target/elasticsearch/data

The workaround I mentioned above does not work. I'd like to solve this for my 21-Points Health app that runs on Heroku. It seems the best way is to use spring-data-jest. I'll start this today and see how far I get. Let me know if you think there's a better path!

@mraible I think that's a good plan. There are a lot of environments where the Elasticsearch REST interface is required or preferred, so this would put JHipster is a better spot in general. Let me know if I can help.

I was able to integrate Spring Data Jest and get everything working locally tonight. One cool thing I discovered is this library creates an embedded Elasticsearch server, so we could use it to restore the same behavior we had previously. I believe you could even run it with this mode on Heroku. However, that's probably not a good idea since it runs in the same JVM.

I was unable to get it to work when talking over HTTP to the Elasticsearch docker container, or to the Searchbox add-in on Heroku. I documented my findings in an issue I created in the spring-data-jest project.

I was able to fix part of my problem by deleting JHipster's ElasticSearchConfiguration.java class.

package org.jhipster.health.config;

import java.io.IOException;

import org.elasticsearch.client.Client;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.autoconfigure.data.elasticsearch.ElasticsearchProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.elasticsearch.core.ElasticsearchTemplate;
import org.springframework.data.elasticsearch.core.EntityMapper;
import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder;

import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;

@Configuration
@EnableConfigurationProperties(ElasticsearchProperties.class)
@ConditionalOnProperty("spring.data.elasticsearch.cluster-nodes")
public class ElasticsearchConfiguration {

    @Bean
    public ElasticsearchTemplate elasticsearchTemplate(Client client, Jackson2ObjectMapperBuilder jackson2ObjectMapperBuilder) {
        return new ElasticsearchTemplate(client, new CustomEntityMapper(jackson2ObjectMapperBuilder.createXmlMapper(false).build()));
    }

    public class CustomEntityMapper implements EntityMapper {

        private ObjectMapper objectMapper;

        public CustomEntityMapper(ObjectMapper objectMapper) {
            this.objectMapper = objectMapper;
            objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
            objectMapper.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true);
        }

        @Override
        public String mapToString(Object object) throws IOException {
            return objectMapper.writeValueAsString(object);
        }

        @Override
        public <T> T mapToObject(String source, Class<T> clazz) throws IOException {
            return objectMapper.readValue(source, clazz);
        }
    }
}

I'm able to connect locally now. However, when I try to connect to my searchbox URL, I get a 409: too many requests.

2018-08-20 07:21:14.862  INFO 16939 --- [  restartedMain] io.searchbox.client.AbstractJestClient   : Setting server pool to a list of 1 servers: [https://paas:[email protected]]
2018-08-20 07:21:14.864  INFO 16939 --- [  restartedMain] io.searchbox.client.JestClientFactory    : Using multi thread/connection supporting pooling connection manager
2018-08-20 07:21:14.958  INFO 16939 --- [  restartedMain] io.searchbox.client.JestClientFactory    : Using default GSON instance
2018-08-20 07:21:14.958  INFO 16939 --- [  restartedMain] io.searchbox.client.JestClientFactory    : Node Discovery disabled...
2018-08-20 07:21:14.958  INFO 16939 --- [  restartedMain] io.searchbox.client.JestClientFactory    : Idle connection reaping disabled...
2018-08-20 07:21:15.333 DEBUG 16939 --- [  restartedMain] o.jhipster.health.config.WebConfigurer   : Registering CORS filter
2018-08-20 07:21:15.457  INFO 16939 --- [  restartedMain] o.jhipster.health.config.WebConfigurer   : Web application configuration, using profiles: dev
2018-08-20 07:21:15.457 DEBUG 16939 --- [  restartedMain] o.jhipster.health.config.WebConfigurer   : Initializing Metrics registries
2018-08-20 07:21:15.461 DEBUG 16939 --- [  restartedMain] o.jhipster.health.config.WebConfigurer   : Registering Metrics Filter
2018-08-20 07:21:15.461 DEBUG 16939 --- [  restartedMain] o.jhipster.health.config.WebConfigurer   : Registering Metrics Servlet
2018-08-20 07:21:15.464 DEBUG 16939 --- [  restartedMain] o.jhipster.health.config.WebConfigurer   : Initialize H2 console
2018-08-20 07:21:15.466  INFO 16939 --- [  restartedMain] o.jhipster.health.config.WebConfigurer   : Web application fully configured
2018-08-20 07:21:16.522 DEBUG 16939 --- [  restartedMain] io.searchbox.client.http.JestHttpClient  : HEAD method created based on client request
2018-08-20 07:21:16.523 DEBUG 16939 --- [  restartedMain] io.searchbox.client.http.JestHttpClient  : Request method=HEAD url=https://paas:[email protected]/user
2018-08-20 07:21:17.102 DEBUG 16939 --- [  restartedMain] io.searchbox.action.AbstractAction       : Request and operation succeeded
2018-08-20 07:21:17.173 DEBUG 16939 --- [  restartedMain] io.searchbox.client.http.JestHttpClient  : PUT method created based on client request
2018-08-20 07:21:17.178 DEBUG 16939 --- [  restartedMain] io.searchbox.client.http.JestHttpClient  : Request method=PUT url=https://paas:[email protected]/user/user/_mapping
2018-08-20 07:21:17.317 DEBUG 16939 --- [  restartedMain] io.searchbox.action.AbstractAction       : Request and operation succeeded
2018-08-20 07:21:17.621 DEBUG 16939 --- [  restartedMain] io.searchbox.client.http.JestHttpClient  : HEAD method created based on client request
2018-08-20 07:21:17.622 DEBUG 16939 --- [  restartedMain] io.searchbox.client.http.JestHttpClient  : Request method=HEAD url=https://paas:[email protected]/bloodpressure
2018-08-20 07:21:17.756 DEBUG 16939 --- [  restartedMain] io.searchbox.action.AbstractAction       : Request and operation succeeded
2018-08-20 07:21:17.756 DEBUG 16939 --- [  restartedMain] io.searchbox.client.http.JestHttpClient  : PUT method created based on client request
2018-08-20 07:21:17.757 DEBUG 16939 --- [  restartedMain] io.searchbox.client.http.JestHttpClient  : Request method=PUT url=https://paas:[email protected]/bloodpressure/bloodpressure/_mapping
2018-08-20 07:21:17.892 DEBUG 16939 --- [  restartedMain] io.searchbox.action.AbstractAction       : Request and operation succeeded
2018-08-20 07:21:17.973 DEBUG 16939 --- [  restartedMain] io.searchbox.client.http.JestHttpClient  : HEAD method created based on client request
2018-08-20 07:21:17.973 DEBUG 16939 --- [  restartedMain] io.searchbox.client.http.JestHttpClient  : Request method=HEAD url=https://paas:[email protected]/points
2018-08-20 07:21:18.109 DEBUG 16939 --- [  restartedMain] io.searchbox.action.AbstractAction       : Response is failed. errorMessage is 404 Not Found
2018-08-20 07:21:18.110 DEBUG 16939 --- [  restartedMain] c.g.v.s.jest.mapper.DefaultErrorMapper   : Cannot execute jest action , response code : 404 , error : 404 Not Found , message : null
2018-08-20 07:21:18.114 DEBUG 16939 --- [  restartedMain] io.searchbox.client.http.JestHttpClient  : PUT method created based on client request
2018-08-20 07:21:18.114 DEBUG 16939 --- [  restartedMain] io.searchbox.client.http.JestHttpClient  : Request method=PUT url=https://paas:[email protected]/points
2018-08-20 07:21:18.250 DEBUG 16939 --- [  restartedMain] io.searchbox.action.AbstractAction       : Response is failed. errorMessage is 429 Too Many Requests
2018-08-20 07:21:18.250 ERROR 16939 --- [  restartedMain] c.g.v.s.jest.mapper.DefaultErrorMapper   : Cannot execute jest action , response code : 429 , error : 429 Too Many Requests , message : null
2018-08-20 07:21:18.256 DEBUG 16939 --- [  restartedMain] c.e.c.E.j.health.domain.BloodPressure    : Close successful.
2018-08-20 07:21:18.257 DEBUG 16939 --- [  restartedMain] c.e.c.E.jhipster.health.domain.User      : Close successful.
2018-08-20 07:21:18.257 DEBUG 16939 --- [  restartedMain] c.e.c.E.j.health.domain.Preferences      : Close successful.
2018-08-20 07:21:18.258 DEBUG 16939 --- [  restartedMain] c.e.c.E.jhipster.health.domain.Weight    : Close successful.
2018-08-20 07:21:18.258 DEBUG 16939 --- [  restartedMain] c.e.c.E.jhipster.health.domain.Points    : Close successful.
2018-08-20 07:21:18.258 DEBUG 16939 --- [  restartedMain] c.e.c.E.j.health.domain.Authority        : Close successful.
2018-08-20 07:21:18.259 DEBUG 16939 --- [  restartedMain] c.e.c.E.j.h.domain.User.authorities      : Close successful.
2018-08-20 07:21:18.259 DEBUG 16939 --- [  restartedMain] c.ehcache.core.Ehcache-usersByEmail      : Close successful.
2018-08-20 07:21:18.260 DEBUG 16939 --- [  restartedMain] c.ehcache.core.Ehcache-usersByLogin      : Close successful.
07:21:18.297 [restartedMain] ERROR org.springframework.boot.SpringApplication - Application run failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'pointsResource' defined in file [/home/mraible/dev/21-points/build/classes/java/main/org/jhipster/health/web/rest/PointsResource.class]: Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pointsSearchRepository': Invocation of init method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.elasticsearch.repository.support.NumberKeyedRepository]: Constructor threw exception; nested exception is com.github.vanroy.springdata.jest.exception.JestElasticsearchException: Cannot execute jest action , response code : 429 , error : 429 Too Many Requests , message : null

@mraible is that from searchbox? I wonder if they're rate-limiting in the free addon.

@jkutner Yes. It seems they are rate limiting. From googling, it seems to be 6 requests per second. If I upgrade to micro ($9/month), it still happens. If I upgrade to small ($19/month), it works.

$ heroku addons:upgrade searchbox:small
Changing searchbox-clear-46121 on health-by-points-3 from searchbox:micro to searchbox:small... done, $19/month

@jkutner I tried it with Bonsai Elasticsearch and it works with the sandbox (free) tier! :)

@mraible as a means of reducing the number of requests, maybe try setting multiThreaded=false in the spring-data-jest config? Or reduce maxTotalConnection, which looks to be 50 by default

@mraible re: Bonsai, that's even better.

Bonsai definitely seems better. They send you emails with helpful
information when you signup.

On Mon, Aug 20, 2018 at 7:51 AM Joe Kutner notifications@github.com wrote:

@mraible https://github.com/mraible re: Bonsai, that's even better.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/7810#issuecomment-414323373,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABF5K3qwLCHyIVAc1o-UUTRXEuqksbEks5uSr7VgaJpZM4Utocn
.

@jkutner FWIW, here's the changes I needed to make in my 21-Points Health app. Most of these are already made by the Heroku plugin. Do you have time to make modifications to the Heroku sub-generator, or should I try?

@mraible i can update the generator rn

I can't believe all this:

  • Not being able to work with an embedded version of Elasticsearch is really annoying.
  • Not being to use the REST API is crazy, that's just the whole idea of Elasticsearch from the start.

So if Spring Data Jest solves both of those issues, let's use it. But I'm worried to add one more library, with probably a lot of dependencies. Besides, the project isn't very popular (105 stars at the moment), and is not an official Spring Data project, so this means we might have trouble in the future if it's not well maintained.

FWIW, here's the dependency graph from my 21-Points Health pull-request.

+--- com.github.vanroy:spring-boot-starter-data-jest:3.1.4.RELEASE
|    +--- org.springframework.boot:spring-boot-starter:2.0.0.RELEASE -> 2.0.4.RELEASE (*)
|    +--- com.github.vanroy:spring-data-jest:3.1.4.RELEASE
|    |    +--- org.springframework.data:spring-data-elasticsearch:3.0.5.RELEASE -> 3.0.9.RELEASE (*)
|    |    +--- org.elasticsearch:elasticsearch:5.5.0 -> 5.6.10 (*)
|    |    +--- commons-logging:commons-logging:1.2
|    |    +--- io.searchbox:jest:5.3.3
|    |    |    +--- io.searchbox:jest-common:5.3.3
|    |    |    |    +--- com.google.guava:guava:21.0 -> 25.1-jre (*)
|    |    |    |    \--- com.google.code.gson:gson:2.8.0 -> 2.8.5
|    |    |    +--- org.apache.httpcomponents:httpcore-nio:4.4.6 -> 4.4.10 (*)
|    |    |    +--- org.apache.httpcomponents:httpclient:4.5.3 -> 4.5.6 (*)
|    |    |    +--- org.apache.httpcomponents:httpasyncclient:4.1.3
|    |    |    \--- org.slf4j:slf4j-api:1.7.25
|    |    \--- com.google.code.gson:gson:2.8.0 -> 2.8.5
|    \--- net.java.dev.jna:jna:4.2.2 -> 4.5.2
+--- io.searchbox:jest -> 5.3.3 (*)
+--- com.google.code.gson:gson -> 2.8.5

It looks like I can improve some dependencies based on this.

5 min later...

I tried making the following changes:

-    compile "org.springframework.boot:spring-boot-starter-data-elasticsearch"
-    // Jest for Elasticsearch
-    runtime "com.github.vanroy:spring-boot-starter-data-jest:3.1.4.RELEASE"
-    runtime ("io.searchbox:jest") {
+    runtime ("com.github.vanroy:spring-boot-starter-data-jest:3.1.4.RELEASE") {
         exclude module: 'commons-logging'
     }

But now it doesn't start, so maybe the current dependencies are correct?

@mraible as this already merged, I have a few comments:

  • You force the "2.7" version for Log4J -> don't we have a correct version already coming from JHipster dependencies?
  • You removed the whole Elasticsearch auto configuration file, but were also tuning a few things there, not just running Elasticsearch: are you sure those are not needed anymore?
  • I'm currently testing and I can't get the embedded server to run, are you sure this is working?

You force the "2.7" version for Log4J -> don't we have a correct version already coming from JHipster dependencies?

When I tried without the version number, I received errors when it tried to create the embedded ES instance.

You removed the whole Elasticsearch auto configuration file, but were also tuning a few things there, not just running Elasticsearch: are you sure those are not needed anymore?

As far as I could tell, ElasticsearchConfiguration was configuring Jackson, while Spring Data Jest uses Gson. Having this file in the classpath was causing startup issues.

I'm currently testing and I can't get the embedded server to run, are you sure this is working?

All the tests were passing and it works with my 21-Points Health app (which uses Gradle). What errors are you seeing?

Thanks @mraible
For point 1: we should then put the version number in JHipster Dependencies, but I'm worried as it currently gives version 2.10 and I don't want to downgrade without a good reason.
For point 3: I had no embedded server running, so I get errors telling me their is no available Elasticsearch node

Can you post your .yo-rc.json and I’ll see if I can reproduce?

@mraible I deleted my app and now it works when I create a new one... I'm not sure if that's a good or bad news! Let's forget about this for the moment.

FWIW, if I remove the version number on Log4J, I get:

org.apache.logging.slf4j.SLF4JLoggerContext cannot be cast to 
org.apache.logging.log4j.core.LoggerContext

According to Stack Overflow, this is caused by having log4j-to-slf4j in the classpath.

If I remove log4j altogether, the error is:

java.lang.ClassNotFoundException: org.apache.logging.log4j.core.config.Configurator

I still can't integrate elasticsearch with heroku.

My repository:

https://github.com/javadev/pim-system

The error message is:

org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:651)
2020-07-30T01:56:56.401729+00:00 app[web.1]: ... 110 common frames omitted
2020-07-30T01:56:56.401729+00:00 app[web.1]: Caused by: java.lang.IllegalStateException: path.home is not configured
2020-07-30T01:56:56.401729+00:00 app[web.1]: at org.elasticsearch

Was this page helpful?
0 / 5 - 0 ratings

Related issues

edvjacek picture edvjacek  Â·  3Comments

SudharakaP picture SudharakaP  Â·  3Comments

ahmedeldeeb25 picture ahmedeldeeb25  Â·  3Comments

trajakovic picture trajakovic  Â·  4Comments

DanielFran picture DanielFran  Â·  3Comments