Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OAuth2: problem with jdbcTokenStore #4620

Closed
pascalgrimaud opened this issue Dec 6, 2016 · 0 comments
Closed

OAuth2: problem with jdbcTokenStore #4620

pascalgrimaud opened this issue Dec 6, 2016 · 0 comments
Milestone

Comments

@pascalgrimaud
Copy link
Member

Overview of the issue

Our current Travis failed when running the build with OAuth2.
The application didn't manage to start.

Here the full log: https://travis-ci.org/jhipster/generator-jhipster/jobs/181352358
Here an extract:

2016-12-06 02:31:31.353  WARN 6749 --- [           main] o.s.boot.SpringApplication               : Error handling failed (Error creating bean with name 'delegatingApplicationListener' defined in class path resource [org/springframework/security/config/annotation/web/configuration/WebSecurityConfiguration.class]: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.cache.annotation.ProxyCachingConfiguration': Initialization of bean failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'org.springframework.context.annotation.ConfigurationClassPostProcessor.importRegistry' available)
2016-12-06 02:31:31.586 ERROR 6749 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   :
***************************
APPLICATION FAILED TO START
***************************
Description:
Field jdbcTokenStore in io.github.jhipster.travis.service.UserService required a bean of type 'org.springframework.security.oauth2.provider.token.store.JdbcTokenStore' that could not be found.
Action:
Consider defining a bean of type 'org.springframework.security.oauth2.provider.token.store.JdbcTokenStore' in your configuration.
Reproduce the error

Very hard to reproduce.
I didn't manage to reproduce in my local, or inside Docker.

At the moment, only Travis can reproduce it.
So I created a project here https://github.com/pascalgrimaud/jhipster-oauth2 and connected it to travis

  1. test with java -jar target/*.war -> fail - see https://travis-ci.org/pascalgrimaud/jhipster-oauth2/builds/181799849)
  2. test with ./mvwn -> OK - see https://travis-ci.org/pascalgrimaud/jhipster-oauth2/builds/181801228

So how is it possible ?

Related issues

It has been discussed here: #4607 (comment)

@tsaqova opened an issue here #4009 but nobody managed to reproduce

Suggest a Fix

For Travis, we can use temporary: group: deprecated as indicated here:
https://github.com/jhipster/generator-jhipster/blob/master/.travis.yml#L1

Maybe we can try this #4009 (comment)

JHipster Version(s)
jhoauth-2@0.0.0 /home/pgrimaud/projects/pascalgrimaud/jhipster-oauth2
└── generator-jhipster@3.12.0

JHipster configuration, a .yo-rc.json file generated in the root folder
{
  "generator-jhipster": {
    "jhipsterVersion": "3.12.0",
    "baseName": "jhoauth2",
    "packageName": "io.github.pascalgrimaud",
    "packageFolder": "io/github/pascalgrimaud",
    "serverPort": "8080",
    "authenticationType": "oauth2",
    "hibernateCache": "ehcache",
    "clusteredHttpSession": false,
    "websocket": false,
    "databaseType": "sql",
    "devDatabaseType": "h2Disk",
    "prodDatabaseType": "mysql",
    "searchEngine": false,
    "messageBroker": false,
    "buildTool": "maven",
    "enableSocialSignIn": false,
    "useSass": false,
    "yarn": true,
    "applicationType": "monolith",
    "testFrameworks": [
      "gatling"
    ],
    "jhiPrefix": "jhi",
    "enableTranslation": true,
    "nativeLanguage": "en",
    "languages": [
      "en"
    ]
  }
}
Entity configuration(s) entityName.json files generated in the .jhipster directory

ls: no such file or directory: .jhipster/*.json

Browsers and Operating System

openjdk version "1.8.0_111"
OpenJDK Runtime Environment (build 1.8.0_111-8u111-b14-2ubuntu0.16.04.2-b14)
OpenJDK 64-Bit Server VM (build 25.111-b14, mixed mode)

git version 2.11.0

node: v6.9.1

npm: 3.10.9

bower: 1.7.9

gulp:
[00:28:38] CLI version 1.2.2
[00:28:38] Local version 3.9.1

yeoman: 1.8.5

yarn: 0.17.9

Docker version 1.12.3, build 6b644ec

docker-compose version 1.9.0-rc4, build 181a4e9

ruddell added a commit to ruddell/generator-jhipster that referenced this issue Dec 7, 2016
ruddell added a commit to ruddell/generator-jhipster that referenced this issue Dec 7, 2016
@jdubois jdubois modified the milestone: 3.12.1 Dec 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants