cancel
Showing results for 
Search instead for 
Did you mean: 

when I try to create Room I get following Error

former_member185931
Participant
0 Kudos
308

java.lang.NullPointerException

at com.sap.ip.collaboration.room.impl.RoomUMStorage.delete(RoomUMStorage.java:208)

at com.sap.ip.collaboration.room.impl.RoomObject.createUMGroups(RoomObject.java:2720)

at com.sap.ip.collaboration.room.impl.RoomObject.<init>(RoomObject.java:178)

at com.sap.ip.collaboration.room.impl.Rooms.createRoom(Rooms.java:179)

Anybody who can help if I am missing something.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Jagraj,

There is a fix of this in EP6 SP12, KMC SP12 patch3,that will solve the error.

Refer Note : 739263

REgards

Rajeev

Answers (1)

Answers (1)

detlev_beutner
Active Contributor
0 Kudos

Hi Rajeev, Hi Jagraj,

from the note provided there is no solution to be seen; also within the note 857830 (P3 for KMC SPS12) this is not listed.

It should be repaired with KMC SPS14 (this has been promised); I had originally reported this bug against SPS12 P2, so eventually this bug also has been removed in P3 for SPS12, but I cannot really imagine.

Hope it helps

Detlev

PS: Here comes my bug report:

<i>Hi,

with our system, based on

EP6 SPS 12 / KMC SPS 12 Patch 2

WAS J2EE SPS 12

we have the following issue:

When one creates a room, and if the UM is not writable, the room

creation stops with a not catched NullPointerException. The stack trace

starts as follows:

java.lang.NullPointerException

at com.sap.ip.collaboration.room.impl.RoomUMStorage.delete

(RoomUMStorage.java:208)

at com.sap.ip.collaboration.room.impl.RoomObject.createUMGroups

(RoomObject.java:2384)

at com.sap.ip.collaboration.room.impl.RoomObject.<init>

(RoomObject.java:182)

at com.sap.ip.collaboration.room.impl.Rooms.createRoom(Rooms.java:174)

at com.sap.ip.collaboration.room.impl.RoomsKMService.createRoom

(RoomsKMService.java:107)

(This stack trace is from KMC SPS 11, but the behaviour is the same at

SPS 12 Patch 2.)

The reason for this is obvious when watching the source of

com.sap.ip.collaboration.room.impl.RoomUMStorage, which will be called

by createUMGroups(IRoomInfo roomInfo) of

com.sap.ip.collaboration.room.impl.RoomObject:

public void createUMGroups(IRoomInfo info) throws Exception {

/* 53*/ RoomMainGroup mainGroup = null;

/* 54*/ Hashtable groups = new Hashtable();

/* 58*/ RoomRootSet rootGroup = null;

/* 62*/ rootGroup = new RoomRootSet(room);

/* 71*/ ITemplateBrowser tb = TemplateBrowserFactory.getInstance();

/* 72*/ ITemplate template = tb.getTemplate(room.getRuntimeInfo

().getTemplateName());

/* 73*/ String publicRoleName =

TemplateDefaultDataFactory.readDefaultTemplateData

().getRoleForPublicArea().getRoleName();

/* 74*/ IRoomRole roles[] = template.getRoomRoles();

/* 75*/ for (int i = 0; i < roles.length; i++)

/* 79*/ if (!publicRoleName.equals(roles<i>.getRoleName())) {

/* 81*/ RoomRoleSet newGroup = new RoomRoleSet(room, roles

<i>.getRoleName());

/* 82*/ groups.put(newGroup.getRoleName(), newGroup);

/* 84*/ rootGroup.addMember(newGroup.getUMSetUniqueId());

}

/* 93*/ room.getRuntimeInfo().setRoleGroups(groups);

/* 94*/ room.getRuntimeInfo().setRootGroup(rootGroup); // this won't

be called in case of failure

/* 110*/ mainGroup = new RoomMainGroup(room);

/* 111*/ room.getRuntimeInfo().setMainUserGroup(mainGroup);

...

}

public boolean delete() {

/* 192*/ boolean result = true;

/* 194*/ Hashtable table = room.getRuntimeInfo().getRoleGroups();

/* 195*/ for (Enumeration enum = table.keys(); enum.hasMoreElements();)

{

/* 198*/ RoomRoleSet group = (RoomRoleSet)table.get((String)

enum.nextElement()); // this will return null in case of failure

/* 199*/ if (!group.delete()) // this will throw the NPE

...

See the remarks in lines 94, 198, 199.

The exception should be catched or the case should be checked in

before, so that the controlled exception:

/2385/ throw new RoomCreationException(e, "Cannot create UM groups

for room " + getName(), true);

would be thrown (createUMGroups(IRoomInfo roomInfo) of

com.sap.ip.collaboration.room.impl.RoomObject).

Thanks in advance

Detlev Beutner</i>