我是Java EE的新手。制作了我的第一个持久化应用程序,但无法部署。
错误信息如下:
NetBeans: Deploying on GlassFish Server
profile mode: false
debug mode: false
force redeploy: true
In-place deployment at C:\Users\HussainAli\Documents\NetBeansProjects\mavenproject4\target\classes
GlassFish Server, deploy, null, false
The module has not been deployed.
See the server log for details.
at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:238)
at org.netbeans.modules.maven.j2ee.ExecutionChecker.performDeploy(ExecutionChecker.java:205)
at org.netbeans.modules.maven.j2ee.ExecutionChecker.executionResult(ExecutionChecker.java:123)
at org.netbeans.modules.maven.execute.MavenCommandLineExecutor.run(MavenCommandLineExecutor.java:235)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
Glassfish窗口日志(无效资源):
原因:com.sun.appserv.connectors.internal.api.ConnectorRuntimeException: 无效资源:jdbc/zoodb__pm 在org.glassfish.jdbcruntime.service.JdbcDataSource.validateResource(JdbcDataSource.java:81)处发生错误 在org.glassfish.jdbcruntime.service.JdbcDataSource.setResourceInfo(JdbcDataSource.java:62)处设置资源信息 在org.glassfish.jdbcruntime.JdbcRuntimeExtension.lookupDataSourceInDAS(JdbcRuntimeExtension.java:136)处查找数据源 在com.sun.enterprise.connectors.ConnectorRuntime.lookupDataSourceInDAS(ConnectorRuntime.java:589)处发现错误 ... 45 more
严重: 准备应用时出现异常: 无效资源: jdbc/zoodb__pm com.sun.appserv.connectors.internal.api.ConnectorRuntimeException: 无效资源: jdbc/zoodb__pm 在 org.glassfish.jdbcruntime.service.JdbcDataSource.validateResource(JdbcDataSource.java:81) 处 在 org.glassfish.jdbcruntime.service.JdbcDataSource.setResourceInfo(JdbcDataSource.java:62) 处 在 org.glassfish.jdbcruntime.JdbcRuntimeExtension.lookupDataSourceInDAS(JdbcRuntimeExtension.java:136) 处 在 com.sun.enterprise.connectors.ConnectorRuntime.lookupDataSourceInDAS(ConnectorRuntime.java:589) 处 在 com.sun.enterprise.connectors.ConnectorRuntime.lookupPMResource(ConnectorRuntime.java:517) 处 在 org.glassfish.persistence.common.PersistenceHelper.lookupPMResource(PersistenceHelper.java:63) 处 在 org.glassfish.persistence.jpa.ProviderContainerContractInfoBase.lookupDataSource(ProviderContainerContractInfoBase.java:71) 处 在 org.glassfish.persistence.jpa.PersistenceUnitInfoImpl.(PersistenceUnitInfoImpl.java:108) 处 在 org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:142) 处 在 org.glassfish.persistence.jpa.PersistenceUnitLoader.(PersistenceUnitLoader.java:107) 处 在 org.glassfish.persistence.jpa.JPADeployer$1.visitPUD(JPADeployer.java:223) 处 在 org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:510) 处 在 org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:230) 处 在 org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:168) 处 在 com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:922) 处 在 com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:431) 处 在 com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219) 处 在 org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491) 处 在 com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:527) 处 在 com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:523) 处 在 java.security.AccessController.doPrivileged(Native Method) 处 在 javax.security.auth.Subject.doAs(Subject.java:360) 处 在 com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:522) 处 在 com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546) 处 在 com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423) 处 在 com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108) 处 在 com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1762) 处 在 com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1674) 处 在 com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:534) 处 在 com.sun.enterprise.v3.admin.AdminAdapter.onMissingResource(AdminAdapter.java:224) 处 在 org.glassfish.grizzly.http.server.StaticHttpHandler.service(StaticHttpHandler.java:297) 处 在 com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:246) 处 在 org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191) 处 在 org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168) 处 在 org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189) 处 在 org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) 处 在 org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288) 处 在 org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206) 处 在 org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136) 处
web.xml
文件配置出了问题! - Am_I_Helpful