Skip to main content

Deployment error: Delegate is not set yet...how to solve this error?

3 replies [Last post]
sethu171988
Offline
Joined: 2009-07-06

Hi all,

I am currently working on a web application using netbeans. I am using sun glassfish webspace server 10 and mysql database. I have added portlet plugins to the project. But when i build and deploy the project I get the following error. I am not sure what I have to do. Please guide me. The error is as follows

init:
deps-module-jar:
deps-ear-jar:
deps-jar:
library-inclusion-in-archive:
Copying 14 files to C:\Users\Sambaash\Documents\NetBeansProjects\CustomerApplication\build\web\WEB-INF\classes
library-inclusion-in-manifest:
compile:
compile-jsps:
Deployment error:
Delegate is not set yet
See the server log for details.
at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:198)
at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:103)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor170.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:273)
at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:499)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:151)
Caused by: java.lang.IllegalStateException: Delegate is not set yet
at org.netbeans.modules.j2ee.deployment.impl.TargetModule.delegate(TargetModule.java:180)
at org.netbeans.modules.j2ee.deployment.impl.TargetModule.getTarget(TargetModule.java:194)
at org.netbeans.modules.j2ee.deployment.impl.TargetServer.canFileDeploy(TargetServer.java:218)
at org.netbeans.modules.j2ee.deployment.impl.TargetServer.supportsDeployOnSave(TargetServer.java:707)
at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:167)
... 16 more
BUILD FAILED (total time: 0 seconds)

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
echoside
Offline
Joined: 2013-09-10

I had a similar problem and I use Netbeans with GlassFish, I fixed this problem by removing the GlassFish server from Netbeans and re-adding it to Netbeans.

To Remove and Re-Add your GlassFish:

Goto the Services tab > Expand Servers > Right Click the GlassFish server your project uses and select Remove.

Now go back to the Projects tab, right click your Web Application Project and select "Resolve Missing Server Problem"

Now Re-add your GlassFish server.

This fixed the problem for me, good luck!

rmunian
Offline
Joined: 2009-07-13

Im not sure what caused this, but I think i have a way to correct. i deleted ~/.netbeans/6.7/config/J2EE/TargetModules/* from my home dir, and it started working again. Let me know if that works for you.

sethu171988
Offline
Joined: 2009-07-06

Hi,

I also found that way of solving problems. It basically did that by luck!!!! anyways it is fixed and working fine. I think the problem is because of not proper clean and build think it is an error with netbeans.

thanks a lot for replyin

Regards,

Sethu