Grails application now working on GlassFish v3
Recently Guillaume reported to me about his Grail app not deploying on GlassFish v3 Preview 2. The problem reported was that the Grail app was taking lots of time to deploy on GlassFish v3 Preview 2. Although such failures are not acceptable but considering GlassFish v3 is a complete new architecture, is still under development and feature incomplete and above all the preview releases do not go thru the normal test cycle so such bugs can appear.
This issue was discussed at the GlassFish mailing list, see the discussion here and the corresponding bug.
The good news is that Jerome quickly found out what the problem was and after the code went thru reviews, it was checked in and the fix went into yesterday's nightly build.
Here is how I created and deployed a Grails application on GlassFish v3:
Create a simple Grails app
Setup Grails This is the standard way you would setup the Grails environments:
export PATH=$GRAILS_HOME/bin:$PATH
export GRAILS_HOME=/tools/grails
Create a simple Grails app
vivekmz@boson(555)> grails create-app MyFirstGrailsApp
Welcome to Grails 1.0.1 - http://grails.org/
Licensed under Apache Standard License 2.0
Grails home is set to: /tools/grails
Base Directory: /ws/sb
Environment set to development
Note: No plugin scripts found
Running script /tools/grails/scripts/CreateApp.groovy
[mkdir] Created dir: /ws/sb/MyFirstGrailsApp/src
[mkdir] Created dir: /ws/sb/MyFirstGrailsApp/src/java
[mkdir] Created dir: /ws/sb/MyFirstGrailsApp/src/groovy
[mkdir] Created dir: /ws/sb/MyFirstGrailsApp/grails-app
[mkdir] Created dir: /ws/sb/MyFirstGrailsApp/grails-app/controllers
[mkdir] Created dir: /ws/sb/MyFirstGrailsApp/grails-app/services
[mkdir] Created dir: /ws/sb/MyFirstGrailsApp/grails-app/domain
[mkdir] Created dir: /ws/sb/MyFirstGrailsApp/grails-app/taglib
[mkdir] Created dir: /ws/sb/MyFirstGrailsApp/grails-app/utils
[mkdir] Created dir: /ws/sb/MyFirstGrailsApp/grails-app/views
[mkdir] Created dir: /ws/sb/MyFirstGrailsApp/grails-app/views/layouts
[mkdir] Created dir: /ws/sb/MyFirstGrailsApp/grails-app/i18n
[mkdir] Created dir: /ws/sb/MyFirstGrailsApp/grails-app/conf
[mkdir] Created dir: /ws/sb/MyFirstGrailsApp/test
[mkdir] Created dir: /ws/sb/MyFirstGrailsApp/test/unit
[mkdir] Created dir: /ws/sb/MyFirstGrailsApp/test/integration
[mkdir] Created dir: /ws/sb/MyFirstGrailsApp/scripts
[mkdir] Created dir: /ws/sb/MyFirstGrailsApp/web-app
[mkdir] Created dir: /ws/sb/MyFirstGrailsApp/web-app/js
[mkdir] Created dir: /ws/sb/MyFirstGrailsApp/web-app/css
[mkdir] Created dir: /ws/sb/MyFirstGrailsApp/web-app/images
[mkdir] Created dir: /ws/sb/MyFirstGrailsApp/web-app/META-INF
[mkdir] Created dir: /ws/sb/MyFirstGrailsApp/lib
[mkdir] Created dir: /ws/sb/MyFirstGrailsApp/grails-app/conf/spring
[mkdir] Created dir: /ws/sb/MyFirstGrailsApp/grails-app/conf/hibernate
[propertyfile] Creating new property file:
/ws/sb/MyFirstGrailsApp/application.properties
[copy] Copying 2 files to /ws/sb/MyFirstGrailsApp
[copy] Copying 2 files to /ws/sb/MyFirstGrailsApp/web-app/WEB-INF
[copy] Copying 5 files to /ws/sb/MyFirstGrailsApp/web-app/WEB-INF/tld
[copy] Copying 87 files to /ws/sb/MyFirstGrailsApp/web-app
[copy] Copying 17 files to /ws/sb/MyFirstGrailsApp/grails-app
[copy] Copying 1 file to /ws/sb/MyFirstGrailsApp
[copy] Copying 1 file to /ws/sb/MyFirstGrailsApp
[copy] Copying 1 file to /ws/sb/MyFirstGrailsApp
[propertyfile] Updating property file:
/ws/sb/MyFirstGrailsApp/application.properties
Created Grails Application at /ws/sb/MyFirstGrailsApp
Start GlassFish v3
vivekmz@boson(735)> glassfish/bin/asadmin start-domain
Mar 7, 2008 7:43:04 PM com.sun.enterprise.v3.server.AppServerStartup run
INFO: HK2 initialized in 281 ms
Mar 7, 2008 7:43:04 PM com.sun.enterprise.v3.server.AppServerStartup run
INFO: com.sun.enterprise.naming.impl.ServicesHookup@51b48197 Init done in 307 ms
Mar 7, 2008 7:43:04 PM com.sun.enterprise.v3.server.AppServerStartup run
INFO: com.sun.enterprise.v3.services.impl.CmdLineParamProcessor@9c0ec97 Init done in 310 ms
Mar 7, 2008 7:43:04 PM com.sun.enterprise.v3.server.AppServerStartup run
INFO: com.sun.enterprise.v3.server.SystemTasks@1fd0fafc Init done in 382 ms
Mar 7, 2008 7:43:04 PM com.sun.enterprise.v3.server.AppServerStartup run
INFO: com.sun.enterprise.v3.services.impl.LogManagerService@388ee016 Init done in 411 ms
Mar 7, 2008 7:43:04 PM com.sun.enterprise.v3.server.AppServerStartup run
INFO: com.sun.enterprise.v3.services.impl.HouseKeeper@a210b5b Init done in 413 ms
Mar 7, 2008 7:43:04 PM com.sun.enterprise.v3.services.impl.GrizzlyProxy start
INFO: Listening on port 8080
Mar 7, 2008 7:43:04 PM com.sun.enterprise.v3.services.impl.GrizzlyProxy start
INFO: Listening on port 8181
Mar 7, 2008 7:43:04 PM com.sun.enterprise.v3.services.impl.GrizzlyProxy start
INFO: Listening on port 4848
Mar 7, 2008 7:43:04 PM com.sun.enterprise.v3.server.AppServerStartup run
INFO: com.sun.enterprise.v3.services.impl.GrizzlyService@506f9b8e startup done in 630 ms
Mar 7, 2008 7:43:04 PM com.sun.enterprise.v3.server.AppServerStartup run
INFO: com.sun.enterprise.security.SecurityServicesUtil@585976c2 startup done in 732 ms
Mar 7, 2008 7:43:04 PM com.sun.enterprise.v3.server.AppServerStartup run
INFO: Glassfish v3 started in 733 ms
You can see above it took 733ms to boot up!
Deploy the Grails App
Now that I have built
MyFirstGrailsApp, it is time to deploy. So first I will create a war file:
vivekmz@boson(558)> cd MyFirstGrailsApp/
vivekmz@boson(559)> grails war
Now Let's deploy to GlassFish v3:
vivekmz@boson(749)> ../glassfish/bin/asadmin deploy MyFirstGrailsApp-0.1.war
SUCCESS : MyFirstGrailsApp-0.1 deployed successfully
properties=(name=MyFirstGrailsApp-0.1)
The server log tells, it took about 9.7 seconds to deploy it:
[#|2008-03-07T20:19:03.580+0000|INFO|GlassFish10.0|javax.enterprise.system.tools.deployment|_ThreadID=12;_ThreadName=Thread-4;|Deployment of MyFirstGrailsApp-0.1 done is 9765 ms|#]
Now when I accessing http://localhost:8080/MyFirstGrailsApp-0.1/my Grails app appears in the Firefox:
GlassFish v3 has been going thru continuous improvements and the development team is busy making it rock solid while adding new features to it. Continue sending your feedbacks to [email protected].
All articles with this logo are original by the blogger Caoer (Caoer), and all articles are indexed and collected.
, Please indicate the source and the original author when reprinting. thank you very much.
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
다양한 언어의 JSONJSON은 Javascript 표기법을 사용하여 데이터 구조를 레이아웃하는 데이터 형식입니다. 그러나 Javascript가 코드에서 이러한 구조를 나타낼 수 있는 유일한 언어는 아닙니다. 저는 일반적으로 '객체'{}...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.