简体   繁体   English

Portlet中ext插件的liferay使用服务/类

[英]liferay use service/class from ext plugin in portlet

I have created a liferay custom MVC portlet which is required to call some services/classes defined by someone else in an ext plugin already deployed on the server. 我创建了一个liferay自定义MVC portlet,在已部署在服务器上的ext插件中调用其他人定义的某些服务/类时,需要使用该自定义MVC portlet。 Does anyone know what is needed to resolve the "class/service not found" errors? 有谁知道解决“找不到类/服务”错误所需的内容?

Thanks in advance! 提前致谢!

When an EXT plugin is deployed the classes inside ext-<plugin-name>-ext-service.jar can be accessed by any plugin since it this goes in the global class-path ( /tomcat/lib/ext for tomcat) just like portal-service.jar of liferay. 部署EXT插件时,任何插件都可以访问ext-<plugin-name>-ext-service.jar中的类,因为它进入全局类路径(对于tomcat是/tomcat/lib/ext ),就像liferay的portal-service.jar

But the classes inside ext-<plugin-name>-ext-impl.jar can only be accessed by EXT and hook JSPs (if any), since it is similar to portal-impl.jar since this resides in \\tomcat\\webapps\\ROOT\\WEB-INF\\lib which is in the portal class-path. 但是ext-<plugin-name>-ext-impl.jar中的类只能由EXT访问并挂接JSP(如果有),因为它类似于portal-impl.jar因为它位于\\tomcat\\webapps\\ROOT\\WEB-INF\\lib门户网站类路径中的\\tomcat\\webapps\\ROOT\\WEB-INF\\lib

So if you are accessing classes inside ext-impl.jar , which seems to be the case then I am sorry to say but you are out of luck . 因此,如果您正在访问ext-impl.jar类(似乎是这种情况),那么我很遗憾地说, 但是您不走运

May be some work around can be found if you can provide more information. 如果您可以提供更多信息,可能会找到一些解决方法。

I have managed a work-around for this problem. 我已设法解决此问题。 I have worked directly with the database from my portlet, instead of using the service, and have copied the java functions needed from the ext to my portlet. 我直接从Portlet处理数据库,而不使用服务,并且将ext所需的Java函数复制到了Portlet。 This has solved it. 这解决了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM