[ 
https://issues.apache.org/jira/browse/FELIX-5966?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Carsten Ziegeler reassigned FELIX-5966:
---------------------------------------

    Assignee: Carsten Ziegeler

> NPE at RuntimeDTOBuilder.java:74
> --------------------------------
>
>                 Key: FELIX-5966
>                 URL: https://issues.apache.org/jira/browse/FELIX-5966
>             Project: Felix
>          Issue Type: Bug
>          Components: HTTP Service
>    Affects Versions: http.jetty-4.0.6
>            Reporter: Stefan Bischof
>            Assignee: Carsten Ziegeler
>            Priority: Major
>             Fix For: http.jetty-4.0.8
>
>
> Got a Nullpointer when asking for runtimeDTO of the second HttpServiceRuntime 
>  
> {code:java}
> @Reference(policy = 
> ReferencePolicy.DYNAMIC,cardinality=ReferenceCardinality.MULTIPLE)
> public void bindHttpServiceRuntime(HttpServiceRuntime rt) {
> RuntimeDTO dto = rt.getRuntimeDTO();
> }
> java.lang.NullPointerException
>  at 
> org.apache.felix.http.base.internal.runtime.dto.RuntimeDTOBuilder.createServiceDTO(RuntimeDTOBuilder.java:74)
>  at 
> org.apache.felix.http.base.internal.runtime.dto.RuntimeDTOBuilder.build(RuntimeDTOBuilder.java:56)
>  at 
> org.apache.felix.http.base.internal.service.HttpServiceRuntimeImpl.getRuntimeDTO(HttpServiceRuntimeImpl.java:92){code}
>  
> if i wait a second the serviceReference is set
> {code:java}
> @Reference(policy = 
> ReferencePolicy.DYNAMIC,cardinality=ReferenceCardinality.MULTIPLE)
> public void bindHttpServiceRuntime(HttpServiceRuntime rt) {
> new Thread(new Runnable() {
> @Override
> public void run() {
> try {
> Thread.sleep(1000);
> } catch (InterruptedException e) {
> e.printStackTrace();
> }
> RuntimeDTO dto = rt.getRuntimeDTO();
> }
> }).start();
> }
> {code}
>  regards



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to