Skip to Content
author's profile photo Former Member
Former Member

[Portal 7.3] access modifier in com.sapportals.wcm.repository.IResource

Hello everyone!

After portal update from 7.0 version to 7.3 stoped working with error:

Error: Application error occurred during the request processing.
Error Type: []

Details: java.lang.NoSuchMethodError: com.sapportals.wcm.repository.IResource.getLinkType()Lcom/sapportals/wcm/repository/enum/LinkType;

line that couses a problem:

String link_type = res_child.getLinkType().toString();

Now, the only difference between class IResource in 7.0 and 7.3 are access modifiers:

public LinkType getLinkType()
LinkType getLinkType()

what makes method getLinkType() inaccessible from outside the package.

I though of a workaround to compile my classes as a part of package com.sapportals.wcm.repository, but I'm affraid it wouldn't follow the best programming practices. Besides I cannot find com.sapportals.wcm.repository in portal 7.3 resources (why?) to compile.

Dear experts, do you have any ideas of how to solve that issue?

Guesses why even SAP decided to change access modifiers?

Thanks a lot,


Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Jan 12, 2012 at 12:51 PM

    Hi Daniel,

    The problem you are confronted with is the signature of the method, and in this case that is the return type:

    java.lang.NoSuchMethodError: com.sapportals.wcm.repository.IResource.getLinkType()Lcom/sapportals/wcm/repository/enum/LinkType;

    That is correct, but has nothing to do with the access modifier: The return type in 7.3 is


    whereas it has been until 7.0:


    That is due to being "enum" a key word from Java 5 on.

    That's all, so the change to be done is just extending an "s" in the corresponding import statement 😊

    Hope it helps


    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.