从 Liferay 6.2 升级到 Liferay 7 时,在使用 Liferay 升级工具解决重大更改然后转到建筑服务后,这 3 种类型的错误反复出现。为简洁起见,我只列出了每种情况。
我的感觉是它无法解决曾经占据BaseModel的底层自定义Generic,并用问号代替了它
[javac] Compiling 116 source files to C:\LiferayDXP\advglobalweb\v6.2\plugins\portlets\e-Recruit-portlet\docroot\WEB-INF\service-classes
[javac] C:\LiferayDXP\advglobalweb\v6.2\plugins\portlets\e-Recruit-portlet\docroot\WEB-INF\service\com\advantage\erecruit\model\CandidateApplicationClp.java:1301: error: cannot find symbol
[javac] public BaseModel<?> getCandidateApplicationRemoteModel() {
[javac] ^
[javac] symbol: class BaseModel
[javac] location: class CandidateApplicationClp
[javac] C:\LiferayDXP\advglobalweb\v6.2\plugins\portlets\e-Recruit-portlet\docroot\WEB-INF\service\com\advantage\erecruit\model\PositionWrapper.java:35: error: PositionWrapper is not abstract and does not override abstract method isFinderCacheEnabled() in BaseModel
[javac] public class PositionWrapper implements Position, ModelWrapper<Position> {
[javac] ^
[javac] C:\LiferayDXP\advglobalweb\v6.2\plugins\portlets\e-Recruit-portlet\docroot\WEB-INF\service\com\advantage\erecruit\model\CandidateApplicationClp.java:449: error: incompatible types: getClass cannot be converted to Class<?>
[javac] Class<?> clazz = _candidateApplicationRemoteModel.getClass();