Note that there are some explanatory texts on larger screens.

plurals
  1. PONullPointerException with Spring Dynamic Modules
    primarykey
    data
    text
    <p>I am integrating OSGi Equinox, GWT as bundle and Spring Dynamic Modules. Firstly I check GWT bundle without services and it runs. Now I wish to call a external service with Spring Dynamic Modules. These are my XML files to declare and consume the service:</p> <pre><code>&lt;bean name="ServicioZB" id="zbservice" class="service.ZBService"/&gt; &lt;osgi:service ref="zbservice" interface="service.IZBService"/&gt; </code></pre> <p>And: </p> <pre><code>&lt;osgi:reference id="service"&gt; &lt;osgi:interfaces&gt; &lt;value&gt;service.IZBService&lt;/value&gt; &lt;/osgi:interfaces&gt; &lt;/osgi:reference&gt; </code></pre> <p>In GreetingServiceImpl I have the property zb and setter/getter:</p> <pre><code>private IZBService zb; public IZBService getZb() { return zb; } public void setZb(IZBService zb) { this.zb = zb; } public boolean greetServer(String input, String input2) throws Exception { return this.zb.checkUser(); } </code></pre> <p>If in Equinox type "services" I can view all services and consumers. It shows the following:</p> <pre><code>{service.IZBService}={org.springframework.osgi.bean.name=zbservice, Bundle-SymbolicName=zbservice, Bundle-Version=3.0.0, service.id=56} Registered by bundle: zbservice_3.0.0 [56] Bundles using service: ZBGWTApp_1.0.0 [57] </code></pre> <p>Then, the service is shown, and my application ZBGWTApp is the consumer. All seems right. However, if I debug the application, when I break the thread on line zb.checkUser(), the value of zb is NULL. It is to say, the service reference is not injected, why?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload