users@glassfish.java.net

Re: Glassfish embedded 3.1.1 won't deploy existing war file (deploys fine in embedded tomcat 6

From: Amy Roh <amy.roh_at_oracle.com>
Date: Fri, 30 Sep 2011 17:29:54 -0700

Which jar are you using? What is in your CLASSPATH?

Amy

On 9/29/11 6:20 PM, forums_at_java.net wrote:
> Our existing war file will not deploy in embedded glassfish 3.1.1
> This war was functioning fine in an embedded Tomcat 6 instance for a
> couple
> of years.
> I migrated to embedded glassfish 3.1.1 and I can bring up embedded
> glassfish
> just fine and it will listen on my custom port of 9090. If I browse to
> 9090,
> glassfish answers and gives its 404 error page just fine.
> As soon as I add a deploy statement to the code, I get errors.
> ( code is at the bottom )
> error_log below without the deploy:
> -------------------------------------------------------
> Sep 29, 2011 4:30:58 PM
> com.sun.enterprise.v3.server.CommonClassLoaderServiceImpl findDerbyClient
> INFO: Cannot find javadb client jar file, derby jdbc driver will not be
> available by default.
> Sep 29, 2011 4:30:58 PM org.hibernate.validator.util.Version <clinit>
> INFO: Hibernate Validator null
> Sep 29, 2011 4:30:58 PM
> org.hibernate.validator.engine.resolver.DefaultTraversableResolver
> detectJPA
> INFO: Instantiated an instance of
> org.hibernate.validator.engine.resolver.JPATraversableResolver.
> Sep 29, 2011 4:30:58 PM
> com.sun.enterprise.v3.services.impl.GrizzlyService
> createNetworkProxy
> INFO: Network listener https-listener on port 0 disabled per domain.xml
> Sep 29, 2011 4:30:58 PM com.sun.enterprise.v3.server.AppServerStartup run
> INFO: GlassFish Server Open Source Edition 3.1.1 (12) startup time :
> Embedded
> (774ms), startup services(315ms), total(1,089ms)
> Sep 29, 2011 4:30:58 PM
> com.sun.enterprise.v3.services.impl.GrizzlyProxy$2$1
> onReady
> INFO: Grizzly Framework 1.9.36 started in: 68ms - bound to [0.0.0.0:9090]
> Sep 29, 2011 4:30:59 PM
> org.glassfish.admin.mbeanserver.JMXStartupService$JMXConnectorsStarterThread
>
> run
> INFO: JMXStartupService: JMXConnector system is disabled, skipping.
> ----------------------------------------------------------------------
> Error_log, as soon as I try to deploy the war file.
> ----------------------------------------------------------------------
> Sep 29, 2011 5:49:04 PM
> com.sun.enterprise.v3.server.CommonClassLoaderServiceImpl findDerbyClient
> INFO: Cannot find javadb client jar file, derby jdbc driver will not be
> available by default.
> Sep 29, 2011 5:49:04 PM org.hibernate.validator.util.Version <clinit>
> INFO: Hibernate Validator null
> Sep 29, 2011 5:49:04 PM
> org.hibernate.validator.engine.resolver.DefaultTraversableResolver
> detectJPA
> INFO: Instantiated an instance of
> org.hibernate.validator.engine.resolver.JPATraversableResolver.
> Sep 29, 2011 5:49:04 PM
> com.sun.enterprise.v3.services.impl.GrizzlyService
> createNetworkProxy
> INFO: Network listener https-listener on port 0 disabled per domain.xml
> Sep 29, 2011 5:49:04 PM com.sun.enterprise.v3.server.AppServerStartup run
> INFO: GlassFish Server Open Source Edition 3.1.1 (12) startup time :
> Embedded
> (797ms), startup services(304ms), total(1,101ms)
> Sep 29, 2011 5:49:04 PM
> com.sun.enterprise.v3.services.impl.GrizzlyProxy$2$1
> onReady
> INFO: Grizzly Framework 1.9.36 started in: 66ms - bound to [0.0.0.0:9090]
> Sep 29, 2011 5:49:04 PM
> org.glassfish.admin.mbeanserver.JMXStartupService$JMXConnectorsStarterThread
>
> run
> INFO: JMXStartupService: JMXConnector system is disabled, skipping.
> Sep 29, 2011 5:49:05 PM com.sun.enterprise.security.SecurityLifecycle
> <init>
> INFO: SEC1002: Security Manager is OFF.
> Sep 29, 2011 5:49:05 PM com.sun.enterprise.security.SecurityLifecycle
> onInitialization
> INFO: SEC1010: Entering Security Startup Service
> Sep 29, 2011 5:49:05 PM com.sun.enterprise.security.PolicyLoader
> loadPolicy
> INFO: SEC1143: Loading policy provider
> com.sun.enterprise.security.jacc.provider.SimplePolicyProvider.
> Sep 29, 2011 5:49:05 PM com.sun.enterprise.security.auth.realm.Realm
> doInstantiate
> INFO: SEC1115: Realm [admin-realm] of classtype
> [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully
> created.
> Sep 29, 2011 5:49:05 PM com.sun.enterprise.security.auth.realm.Realm
> doInstantiate
> INFO: SEC1115: Realm [file] of classtype
> [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully
> created.
> Sep 29, 2011 5:49:05 PM com.sun.enterprise.security.auth.realm.Realm
> doInstantiate
> INFO: SEC1115: Realm [certificate] of classtype
> [com.sun.enterprise.security.auth.realm.certificate.CertificateRealm]
> successfully created.
> Sep 29, 2011 5:49:05 PM com.sun.enterprise.security.SecurityLifecycle
> onInitialization
> INFO: SEC1011: Security Service(s) Started Successfully
> Sep 29, 2011 5:49:05 PM com.sun.enterprise.v3.server.ApplicationLifecycle
> startContainers
> SEVERE: Cannot start container web
> org.jvnet.hk2.component.ComponentException: Failed to create class
> com.sun.enterprise.web.WebContainer
> at
> com.sun.hk2.component.ConstructorCreator.create(ConstructorCreator.java:71)
>
> at
> com.sun.hk2.component.AbstractCreatorImpl.get(AbstractCreatorImpl.java:80)
>
> at
> com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:67)
>
> at
> com.sun.hk2.component.EventPublishingInhabitant.get(EventPublishingInhabitant.java:139)
>
> at
> com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:76)
>
> at
> org.glassfish.internal.data.EngineInfo.getContainer(EngineInfo.java:93)
> at
> com.sun.enterprise.v3.server.ApplicationLifecycle.startContainers(ApplicationLifecycle.java:957)
>
> at
> com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:667)
>
> at
> com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:368)
>
> at
> com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
>
> at
> org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:382)
>
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:355)
>
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370)
>
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1064)
>
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96)
>
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1244)
>
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1232)
>
> at
> com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:129)
>
> at com.pop3gateway.HttpServer.deploy(HttpServer.java:135)
> at com.pop3gateway.HttpServer.run(HttpServer.java:107)
> at java.lang.Thread.run(Unknown Source)
> Caused by: java.lang.VerifyError: class com.sun.enterprise.web.WebModule
> overrides final method start.()V
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(Unknown Source)
> at java.security.SecureClassLoader.defineClass(Unknown Source)
> at java.net.URLClassLoader.defineClass(Unknown Source)
> at java.net.URLClassLoader.access$100(Unknown Source)
> at java.net.URLClassLoader$1.run(Unknown Source)
> at java.net.URLClassLoader$1.run(Unknown Source)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(Unknown Source)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at java.lang.Class.getDeclaredConstructors0(Native Method)
> at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
> at java.lang.Class.getConstructor0(Unknown Source)
> at java.lang.Class.newInstance0(Unknown Source)
> at java.lang.Class.newInstance(Unknown Source)
> at
> com.sun.hk2.component.ConstructorCreator.create(ConstructorCreator.java:65)
>
> ... 20 more
> Sep 29, 2011 5:49:06 PM org.glassfish.api.ActionReport failure
> SEVERE: Aborting, Failed to start container
> com.sun.enterprise.web.WebContainer
> Sep 29, 2011 5:49:06 PM org.glassfish.api.ActionReport failure
> SEVERE: Exception while deploying the app [emp]
> Sep 29, 2011 5:49:06 PM com.sun.enterprise.v3.server.ApplicationLifecycle
> deploy
> SEVERE: Aborting, Failed to start container
> com.sun.enterprise.web.WebContainer
> java.lang.Exception: Aborting, Failed to start container
> com.sun.enterprise.web.WebContainer
> at
> com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:670)
>
> at
> com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:368)
>
> at
> com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
>
> at
> org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:382)
>
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:355)
>
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370)
>
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1064)
>
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96)
>
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1244)
>
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1232)
>
> at
> com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:129)
>
> at com.pop3gateway.HttpServer.deploy(HttpServer.java:135)
> at com.pop3gateway.HttpServer.run(HttpServer.java:107)
> at java.lang.Thread.run(Unknown Source)
> Sep 29, 2011 5:49:06 PM org.glassfish.deployment.admin.DeployCommand
> execute
> SEVERE: Exception while deploying the app [emp] : Aborting, Failed to
> start
> container com.sun.enterprise.web.WebContainer
> ---------------------------------------------------------------------------------------
>
> Source code controlling this all
> ----------------------------------------------------------------------
> // glassfish & deployer are global
> try {
> GlassFishProperties glassFishProperties = new
> GlassFishProperties();
> glassFishProperties.setPort("http-listener", 9090);
>
>
> glassfish =
> GlassFishRuntime.bootstrap().newGlassFish(glassFishProperties);
> glassfish.start();
> deployer = glassfish.getDeployer();
> /
> deploy("C:\\emp.war");
>
>
> }
>
> public void deploy(String file) {
> try {
> deployer.deploy(new File(file));
> } catch (GlassFishException ex) {
>
> Logger.getLogger(HttpServer.class.getName()).log(Level.SEVERE, null, ex);
> }
> }
>
>
> --
>
> [Message sent by forum member 'jakorsme']
>
> View Post: http://forums.java.net/node/848612
>
>