I try starting/building a new project with uaa enabled microservices. So i create the uaa service and som uaa enabled microservices, but i can't start/build the uaa nor the microservices with java 11 or 12. Because JAXB not found. i try to add the required maven dependencies, but this also not working.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project main-application-service: Fatal error compiling: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException: javax.xml.bind.JAXBException -> [Help 1]
Microservices without uaa enabled, starts without any problems. But if you want a project with uaa its not working.
I think, the uaa service generator is not updated to use with newer java versions then java 8
jHipster 6.0.1
INFO! Using JHipster version installed locally in current project's node_modules
INFO! Executing jhipster:info
INFO! Options: from-cli: true
Welcome to the JHipster Information Sub-Generator
[email protected] /Users/rizzi/Desktop/jhipster-demo
└── [email protected]
##### **JHipster configuration, a `.yo-rc.json` file generated in the root folder**
{
"generator-jhipster": {
"promptValues": {
"packageName": "com.epbf.bitsbutler.ms.mainapplication",
"nativeLanguage": "en"
},
"jhipsterVersion": "6.0.1",
"applicationType": "microservice",
"baseName": "mainApplicationService",
"packageName": "com.epbf.bitsbutler.ms.mainapplication",
"packageFolder": "com/epbf/bitsbutler/ms/mainapplication",
"serverPort": "8081",
"authenticationType": "jwt",
"cacheProvider": "hazelcast",
"enableHibernateCache": true,
"websocket": false,
"databaseType": "sql",
"devDatabaseType": "h2Disk",
"prodDatabaseType": "mariadb",
"searchEngine": false,
"messageBroker": false,
"serviceDiscoveryType": "eureka",
"buildTool": "maven",
"enableSwaggerCodegen": false,
"jwtSecretKey": "bXktc2VjcmV0LXRva2VuLXRvLWNoYW5nZS1pbi1wcm9kdWN0aW9uLWFuZC10by1rZWVwLWluLWEtc2VjdXJlLXBsYWNl",
"testFrameworks": [
"gatling"
],
"jhiPrefix": "jhi",
"entitySuffix": "",
"dtoSuffix": "DTO",
"otherModules": [],
"enableTranslation": true,
"clientPackageManager": "npm",
"nativeLanguage": "en",
"languages": [
"en",
"de"
],
"skipClient": true,
"skipUserManagement": true
}
}
entityName.json files generated in the .jhipster directory
JDL entity definitions
openjdk version "12.0.1" 2019-04-16
OpenJDK Runtime Environment AdoptOpenJDK (build 12.0.1+12)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 12.0.1+12, mixed mode, sharing)
git version 2.21.0
node: v12.3.1
npm: 6.9.0
yeoman: 2.0.5
yarn: 1.16.0
Docker version 18.09.2, build 6247962
docker-compose version 1.23.2, build 1110ad01
INFO! Congratulations, JHipster execution is complete!
entityName.json files generated in the .jhipster directoryno entities needed for forcing the exception
Latest MacOS Mojave with Java 11 and 12
If you add JAXB as a dependency, does it work?
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
</dependency>
This is by default already in the dependencies. I also try to some combinations with jaxb-api, jaxb-core, jaxb-impl, activation but nothing works for me
@RizziCR Thanks for reporting. I was able to reproduce the problem and a quick workaround is to add the following under hibernate-jpamodelgen within the configuration of the maven-compiler-plugin:
<path>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<version>${jaxb-runtime.version}</version>
</path>
I think this might be caused by a change I made :flushed: . Will investigate further and do a PR. In the meantime can you please try the workaround and let us know if it works for you?
@pvliss Thanks for the quick reply. I can confirm, that it works with the workaround ;)
Thanks
@RizziCR Great and thanks for the feedback!!!