Stream: hapi
Topic: android error
Luis EC (Sep 17 2019 at 04:46):
hello all,
I try to program for android using hapi fhir JPA dstu3 as a server,and I try to create an android client that can create a patient for research reasons,but at the time of sending the information to the server this marks me an error.
could someone tell me how I could send the information to the server?
java.lang.NoClassDefFoundError: java.lang.NoClassDefFoundError: ca.uhn.fhir.context.-$$Lambda$ModelScanner$uSzLWSu2DEH0tpG0Dyb0S0HKZ1s
at ca.uhn.fhir.context.ModelScanner.init(ModelScanner.java:116)
at ca.uhn.fhir.context.ModelScanner.<init>(ModelScanner.java:69)
at ca.uhn.fhir.context.FhirContext.scanResourceTypes(FhirContext.java:780)
at ca.uhn.fhir.context.FhirContext.validateInitialized(FhirContext.java:893)
at ca.uhn.fhir.context.FhirContext.getResourceDefinition(FhirContext.java:424)
at ca.uhn.fhir.rest.client.method.MethodUtil.createCreateInvocation(MethodUtil.java:92)
at ca.uhn.fhir.rest.client.impl.GenericClient$CreateInternal.execute(GenericClient.java:570)
at ca.uhn.fhir.rest.client.impl.GenericClient$CreateInternal.execute(GenericClient.java:533)
at com.example.clientefhir.MainActivity.enviar(MainActivity.java:91)
at com.example.clientefhir.MainActivity.access$000(MainActivity.java:17)
at com.example.clientefhir.MainActivity$5.onClick(MainActivity.java:80)
at android.view.View.performClick(View.java:5280)
at android.view.View$PerformClick.run(View.java:21239)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5517)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
James Agnew (Sep 17 2019 at 13:56):
hmm... i'm not an android expert, but fwiw this test project might be useful: https://github.com/hapifhir/hapi-fhir-android-integration-test
Luis EC (Sep 17 2019 at 14:52):
good morning I just want to know how to use this line on android
client.create().resource(patient).execute();
Last updated: Apr 12 2022 at 19:14 UTC