Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Eclipse Web Tools Platform Project (WTP) » Could not find required bundle slf4j.api(Error msg when launching J2EE Preview of simple HelloWorld Eclipse JEE project)
Could not find required bundle slf4j.api [message #1851783] Fri, 15 April 2022 12:16 Go to next message
Meik Neubauer is currently offline Meik NeubauerFriend
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...
Re: Could not find required bundle slf4j.api [message #1851788 is a reply to message #1851783] Fri, 15 April 2022 14:24 Go to previous message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4438
Registered: July 2009
Senior Member

That is a bug, please report it to https://bugs.eclipse.org/bugs/enter_bug.cgi?product=WTP%20ServerTools&component=jst.server .

Regardless, the Preview Server does not support running JSPs. It can download Tomcat for you
when you go to add it as a server runtime.


_
Nitin Dahyabhai
Eclipse Web Tools Platform

[Updated on: Fri, 15 April 2022 14:25]

Report message to a moderator

Previous Topic: eclipse-jee-2021-12-R-linux-gtk-x86_64 WTP plugin and m2e plugin
Next Topic:Building JPA Project: beancreation"
Goto Forum:
  


Current Time: Mon May 06 03:13:35 GMT 2024

Powered by FUDForum. Page generated in 0.02957 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top