Questions tagged [open-liberty]
Open Liberty is a highly composable, fast to start, dynamic application server runtime environment distributed under the EPLv1 license.
358
questions
0
votes
1
answer
15
views
Getting CWWKF0044E incompatible feature error using Open Liberty with Maven, but I didn't configure incompatible features
When using Open Liberty version 22.0.0.5 and liberty-maven-plugin version 3.3 with a server config (server.xml) configuring just a single feature:
<featureManager>
<feature>...
1
vote
0
answers
23
views
Attribute location of element springBootApplication is ignored
I'm following the Containerizing, packaging, and running a Spring Boot application guide. After getting it to run, I want to use my own Spring Boot application. So I took my jar, put it into the ...
0
votes
0
answers
25
views
Running Open-Liberty as a non root user
We are trying to run an Open Liberty on a Red Hat server 7.9, however, the service will not start.
Systemd script which is starting the application is giving the following message:
OPENLP.service - ...
0
votes
0
answers
27
views
Maven: how to mitigate mvn "fileNameMapping has been removed ... use outputFileMapping instead"
using mvn install I get the error message "fileNameMapping has been removed with version 3.0.0 but you are still using it...".
First of all, I am not using "fileNameMapping" ...
0
votes
0
answers
27
views
How to fetch ${wlp.server.name} in log4j2.properties when we are using websphere liberty profile
My application is using websphere liberty profile(wlp) as server and my application is springboot application. I have a bootstrap file like below:
Server_log_filepath=/somepath/${wlp.server.name}
...
0
votes
0
answers
20
views
PropagationHelper.getIdToken() returning null
What trying to achieve is to get IdToken after authentication . We integrate j2ee application with keycloak for authentication in openliberty.
Application is successfully able to authenticate, but ...
0
votes
2
answers
33
views
How can I return a custom reponse for a bean validation error under Open Liberty?
We are using beanValidation-2.0 and cdi-2.0 under Open Liberty 20.0.0.3. This works fine in that Open Liberty returns a 400 Bad Request response containing the bean validation error message when a a ...
1
vote
0
answers
61
views
Integration Testing for Microprofile / OpenLiberty
I have joined a new project who are using Microprofile/Openliberty. I have searched around quite a bit on the internet and it doesnt look like there is a straight forward way to write integration ...
1
vote
0
answers
42
views
JBeret in Java EE environnement that is not Wildfly
I'm trying to use JBeret implementaton of JSR352 in an EE environment but not Wildfly/JBoss.
I'm working with JBeret 1.4.7.Final deployed on Open Liberty 21.0.0.12. I know that Open Liberty have its ...
3
votes
2
answers
99
views
open-liberty and openapi(/ui) and "no operations defined in spec!"
I can not find out why my rest api endpoints are not visible / executable in openapi/ui with openliberty. openapi/ui reports "there are no operations defined in spec!" My project consists of ...
0
votes
1
answer
68
views
OpenLiberty JakartaEE with IBM MQ Resorce Adapater - java.lang.NoClassDefFoundError
I'm upgrading an OpenLiberty application to Jakarta EE 9.1 that integrates with IBM MQ using it's JMS resource adapter.
Resource adapter is declared in the server.xml like this:
<resourceAdapter id=...
0
votes
2
answers
73
views
Consume and validate JWT in Open Liberty
I'm trying to use the jwt-1.0 feature in Open Liberty.
The JwtBuilder API is pretty nice and allows to set expiration, sign, encrypt and build a token programmatically (and everything else needed).
...
0
votes
0
answers
74
views
Upgrading to Springboot 2.5.x crashes application start on Liberty server
Spring Boot version (spring-boot-starter-parent): 2.5.1
Eclipse 2021
Liberty 20.x
After update to Spring Boot 2.5.1, I am getting following error when starting Liberty server to host my API
[AUDIT ] ...
0
votes
0
answers
30
views
How to utilize jeemanagement-1.1 performance statistics in openliberty
We're migration a legacy software from WebSphere traditional to OpenLiberty.
Just recently we have been extracting Performance Data based on the jeemanagement specification which says:
JSR77.6.1 ...
1
vote
1
answer
43
views
Using Open Liberty with EclipseLink JPA provider - javax.persistence.sql-load-script-source not loading
Using Open Liberty version 21.0.0.12 with jpa-2.2 configured among features and Derby DS config:
server.xml
<featureManager>
<feature>jaxrs-2.1</feature>
<feature>...
1
vote
1
answer
52
views
open-liberty in dev mode throws "Error compiling Java files: error: option --source cannot be used together with --release" even for "empty" projects
I'm just starting to explore openliberty, so maybe there is something trivial I did not see.
The project is generated by https://openliberty.io/start/ with java version 17, jakarta ee 9.1 and ...
0
votes
2
answers
112
views
How to read Open-Liberty server config property file value in java class?
I have a scenario where I need to read an url from my property file I have created in a server config directory of my created server i.e. C:\<path to liberty installation>\openliberty-21.0.0.11\...
0
votes
1
answer
45
views
JSP-Error: Only a type can be imported. com.ibm.ws.webcontainer.webapp.WebAppErrorReport resolves to a package
I am migrating a project from Websphere server to OpenLiberty-21.0.0.1 along with other technical stack. While running the application , in one of the JSP page it gives me runtime error as bellow:
...
0
votes
1
answer
89
views
Why is OpenLiberty datasource not available in unit tests?
OpenLiberty is running in dev-mode.
Somewhere in my code i use
Context initContext = new InitialContext();
DataSource ds = (DataSource) initContext.lookup("app/myDB");
with a datasource ...
0
votes
1
answer
106
views
What are the differences in features between Websphere Liberty Core, Websphere Liberty Base and Open Liberty versions?
What are the differences in features between Websphere Liberty Core, Websphere Liberty Base and Open Liberty versions?
Apart from the Websphere Liberty ones requiring a license, of course and Open ...
1
vote
1
answer
107
views
How to require client certificate authentication in only specific java servlets?
I am trying to create a java servlet application that requires client certificate authentication, but only on specific pages. I would like to have a landing page that doesn't require any sort of ...
1
vote
2
answers
128
views
OpenLiberty JakartaEE 9: access TransactionManager
On Docker Image open-liberty:22.0.0.1-full-java17-openj9 with the following activated features:
<featureManager>
<feature>persistence-3.0</feature>
<feature>localConnector-...
1
vote
2
answers
64
views
microprofile-config.properties as ConfigMap in Openliberty
This example shows how to use ConfigMaps with openliberty.
The problem to me is that you have to create a section for the env variable in each of kubernetes deployment.
containers:
- name: ...
0
votes
1
answer
54
views
NullPointer while using JPA EntityManager in a ThredPoolExecutor
I'm implementing a JavaEE8 application using CDI and running on an Open Liberty (v20.0.0.4). The application has a event-triggered job, which runs some code in an separate thread using the ...
0
votes
0
answers
33
views
Azure Pipeline - Open liberty server process quits when the pipeline execution ends
I have an Azure pipeline that deploys new version of an Openliberty server and starts the server in an Azure Linux (RHEL) VM
stages:
- stage: Deploy
jobs:
- deployment: ...
0
votes
1
answer
61
views
How does WSSubject.getCallerPrincipal() extract a logged in user data in Java EE application?
I am being new to Java EE application. I am working on one of the legacy project migration task, while doing that I need to get some idea how the authentication machanism works in the application. It ...
0
votes
1
answer
85
views
Springboot: Spring JPA - How to get datasource properties from server container
I use WAS Liberty Server container which provides server.xml and server.env file for configuring many things in addition to configuring DataSource properties such as url, username, password etc.
For ...
0
votes
1
answer
41
views
Open Liberty : sessionCache for SIP session
I would like to know if the functionnality described in the article JCache session persistence is applicable for SIP session as well ?
If not, is there an other way to synchronize sip session between ...
0
votes
1
answer
64
views
Use @ArquillianResource to inject URL when deploying an EnterpriseArchive
I am using Arquillian for functional testing an application against a Jakarta EE application server.
I am running into an issue where I am unable to properly inject the servlet URL to test against.
...
0
votes
1
answer
88
views
Openliberty arquillian testing
I'm running into an issue when running an integration test with arquillian against openliberty. Basically it is timing out on the deployment. Apparently you can set appDeployTimeout which I have done. ...
1
vote
2
answers
70
views
Springboot: Can springboot access server container configuration files to read needed variables instaed from application.properties file
I know Springboot applications can use application.properties or application.yaml files to retrieve variables like database connectivity setting, username, password etc.
However, and because of ...
0
votes
2
answers
113
views
Share sessions data between different apps using httpSessionCache and HazelCast in OpenLiberty
Usings the OpenLiberty sessionCache-1.0 feature with HazelCast enables you to easily persist and share session data in a HazelCast in-memory cluster as explained here: https://openliberty.io/guides/...
0
votes
1
answer
57
views
Multiple spring boot jar deployment open liberty
How to deploy multiple spring boot application jar in open liberty server?
1
vote
1
answer
165
views
JPA: How to specify tables from different DB2 schemas using @NamedQuery. Schema.Table cannot be the first declaration of the FROM clause
I encountering a problem when sending a GET request from Postman to test my endpoints. The same NamedQueries worked before with Derby with just the one Schema, so no need to differentiate then. I have ...
0
votes
1
answer
339
views
Entity Manager is null when trying to connect to Dockerised DB2 in Java using JPA, also using maven & Open Liberty
So I'm developing an API and I'm trying to connect to a local docker instance of DB2 from java using JPA entity manager. After running Apache Maven and getting build success, I try a GET request from ...
1
vote
0
answers
144
views
Serve static files in openLiberty
I am trying to serve a static file on OpenLiberty application but haven't found a straightforward way to do so.
At first I simply put the file in the src/resources and webapp/META-INF folder but it ...
0
votes
0
answers
64
views
CDI module in EJB-jar deployed in an EAR
I have the following setup:
EAR
app.war (WAR module)
@Inject SomeService --> works!
depends on ejb
ejb.jar (EJB module)
@Stateless SomeServiceBean
@Inject Foo --> does not work
beans.xml, ...
2
votes
1
answer
206
views
Is it possible to unset a JVM option?
Our app server, OpenLiberty, supports config defaults and overrides as defined at https://openliberty.io/docs/latest/reference/config/server-configuration-overview.html#jvm-options
Options are read ...
0
votes
2
answers
124
views
Liberty JavaEE 8 catch ConstraintViolationException
Is there any way to catch org.hibernate.exception.ConstraintViolationException in Liberty application server ?
I have a this repository code :
@Stateless
@TransactionManagement(...
0
votes
2
answers
193
views
JNDI Liberty Server - Not Working if using ${server.config.dir}
I am using jdk 11 with Eclipse 2021 and WAS Liberty 21.0.0.4.
I also have OpenLiberty 21.0.0.4 and the same issue happens there.
I have ConnectionFactory code that looks like this
public class ...
0
votes
2
answers
101
views
How can I eliminate "Content-Language" header from Liberty's response?
WebSphere Liberty and Open Liberty, all version.
I want remove "Content-Language" header from Servlet/JSP response, because of browser translation function accidentally popup. It seems that ...
0
votes
1
answer
78
views
@RequestScoped + new thread
We use javaEE RequestScoped with OpenLiberty and new threads via EJB @Asynchronous. I am just curious what the actual value comes from when we inject RequestScoped bean inside a new thread? Will the ...
0
votes
1
answer
144
views
Openliberty datasource always uses 1 database connection
I have configured openliberty (version 21) with a database (oracle) connection as follows in the server.xml :
<dataSource jndiName="jdbc/myds" transactional="true">
&...
0
votes
0
answers
62
views
OpenLiberty mpRestClient tutorial feature definition could not be found
I was excited to read about OpenLiberty's template interface feature to consume Rest endpoints. However, when I clone and run (liberty:run/liberty:debug) the sample project I see the following output ...
0
votes
0
answers
580
views
Handler dispatch failed; nested exception is java.lang.NoSuchMethodError: org.bouncycastle.asn1.ASN1ObjectIdentifier.e
When I am deploying in liberty server I am getting this error
it is working in tomcat server but throwing error in IBM open liberty server
[ERROR ] SRVE0777E: Exception thrown by application class '...
1
vote
1
answer
94
views
Compile Maven project using open liberty 21.0.0.8
Up to version 21.0.0.7 it was possible to compile project sources by including Maven dependencies with the following Maven coordinates:
<dependency>
<groupId>io.openliberty.features<...
0
votes
1
answer
57
views
Is there a way to prevent MPJwt authenticating unprotected / permitted endpoints. Using Openliberty server
Mpjwt configuration for open liberty server.xml
<mpJwt
id="keycloakJwt"
jwksUri="https://auth.ura.go.ug/auth/realms/sso/protocol/openid- connect/certs"
issuer="...
1
vote
1
answer
83
views
Location of compiled JSP in Open Liberty
I added this config element to my server.xml -
<jspEngine keepGenerated ="true"/>
Will this generate compiled jsp to the disk somewhere? IF so where? My Open Liberty server started ...
0
votes
1
answer
305
views
Open-liberty how to setup a log4j2 configuration?
title says it all. How do I setup a log4j2 configuration in my Open-liberty project? I've added my log4j2.xml file in the resources folder and I use the following dependency in my pom.xml:
<!-- ...
0
votes
1
answer
133
views
How can I provide an own implementation of HttpAuthenticationMechanism in Open Liberty
In a simple app that I run on Open Liberty 21.0.0.8, I have provided an implementation of HttpAuthenticationMechanism:
// imports omitted
@CustomFormAuthenticationMechanismDefinition(
...