This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 231305 - NPE in getDirectoryForNewApplication on deployment to glassfish 4
Summary: NPE in getDirectoryForNewApplication on deployment to glassfish 4
Status: RESOLVED INCOMPLETE
Alias: None
Product: javaee
Classification: Unclassified
Component: Maven (show other bugs)
Version: 7.4
Hardware: PC Linux
: P3 normal (vote)
Assignee: Martin Janicek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-15 15:03 UTC by everflux
Modified: 2014-11-03 11:27 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description everflux 2013-06-15 15:03:49 UTC
Product Version: NetBeans IDE Dev (Build 201306142301)

I have a multi module maven project with a web module.
When trying to deploy to Glassfish 4 I get the following error:

NetBeans: Deploying on GlassFish Server
    profile mode: false
    debug mode: false
    force redeploy: true
Starting GlassFish Server
GlassFish Server is running.
Deployment error.
See the server log for details.
	at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:245)
	at org.netbeans.modules.maven.j2ee.ExecutionChecker.performDeploy(ExecutionChecker.java:184)
	at org.netbeans.modules.maven.j2ee.ExecutionChecker.executionResult(ExecutionChecker.java:135)
	at org.netbeans.modules.maven.execute.MavenCommandLineExecutor.run(MavenCommandLineExecutor.java:235)
	at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
Caused by: java.lang.NullPointerException
	at org.netbeans.modules.j2ee.deployment.plugins.spi.IncrementalDeployment.getDirectoryForNewApplication(IncrementalDeployment.java:147)
	at org.netbeans.modules.j2ee.deployment.impl.InitialServerFileDistributor.distribute(InitialServerFileDistributor.java:105)
	at org.netbeans.modules.j2ee.deployment.impl.TargetServer.initialDistribute(TargetServer.java:261)
	at org.netbeans.modules.j2ee.deployment.impl.TargetServer.deploy(TargetServer.java:666)
	at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:197)
	... 4 more
Comment 1 Martin Janicek 2013-06-17 07:57:51 UTC
Hi, unfortunately this type of exception is very general for deployment issues and I can't find the source of the problem without reproducible test case. Could you please share your project or ideally create another one with a minimal setup?
Thanks in advance!
Comment 2 everflux 2013-06-17 08:41:19 UTC
I could not reproduce it with the very same project :(

clean-build / restart Netbeans / clean-build somehow solved the problem and it did not appear again (yet).
Comment 3 Martin Janicek 2013-06-17 08:49:24 UTC
Ok, in that case I'm suggesting to close the ticket as INCOMPLETE for now and if you will find anything suspicious or any additional information, please reopen it again and I'll take a look at it.
Comment 4 lathspell 2013-10-31 10:13:47 UTC
Hello 

I experienced the same problem. What information do you need?

NetBeans: Deploying on GlassFish Server
    profile mode: false
    debug mode: false
    force redeploy: true
Deployment error.
See the server log for details.
	at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:273)
	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)
Caused by: java.lang.NullPointerException
	at org.netbeans.modules.j2ee.deployment.plugins.spi.IncrementalDeployment.getDirectoryForNewApplication(IncrementalDeployment.java:147)
	at org.netbeans.modules.j2ee.deployment.impl.InitialServerFileDistributor.distribute(InitialServerFileDistributor.java:105)
	at org.netbeans.modules.j2ee.deployment.impl.TargetServer.initialDistribute(TargetServer.java:261)
	at org.netbeans.modules.j2ee.deployment.impl.TargetServer.deploy(TargetServer.java:666)
	at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:225)
	... 4 more
Comment 5 lathspell 2013-10-31 10:27:19 UTC
Additional information, I use NetBeans IDE 7.4 (Build 201310111528) and the GlassFish Server Open Source Edition 4.0 (build 89) just downloaded using NetBeans. So my project was the first app in "domain1".
Comment 6 Martin Janicek 2013-11-04 12:43:51 UTC
(In reply to lathspell from comment #4)
> Hello 
> 
> I experienced the same problem. What information do you need?

The same I asked in comment 1.. please either share the project where you are able to reproduce the problem or ideally create another one with a minimal setup. Thanks in advance
Comment 7 Martin Janicek 2013-11-25 12:58:39 UTC
Also the server log would be appreciated. Closing as incomplete until more information will be available.
Comment 8 ingi_erli 2014-08-18 12:22:31 UTC
Hello!

Has this been resolved ?

Running on 'NetBeans IDE 7.4 (Build 201310111528)' and on GlassFish Server Open Source Edition 4.0 (build 89).
Suddenly this morning, the error popped up.

"
NetBeans: Deploying on GlassFish-4
    profile mode: false
    debug mode: false
    force redeploy: true
Deployment error.
See the server log for details.
	at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:273)
	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)
