I created an eclipse (v.4.5) EAR project which hosts as a deployment assembly a EJB, JPA and WAR project.
Source:
/EarContent
PersonEJB
PersonJPA
PersonWAR
Deploy Path:
PersonEJB.jar
lib/PersonJPA.jar
PersonWAR.war
The deployment of the EAR-file always fails on glassfish 3.1.2.2 (build 5) with the following error:
SEVERE: Exception while deploying the app [firstcup-war] : Exception [EclipseLink-4002](Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: java.net.ConnectException : Error connecting to server localhost on port 1527 with message Connection refused: connect. Error Code: 0
The persistence.xml (JPA project) and application.xml (EJB project) are valid and in the META-INF folders.
If assign the EJB project an additional JPA project facet and delete the JPA project the deployment works flawless! Why? - What is wrong here?
Greetings
JustOneQuestion