Jakarta ee 甲骨文第一杯教程(第一杯大战)

Jakarta ee 甲骨文第一杯教程(第一杯大战),jakarta-ee,Jakarta Ee,我是JavaEE新手。我从OracleJavaEE页面获得了一个教程firstcup。我遵循dukes age的教程,效果很好。 firstcup war的教程似乎没有在我的系统上运行 我使用的是Netbeans 8.0、GlassFish 4.0和windows 7操作系统 1。我按照提供的说明进行操作,在运行项目时 我收到的第一条消息是添加了一个服务器,但我在服务器上没有看到 教程(第一杯战争) 2.添加glassfish服务器后,项目仍然没有部署到服务器上 服务器和我从glassfish得

我是JavaEE新手。我从OracleJavaEE页面获得了一个教程firstcup。我遵循dukes age的教程,效果很好。 firstcup war的教程似乎没有在我的系统上运行

我使用的是Netbeans 8.0、GlassFish 4.0和windows 7操作系统

1。我按照提供的说明进行操作,在运行项目时 我收到的第一条消息是添加了一个服务器,但我在服务器上没有看到 教程(第一杯战争)

2.添加glassfish服务器后,项目仍然没有部署到服务器上 服务器和我从glassfish得到了警告和异常 服务器:

2.1

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.PoolingException: 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.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
  at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:316)
  at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:135)
.....

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.DeploymentException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): 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.
.....
3.

在run(firstcup war)输出页面上,我在日志后面看到这样一条消息,上面写着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

请帮我解决这个问题。

在教程中,maven只创建一个war文件。您必须使用glassfish控制台将其部署到glassfish服务器

http://localhost:4848
您还必须启动Java数据库

asadmin start-database