Skip to content
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

When using sofa:reference to reference jvm service in ark environment, my app occurred an NPE error #699

Closed
elseifer opened this issue Sep 7, 2020 · 0 comments · Fixed by #700
Assignees
Labels
bug Something isn't working
Milestone

Comments

@elseifer
Copy link
Member

elseifer commented Sep 7, 2020

here is some error info:

2020-09-07 13:52:14,944 [ - /// - ] ERROR boot.SpringApplication - Application run failed
java.lang.NullPointerException
at com.alipay.sofa.runtime.invoke.DynamicJvmServiceProxyFinder.findServiceProxy(DynamicJvmServiceProxyFinder.java:114)
at com.alipay.sofa.runtime.service.component.ReferenceComponent.getServiceTarget(ReferenceComponent.java:256)
at com.alipay.sofa.runtime.service.component.ReferenceComponent.isHealthy(ReferenceComponent.java:103)
at com.alipay.sofa.healthcheck.impl.ComponentHealthChecker.isHealthy(ComponentHealthChecker.java:60)
at com.alipay.sofa.healthcheck.HealthCheckerProcessor.doHealthCheck(HealthCheckerProcessor.java:136)
at
com.alipay.sofa.healthcheck.HealthCheckerProcessor.lambda$readinessHealthCheck$4(HealthCheckerProcessor.java:108)

my code to publish sofa service is:

<sofa:service interface="com.alipay.serverless.base.facade.SampleService" ref="sampleService">
        <!-- BUG ? WHEN PUBLISH BOLT, CAUSE MODULE SETUP DOWM -->
        <sofa:binding.bolt/>
 </sofa:service>

NPE occured at sofaboot codes ,because variable serviceJvmBinding is null:

JvmBinding referenceJvmBinding = (JvmBinding) contract
            .getBinding(JvmBinding.JVM_BINDING_TYPE);
JvmBinding serviceJvmBinding = (JvmBinding) serviceComponent.getService().getBinding(
            JvmBinding.JVM_BINDING_TYPE);
boolean serialize = referenceJvmBinding.getJvmBindingParam().isSerialize()
                            || serviceJvmBinding.getJvmBindingParam().isSerialize();
return new DynamicJvmServiceInvoker(clientClassloader,
            sofaRuntimeManager.getAppClassLoader(), serviceComponent.getService().getTarget(),
            contract, biz.getIdentity(), serialize);
@elseifer elseifer added the bug Something isn't working label Sep 7, 2020
@sofastack-bot sofastack-bot bot added the question Further information is requested label Sep 7, 2020
@alaneuler alaneuler changed the title When using sofa:reference to reference jvm service in ark environment, my app occured a NPE error When using sofa:reference to reference jvm service in ark environment, my app occurred an NPE error Sep 7, 2020
@alaneuler alaneuler self-assigned this Sep 7, 2020
@alaneuler alaneuler removed the question Further information is requested label Sep 7, 2020
@alaneuler alaneuler added this to the 3.4.4 milestone Sep 7, 2020
@sofastack-bot sofastack-bot bot added the question Further information is requested label Sep 7, 2020
@elseifer elseifer removed the question Further information is requested label Sep 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants