Troubleshooting
Problem
Attempts to execute a code post migration of IBM Rational Software Architect from version 7.5 to 8.5 on portal projects results in "Error : The inferred type PumaHome is not a valid substitute for the bounded parameter"
Symptom
You receive the Error message similar to mentioned below while compiling project in pumaHome Class.
pumaHome = (PumaHome) portletServiceHome.getPortletService(PumaHome.class)
Multiple markers at this line
- Bound mismatch: The generic method getPortletService(Class<T>) of type PortletServiceHome is not applicable for the arguments (Class<PumaHome>). The inferred type PumaHome is
not a valid substitute for the bounded parameter
<T extends PortletService>
- Line breakpoint:TMDUserSecurityManager [line: 158] -
initializeSecurity()
Cause
This error is caused due to incorrectly defining and usage of the wrong JNDI context for the pumaHome class in the custom themes
Resolving The Problem
In order to resolve the aforesaid error you would need to change the syntax of PumaHome class in the respective class file in custom themes from
portalServiceHome = (PortletServiceHome)ctx.lookup("portletservice/com.ibm.portal.um.portlet
service.PumaHome");
to
javax.naming.Context ctx = new javax.naming.InitialContext();
PumaHome pumaHome = (PumaHome)
ctx.lookup("portal:service/usermanagement/Puma");
Once done Save the changes the files and Re-deploy their custom themes.
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21634632