Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
3.0-M2
-
None
-
linux redhat 9
Description
I am a member of celtix team and doing integration between celtix and servicemix.
I just develop my ServiceEngine Component and Service Unit demo and try to develop it into ServiceMix. I am using the latest nightly binary kit which is incubating-servicemix-3.0-SNAPSHOT.zip.
But I get NullPointerException when I try to start service assembly.
The exception was thrown at line **** *****
if (services != null) {
Provides[] provides = services.getProvides();
-
-
-
-
-
-
-
-
-
-
-
- for (int j = 0; j < provides.length; j++) { *************
-
-
-
-
-
-
-
-
-
-
The problem is that variable "provides" was not checked null or not. In fact, this variable would be null always since services.setProvides() method is never called in the whole code base.
I modify Services.java a little bit which can make my demo works with ServiceMix
codebase:
private Provides[] provides;
private Consumes[] consumes;
my change:
private Provides[] provides = new Provides[0];
private Consumes[] consumes = new Consumes[0];
Just makesure provides is not null.
The attachment is Services.java I modified.