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
2
votes
1 answer

How to add Postgres Driver to Open Liberty?

I am implementing a basic REST API with Micorprofile 3.2 and deploying it with Open Liberty. The server.xml,
max
  • 45
  • 1
  • 5
2
votes
1 answer

Accessing Files In webapp Folder During Unit Testing

I've seen several variations of this question on StackOverflow, but none describe my scenario exactly, or offer a solution that works for me. I'm building a Java EE web game. I'm using JUnit to do unit testing during the build process. In my…
Tim Gustafson
  • 177
  • 1
  • 11
2
votes
1 answer

Feign throw error instead of return ResponseEntity, how to go back to the caller method

I would like to understand how to do with the following, I have a microservice who need to get a product: @RequestMapping("/details-produit/{id}") public String ficheProduit(@PathVariable int id, Model model){ …
2
votes
2 answers

Access JAX-RS resource annotations from a JsonbSerializer

I have an application running on Payara 4 using a custom GSON JSON adapter. I would like to migrate to Payara 5 (5.191) and start using JSON-B. In our current application we can control the JSON output using annotations on a resource. For example…
Jasper de Vries
  • 19,370
  • 6
  • 64
  • 102
2
votes
4 answers

Hibernate @ManyToMany, error : relation does not exists

I'm trying to implement a many-to-many relation with 2 entities: Book and Authors. A book can be written by multiples authors, and authors can have written multiple books. But when I try to persist a book with his authors, I got an error: relation…
Alexis Brunet
  • 335
  • 5
  • 15
2
votes
3 answers

Cannot generate database schemas from model @Entity classes in GlassFish 5 server using MySQL

Hello I have got problem with enabling auto generating database tables from java models @Entity classes. I have tried almost everything. I have created maven project in Intellij Idea at first I have downloaded JavaEE 8 api implementation which I am…
Ppyyt
  • 125
  • 2
  • 9
2
votes
1 answer

Unsatisfied dependencies for type SecurityContext with qualifiers @Default

I'm trying to inject a SecurityContext into a session bean. The container is an out-of-the-box, standalone Wildfly 15.0.1 application server running on OpenJDK 11. When I try to deploy that application, I get the following: WELD-001408: Unsatisfied…
Olivier Grégoire
  • 33,839
  • 23
  • 96
  • 137
2
votes
1 answer

Should I Use CDI javax.inject.Singleton for the beans that dont need serialization, proxies, or decorations

I understand how ApplicationScoped and CDI javax.inject.Singleton work, and I understand the difference between these two scopes. My app has a lot of beans that don't need serialization, proxies, or decorations, so I am considering switching those…
LHA
  • 9,398
  • 8
  • 46
  • 85
2
votes
1 answer

NullPointerException getting bean class name in @Produces method

I have this LoggerProducer class that's injected in a @Stateless bean to generate log entries as explained here. Problem is that when CustomerBean is invoked (without even calling logger.info), the @Produces method (that retrieves the bean class…
ps0604
  • 1,227
  • 23
  • 133
  • 330
2
votes
2 answers

ConstraintValidator Double time call isValid() method

Any Body explain me why isValid() method of ConstraintValidator class called twice ? for example this is my example code : @POST @Path("/json/dog") @Produces("application/json") @Consumes("application/json") public Response…
mah454
  • 1,571
  • 15
  • 38
2
votes
1 answer

IllegalArgumentException: No handler can be found for the key 'javax.security.auth.Subject.container'

I am basically following this tutorial: https://www.ibm.com/developerworks/java/library/j-javaee8-security-api-4/index.html?ca=drs- My development environment: TomEE 8.0 M1 Plume pom.xml
ThanhLoyal
  • 393
  • 3
  • 11
2
votes
0 answers

jax-rs sse client with Singleton in Glassfish/Payara

About jax-rs client with SSE in EJB Singleton, I've tried with Payara server full-5.183 (without docker) for this example, [https://abhirockzz.wordpress.com/2017/07/27/jax-rs-2-1-sse-client-api-example-using-glassfish-5-on-docker/], but failed.…
PeterL355
  • 75
  • 1
  • 9
2
votes
2 answers

Spring Boot Deployment in different environments

I am pretty new to spring boot, We are working on a spring boot application(packaging as a war file). When deploying this war file in higher environments on a tomcat server, 1. Can we configure the application.properties for diff environments…
PragmaticFire
  • 65
  • 1
  • 1
  • 11
2
votes
1 answer

JMS MessageListener not working on Liberty

I working on Liberty 18.0.0.2 with JavaEE 8 full profile . I configured JMS 2 on server.xml with this content : javaee-8.0
mah454
  • 1,571
  • 15
  • 38
2
votes
0 answers

How can I add simple String value to JsonObjectBuilder?

This is a follow-up question from Java JsonObjectBuilder adding extra 'metadata' when added as child to JsonObjectBuilder. When I add a String, I see "href":{ "chars":"http://test.com/test/1", "string":"http://test.com/test/1", …
Jin Kwon
  • 20,295
  • 14
  • 115
  • 184