问题标签 [open-liberty]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
328 浏览

security - Wim 模型消息的跟踪日志中的 Liberty 登录错误 - ClassCastException Entity 和 LoginAccount

我已将 Websphere Liberty 配置为使用 LDAP 对用户进行身份验证。我已启用安全跟踪 -

com.ibm.ws.security。=全部:com.ibm.ws.webcontainer.security。=全部:com.ibm.oauth。=全部:com.ibm.wsspi.security.oauth20。=全部:com.ibm.ws.transport.http。=全部:org.apache.http.client。=全部

我在 WebSphere Liberty v17.0.0.3webProfile-7.0javaMail-1.5ldapRegistry-3.0中启用了以下功能列表localConnector-1.0

但是,安全内容因错误HTTP 401 (Unauthenticated)而失败。在跟踪文件中,我可以看到 LDAP 能够返回登录的用户数据。但是 WebSphere Liberty 因错误而失败 -

com.ibm.wsspi.security.wim.model.Entity 与 com.ibm.wsspi.security.wim.model.LoginAccount java.lang.ClassCastException 不兼容:com.ibm.wsspi.security.wim.model.Entity 与 com 不兼容.ibm.wsspi.security.wim.model.LoginAccount 在 com.ibm.ws.security.wim.registry.util.SecurityNameBridge.getUserSecurityName(SecurityNameBridge.java:203) 在 com.ibm.ws.security.wim.registry。 WIMUserRegistry.getUserSecurityName(WIMUserRegistry.java:316) 在 com.ibm.ws.security.authentication.internal.jaas.modules.ServerCommonLoginModule.getSecurityName(ServerCommonLoginModule.java:104)

如果此错误是由于任何配置问题引起的,请帮助指导。

0 投票
2 回答
781 浏览

java - 在 WAS Liberty 17.0.0.3 上创建非持久性计时器

在将应用程序迁移到最新的 Liberty 期间,我在创建 Timer 时遇到了一些问题。Timer 在initialize() 方法(@PostConstruct) 中的@Singleton 注释类中创建。代码很简单:

当我部署应用程序时,我收到了为我的持久性计时器创建数据源的建议的异常。我知道 - 默认情况下,计时器是持久性的,需要数据源和表来保持它的状态,但我要求创建非持久性。

我试图从服务器功能中删除对持久性计时器的支持(我将 Java EE 7 Full Platform 功能更改为 Java™ EE 7 Web Profile,因此不再需要 ejb-3.2)。现在我有例外: CNTR4019E:无法创建或访问持久计时器。server.xml 文件中配置的任何功能都不支持持久 EJB 计时器。

所以,看起来服务器忽略了我创建非持久性计时器的要求并总是试图创建持久性。这段代码以前可以与一些旧的 WAS (JEE6) 一起使用,但现在我无法部署它。

有人遇到过这个问题吗?可能是我做错了什么?先感谢您。

0 投票
2 回答
1027 浏览

open-liberty - 开放自由功能

我目前正在评估 Kumuluzee vs Wildfly Swarm vs OpenLiberty。我有一些问题:

  1. 除了 maven 之外,OpenLiberty 是否还有 Gradle 示例/插件。

  2. 是否有可能/记录了如何使用库扩展 OL 本身,而不是将它们放在 web-inf/lib 中。(瘦身战争)。如果可能,是否将此类 jar 排除在重新部署扫描之外(更快的开发周期)?

  3. 在许多情况下,人们希望在单个 jvm(反微服务)中部署多个战争。您可以在 server.xml 文件中列举几个 Web 应用程序吗?

0 投票
2 回答
872 浏览

maven - Websphere Liberty Profile: [WARNING ] SRVE0190E: File not found in library that is contained in the EAR file

Currently I have a problem during migrating a Java Enterprise project form old WAS-8 to Liberty Profile 17. In my case the environment cannto find a bunch of css/js files in the richfaces jar. Loading a page in the browser, WLP17 writes warnings like this into the logfile:

I build the project using maven and I defined the richfaces dependency in the parent pom like this:

Then, I have several EJB and WAR projects that are packed together into an EAR file. The WAR projects using richfaces contain a richfaces dependency with scope provided:

Finally, the EAR pom has the dependency on richfaces to ensure that the library is included in the EAR file. For any reason the liberty is not able to find resources located in the richfaces jar.

I inspected the created EAR file, it contains the richfaces libraries. Then, I inspected the richfaces libraries, the also contain the files that are not found.

Is there any more configuration I have to do?

0 投票
1 回答
1839 浏览

hibernate - 开放自由和休眠

我可以在开放自由中使用 Hibernate 作为 JPA 实现吗?如果存在这样的集成,我会假设它带有分布式缓存和 JTA?

0 投票
1 回答
713 浏览

java - Webpshere Liberty 对 Java 9 的支持

Webpshere Liberty 是否支持 Java 9?截至最新的测试版,它被提到与 Java 8 完全兼容,但没有提到升级。Websphere liberty 是否支持 Java 9 模块路径?

0 投票
1 回答
143 浏览

websphere-liberty - 带有 Java 9 的 Liberty macOS installUtility

在带有 Oracle Java 9.0.1 的 macOS 上运行bin/installUtility install javaee-7.0失败。唯一的输出是:

javax/xml/bind/JAXBException

当我暂时切换到 Java 8 (Zulu 8) 时,它工作正常。

需要哪些 Java 环境?在文档中找不到这个——只记得看到 8 或更高。

0 投票
2 回答
547 浏览

jsf - 如何在 JSF 页面中从 Liberty 基于 FORM 的身份验证获取用户主体?

所以我有这个使用基于表单的身份验证的 JSF 项目。在第一次尝试打开我的 JSF 页面时,我被重定向到我的登录服务器。在那里进行身份验证,成功后我被重定向到我的应用程序。不幸的是,我不知道如何获取身份验证服务器提供的信息,例如用户名。

我有一个页面,其中的文字是“登录为”。应由 ManagedBean 使用 getCurrentUserPrincipal() 方法设置。

该方法当前为空。我用WSSubject.getCallerPrincipal()FacesContext.getCurrentInstance().getExternalContext().getUserPrincipal()进行了尝试,但返回 null。我怎样才能用这种方法获得我需要的信息?甚至可能吗?我不确定您需要什么信息,因此如果缺少某些信息,我会尽可能提供。

0 投票
1 回答
543 浏览

cdi - OpenLiberty 共享库和 CDI

OpenLiberty 提供了共享库的美妙特性,可以在服务器中部署一次,然后(非常精简和快速重新部署)WAR 可以在运行时访问它们。另一方面,CDI 提供了一种减少 bean 扫描的机制,例如:

我的问题是 - 两者如何相互作用:

  1. 在完全没有 CDI 扫描器限制的情况下,Openliberty CDI 扫描器是否会在 WAR 部署时检查共享库中的 bean?
  2. CDI 扫描仪可以从共享库中引用包吗?
0 投票
1 回答
693 浏览

open-liberty - OpenLiberty Microprofile 配置示例?

如何在命令行上将 MP 配置属性文件传递给 OL?wlp/bin/server.bat 甚至不允许传递 Java 系统属性...

我查看了 OL MP 配置示例,它假定配置位于用户 user.home 系统属性中 - 不是很有用。

我阅读了各种 WS Liberty 文档,它们要求我在 XML 中配置属性文件所在的位置——也不是很灵活。其他选项涉及使用环境变量——不是我想要的。

我想要的是像这样灵活的东西:

上面这个例子类似于 Spring/SpringBoot 的做法。谢谢!