-
Notifications
You must be signed in to change notification settings - Fork 230
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
Backend-service.jar does not work. #233
Comments
Hey, you try to launch with this exactly : java -jar backend-service.jar -introspectionEnabled true ? |
Yes, it is what I tried. |
Perhaps the issue is with JDK version. If JDK 8 is used then it works as expected |
I have verified on Windows and Ubuntu for both Open JDK and Oracle flavours |
I am training in this course WSO2 Identity Server Fundamentals - V5.11 |
@souvikdotdas You're correct. This error occurs on JDK 11. When I tried with JDK 8, it worked without any error. |
Migrating to JDK 8 sorted it out. |
open-Jdk11 has issues and Jdk8 has no problem. |
I'm learning WSO2 Identity Server Fundamentals - V5.11 now, the wso2 application is not working for me on JDK8 & backend-service.jar doesn't work on JDK11....what should i do??? |
JDK11 removed some dependency JARs that are needed. Here is a diff of the changes needed in your backend-service/pom.xml so the dependency JARs are pulled into the backend JAR.
|
Description:
I am trying to launch the backend-service.jar but I get this error
java -jar backend-service.jar -introspection
Enabled true
2020-04-10 12:20:14 INFO BookingService:47 - Service properties loaded successfully.
2020-04-10 12:20:14 INFO BookingService:84 - Setting trust store path to : /tmp/wso2carbon.jks11159419101483655202
2020-04-10 12:20:14 INFO BookingService:109 - Starting backend service.
2020-04-10 12:20:14 INFO BookingService:110 - Configurations :
2020-04-10 12:20:14 INFO BookingService:113 - port: 39090
2020-04-10 12:20:14 INFO BookingService:113 - introspectionEndpoint: https://localhost:9443/oauth2/introspect
2020-04-10 12:20:14 INFO BookingService:113 - introspectionEnabled: true
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by io.netty.util.internal.ReflectionUtil (file:/c/Learning/wso2/samples-is/etc/backend-service/target/backend-service.jar) to constructor java.nio.DirectByteBuffer(long,int)
WARNING: Please consider reporting this to the maintainers of io.netty.util.internal.ReflectionUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Exception in thread "main" java.lang.NoClassDefFoundError: javax/annotation/PostConstruct
at org.wso2.msf4j.internal.router.MicroserviceMetadata.lambda$new$33(MicroserviceMetadata.java:63)
at java.base/java.util.HashMap.forEach(HashMap.java:1336)
at java.base/java.util.Collections$UnmodifiableMap.forEach(Collections.java:1505)
at org.wso2.msf4j.internal.router.MicroserviceMetadata.(MicroserviceMetadata.java:61)
at org.wso2.msf4j.internal.MicroservicesRegistryImpl.updateMetadata(MicroservicesRegistryImpl.java:234)
at org.wso2.msf4j.internal.MicroservicesRegistryImpl.addService(MicroservicesRegistryImpl.java:80)
at org.wso2.msf4j.MicroservicesRunner.deploy(MicroservicesRunner.java:111)
at org.wso2.sample.identity.backend.BackendApplication.main(BackendApplication.java:116)
Caused by: java.lang.ClassNotFoundException: javax.annotation.PostConstruct
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 8 more
Suggested Labels:
Suggested Assignees:
Affected Product Version:
OS, DB, other environment details and versions:
Steps to reproduce:
Related Issues:
The text was updated successfully, but these errors were encountered: