Skip to Content

when I try to create Room I get following Error

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.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 05, 2005 at 04:04 PM

    Hi Jagraj,

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

    Refer Note : 739263

    REgards

    Rajeev

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 05, 2005 at 07:56 PM

    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>

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.