Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
[GLASSFISH-11323] Nasty null pointer exception on deploy Created: 17/Dec/09 Updated: 20/May/10 Resolved: 20/May/10 Status: Project: Component/s: Affects Version/s: Fix Version/s: Resolved glassfish deployment V3 Type: Reporter: Resolution: Labels: Remaining Estimate: Time Spent: Original Estimate: Environment: Bug rjdkolb Fixed None Not Specified Attachments: EnygmaCoreEjb.jar 11,323 Issuezilla Id: 3.1 Priority: Assignee: Votes: Major Hong Zhang 0 Not Specified Not Specified Operating System: All Platform: Linux TestForHong2.tgz Description I am getting a nasty Null Pointer Exception when deploying my ejb on 3.0 release. [#|2009-1217T10:10:17.626+0200|INFO|glassfishv3.0|javax.enterprise.system.std.com.sun.enterprise.v3.services.impl|_Th 1;|Installed /home/richard/install/java6/glassfishv3/glassfish/modules/autostart/org.apache.felix.fileinstall-autodeploy-bundl [#|2009-1217T10:12:12.548+0200|SEVERE|glassfishv3.0|javax.enterprise.system.core.com.sun.enterprise.v3.server|_Threa 1;|Exception while deploying the app java.lang.NullPointerException at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:120) at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:78) at com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:612) at com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:554) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:262) 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:123 at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:122 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) #] Comments Comment by rjdkolb [ 17/Dec/09 ] Created an attachment (id=4118) EJB JAR to recreate problem Comment by rjdkolb [ 17/Dec/09 ] It's the strangest thing. This persistence.xml was generated by NetBeans 6.8 (final) When I took out the <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider> it deployed. When I put this back in , it still deploys now. Make sure you deploy the original attached application in a clean container to reproduce then. Comment by Hong Zhang [ 17/Dec/09 ] Thanks for attaching the application, I will take a look. Change target release to 3.1 Comment by Hong Zhang [ 17/Dec/09 ] I was able to reproduce the problem with the attached application, will look into the cause Comment by rjdkolb [ 17/Dec/09 ] Created an attachment (id=4123) Maven project that causes issue (no EJBs in project yet) Comment by rjdkolb [ 17/Dec/09 ] Adding a SessionBean to the project fixes the issue. Comment by Hong Zhang [ 18/Dec/09 ] Thanks for trying this! Yes, you need to have at least one EJB in an ejb jar. I will work on providing a better error message for the negative case. Comment by Hong Zhang [ 05/Jan/10 ] I have fixed the NPE to show a better error message. This is what it will show now: $ asadmin deploy EnygmaCoreEjb.jar com.sun.enterprise.admin.cli.CommandException: remote failure: Exception while deploying the app : java.lang.RuntimeException: Archive [EnygmaCoreEjb] was deployed as a Java EE archive while it does not contain any valid Java EE components. Please check the packaging of the archive. Comment by rjdkolb [ 05/Jan/10 ] Very nice, thanks Comment by Hong Zhang [ 30/Mar/10 ] o Issue 11737 has been marked as a duplicate of this issue. *** Generated at Thu May 11 13:38:15 UTC 2017 using JIRA 6.2.3#6260sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.