Caused by: java.lang.NullPointerException
	at org.netbeans.modules.j2ee.deployment.plugins.spi.IncrementalDeployment.getDirectoryForNewApplication(IncrementalDeployment.java:147)
	at org.netbeans.modules.j2ee.deployment.impl.InitialServerFileDistributor.distribute(InitialServerFileDistributor.java:105)
	at org.netbeans.modules.j2ee.deployment.impl.TargetServer.initialDistribute(TargetServer.java:261)
	at org.netbeans.modules.j2ee.deployment.impl.TargetServer.deploy(TargetServer.java:666)
	at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:225)
	... 4 more"
Comment 9 Martin Janicek 2014-08-18 12:24:31 UTC
Nope, because no one ever share additional information that would help to identify the problem (see comment 1)
Comment 10 andre-froes 2014-11-03 11:27:50 UTC
(In reply to Martin Janicek from comment #9)
> Nope, because no one ever share additional information that would help to
> identify the problem (see comment 1)

I just had this issue. This wasn't happening until I get a sudden shutdown while gf was starting.

This is the entire server log:

----------
[#|2014-11-03T09:21:42.488-0200|INFO|glassfish3.1.2|com.sun.enterprise.server.logging.GFFileHandler|_ThreadID=1;_ThreadName=Thread-2;|Running GlassFish Version: GlassFish Server Open Source Edition 3.1.2.2 (build 5)|#]

[#|2014-11-03T09:21:42.603-0200|INFO|glassfish3.1.2|org.glassfish.ha.store.spi.BackingStoreFactoryRegistry|_ThreadID=1;_ThreadName=Thread-2;|Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry|#]

[#|2014-11-03T09:21:42.864-0200|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=30;_ThreadName=Thread-2;|Grizzly Framework 1.9.50 started in: 30ms - bound to [0.0.0.0:3700]|#]

[#|2014-11-03T09:21:42.874-0200|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=27;_ThreadName=Thread-2;|Grizzly Framework 1.9.50 started in: 50ms - bound to [0.0.0.0:4848]|#]

[#|2014-11-03T09:21:42.874-0200|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=23;_ThreadName=Thread-2;|Grizzly Framework 1.9.50 started in: 60ms - bound to [0.0.0.0:8181]|#]

[#|2014-11-03T09:21:42.889-0200|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=24;_ThreadName=Thread-2;|Grizzly Framework 1.9.50 started in: 95ms - bound to [0.0.0.0:8080]|#]

[#|2014-11-03T09:21:42.922-0200|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=33;_ThreadName=Thread-2;|Grizzly Framework 1.9.50 started in: 78ms - bound to [0.0.0.0:7676]|#]

[#|2014-11-03T09:21:43.026-0200|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.admin.adapter|_ThreadID=1;_ThreadName=Thread-2;|The Admin Console is already installed, but not yet loaded.|#]

[#|2014-11-03T09:21:43.297-0200|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=1;_ThreadName=Thread-2;|GlassFish Server Open Source Edition 3.1.2.2 (5) startup time : Felix (4.157ms), startup services(5.950ms), total(10.107ms)|#]

[#|2014-11-03T09:21:44.190-0200|INFO|glassfish3.1.2|javax.enterprise.system.jmx.org.glassfish.admin.mbeanserver|_ThreadID=46;_ThreadName=Thread-2;|JMX005: JMXStartupService had Started JMXConnector on JMXService URL service:jmx:rmi://CTA1N011.nsnprojects.net:8686/jndi/rmi://CTA1N011.nsnprojects.net:8686/jmxrmi|#]

[#|2014-11-03T09:21:44.418-0200|INFO|glassfish3.1.2|org.hibernate.validator.internal.util.Version|_ThreadID=34;_ThreadName=Thread-2;|HV000001: Hibernate Validator 4.3.0.Final|#]

[#|2014-11-03T09:21:44.971-0200|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=77;_ThreadName=Thread-2;|Grizzly Framework 1.9.50 started in: 37ms - bound to [0.0.0.0:8080]|#]

[#|2014-11-03T09:21:45.936-0200|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=82;_ThreadName=Thread-2;|Grizzly Framework 1.9.50 started in: 40ms - bound to [0.0.0.0:8181]|#]
-------------------

How I resolved it: I restored a previous version of my glassfish instance, then it worked. The issue probably happens when gf set a bunch of vars to start server emulation and in the middle of it, it crashes or process is interrupted, i mean, on NB it must be considering something, because gf starts normally if I do it by asadmin command.