on 01-12-2012 10:13 AM
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: [com.sap.ASJ.web.000137]
Details: java.lang.NoSuchMethodError: com.sapportals.wcm.repository.IResource.getLinkType()Lcom/sapportals/wcm/repository/enum/LinkType;
at pl.com.bcc.flexibleui.renderer.HomepageCollectionRenderer.renderUI(HomepageCollectionRenderer.java:177)
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:
7.0:
public LinkType getLinkType()
7.3:
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,
Daniel
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
com.sapportals.wcm.repository.enums.LinkType
whereas it has been until 7.0:
com.sapportals.wcm.repository.enum.LinkType
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
Detlev
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Detlev!
Thank you for your quick reaction and helpful answer.
Still, I cannot find particular libs for the project to be compiled.
Even though I use Jar/Class locator, nothing is found for com.sapportals.wcm.*
sapjarfinder.com won't help, because it works with 7.0 libs only.
Will be grateful for any ideas!
Thanks,
Daniel
Hi Daniel,
The problem with the current ClassLocator is that it does not index JAR files with an "~" in it's name (would be great if someone would fix this one day...; at least I just filed a short bug report).
An alternative for example might be using WinRAR; of course, it's much less comfortable than CL, but at least it brings you to your aim.
On the other side, the KM jars don't seem to be affected by this bug. With a classpath variable APPS_SAP_COM set to"/usr/sap/<SID>/<INST>/j2ee/cluster/apps/sap.com", the following classpath entries cover some KM things for example:
APPS_SAP_COM/com.sap.km.cm.ui/servlet_jsp/com.sap.km.cm.ui/root/WEB-INF/lib/km.shared.ui.enum_api.jar
APPS_SAP_COM/com.sap.km.cm.ui.flex/servlet_jsp/com.sap.km.cm.ui.flex/root/WEB-INF/lib/km.shared.ui.flex.base_api.jar
APPS_SAP_COM/com.sap.netweaver.bc.crt/servlet_jsp/com.sap.netweaver.bc.crt/root/WEB-INF/lib/bc.crt_api.jar
APPS_SAP_COM/com.sap.netweaver.bc.rf/servlet_jsp/com.sap.netweaver.bc.rf/root/WEB-INF/lib/bc.rf.framework_api.jar
etc pp
So in your case it seems more probable that you did not use the right root directories for letting CL index all relevant stuff.
It should be, with corresponding classpath variables:
"/usr/sap/<SID>/<INST>/j2ee/cluster/apps/sap.com" [APPS_SAP_COM]
"/usr/sap/<SID>/<INST>/j2ee/cluster/bin/services" [BIN_SERVICES]
"/usr/sap/<SID>/<INST>/j2ee/cluster/bin/ext" [BIN_EXT]
Of course, you are not obliged to use the classpath variables, or if you use some you might use different name. Anyhow, it makes much sense to use them as well as to use these names...
Hope it helps
Detlev
Dear Detlev,
Thank you so much again!
Unfortunately I'm not able to add all of these locations to CF properties, since portal is installed on separate server in separate network. Machine I use to browse server files is pretty weak, has no WinRAR, no NWDS, what makes searching for an exact class a big logistic problem.
Coping all jars crashes system :).
I'm looking for classes:
import com.sapportals.wcm.WcmException;
import com.sapportals.wcm.rendering.base.ILayoutObject;
import com.sapportals.wcm.rendering.collection.LightCollectionRenderer;
import com.sapportals.wcm.repository.ResourcePropertyComparator;
import com.sapportals.wcm.repository.service.layout.customizing.ICollectionRendererParameterNameConst;
import com.sapportals.wcm.repository.service.layout.customizing.IParameterName;
import com.sapportals.wcm.repository.service.layout.customizing.IParameters;
import com.sapportals.wcm.repository.service.layout.customizing.IResourceRendererParameterNameConst;
import com.sapportals.wcm.service.propertyconfig.IMetaName;
import com.sapportals.wcm.service.propertyconfig.IMetaNameList;
import com.sapportals.wcm.service.propertyconfig.IPropertyConfigurationService;
and
import com.sapportals.wcm.WcmException;
import com.sapportals.wcm.control.util.URLGeneratorHelper;
import com.sapportals.wcm.rendering.base.ILayoutObject;
import com.sapportals.wcm.rendering.collection.LightCollectionRenderer;
import com.sapportals.wcm.rendering.readymades.ResourceLink;
import com.sapportals.wcm.rendering.util.EmptyHtmlFragment;
import com.sapportals.wcm.repository.IProperty;
import com.sapportals.wcm.repository.IResource;
import com.sapportals.wcm.repository.IResourceList;
import com.sapportals.wcm.repository.PropertyName;
import com.sapportals.wcm.repository.ResourceException;
If you would be able to point files containing what we need here, problem shall be solved.
Best regards,
Daniel
Hi Daniel,
> Coping all jars crashes system :).
?!?! I will now provide the list of references you need, BUT: You cannot be serious that you always need a guy on SDN to tell you which JAR to reference... Someone who develops against the portal definitely needs the JARs (or even better a full copy of the directories listed in my last answer) on the local dev machine!!!
Anyhow, here you are, but only this once. Get your bosses to understand which infrastructure is needed for a portal developer...
<classpathentry kind="var" path="APPS_SAP_COM/com.sap.km.cm.ui/servlet_jsp/com.sap.km.cm.ui/root/WEB-INF/lib/km.shared.ui.util_api.jar"/>
<classpathentry kind="var" path="APPS_SAP_COM/com.sap.netweaver.bc.util/servlet_jsp/com.sap.netweaver.bc.util/root/WEB-INF/lib/bc.util.public_api.jar"/>
<classpathentry kind="var" path="APPS_SAP_COM/com.sap.km.cm.ui.flex/servlet_jsp/com.sap.km.cm.ui.flex/root/WEB-INF/lib/km.shared.ui.flex.base_api.jar"/>
<classpathentry kind="var" path="APPS_SAP_COM/com.sap.km.cm.ui.flex/servlet_jsp/com.sap.km.cm.ui.flex/root/WEB-INF/lib/km.shared.ui.flex.collection_api.jar"/>
<classpathentry kind="var" path="APPS_SAP_COM/com.sap.km.cm.ui.flex/servlet_jsp/com.sap.km.cm.ui.flex/root/WEB-INF/lib/km.shared.ui.flex.util_api.jar"/>
<classpathentry kind="var" path="APPS_SAP_COM/com.sap.km.cm.ui.flex/servlet_jsp/com.sap.km.cm.ui.flex/root/WEB-INF/lib/km.shared.ui.flex.readymades_api.jar"/>
<classpathentry kind="var" path="APPS_SAP_COM/com.sap.netweaver.bc.rf/servlet_jsp/com.sap.netweaver.bc.rf/root/WEB-INF/lib/bc.rf.framework_api.jar"/>
<classpathentry kind="var" path="APPS_SAP_COM/com.sap.km.cm.repository.service.base/servlet_jsp/com.sap.km.cm.repository.service.base/root/WEB-INF/lib/km.shared.repository.service.layout_api.jar"/>
<classpathentry kind="var" path="APPS_SAP_COM/com.sap.km.cm.service.base/servlet_jsp/com.sap.km.cm.service.base/root/WEB-INF/lib/km.shared.service.propertyconfig_api.jar"/>
From my last answers, you'll understand APPS_SAP_COM.
Hope it helps
Detlev
Hi Detlev,
I have a WD DC 7.3, and I got a error caused by:
"import com.sapportals.wcm.repository.enum.PropertyType;"
I know the correct import is "com.sapportals.wcm.repository.enums.PropertyType", but I don't have "bc.rf.framework_api.jar" and "bc.util.public_api.jar".
In my sever 7.3 I don't find these jars in the path ""/usr/sap/<SID>/<INST>/j2ee/cluster/apps/sap.com/".
Can you help me? Or send me jar files?
Regards
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.