3
votes

i am trying to debug my project but its showing error message as such :

"cannot Deploy WebForm Deployment Error for module: WebForm: Error occurred during deployment: Exception while preparing the app : 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."

i have done every possible step with the persistence.xml as well as the JPA tables but still it's not deploying. Help!

1
You must provide more details about your issue. For example, your persistence.xml file; what kind of database you use (managed database or not); have you looked your firewall? - G Bisconcini
Could you please share what exactly did u do to solve the problem ? I am facing exactly the same problem. - Ragini

1 Answers

2
votes

You have some sort of DB-connection configured in your app. The message "Error connecting to server localhost on port 1527 with message Connection refused: connect. Error Code: 0" says, your program tries to reach a DB on port 1527. The possibilities are:

  • on the production server is no DB running: install and configure DB
  • the program does not have the rights to access DB
  • the DB-connection on production-server is reached differently than in development - adjust your configuration