Could not find required bundle slf4j.api [message #1851783] |
Fri, 15 April 2022 12:16 |
Meik Neubauer Messages: 1 Registered: April 2022 |
Junior Member |
|
|
Eclipse IDE for Enterprise Java and Web Developers - Version: 2022-03 (4.23.0) - Build id: 20220310-1457
(pristine install with Eclipse Installer on Linux (Ubuntu 20.04LTS))
Eclipse configuration:
Java -> Installed JRE: Adoptium Temurin jdk-8u322-b06
Server -> Runtime Environments:
Jakarta EE 8.0.0 Runtime Library: jakarta.jakartaee-api-8.0.0.jar
J2EE Preview
HTTP Preview
Run Configuration:
J2EE Preview at localhost: with above JRE System Library
With the
File -> New...
wizard I create a
Java EE -> Enterprise Application Project
with a full-blown subconfiguration, i.e. with Client, Connector, EJB, and Web modules
Then I create simple HelloWorld content in the Web module, i.e. index.jsp does
<jsp:forward page="/hello" />
with /hello mapped to the servlet. Servlet in doGet(...) sets a string attribute and forwards to hello.jsp, which in the body just has
<%=(String)request.getAttribute("hello_string")%>
That's it... pretty simple.
I then use Ant to create a war-file.
Trying to run the project with the 'J2EE Preview at localhost' run configuration results in an Eclipse error popup window:
'Launching J2EE Preview at localhost' has encountered a problem.
Could not find required bundle slf4j.api
I guess that the slf4j.api bundle mentioned in the error message needs to be added to MANIFEST.MF in some way. Tried this - no success (but maybe I did not specify it correctly (I have no experience with OSGi)).
The bundle itself is available in Eclipse:
*** Plug-in Registry:
ch.qos.logback.slf4j (1.2.3.v20200428-2012) "SLF4J API Module" [Resolved]
org.eclipse.m2e.maven.runtime.slf4j.simple (1.18.1.20211008-0657) "M2E SLF4J-Simple Binding for Embedded Maven Runtime" [Resolved]
org.slf4j.api (1.7.30.v20200204-2150) "SLF4J API Module" [Resolved]
*** Current Install Configuration:
Id: ch.qos.logback.slf4j, Version: 1.2.3.v20200428-2012, Location: reference:file:/home/meik/.p2/pool/plugins/ch.qos.logback.slf4j_1.2.3.v20200428-2012.jar
Id: org.eclipse.m2e.maven.runtime.slf4j.simple, Version: 1.18.1.20211008-0657, Location: reference:file:/home/meik/.p2/pool/plugins/org.eclipse.m2e.maven.runtime.slf4j.simple_1.18.1.20211008-0657
Id: org.slf4j.api, Version: 1.7.30.v20200204-2150, Location: reference:file:/home/meik/.p2/pool/plugins/org.slf4j.api_1.7.30.v20200204-2150.jar
My questions are:
Is my assumption right that MANIFEST.MF needs to utilize slf4j.api in some way?
If yes, how should it be specified?
If no, what is the root cause of the problem and how can it be fixed?
Thanks...
|
|
|
|
Powered by
FUDForum. Page generated in 0.02083 seconds