Questions tagged [java-ee-8]

Use this tag for questions relating specifically to Java Enterprise Edition 8.

Java Enterprise Edition 8 (JEE8) is a specification defining a collection of Java-based technologies and how they interoperate. JEE8 incorporates features of previous versions and adds:

  • Java Servlet 4.0 API with HTTP/2 support
  • Enhanced JSON support including a new JSON binding API
  • A new REST Reactive Client API
  • Asynchronous CDI Events
  • A new portable Security API
  • Server-Sent Events support (Client & Server-side)
  • Support for Java SE 8 new capabilities (e.g. Date & Time API, Streams API, annotations enhancements)

See Overview below for a list of updated and new JSRs.

Numerous implementations are available in the form of both commercial products and open source projects. Glassfish 5 is the reference implementation for JEE8.

Information

This tag is specific for the Java EE 8 version. See the tag for general Java EE questions.

Useful links

467 questions
1
vote
1 answer

Mockito always returns null as a result of calling an EJB

I'm trying to call the second method of this class, and always get null. Note that it returns new User() however in the test class I always get null: @Stateless public class UserDAO2 { public Connection getConnFromPool(int i) { return…
ps0604
  • 1,227
  • 23
  • 133
  • 330
1
vote
1 answer

Map abstract class to DTO with MapStruct

I found a lot of topics to this but all solutions went into a wrong direction in my eyes. So... How do i use MapStruct mapping for this case? abstract class Person: public abstract class Person implements Serializable{ private String name; …
albert
  • 163
  • 2
  • 3
  • 12
1
vote
1 answer

Failed to initialize Atmosphere Framework on vaadin 14

I have added Vaadin 14 flow in the existing JavaEE 8 application which has Perimeface 6.2 implementations on the frontend using Wildfly 18 as a server container. The application runs okay but before deployment, I get the following error. I have…
itro
  • 7,006
  • 27
  • 78
  • 121
1
vote
1 answer

CDI injection not working in REST Resource in WAS Liberty with Jersey as JAX-RS implementation

I am using websphere liberty 19.0.0.8 and I wanted to use Jersey instead of default CXF for jax-rs implementation. I removed jaxrs-2.1 feature from server xml and packaged jersey implementation jars in my webapp .war.
1
vote
1 answer

CDI context reload in runtime

I have CDI based application. At runtime my application generates custom event that causes bean reload. Bean reload means go through all beans and reinitialize already injected beans. Reinitialization should be aware of beans dependencies. For…
Igor Dumchykov
  • 347
  • 1
  • 15
1
vote
2 answers

Migrating from java 8 to 11 - jaxws-rt

I´ve migrated from Java 8 to Java 11 and I´ve found that some Java EE libraries are deprecated and I have to use some third party dependencies instead. So I´ve added these dependencies to maven pom.xml
Johnczek
  • 532
  • 9
  • 30
1
vote
0 answers

Mysql Driver class com.mysql.jdbc.Driver is not a valid javax.sql.DataSource implementation from wildfly

maybe my setup is quite special, but I do have issues when I define a JDBC Datasource for Java EE container in my web.xml file. I configured my Datasource in my web.xml as follow: java:app/myapp/DS
1
vote
0 answers

404 error thrown whenever I run my java sevlet code on the server

I was working on a java code for servlet programming to implement an application which provides a REST API with endpoints for searching, creating and deleting “server” objects. The server object is passed as a json-encoded message body. Example: {…
1
vote
1 answer

Getting An AccessDeniedException with Tomcat?

I want to have access to static resources outside my webapp so that they don't get destroyed every time I redeploy, but I can't seem to get them I have a servlet that is meant to serve these images via a FileOutputStream, but it can't get the file…
bluesquare
  • 76
  • 1
  • 8
1
vote
0 answers

jax-rs : How to validate pathparam and return bad request if it is not the proper type?

I have this endpoint: @GET @Path("{id}") public Response getActiveById( @PathParam("id") @NotNull(message = "id may not be null") Long id) { try { AccountDTO accountDTO = accountService .getActiveById(id); …
PavlMits
  • 523
  • 2
  • 14
1
vote
1 answer

Retrieve Alternative entityManager on unit test though CDI

I'm using Junit 5, Java bath that run under a webapp EE8 environment. On the web app, I actually have a resources class that is employed as a producer: @ApplicationScoped public class Resources { @Produces public Logger…
Fabrizio Stellato
  • 1,727
  • 21
  • 52
1
vote
2 answers

Install a default DataSource in OpenLiberty by maven plugin

I was trying to set a DefaultDataSource for openliberty 20.0.0.1. The src/liberty/config/server.xml is:
Hantsy
  • 8,006
  • 7
  • 64
  • 109
1
vote
0 answers

Adding internal JAR library to WAR test in Arquillian

I'm trying to test with Arquillian a Java RESTful API (JAX-RS) in a war package. The API in the war calls a method of an EJB that's located in a jar. To test this, I created an Arquillian test that calls the war method. The test is located in a…
ps0604
  • 1,227
  • 23
  • 133
  • 330
1
vote
1 answer

JEE: How to intercept a @PostCostruct method?

I have a bean having: void initialize() method annotated with @PostConstruct. void release() method annotated with @PreDestroy. Some other methods. In addition that bean has a @Interceptors annotation defining some interceptors. One of those…
1
vote
1 answer

JPQL CreateQuery with SYSDate comparison

I have a JPQL query which is giving me error as below and same query running fine when I used NativeSQLQuery, THe same JPQL code was running on JBoss 6 PERFECTLY WITH JAVAEE7 but did not work on PAYARA 5.192 with javaee8. Exception Description:…
Amar
  • 565
  • 2
  • 8
  • 15