在Liferay 7中,我已经将一个模块JAR放入了deploy/,然后我通过Gogo Shell卸载了它,现在我想再次安装它。
问题:当我再次将其复制到deploy/我收到此错误:
INFO [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner][AutoDeployDir:252] Processing httpclient-osgi-4.5.3.jar
WARN [fileinstall-/home/nico/liferay/osgi/modules][org_apache_felix_fileinstall:103] Failed to update bundle: /home/nico/liferay/osgi/modules/httpclient-osgi-4.5.3.jar with ID 1088. The bundle has been uninstalled
Run Code Online (Sandbox Code Playgroud)
如何解决这个问题?
我们正在使用 Liferay 7.3 (CE) 并试图通过“页面片段”来包含“内容页面”的相对较新的功能。我们能够使用<lfr-widget-WIDGETALIAS>标记开发已经包含 portlet(在内容页面的上下文中称为“小部件”)的页面片段。到目前为止,这是有效的。
现在,我们正在尝试准备嵌入应用了特殊 portlet 配置的portlet 的页面片段。例如,我们想要准备一个页面片段,它只显示一个资产发布者 portlet,该 portlet 被配置为列出来自预定义类别的 WebContent 文章。用户应该能够将该片段放到页面上,而不必关心资产发布者 portlet 的配置。
我们没有找到任何直接的方法来实现这一点——我们的第一个猜测是,配置可以写成<lfr-widget-...>标签的属性或内容,但被 liferay 文档中的一个提示阻止了,即没有有效的属性或内容可以附加到该标签.
是否有人对如何在应用预定义的 Portlet 配置的页面片段中嵌入 Portlet 有所了解?(包括开箱即用的 Liferay portlet?)
Liferay 7 GA1只是releasead,但文档尚未完成.如何从默认的liferay徽标更改为公司徽标?我希望每个网站都有一个自定义徽标.
我想在我的liferay 7 portlet中包含sockjs(v1.1.2),但是我收到了这个警告:
Mismatched anonymous define() module: function ()...
Run Code Online (Sandbox Code Playgroud)
然后没有加载库.
我直接在我的liferay-portlet.xml中包含.js文件,如下所示:
<header-portlet-javascript>/common/js/sockjs.js</header-portlet-javascript>
Run Code Online (Sandbox Code Playgroud)
我没有任何想法让它发挥作用
我正在尝试将 Apache POI 集成到Liferay DXP(OSGi) 中,但无法在 gradle 项目中解决与 POI 3.17 版本的依赖关系。我创建了以下 JAR 的独立项目:
另外,我在build.gradle 中添加了以下 gradle 依赖项
compile group: 'org.apache.poi', name: 'poi', version: '3.17'
compile group: 'org.apache.poi', name: 'poi-ooxml', version: '3.17'
compile group: 'org.apache.poi', name: 'poi-ooxml-schemas', version: '3.17'
compile group: 'org.apache.xmlbeans', name: 'xmlbeans', version: '2.6.0'
compile group: 'org.apache.commons', name: 'commons-collections4', version: '4.1'
Run Code Online (Sandbox Code Playgroud)
此外,bnd.bnd 中也提供了相应的 jar 。知道我在这里缺少什么吗?
我有一个需要访问AConfiguration和BConfiguration的组件MyComponent:
my.MyComponent:
@Component(
configurationPid = "[my.AConfiguration,my.BConfiguration]"
)
public class MyComponent {
@Activate
@Modified
protected void activate(Map<String, Object> properties) {
_aConfiguration = ConfigurableUtil
.createConfigurable(AConfiguration.class, properties);
_bConfiguration = ConfigurableUtil
.createConfigurable(BConfiguration.class, properties);
}
public void hello() {
System.out.println("A:" + _sConfiguration.valueA());
System.out.println("B:" + _sConfiguration.valueB());
}
}
Run Code Online (Sandbox Code Playgroud)
my.AConfiguration:
@Meta.OCD(
id = "my.AConfiguration"
)
public interface AConfiguration {
@Meta.AD(deflt = "6")
public long valueA();
}
Run Code Online (Sandbox Code Playgroud)
my.BConfiguration:
@Meta.OCD(
id = "my.BConfiguration"
)
public interface BConfiguration {
@Meta.AD(deflt = "6")
public long valueB();
}
Run Code Online (Sandbox Code Playgroud)
问题:配置valueA和valueB以7使用Liferay的配置UI无效, …
我正在尝试使用 SearchContext、IndexSearcherHelperUtil 和所有其他东西为 Liferay 7.3.5 GA6 开发一个自定义 Web 内容搜索 portlet。
\n我有一些具有不同字段的 DDMStructure,从我在 elasticsearch 索引上看到的情况来看,这些字段在嵌套文档中建立索引,如下所示:
\n"ddmFieldArray": [\n{\n"ddmFieldName": "ddm__text__37702__nome_it_IT",\n"ddmValueFieldName": "ddmFieldValueText_it_IT",\n"ddmFieldValueText_it_IT": "Nome esempio",\n"ddmFieldValueText_it_IT_String_sortable": "nome esempio"\n}\n,\n{\n"ddmFieldName": "ddm__text__37702__descrizione_breve_it_IT",\n"ddmValueFieldName": "ddmFieldValueText_it_IT",\n"ddmFieldValueText_it_IT": "Esempio di descrizione breve da indicizzare",\n"ddmFieldValueText_it_IT_String_sortable": "esempio di descrizione breve da indicizzare"\n}\n]\nRun Code Online (Sandbox Code Playgroud)\n这与我以前知道的旧方式不同,其中自定义字段的索引如下ddm__[keyword/text]__[structure_id]__[field_name]
现在,我明白\xc2\xa0这种不同的索引方式是由于为了避免弹性问题而进行的改进(已超出总字段的限制)但是......执行搜索后, com.liferay.portal中没有ddmFieldArray .kernel.search.Document .getFields,因此我无法从弹性搜索索引中获取 ddmstruct 字段值。
\n这是代码:
\nlong journalArticleClassId = ClassNameLocalServiceUtil.getClassNameId(JournalArticle.class.getName());\n\nSearchContext searchContext = new SearchContext();\nsearchContext.setClassTypeIds(new long[] {journalArticleClassId});\nsearchContext.setCompanyId(companyId);\nsearchContext.setStart(QueryUtil.ALL_POS);\nsearchContext.setEnd(QueryUtil.ALL_POS);\n \nBooleanQuery query = new BooleanQueryImpl();\n \n \nMatchQuery approvedQuery = new MatchQuery(Field.STATUS, String.valueOf(WorkflowConstants.STATUS_APPROVED));\n\nquery.add(approvedQuery, BooleanClauseOccur.MUST.getName());\n\n\nHits resultHits = IndexSearcherHelperUtil.search(searchContext, …Run Code Online (Sandbox Code Playgroud) 我正在尝试向 Liferay 添加外部库 - Orika 库。
我在 build.gradle 中添加了 Gradle 依赖项,如下所示:
compileInclude group: 'ma.glasnost.orika', name: 'orika-core', version: '1.5.4'
Run Code Online (Sandbox Code Playgroud)
我正在使用编译包含,以便模块也附加依赖项。
该库在本地运行良好- 我已经使用类中的 main 方法对其进行了测试,但是当我部署到 Portal 时,我收到以下错误:
org.osgi.framework.BundleException: Could not resolve module: <YourModuleName> [2755]_ Unresolved requirement: Import-Package: com.google.common.base_ [Sanitized]
Run Code Online (Sandbox Code Playgroud)
这似乎是由于运行时缺少库引起的,但不太清楚的是,如果我在其中运行它时它按public static main预期工作,为什么会在构建时添加这些依赖项?另外,我检查了 Eclipse 中下载的 libs Gradle,看看是否有任何包,com.google.commom.base但没有找到。
因此,因为构建时完成了其他一些步骤,所以我检查了生成的 jar 中的 MANIFEST.MF(例如 eclipse-workspace<your_project_name>\modules<your_module_name>\build\libs),然后com.google.commom.base从文件中删除该条目。错误消失了,但又出现了另一个错误:
org.osgi.framework.BundleException: Could not resolve module: <your_module_name> [2755]_ Unresolved requirement: Import-Package: com.sun.jdi_ [Sanitized]
Run Code Online (Sandbox Code Playgroud)
所以,问题是 -为什么添加这些依赖项以及如何删除或满足它们?- 鉴于我在 Eclipse 中没有它们,那么我会放弃它们。
我是 Liferay 的新手,似乎我可以使用片段、小部件和 Portlet 做同样的事情。有人可以向我解释一下其中的区别吗?
先感谢您。
liferay-7 ×10
liferay ×7
java ×2
liferay-dxp ×2
osgi ×2
apache-poi ×1
build.gradle ×1
deployment ×1
excel ×1
liferay-aui ×1
orika ×1
portlet ×1