embedded@glassfish.java.net

Re: [embedded] How to specify default-web.xml

From: Jennifer Chou <Jennifer.Chou_at_Sun.COM>
Date: Thu, 12 Mar 2009 15:17:51 -0400

Hi Joey,

Thanks for letting us know. I broke it with some not well thought out
validation of the HTTP port. I have removed that validation for now to
fix this problem. It's been checked-in so it should be in the next
nightly build.

There was an issue filed:
https://embedded-glassfish.dev.java.net/issues/show_bug.cgi?id=103

Jennifer

Joey Jarosz wrote:
> I just grabbed last night's build and ran into two problems.
>
> 1. It now required me to specify a HTTP host explicitly via the API else
> it refuses to start the server. The problem with this is that I already
> specify several listeners in my domain.xml because of the lack of api
> for specifying multiple listeners.
>
> 2. I am getting UnsatisfiedDependencyExceptions
>
> INFO: Cannot inject private
> com.sun.enterprise.config.serverbeans.TransactionService
> com.sun.enterprise.transaction.JavaEETransactionManagerSimplified.txnSer
> vice in
> componentcom.sun.enterprise.transaction.JavaEETransactionManagerSimplifi
> ed_at_1003d5d
> Mar 12, 2009 11:17:24 AM org.apache.catalina.core.ApplicationContext log
> SEVERE: WebModule[]StandardWrapper.Throwable
> org.jvnet.hk2.component.UnsatisfiedDepedencyException: Unsatisfied
> dependency exception : private
> com.sun.enterprise.config.serverbeans.TransactionService
> com.sun.enterprise.transaction.JavaEETransactionManagerSimplified.txnSer
> vice
> at
> org.jvnet.hk2.component.InjectionManager.inject(InjectionManager.java:10
> 0)
> at
> com.sun.hk2.component.AbstractWombImpl.inject(AbstractWombImpl.java:100)
> 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:5
> 8)
> 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.getByContract(Habitat.java:561)
> at
> com.sun.web.server.J2EEInstanceListener.init(J2EEInstanceListener.java:1
> 32)
> at
> com.sun.web.server.J2EEInstanceListener.instanceEvent(J2EEInstanceListen
> er.java:107)
> at
> org.apache.catalina.util.InstanceSupport.fireInstanceEvent(InstanceSuppo
> rt.java:347)
> at
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.jav
> a:1196)
> at
> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1048)
> at
> org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.j
> ava:5028)
> at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:5425
> )
> 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:5
> 8)
> 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:74)
> at
> com.chipestimate.server.CCPSServer.startAppServer(CCPSServer.java:70)
> at com.chipestimate.server.CCPSServer.main(CCPSServer.java:411)
> Caused by: org.jvnet.hk2.component.UnsatisfiedDepedencyException:
> Unsatisfied dependency exception : private
> com.sun.enterprise.config.serverbeans.TransactionService
> com.sun.enterprise.transaction.JavaEETransactionManagerSimplified.txnSer
> vice
> at
> org.jvnet.hk2.component.InjectionManager.inject(InjectionManager.java:95
> )
> ... 40 more
>
> Mar 12, 2009 11:17:24 AM org.jvnet.hk2.component.InjectionManager inject
> INFO: Cannot inject private
> com.sun.enterprise.config.serverbeans.TransactionService
> com.sun.enterprise.transaction.JavaEETransactionManagerSimplified.txnSer
> vice in
> componentcom.sun.enterprise.transaction.JavaEETransactionManagerSimplifi
> ed_at_1a685ae
> Mar 12, 2009 11:17:24 AM org.apache.catalina.core.ContainerBase
> startChildren
> SEVERE: PWC1240: Container
> StandardEngine[com.sun.appserv].StandardHost[server].StandardContext[]
> has not been started
> org.jvnet.hk2.component.UnsatisfiedDepedencyException: Unsatisfied
> dependency exception : private
> com.sun.enterprise.config.serverbeans.TransactionService
> com.sun.enterprise.transaction.JavaEETransactionManagerSimplified.txnSer
> vice
> at
> org.jvnet.hk2.component.InjectionManager.inject(InjectionManager.java:10
> 0)
> at
> com.sun.hk2.component.AbstractWombImpl.inject(AbstractWombImpl.java:100)
> 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:5
> 8)
> 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.getByContract(Habitat.java:561)
> at
> com.sun.web.server.J2EEInstanceListener.init(J2EEInstanceListener.java:1
> 32)
> at
> com.sun.web.server.J2EEInstanceListener.instanceEvent(J2EEInstanceListen
> er.java:107)
> at
> org.apache.catalina.util.InstanceSupport.fireInstanceEvent(InstanceSuppo
> rt.java:384)
> at
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.jav
> a:1261)
> at
> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1048)
> at
> org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.j
> ava:5028)
> at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:5425
> )
> 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:5
> 8)
> 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:74)
> at
> com.chipestimate.server.CCPSServer.startAppServer(CCPSServer.java:70)
> at com.chipestimate.server.CCPSServer.main(CCPSServer.java:411)
> Caused by: org.jvnet.hk2.component.UnsatisfiedDepedencyException:
> Unsatisfied dependency exception : private
> com.sun.enterprise.config.serverbeans.TransactionService
> com.sun.enterprise.transaction.JavaEETransactionManagerSimplified.txnSer
> vice
> at
> org.jvnet.hk2.component.InjectionManager.inject(InjectionManager.java:95
> )
> ... 40 more
> Mar 12, 2009 11:17:27 AM org.apache.catalina.loader.WebappLoader
> setClassPath
>
> -----Original Message-----
> From: Jennifer.Chou_at_Sun.COM [mailto:Jennifer.Chou_at_Sun.COM]
> Sent: Thursday, March 12, 2009 10:18 AM
> To: embedded_at_glassfish.dev.java.net
> Subject: Re: [embedded] How to specify default-web.xml
>
> Hi Joey,
>
> I have added setDefaultWebXml() back to EmbeddedFileSystem yesterday.
> However, it looks like the latest nightly build did not get pushed to
> the maven repo yet.
>
> Note that are working on improving and having a more complete API on the
>
> 'trunk' - our main development. And this API may likely change.
>
> Thanks,
> Jennifer
>
> Joey Jarosz wrote:
>
>> I grabbed the latest promoted build the other day. Apparently
>> Server.setDefaultWebXml() went away and I can't figure out how to
>> specify the default-web.xml file to be used by my web-apps. Any
>> suggestions?
>>
>> I kind of hoped that maybe if I just put it in
>> <installdir>/config/default-web.xml that it would be found but no such
>>
>
>
>> luck.
>>
>> --------------------------------------------
>> 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
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embedded-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: embedded-help_at_glassfish.dev.java.net
>
>