Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Deploy War File in Glassfish Fails

    Hi Isomorphic.

    I am trying to deploy the builtinds sample project to Glassfish. It runs perfectly when using Super Dev Mode in Eclipse. But it fails when I package it in a war file and try to deploy it to Glassfish. This is the log I got from one attempt:

    Code:
    [2016-02-06T00:06:12.243-0500] [glassfish 4.1] [SEVERE] [AS-WEB-CORE-00174] [javax.enterprise.web.core] [tid: _ThreadID=128 _ThreadName=admin-listener(6)] [timeMillis: 1454735172243] [levelValue: 1000] [[
      Startup of context /builtinds failed due to previous errors]]
    
    [2016-02-06T00:06:12.244-0500] [glassfish 4.1] [SEVERE] [AS-WEB-CORE-00175] [javax.enterprise.web.core] [tid: _ThreadID=128 _ThreadName=admin-listener(6)] [timeMillis: 1454735172244] [levelValue: 1000] [[
      Exception during cleanup after start failed
    org.apache.catalina.LifecycleException: Manager has not yet been started
        at org.apache.catalina.session.StandardManager.stop(StandardManager.java:935)
        at org.apache.catalina.core.StandardContext.stop(StandardContext.java:6133)
        at com.sun.enterprise.web.WebModule.stop(WebModule.java:720)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:5950)
        at com.sun.enterprise.web.WebModule.start(WebModule.java:691)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:1041)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:1024)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:747)
        at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2286)
        at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1932)
        at com.sun.enterprise.web.WebApplication.start(WebApplication.java:139)
        at org.glassfish.internal.data.EngineRef.start(EngineRef.java:122)
        at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:291)
        at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:352)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:500)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
        at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:539)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:535)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:360)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:534)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:565)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:557)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:360)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:556)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1464)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:109)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1846)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1722)
        at org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:253)
        at org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:231)
        at org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:275)
        at org.glassfish.admin.rest.resources.TemplateListOfResource.createResource(TemplateListOfResource.java:133)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
        at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:151)
        at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:171)
        at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:152)
        at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:104)
        at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:387)
        at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:331)
        at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:103)
        at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:271)
        at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
        at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
        at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
        at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
        at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
        at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:297)
        at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:254)
        at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1028)
        at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:365)
        at org.glassfish.admin.rest.adapter.RestAdapter$2.service(RestAdapter.java:316)
        at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:179)
        at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
        at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
        at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201)
        at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175)
        at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
        at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
        at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
        at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561)
        at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
        at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
        at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
        at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
        at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
        at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
        at java.lang.Thread.run(Thread.java:745)
    ]]
    
    [2016-02-06T00:06:12.244-0500] [glassfish 4.1] [SEVERE] [AS-WEB-CORE-00108] [javax.enterprise.web.core] [tid: _ThreadID=128 _ThreadName=admin-listener(6)] [timeMillis: 1454735172244] [levelValue: 1000] [[
      ContainerBase.addChild: start: 
    org.apache.catalina.LifecycleException: java.lang.NullPointerException
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:5954)
        at com.sun.enterprise.web.WebModule.start(WebModule.java:691)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:1041)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:1024)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:747)
        at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2286)
        at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1932)
        at com.sun.enterprise.web.WebApplication.start(WebApplication.java:139)
        at org.glassfish.internal.data.EngineRef.start(EngineRef.java:122)
        at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:291)
        at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:352)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:500)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
        at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:539)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:535)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:360)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:534)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:565)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:557)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:360)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:556)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1464)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:109)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1846)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1722)
        at org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:253)
        at org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:231)
        at org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:275)
        at org.glassfish.admin.rest.resources.TemplateListOfResource.createResource(TemplateListOfResource.java:133)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
        at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:151)
        at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:171)
        at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:152)
        at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:104)
        at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:387)
        at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:331)
        at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:103)
        at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:271)
        at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
        at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
        at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
        at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
        at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
        at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:297)
        at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:254)
        at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1028)
        at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:365)
        at org.glassfish.admin.rest.adapter.RestAdapter$2.service(RestAdapter.java:316)
        at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:179)
        at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
        at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
        at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201)
        at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175)
        at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
        at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
        at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
        at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561)
        at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
        at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
        at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
        at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
        at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
        at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
        at java.lang.Thread.run(Thread.java:745)
    [B]Caused by: java.lang.NullPointerException
        at java.util.Hashtable.put(Hashtable.java:459)
        at org.hsqldb.persist.HsqlProperties.setProperty(Unknown Source)
        at org.hsqldb.persist.HsqlProperties.argArrayToProps(Unknown Source)
        at org.hsqldb.server.Server.main(Unknown Source)
        at com.smartgwt.sample.server.listener.HSQLServletContextListener.contextInitialized(HSQLServletContextListener.java:59)
        at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:5394)
        at com.sun.enterprise.web.WebModule.contextListenerStart(WebModule.java:743)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:5932)[/B]
        ... 74 more
    ]]
    
    [2016-02-06T00:06:12.246-0500] [glassfish 4.1] [SEVERE] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=128 _ThreadName=admin-listener(6)] [timeMillis: 1454735172246] [levelValue: 1000] [[
      Exception while invoking class com.sun.enterprise.web.WebApplication start method
    java.lang.Exception: java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.NullPointerException
        at com.sun.enterprise.web.WebApplication.start(WebApplication.java:168)
        at org.glassfish.internal.data.EngineRef.start(EngineRef.java:122)
        at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:291)
        at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:352)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:500)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
        at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:539)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:535)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:360)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:534)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:565)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:557)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:360)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:556)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1464)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:109)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1846)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1722)
        at org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:253)
        at org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:231)
        at org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:275)
        at org.glassfish.admin.rest.resources.TemplateListOfResource.createResource(TemplateListOfResource.java:133)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
        at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:151)
        at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:171)
        at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:152)
        at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:104)
        at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:387)
        at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:331)
        at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:103)
        at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:271)
        at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
        at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
        at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
        at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
        at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
        at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:297)
        at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:254)
        at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1028)
        at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:365)
        at org.glassfish.admin.rest.adapter.RestAdapter$2.service(RestAdapter.java:316)
        at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:179)
        at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
        at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
        at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201)
        at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175)
        at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
        at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
        at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
        at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561)
        at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
        at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
        at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
        at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
        at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
        at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
        at java.lang.Thread.run(Thread.java:745)
    ]]
    
    [2016-02-06T00:06:12.246-0500] [glassfish 4.1] [SEVERE] [NCLS-CORE-00026] [javax.enterprise.system.core] [tid: _ThreadID=128 _ThreadName=admin-listener(6)] [timeMillis: 1454735172246] [levelValue: 1000] [[
      Exception during lifecycle processing
    java.lang.Exception: java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.NullPointerException
        at com.sun.enterprise.web.WebApplication.start(WebApplication.java:168)
        at org.glassfish.internal.data.EngineRef.start(EngineRef.java:122)
        at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:291)
        at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:352)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:500)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
        at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:539)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:535)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:360)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:534)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:565)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:557)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:360)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:556)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1464)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:109)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1846)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1722)
        at org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:253)
        at org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:231)
        at org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:275)
        at org.glassfish.admin.rest.resources.TemplateListOfResource.createResource(TemplateListOfResource.java:133)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
        at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:151)
        at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:171)
        at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:152)
        at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:104)
        at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:387)
        at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:331)
        at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:103)
        at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:271)
        at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
        at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
        at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
        at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
        at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
        at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:297)
        at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:254)
        at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1028)
        at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:365)
        at org.glassfish.admin.rest.adapter.RestAdapter$2.service(RestAdapter.java:316)
        at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:179)
        at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
        at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
        at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201)
        at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175)
        at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
        at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
        at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
        at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561)
        at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
        at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
        at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
        at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
        at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
        at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
        at java.lang.Thread.run(Thread.java:745)
    ]]
    
    [2016-02-06T00:06:12.247-0500] [glassfish 4.1] [SEVERE] [] [javax.enterprise.system.core] [tid: _ThreadID=128 _ThreadName=admin-listener(6)] [timeMillis: 1454735172247] [levelValue: 1000] [[
      Exception while loading the app]]
    
    [2016-02-06T00:06:12.247-0500] [glassfish 4.1] [SEVERE] [AS-WEB-GLUE-00192] [javax.enterprise.web] [tid: _ThreadID=128 _ThreadName=admin-listener(6)] [timeMillis: 1454735172247] [levelValue: 1000] [[
      Undeployment failed for context /builtinds]]
    
    [2016-02-06T00:06:12.255-0500] [glassfish 4.1] [SEVERE] [] [javax.enterprise.system.core] [tid: _ThreadID=128 _ThreadName=admin-listener(6)] [timeMillis: 1454735172255] [levelValue: 1000] [[
      Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.NullPointerException]]
    
    [2016-02-06T00:06:14.803-0500] [glassfish 4.1] [INFO] [] [org.glassfish.admingui] [tid: _ThreadID=57 _ThreadName=admin-listener(5)] [timeMillis: 1454735174803] [levelValue: 800] [[
      Exception Occurred :Error occurred during deployment: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.NullPointerException. Please see server.log for more details.]]
    In fact, this app and two other apps I've made following a similar strategy (SmartGWT + HSQLDB using HSQLServletContextListener) run fine in Super Dev Mode, and they all fail to deploy with very similar logs. Considering that and the segment marked with bold letters in the log shown above, make me wonder if this is the right approach to deploy these apps to Glassfish?

    Am I missing the real problem here? Can you please help me figure this out? I know you use the servlet listener HSQLServletContextListener to load HSQLDB at the app startup. This works fine when done in Super Dev Mode. But is this the right approach for these apps in a production environment? Or do I need to configure some separate JDBC resource in Glassfish to allow the app to connect to HSQLDB?

    Thanks!

    SmartGWT version: 5.1-p20160127. Glassfish version: 4.1.

    #2
    Your log suggests the hsqlserver.properties file included in the sample project is missing from the CLASSPATH.

    Aside from this, the HSQL server we include with sample projects is a simple embedded database that only works with one JVM and writes to files. It's used purely so that you do not have to set up a separate database server in order to try out samples that demonstrate SQL database operations. Glassfish or not, HSQL is not a typical production deployment option.

    Comment


      #3
      Thanks for your help.

      I agree that this would seem to be the case, but the hsqlserver.properties file is correctly placed under WEB-INF\classes (in the Eclipse project I have it right under src, as it is originally in the sample file, and when compiled, it gets properly written to the classes folder). Any ideas why the app would seem to not being able to use that file?

      Regarding your other comment, I do agree that for a big production app it would be better to look for other choices, but I've read a lot of comments across the web that do recommend HSQL for small projects like mine because performance is good and it certainly seems to be easier to maintain. Anyway, you make a valid point to keep in mind if the app starts to grow. Still, this setup should work correctly, right?

      Comment


        #4
        That sounds like the right place for the file, nevertheless it is obviously not being loaded, so you should troubleshoot whether the WEB-INF/classes folder you've placed the file in is actually in the CLASSPATH, readable by the server process, etc.

        As far as HSQL vs other DBs, outside of the embedded use case, we don't really know of an advantage that HSQL has over other free, stable databases such as MariaDB. In particular, Isomorphic does not use HSQL outside of the embedded use case of our SDK, despite our familiarity with it.

        Even if you choose to use HSQL, there doesn't seem to be a good reason to run it inside the same JVM as your application (it can also run standalone), especially since you seem to be having trouble correctly deploying it in that scenario.

        Comment


          #5
          Hi Isomorphic. So, after a lot of rework (being a newbie to all this), I followed your advice and changed my persistence strategy to use SQL Server. I configured my Glassfish environment with the proper JDBC resource (which has a JDBC connection pool properly configured and passing Glassfish's ping test), I put the proper driver in my Glassfish domain lib folder, and I put the following settings in my server.properties file:

          Code:
          sql.defaultDatabase: SQLServer
          
          sql.SQLServer.database.type: sqlserver
          sql.SQLServer.driver: com.microsoft.sqlserver.jdbc.SQLServerDriver
          sql.SQLServer.driver.databaseName: BMSim
          sql.SQLServer.interface.type: jndi
          sql.SQLServer.driver.name: jdbc/BMSim
          I thought I was on the right track, because after launching the app, I could go into the Admin Console and in the DataBase configuration tab I could get this (default) SQLServer database to pass the test, I was able to browse the related DB contents in the SQL Browser, and when I went to the Import DataSources tab, I could see my users.ds.xml file being properly read and showing all my users table records in the bottom pane. Here is my users.ds.xml file:

          Code:
          <DataSource 
              ID="users" 
              serverType="sql" 
              tableName="users" 
          >
              <fields>
              
                  <field name="username" primaryKey="true" canSave="false"></field>
                  
                  <field name="password">
                      <validators>
                          <validator type="lengthRange" min="6"></validator>
                          <validator type="lengthRange" max="20"></validator>
                      </validators>
                  </field>        
                  
                  <field name="language">
                      <valueMap>
                          <value id="en">English</value>
                          <value id="es">Spanish</value>
                      </valueMap>
                  </field>
                  
              </fields>
          </DataSource>
          But when I tried to add the following simple ListGrid to my entry point class in order to use that data source to show some data:

          Code:
          DataSource ds = DataSource.get("users");
          ListGrid grid = new ListGrid();
          grid.setDataSource(ds);
          grid.draw();
          ...all I got was a white screen. In the developer console, in the Watch tab, the ListGrid control says that it is drawn and visible, but all I see is white space in the place it's supposed to be.

          Can you please help me pinpoint what can be happening here? I think I must be missing something really simple here, but I just can't get to figure it out.

          Thanks in advance for any help!!

          Comment


            #6
            The set of symptoms you describe is basically not possible without a JavaScript error, so use the tools built into your browser (generally on Windows, press F12) to see what the error was.

            One possibility - did you load the DataSource into the page? If you don't understand what this means, please see the QuickStart Guide.

            Comment


              #7
              Turns out I was adding an additional "/" at the beginning of my <script> tag: <script src="/bmsim/sc/DataSourceLoader?dataSource=users"></script>. As mentioned by Isomorphic, the error was clearly shown in Chrome's Developer Tools' console. Fixed it to be <script src="bmsim/sc/DataSourceLoader?dataSource=users"></script>.

              And then I just added grid.fetchData() before my grid.draw() in the code above, so that the ListGrid would show the actual data. I don't know if this is required, because in the QuickStart Guide the sample on page 23 doesn't includes it, but without it, my ListGrid would show no records.

              Anyhow, at last I seem to have it working. So thanks guys for all your help.

              In case any other newbie comes here looking for help, I was able to get my app working in Glassfish 4 (GF) and SQL Server 2012 following these steps:
              1. Create your new GF domain. Or you can use the one that comes by default with GF.
              2. Add sqljdbc42.jar to the GF domain lib folder (you can get this directly/freely from here).
              3. Add a JDBC Connection Pool to GF:
                • Pool Name: connectionPoolName(can be whatever you like for easy identification).
                • Resource Type: javax.sql.DataSource
                • Database Driver Vendor: MicrosoftSqlServer
              4. Configure previous JDBC Connection Pool with these additional properties (you can delete all previous properties, if there are any in the list):
                • user: the one you will use to access the DB from your app. Make sure it has enough privileges to perform all required actions.
                • password: whatever password was assigned to the user specified above for SQL Server authentication.
                • databaseName: YourDBName (needs to match the DB name assigned to the DB that will be used by your app).
                • serverName: PCNAME\SQLEXPRESS (or whatever name the SQL Server instance used to host the DB has.. look it up in the MSSQL Management Studio connection dialogue).
              5. Add JDBC Resource:
                • JNDI Name: jdbc/YourAppName (this is the same value you will use in your server.properties file for the property sql.SQLServer.driver.name).
                • Pool Name: the name of the JDBC Connection Pool created above.
              6. Add server.properties to your project (initially you can put it under src so that it will get in the app's classpath). I will put one sample below, but very stripped down. You can merge it with one of the server.properties in the sample projects, so that you can understand and comment correctly what each line does.
              7. Create all required data source descriptors. You can see one example of this in my previous post in this thread for a simple users table.
              8. Finally, add some code that uses the DS to bind your UI controls to the DB data. An very simple example is shown below for completeness.
              server.properties
              Code:
              webRoot: __AUTODETECT__
              
              gwtModuleName: yourappname
              isomorphicPathRootRelative: $gwtModuleName/sc
              
              sql.defaultDatabase: SQLServer
              
              sql.SQLServer.database.type: sqlserver
              sql.SQLServer.driver: com.microsoft.sqlserver.jdbc.SQLServerDriver
              sql.SQLServer.driver.databaseName: YourDBName
              sql.SQLServer.interface.type: jndi
              sql.SQLServer.driver.name: jdbc/YourAppName
              
              project.datasources: $webRoot/ds
              project.ui: $webRoot/shared/ui
              project.apps: $webRoot/shared/app
              
              modulesDir: modules/
              Sample entry point class code:
              Code:
              import com.smartgwt.client.data.DataSource;
              import com.smartgwt.client.widgets.grid.ListGrid;
              import com.google.gwt.core.client.EntryPoint;  
                
              public class BMSim implements EntryPoint {  
                
                  public void onModuleLoad() {  
              
                      DataSource ds = DataSource.get("users");
                      ListGrid grid = new ListGrid();
                      grid.setDataSource(ds);
                      grid.fetchData();
                      grid.setCanEdit(true);
                      grid.draw();
                      
                  }  
              }

              Comment

              Working...
              X