wso2-docs / WSO2_EI

21 stars 64 forks source link

Error trying to start Hospital-Service-2.0.0-EI7 #66

Open glaucioguerra opened 4 years ago

glaucioguerra commented 4 years ago

Hi,

I have an issue when I tried to start Hospital-Service-2.0.0-EI7.jar. The error message is:

java -jar Hospital-Service-2.0.0-EI7.jar 
Exception in thread "main" java.lang.NoClassDefFoundError: javax/annotation/PostConstruct
    at org.wso2.msf4j.internal.router.MicroserviceMetadata.<init>(MicroserviceMetadata.java:68)
    at org.wso2.msf4j.internal.MicroservicesRegistryImpl.updateMetadata(MicroservicesRegistryImpl.java:171)
    at org.wso2.msf4j.internal.MicroservicesRegistryImpl.addService(MicroservicesRegistryImpl.java:78)
    at org.wso2.msf4j.MicroservicesRunner.deploy(MicroservicesRunner.java:84)
    at org.wso2.service.hospital.Application.main(Application.java:29)
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)
    ... 5 more

I'm using Mac OS with JDK 11.

Thanks!

srout93 commented 4 years ago

Hi, Were you able to resolve this issue ?

glaucioguerra commented 4 years ago

Hi @srout93 not really. I tried this service to test a POC a few months ago, with no success.

srout93 commented 4 years ago

Hi @glaucioguerra you can use this jar file instead (https://github.com/wso2-docs/WSO2_EI/blob/master/Back-End-Service/Hospital-Service-JDK11-2.0.0.jar) and it is working in my case as well.

leandrorichard commented 4 years ago

Hi @glaucioguerra you can use this jar file instead (https://github.com/wso2-docs/WSO2_EI/blob/master/Back-End-Service/Hospital-Service-JDK11-2.0.0.jar) and it is working in my case as well.

It worked for me pretty well, solved my problem

charithjayasanka commented 2 years ago

Hi @glaucioguerra you can use this jar file instead (https://github.com/wso2-docs/WSO2_EI/blob/master/Back-End-Service/Hospital-Service-JDK11-2.0.0.jar) and it is working in my case as well.

This worked for me as well