java build failed_netbeans中的JavaEE在部署时出现BUILD FAILED错误

当我尝试在由Servlet(

java页面),JSP,bean(java页面)和HTML页面组成的Netbeans中运行我的

Java EE程序时,我在输出中出现此错误:

In-place deployment at C:\Users\Derek\Documents\NetBeansProjects\EJBProject\EJBProject-war\build\web

Initializing...

deploy?path=C:\Users\Derek\Documents\NetBeansProjects\EJBProject\EJBProject-war\build\web&name=EJBProject-war&force=true failed on Personal GlassFish v3 Domain

C:\Users\Derek\Documents\NetBeansProjects\EJBProject\EJBProject-war\nbproject\build-impl.xml:611: The module has not been deployed.

BUILD FAILED (total time: 1 second)

然后在命令提示符中,当我在相应的目录中运行asant运行时,我得到:

C:\Users\Derek\Documents\NetBeansProjects\EJBProject\nbproject\build-impl.xml:19: Class org.apache.tools.ant.taskdefs.condition.Not doesn’t support the nested “antversion” element.

你知道为什么会这样吗?为什么netbeans不会部署我的应用程序,所以我可以运行并测试它?

编辑:

蚂蚁版实际上是想出来的……

Apache Ant version 1.6.5 compiled on June 2 2005

glassfish输出日志说:

SEVERE: Exception while loading the app

java.lang.RuntimeException: EJB Container initialization error

at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:219)

at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:197)

at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:63)

at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:175)

at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:216)

at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:338)

at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:183)

at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272)

at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:305)

at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)

at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1176)

at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)

at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)

at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224)

at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:365)

at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:204)

at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)

at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100)

at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:245)

at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)

at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)

at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)

at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)

at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)

at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)

at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)

at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)

at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)

at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)

at com.sun.grizzly.ContextTask.run(ContextTask.java:69)

at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)

at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)

at java.lang.Thread.run(Thread.java:619)

Caused by: java.lang.RuntimeException: Error while binding JNDI name x.results#x.results for EJB : resultsBean

at com.sun.ejb.containers.BaseContainer.initializeHome(BaseContainer.java:1530)

at com.sun.ejb.containers.StatefulSessionContainer.initializeHome(StatefulSessionContainer.java:214)

at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:161)

at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:207)

... 32 more

Caused by: javax.naming.NameAlreadyBoundException: Use rebind to override

at com.sun.enterprise.naming.impl.TransientContext.doBindOrRebind(TransientContext.java:275)

at com.sun.enterprise.naming.impl.TransientContext.bind(TransientContext.java:214)

at com.sun.enterprise.naming.impl.SerialContextProviderImpl.bind(SerialContextProviderImpl.java:79)

at com.sun.enterprise.naming.impl.LocalSerialContextProviderImpl.bind(LocalSerialContextProviderImpl.java:81)

at com.sun.enterprise.naming.impl.SerialContext.bind(SerialContext.java:586)

at com.sun.enterprise.naming.impl.SerialContext.bind(SerialContext.java:602)

at javax.naming.InitialContext.bind(InitialContext.java:404)

at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.publishObject(GlassfishNamingManagerImpl.java:206)

at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.publishObject(GlassfishNamingManagerImpl.java:187)

at com.sun.ejb.containers.BaseContainer$JndiInfo.publish(BaseContainer.java:5484)

at com.sun.ejb.containers.BaseContainer.initializeHome(BaseContainer.java:1515)

编辑:

它似乎是关于我的’有状态’会话bean,因为当我删除它时,它运行完美.

  • 0
    点赞
  • 0
    收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
©️2022 CSDN 皮肤主题:1024 设计师:我叫白小胖 返回首页
评论

打赏作者

家有萌小主

你的鼓励将是我创作的最大动力

¥2 ¥4 ¥6 ¥10 ¥20
输入1-500的整数
余额支付 (余额:-- )
扫码支付
扫码支付:¥2
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值