Hi:
I'm new into Java ee. I got a tutorial firstcup from oracle java ee page. I followed the tutorial for dukes-age and it works fine.
The tutorial for firstcup-war don't seem to run on my system.

I am using Netbeans 8.0, GlassFish 4.0 and windows 7 operating system.

(1) : I followed the instructions provided and when i run the project the first message I got was to add a server I did not see on the tutorial (firstcup-war).
(2): After adding a glassfish server the project still wasn't deployed on server and i got this warnings and exceptions form the glassfish server:

(2.1):
[I]Warning: RAR5038:Unexpected exception while creating resource for pool DerbyPool. Exception : javax.resource.spi.ResourceAllocationException: Connection could not be allocated because: java.net.ConnectException : Error connecting to server localhost on port 1527 with message Connection refused: connect.
Warning: RAR5117 : Failed to obtain/create connection from connection pool [ DerbyPool ]. Reason : com.sun.appserv.connectors.internal.api.PoolingExc eption: Connection could not be allocated because: java.net.ConnectException : Error connecting to server localhost on port 1527 with message Connection refused: connect.
Warning: RAR5114 : Error allocating connection : [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.]
Severe: Local Exception Stack:
Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.DatabaseExcepti on
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
at org.eclipse.persistence.exceptions.DatabaseExcepti on.sqlException(DatabaseException.java:316)
at org.eclipse.persistence.sessions.JNDIConnector.con nect(JNDIConnector.java:135)[/I]

.....

and chain of other exception that caused the above execption.
(2.2):
Severe: Exception while deploying the app [firstcup-war]
Severe: Exception during lifecycle processing
org.glassfish.deployment.common.DeploymentExceptio n: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.DatabaseExcepti on
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.

.....
(3): On the run(firstcup-war) output page I got this message after the log that says build success:
------------------------------------------------------------------------
Total time: 7.949s
Finished at: Mon Apr 21 17:05:54 WAT 2014
Final Memory: 9M/111M
------------------------------------------------------------------------
NetBeans: Deploying on GlassFish Server
profile mode: false
debug mode: false
force redeploy: true
In-place deployment at C:\Users\NYE\Documents\NetBeansProjects\java ee\firstcup-war\target\firstcup-war-1.0-SNAPSHOT
GlassFish Server, deploy, null, false



Please help me fix this.