Entity declaration inside EAR

343
August 20, 2017, at 2:17 PM

This is the structure of my projects:

AppEjb -> DAO, Remote Beans
AppEjbClient -> DTO, Interfaces
AppEjbEAR -> The EAR with additional libs
AppWS -> The Web Service, using AppEjb with @Inject and @EJB

Right now, my entities are all inside AppEjb and I use the DTO to transfer one entity to the WebService call.

I would like to declare my entities inside my AppEjbClient. But when I do this, all my queries stop working with the following error message:

org.eclipse.persistence.exceptions.JPQLException
Exception Description: Problem compiling [SELECT u FROM User]. 
The abstract schema type 'User' is unknown.

What am I doing wrong here?

Where's the right place for persistence.xml? If possible, I wouldn't like to have to type every entity in my persistence.xml.

Rent Charter Buses Company
READ ALSO
Folders can not be found after converting a JAVA project into a runnable JAR

Folders can not be found after converting a JAVA project into a runnable JAR

I hope somebody can help me with my problemAfter hours of scanning all different posts concerning the abovementioned topic I now decided to answer my own question

309
Java background thread: low priorty

Java background thread: low priorty

I have a web-app which has a background threadThis thread, which is a Executors

369
How can I optimize my 2d java game rendering?

How can I optimize my 2d java game rendering?

My problem is, I have a game with a random generated map and it has only 30-40 fps because of the number of blocks(You can imagine my game like a 2d minecraft)

383
how to know when a select finds 0 rows mysql, getFetchSize() not working

how to know when a select finds 0 rows mysql, getFetchSize() not working

I am trying to make a username only register if that name is not taken, using JDBC connection and checking on SQL DatabaseI have the code that checks for the SELECT * FROM user WHERE username = 'jessica';

305