jhipster / generator-jhipster

JHipster is a development platform to quickly generate, develop, & deploy modern web applications & microservice architectures.
https://www.jhipster.tech
Apache License 2.0
21.54k stars 4.02k forks source link

Can't authenticate on Windows #19157

Closed dunfe closed 2 years ago

dunfe commented 2 years ago
Overview of the issue

I'm create an application using Jhipster stack and development on Windows 10. The problem is I can't even login to the default account or register the new one.

I tried to find the solution and got that someone put -Djdk.io.File.enableADS=true into VM options will work but I'm not. Especially, this error only occur on Windows, I tried to run this app without any modifier on Macos and it's working normally. But Macos is not my primary development enviroment then I have to make it work on Windows.

I tried change implementation "org.springframework.boot:spring-boot-starter-undertow" to implementation "org.springframework.boot:spring-boot-starter-tomcat" but get error about missing javax.servlet package.

Motivation for or Use Case

I can't sign in or register to admin on windows.

Here is the error log

Reproduce the error
JHipster Version(s)

7.8.1

JHipster configuration
.yo-rc.json file
{
  "generator-jhipster": {
    "applicationIndex": 0,
    "applicationType": "monolith",
    "authenticationType": "jwt",
    "baseName": "smovie",
    "blueprints": [],
    "buildTool": "gradle",
    "cacheProvider": "redis",
    "clientFramework": "angularX",
    "clientPackageManager": "npm",
    "clientTheme": "none",
    "clientThemeVariant": "",
    "creationTimestamp": 1652962669893,
    "databaseType": "sql",
    "devDatabaseType": "mysql",
    "devServerPort": 4200,
    "dtoSuffix": "DTO",
    "enableGradleEnterprise": false,
    "enableHibernateCache": true,
    "enableSwaggerCodegen": false,
    "enableTranslation": true,
    "entities": ["Movie", "Actor", "Category", "Country", "Manufacturer", "Link"],
    "entitySuffix": "",
    "gradleEnterpriseHost": "",
    "jhiPrefix": "jhi",
    "jhipsterVersion": "7.8.1",
    "jwtSecretKey": "YourJWTSecretKeyWasReplacedByThisMeaninglessTextByTheJHipsterInfoCommandForObviousSecurityReasons",
    "languages": ["en"],
    "lastLiquibaseTimestamp": 1652963029000,
    "messageBroker": false,
    "nativeLanguage": "en",
    "otherModules": [],
    "packageFolder": "com/smovie",
    "packageName": "com.smovie",
    "pages": [],
    "prodDatabaseType": "mysql",
    "reactive": false,
    "searchEngine": false,
    "serverPort": "8090",
    "serviceDiscoveryType": false,
    "skipCheckLengthOfIdentifier": false,
    "skipFakeData": false,
    "skipUserManagement": false,
    "testFrameworks": [],
    "websocket": "spring-websocket",
    "withAdminUi": true
  }
}

JDL for the Entity configuration(s) entityName.json files generated in the .jhipster directory
JDL entity definitions
entity Movie {
  name String required
  viname String
  series Boolean
  description TextBlob
  poster String
  trailer String
  director String
  duration String
  year String
  imdb String
  quality String
  subtitle String
}
entity Actor {
  name String required
}
entity Category {
  name String required
}
entity Country {
  name String
}
entity Manufacturer {
  name String
}
entity Link {
  url String
  quality String
  description String
}
relationship OneToMany {
  Movie{link} to Link{movie}
}
relationship ManyToMany {
  Movie{category} to Category{movie}
  Movie{actor} to Actor{movie}
  Movie{country} to Country{movie}
  Movie{manufacturer} to Manufacturer{movie}
}

dto Movie, Actor, Category, Country, Manufacturer, Link with mapstruct
paginate Movie, Actor, Category, Country, Manufacturer, Link with pagination
service Movie, Actor, Category, Country, Manufacturer, Link with serviceClass

Environment and Tools

openjdk version "11.0.15" 2022-04-19 OpenJDK Runtime Environment Temurin-11.0.15+10 (build 11.0.15+10) OpenJDK 64-Bit Server VM Temurin-11.0.15+10 (build 11.0.15+10, mixed mode)

git version 2.33.0.windows.2

node: v16.15.1

npm: 8.11.0

Docker version 20.10.17, build 100c701

Docker Compose version v2.6.1

Browsers and Operating System

Windows 10 21H2 Chrome Version 103.0.5060.114 (Official Build) (64-bit)

atomfrede commented 2 years ago

I can see a liquibase error, looks like your database can be migrated. Did you check the database connections are correct? How are you using docker? Via docker desktop?

EDIT: The database is locked, did you check by which process? As it seems related to windows, are you using e.g. spacces in you path/location where the project is created?

dunfe commented 2 years ago

I can see a liquibase error, looks like your database can be migrated. Did you check the database connections are correct? How are you using docker? Via docker desktop?

EDIT: The database is locked, did you check by which process? As it seems related to windows, are you using e.g. spacces in you path/location where the project is created?

I found the solution, in the configurations, tomcat has been excluded, I remove that line and change undertow to tomcat then it's work. Thanks!