Hi, Pramod
Can you please send your application to me so I can reproduce the
problem? Thanks.
- Hong
Pramod Gopinath wrote:
> Hi Hong
> I checked out and rebuilt the server with the new file that U pointed
> me to. But the issue is still not solved. In fact now since there is
> no context-root entry in the domain.xml, the server would restart and
> deploy the application at /hello which is wrong.
>
> Deploy command:
> ~/work_related/gf_v3_install/02222008/glassfish/bin/asadmin deploy
> --contextroot / hello
> SUCCESS : hello deployed successfully
> properties=(name=hello)
>
> Server messages related to application being deployed at root context :
> INFO: Glassfish v3 started in 2750 ms
> Feb 22, 2008 12:20:40 PM
> com.sun.grizzly.standalone.StaticResourcesAdapter <init>
> INFO: New Servicing page from:
> /Users/pramodgopinath/work_related/jruby_samples/rails1.x/hello/public
> Feb 22, 2008 12:20:40 PM com.sun.enterprise.rails.RailsDeployer
> registerAdapter
> INFO: Loading application hello at /
> Starting Rails instances
> Feb 22, 2008 12:21:20 PM com.sun.grizzly.jruby.RubyObjectPool$1 run
> INFO: Rails instance instantiation took : 39671ms
> Feb 22, 2008 12:21:20 PM
> com.sun.enterprise.v3.deployment.DeployCommand execute
> INFO: Deployment of hello done is 40182 ms
>
>
> Section of the domain.xml after the application deployment :
> <web-module
> location="/Users/pramodgopinath/work_related/jruby_samples/rails1.x/hello/"
> name="hello"></web-module>
> <application directory-deployed="true" object-type="user"
> enabled="true"
> location="file:/Users/pramodgopinath/work_related/jruby_samples/rails1.x/hello/"
> name="hello">
> <engine sniffer="jruby"></engine>
> </application>
>
> Console log after server restart :
> INFO: Listening on port 4848
> Feb 22, 2008 12:25:31 PM
> com.sun.grizzly.standalone.StaticResourcesAdapter <init>
> INFO: New Servicing page from:
> /Users/pramodgopinath/work_related/jruby_samples/rails1.x/hello/public
> Feb 22, 2008 12:25:31 PM com.sun.enterprise.rails.RailsDeployer
> registerAdapter
> INFO: Loading application hello at /hello
> Starting Rails instances
> Feb 22, 2008 12:26:08 PM com.sun.grizzly.jruby.RubyObjectPool$1 run
> INFO: Rails instance instantiation took : 36655ms
> Feb 22, 2008 12:26:08 PM
> com.sun.enterprise.v3.services.impl.ApplicationLoaderService
> processApplication
> INFO: Loading hello Application done is 36883 ms
> Feb 22, 2008 12:26:08 PM com.sun.enterprise.v3.server.AppServerStartup run
> INFO: Glassfish v3 started in 39667 ms
>
> Thanks
> Pramod
>
> Hong Zhang wrote:
>
>> Hi, Pramod
>> I think I know why now. While the context root attribute is always
>> present for a standalone web module, it is not present for a rails
>> app (and other module types). The context root attribute in the
>> "application" element is optional. I have updated the
>> ApplicationLoaderService to only set context root information in
>> deployment params when it's present in the "application" element in
>> domain.xml. Please bring over the latest version of
>> ApplicationLoaderService and let me know if you still see any problem.
>>
>> Thanks,
>>
>> - Hong
>>
>> Pramod Gopinath wrote:
>>
>>> Hi Hong
>>> I saw Ur checkin related to the deployment information for an
>>> application being registered to the domain.xml. I am using the code
>>> bits that have been checked out today morning.
>>>
>>> Not sure if U mentioned this but wanted to point one issue that I am
>>> running into w.r.t contextroot specified on the asadmin deploy
>>> command. This is not being saved into the domain.xml and hence the
>>> server is brought down and up, get this exception stack trace :
>>>
>>> java.lang.NullPointerException
>>> at java.util.Hashtable.put(Hashtable.java:396)
>>> at java.util.Properties.setProperty(Properties.java:128)
>>> at
>>> com.sun.enterprise.v3.services.impl.ApplicationLoaderService.populateDeployParamsFromDomainXML(ApplicationLoaderService.java:377)
>>>
>>> at
>>> com.sun.enterprise.v3.services.impl.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:214)
>>>
>>> at
>>> com.sun.enterprise.v3.services.impl.ApplicationLoaderService.postConstruct(ApplicationLoaderService.java:114)
>>>
>>> at
>>> com.sun.hk2.component.AbstractWombImpl.inject(AbstractWombImpl.java:114)
>>>
>>> at
>>> com.sun.hk2.component.ConstructorWomb.initialize(ConstructorWomb.java:50)
>>>
>>> at
>>> com.sun.hk2.component.AbstractWombImpl.get(AbstractWombImpl.java:39)
>>> at
>>> com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:22)
>>>
>>> at
>>> com.sun.hk2.component.LazyInhabitant.get(LazyInhabitant.java:71)
>>> at
>>> com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:19)
>>>
>>> at
>>> com.sun.enterprise.v3.server.AppServerStartup.run(AppServerStartup.java:125)
>>>
>>> at
>>> com.sun.enterprise.module.bootstrap.Main.launch(Main.java:388)
>>> at
>>> com.sun.enterprise.module.bootstrap.Main.launch(Main.java:351)
>>> at com.sun.enterprise.module.bootstrap.Main.start(Main.java:154)
>>> at com.sun.enterprise.module.bootstrap.Main$1.run(Main.java:70)
>>>
>>>
>>> For now I am able to work around it, by adding this entry
>>> "--context-root = "/xxxx" to the entry :
>>> <application directory-deployed="true" object-type="user"
>>> enabled="true"
>>> location="file:/Users/pramodgopinath/work_related/jruby_samples/rails1.x/hello/"
>>> name="hello">
>>> in the domain.xml,
>>>
>>> Thanks
>>> Pramod
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>