embedded@glassfish.java.net

Re: [embedded] RE: [Fwd: Re: Problem running Embedded Glassfish on Linux]

From: Homer Yau <Homer.Yau_at_Sun.COM>
Date: Tue, 21 Apr 2009 18:31:52 -0700

Hi Joey,

Thanks for the update.
I am glad you have found the root cause.

Thanks,
Homer

Joey Jarosz wrote:
> Hi gang,
>
> It turns out that a combination of typos and JDK installation issues were at the root of this problem. I already updated the bug report accordingly. Sorry for the fire drill.
>
> I do have a question however how class paths are handled in Embedded. I have a particular WebApp that depends on another JAR file. That JAR file is indeed in the WAR file in the WEB-INF/lib directory. But if I do not include the same JAR file on the classpath used to start my java application (that starts the server) I get a NoClassDefFoundError exception.
>
> I am assuming there is something about how the ClassLoaders work in Embedded Glassfish.
>
> -----Original Message-----
> From: Jennifer.Chou_at_Sun.COM [mailto:Jennifer.Chou_at_Sun.COM]
> Sent: Monday, April 20, 2009 1:39 PM
> To: Siraj Ghaffar
> Cc: Joey Jarosz
> Subject: Re: [Fwd: Re: Problem running Embedded Glassfish on Linux]
>
> To clarify....are we using the embedded-glassfish project issue list?
> https://embedded-glassfish.dev.java.net/issues/enter_bug.cgi?issue_type=DEFECT
> or the glassfish project issue list
> https://glassfish.dev.java.net/issues/enter_bug.cgi?issue_type=DEFECT
> We would need to add an embedded subcomponent.
>
> Jennifer
>
> Siraj Ghaffar wrote:
>
>> Hi Joey,
>> Please file a bug on the v3 trunk for this issue.
>>
>> Thanks
>> --Siraj
>>
>>
>> Jennifer Chou wrote:
>>
>>> ------------------------------------------------------------------------
>>>
>>> Subject:
>>> RE: Problem running Embedded Glassfish on Linux
>>> From:
>>> Joey Jarosz <joey_at_cadence.com>
>>> Date:
>>> Mon, 20 Apr 2009 13:02:27 -0700
>>> To:
>>> Jennifer.Chou_at_Sun.COM
>>>
>>> To:
>>> Jennifer.Chou_at_Sun.COM
>>>
>>>
>>> Hi Jennifer, thanks for getting back to me.
>>>
>>> Are there "embedded" builds based on the v3 main trunk where
>>> development is now taking place?
>>> If I do not end up with a solution, I will definitely find a bug -
>>> same buglist as usual?
>>>
>>> ------------------------------------------------------------------------
>>>
>>> *From:* Jennifer.Chou_at_Sun.COM [mailto:Jennifer.Chou_at_Sun.COM]
>>> *Sent:* Monday, April 20, 2009 11:08 AM
>>> *To:* Joey Jarosz
>>> *Subject:* Re: Problem running Embedded Glassfish on Linux
>>>
>>> Hi Joey,
>>>
>>> Sorry about that - the alias is still valid. I've been focused on
>>> deliverables for a milestone for non-embedded GlassFish and have been
>>> a little out-of-the loop on embedded. I believe we've made progress
>>> on moving embedded from the embedded prelude branch over to the same
>>> workspace as regular v3 main trunk development. So all bugs will be
>>> fixed there - and it sounds like you have found a bug. You may want
>>> to file a bug.
>>>
>>> I'll be off for the next couple days - I'll see if somebody can take
>>> a look.
>>>
>>> Jennifer
>>>
>>> Joey Jarosz wrote:
>>>
>>> Hi Jennifer,
>>>
>>> I have not heard anything from the mailinglist regarding my problem
>>> and since I usually get a pretty quick response to my queries I
>>> wonder if maybe the email alias has changed again or something.
>>>
>>> Anyway, I am dead in the water with this problem. I cannot
>>> realistically go back to the b07 build as I have too much code
>>> dependent on the api changes up to the b14 build.
>>>
>>> Do you have any clues as to why this is happening?
>>>
>>> I have even tried not deploying any web apps but I still get the same
>>> basic problem of the ZipException when trying to open some jar file
>>> (which one is a mystery). I have tried it on two different linux
>>> boxes including the one that I have a b07 based early version of my
>>> application working.
>>>
>>> -------------------------------
>>>
>>> Hi all,
>>>
>>> I decided to copy over my application over to Linux for some testing.
>>> I've done it a while ago (I think it was on build b07) but figured it
>>> would easy to get my latest up and running. Oops!
>>>
>>> Both Windows and Linux_x86 computers are running the same version of
>>> JDK (jdk1.6._13) and embedded GF build b14.
>>>
>>> I've attached most of the traceback starting just before the first
>>> SEVERE level message. I've checked file permissions across the board,
>>> no problem. My two application WAR files get expanded just fine in to
>>> the glassfish "applications" directory.
>>>
>>> Has anyone a clue of what might be the problem? I hesitate to just
>>> grab a newer build because in the past that has meant me having to
>>> modify my code again and again to keep up with the fast changing API
>>> - but if someone can confirm that this sort of problem is fixed in a
>>> newer build I guess I will bite the bullet.
>>>
>>> joey
>>>
>>> ------------------------------------------------------
>>>
>>> ArchiveFactory factory =
>>> server.getHabitat().getComponent(ArchiveFactory.class);
>>>
>>> ApplicationLifecycle lifecycle =
>>> server.getHabitat().getComponent(ApplicationLifecycle.class);
>>>
>>> EmbeddedFileSystem efs = server.getFileSystem();
>>>
>>> ReadableArchive a = factory.openArchive(app);
>>>
>>> ArchiveHandler h = lifecycle.getArchiveHandler(a);
>>>
>>> File appDir = new File(efs.getApplicationsDir(), a.getName());
>>>
>>> FileUtils.whack(appDir);
>>>
>>> appDir.mkdirs();
>>>
>>> h.expand(a, factory.createArchive(appDir));
>>>
>>> a.close();
>>>
>>> return factory.openArchive(appDir); <<<ß----- probably appears to
>>> start here.
>>>
>>> ------------------------------------------------------
>>>
>>> INFO: Embedded GlassFish Prelude v3 Prelude startup time :
>>> Embedded(203ms) startup services(436ms) total(639ms)
>>>
>>> Apr 17, 2009 3:17:35 PM com.sun.enterprise.web.WebContainer
>>> createHttpListener
>>>
>>> INFO: Created HTTP listener http-listener-1 on port 8888
>>>
>>> Apr 17, 2009 3:17:35 PM com.sun.enterprise.web.WebContainer
>>> createHttpListener
>>>
>>> INFO: Created HTTP listener http-listener-2 on port 8282
>>>
>>> Apr 17, 2009 3:17:35 PM com.sun.enterprise.web.WebContainer createHosts
>>>
>>> INFO: Created virtual server vserver-apps
>>>
>>> Apr 17, 2009 3:17:35 PM com.sun.enterprise.web.WebContainer createHosts
>>>
>>> INFO: Created virtual server vserver-secure
>>>
>>> Apr 17, 2009 3:17:35 PM org.apache.commons.modeler.Registry
>>> registerComponent
>>>
>>> SEVERE: Null component
>>> com.sun.appserv:type=JspMonitor,name=jsp,WebModule=//vserver-secure/,J2EEApplication=null,J2EEServer=server
>>>
>>>
>>> Apr 17, 2009 3:17:35 PM org.apache.catalina.core.ContainerBase
>>> startChildren
>>>
>>> SEVERE: PWC1240: Container
>>> StandardEngine[com.sun.appserv].StandardHost[vserver-
>>>
>>> secure].StandardContext[] has not been started
>>>
>>> java.lang.RuntimeException: java.util.zip.ZipException: error in
>>> opening zip file
>>>
>>> at
>>> com.sun.enterprise.util.net.JarURIPattern.getJarEntries(JarURIPattern.java:83)
>>>
>>>
>>> at
>>> org.glassfish.faces.integration.GlassFishTldProvider.postConstruct(GlassFishTldProvider.java:122)
>>>
>>>
>>> at
>>> com.sun.hk2.component.AbstractWombImpl.inject(AbstractWombImpl.java:150)
>>>
>>> at com.sun.hk2.component.ConstructorWomb$1.run(ConstructorWomb.java:90)
>>>
>>> at java.security.AccessController.doPrivileged(Native Method)
>>>
>>> at
>>> com.sun.hk2.component.ConstructorWomb.initialize(ConstructorWomb.java:87)
>>>
>>>
>>> at com.sun.hk2.component.AbstractWombImpl.get(AbstractWombImpl.java:75)
>>>
>>> at
>>> com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:58)
>>>
>>>
>>> at com.sun.hk2.component.LazyInhabitant.get(LazyInhabitant.java:107)
>>>
>>> at
>>> com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:60)
>>>
>>>
>>> at org.jvnet.hk2.component.Habitat$1.get(Habitat.java:252)
>>>
>>> at java.util.AbstractList$Itr.next(AbstractList.java:345)
>>>
>>> at
>>> com.sun.enterprise.web.WebModuleListener.configureJsp(WebModuleListener.java:257)
>>>
>>>
>>> at
>>> com.sun.enterprise.web.WebModuleListener.lifecycleEvent(WebModuleListener.java:147)
>>>
>>>
>>> at
>>> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:159)
>>>
>>>
>>> at
>>> org.apache.catalina.core.StandardContext.start(StandardContext.java:5315)
>>>
>>>
>>> at com.sun.enterprise.web.WebModule.start(WebModule.java:456)
>>>
>>> at
>>> org.apache.catalina.core.ContainerBase.startChildren(ContainerBase.java:1514)
>>>
>>>
>>> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1180)
>>>
>>> at org.apache.catalina.core.StandardHost.start(StandardHost.java:977)
>>>
>>> at
>>> org.apache.catalina.core.ContainerBase.startChildren(ContainerBase.java:1514)
>>>
>>>
>>> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1180)
>>>
>>> at
>>> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:550)
>>>
>>> at org.apache.catalina.startup.Embedded.start(Embedded.java:945)
>>>
>>> at
>>> com.sun.enterprise.web.WebContainer.postConstruct(WebContainer.java:630)
>>>
>>> at
>>> com.sun.hk2.component.AbstractWombImpl.inject(AbstractWombImpl.java:150)
>>>
>>> at com.sun.hk2.component.ConstructorWomb$1.run(ConstructorWomb.java:90)
>>>
>>> at java.security.AccessController.doPrivileged(Native Method)
>>>
>>> at
>>> com.sun.hk2.component.ConstructorWomb.initialize(ConstructorWomb.java:87)
>>>
>>>
>>> at com.sun.hk2.component.AbstractWombImpl.get(AbstractWombImpl.java:75)
>>>
>>> at
>>> com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:58)
>>>
>>>
>>> at com.sun.hk2.component.LazyInhabitant.get(LazyInhabitant.java:107)
>>>
>>> at
>>> com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:60)
>>>
>>>
>>> at org.jvnet.hk2.component.Habitat.getBy(Habitat.java:567)
>>>
>>> at org.jvnet.hk2.component.Habitat.getByType(Habitat.java:548)
>>>
>>> at org.jvnet.hk2.component.Habitat.getComponent(Habitat.java:317)
>>>
>>> at org.glassfish.embed.Server.start(Server.java:321)
>>>
>>> at com.chipestimate.server.AppServer.start(AppServer.java:108)
>>>
>>> at com.chipestimate.server.CCPSServer.startAppServer(CCPSServer.java:71)
>>>
>>> at com.chipestimate.server.CCPSServer.main(CCPSServer.java:420)
>>>
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>
>>> at
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>>
>>>
>>> at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>>
>>>
>>> at java.lang.reflect.Method.invoke(Method.java:597)
>>>
>>> at com.zerog.lax.LAX.launch(DashoA10*..)
>>>
>>> at com.zerog.lax.LAX.main(DashoA10*..)
>>>
>>> Caused by: java.util.zip.ZipException: error in opening zip file
>>>
>>> at java.util.zip.ZipFile.open(Native Method)
>>>
>>> at java.util.zip.ZipFile.<init>(ZipFile.java:114)
>>>
>>> at java.util.jar.JarFile.<init>(JarFile.java:133)
>>>
>>> at java.util.jar.JarFile.<init>(JarFile.java:97)
>>>
>>> at
>>> com.sun.enterprise.util.net.JarURIPattern.getJarEntries(JarURIPattern.java:73)
>>>
>>>
>>> ... 45 more
>>>
>>> Apr 17, 2009 3:17:35 PM org.apache.commons.modeler.Registry
>>> registerComponent
>>>
>>> SEVERE: Null component
>>> com.sun.appserv:type=JspMonitor,name=jsp,WebModule=//vserver-apps/,J2EEApplication=null,J2EEServer=server
>>>
>>>
>>> Apr 17, 2009 3:17:35 PM org.apache.catalina.core.ContainerBase
>>> startChildren
>>>
>>> SEVERE: PWC1240: Container
>>> StandardEngine[com.sun.appserv].StandardHost[vserver-apps].StandardContext[]
>>> has not been started
>>>
>>> java.lang.RuntimeException: java.util.zip.ZipException: error in
>>> opening zip file
>>>
>>> at
>>> com.sun.enterprise.util.net.JarURIPattern.getJarEntries(JarURIPattern.java:83)
>>>
>>>
>>> at
>>> org.glassfish.faces.integration.GlassFishTldProvider.postConstruct(GlassFishTldProvider.java:122)
>>>
>>>
>>> at
>>> com.sun.hk2.component.AbstractWombImpl.inject(AbstractWombImpl.java:150)
>>>
>>> at com.sun.hk2.component.ConstructorWomb$1.run(ConstructorWomb.java:90)
>>>
>>> at java.security.AccessController.doPrivileged(Native Method)
>>>
>>> at com.sun.hk2.component.ConstructorWomb.initialize(ConstructorWomb.java
>>>
>>> :87)
>>>
>>> at com.sun.hk2.component.AbstractWombImpl.get(AbstractWombImpl.java:75)
>>>
>>> at
>>> com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:58)
>>>
>>>
>>> at com.sun.hk2.component.LazyInhabitant.get(LazyInhabitant.java:107)
>>>
>>> at
>>> com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:60)
>>>
>>>
>>> at org.jvnet.hk2.component.Habitat$1.get(Habitat.java:252)
>>>
>>> at java.util.AbstractList$Itr.next(AbstractList.java:345)
>>>
>>> at
>>> com.sun.enterprise.web.WebModuleListener.configureJsp(WebModuleListener.java:257)
>>>
>>>
>>> at
>>> com.sun.enterprise.web.WebModuleListener.lifecycleEvent(WebModuleListener.java:147)
>>>
>>>
>>> at
>>> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:159)
>>>
>>>
>>> at
>>> org.apache.catalina.core.StandardContext.start(StandardContext.java:5315)
>>>
>>>
>>> at com.sun.enterprise.web.WebModule.start(WebModule.java:456)
>>>
>>> at
>>> org.apache.catalina.core.ContainerBase.startChildren(ContainerBase.java:1514)
>>>
>>>
>>> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1180)
>>>
>>> at org.apache.catalina.core.StandardHost.start(StandardHost.java:977)
>>>
>>> at
>>> org.apache.catalina.core.ContainerBase.startChildren(ContainerBase.java:1514)
>>>
>>>
>>> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1180)
>>>
>>> at
>>> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:550)
>>>
>>> at org.apache.catalina.startup.Embedded.start(Embedded.java:945)
>>>
>>> at
>>> com.sun.enterprise.web.WebContainer.postConstruct(WebContainer.java:630)
>>>
>>> at
>>> com.sun.hk2.component.AbstractWombImpl.inject(AbstractWombImpl.java:150)
>>>
>>> at com.sun.hk2.component.ConstructorWomb$1.run(ConstructorWomb.java:90)
>>>
>>> at java.security.AccessController.doPrivileged(Native Method)
>>>
>>> at
>>> com.sun.hk2.component.ConstructorWomb.initialize(ConstructorWomb.java:87)
>>>
>>>
>>> at com.sun.hk2.component.AbstractWombImpl.get(AbstractWombImpl.java:75)
>>>
>>> at
>>> com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:58)
>>>
>>>
>>> at com.sun.hk2.component.LazyInhabitant.get(LazyInhabitant.java:107)
>>>
>>> at
>>> com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:60)
>>>
>>>
>>> --------------------------------------------
>>> Joey Jarosz
>>>
>>> Senior Architect
>>>
>>> //Chip Planning Solutions//
>>>
>>> **/Cadence Design Systems, Inc./***/
>>> /*(408) 914-6269
>>>
>>>
>>> /*/Need some IP? Check out /*//*/www.chipestimate.com/*/
>>> <http://www.chipestimate.com>
>>>
>>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embedded-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: embedded-help_at_glassfish.dev.java.net
>
>