JavaEE in netbeans giving BUILD FAILED error upon deployment
Asked Answered
N

2

6

When I try to run my Java EE program in Netbeans consisting of servlets (java pages), JSP's, beans(java pages) and HTML pages I get this error in the output:

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)

And then in the command prompt when I run asant run in the appropriate directory, I get:

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.

Do you know why this would be? Why won't netbeans deploy my application so I can run and test it?

EDIT: ant version is actually came up with...

Apache Ant version 1.6.5 compiled on June 2 2005

The glassfish output logs say:

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)

EDIT: It seems to be regarding my 'stateful' session bean, as when I delete it, it runs perfectly.

Nocuous answered 9/4, 2010 at 0:26 Comment(2)
Caused by: javax.naming.NameAlreadyBoundException: Use rebind to override Maybe you haven't published your statful session bean correctlyMiyasawa
Caused by: javax.naming.NameAlreadyBoundException: Use rebind to override --> This exception is thrown by methods to indicate that a binding cannot be added because the name is already bound to another object.Chamberlin
P
1

My best guess is that you downloaded and installed the 'Web Profile' of GlassFish Server 3 OR you have created a web app that has a deployment descriptor that forces the server to treat it as a Java EE 5 (or even J2EE 1.4) and then created an EJB in that web app... which would probably lead to these sorts of errors.

Pacifistic answered 13/5, 2010 at 22:19 Comment(0)
D
1

It seems you have some fields on your Stateful session bean that may have the same name of another Stateful Session bean fields. It just a guess. There is no much info about your EJBS to make a deep analysis. Hope it helps

Dimenhydrinate answered 29/11, 2012 at 17:10 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.