{"id":98,"date":"2011-11-01T12:09:31","date_gmt":"2011-11-01T18:09:31","guid":{"rendered":"http:\/\/www.petesworkshop.com\/blog_wp\/?p=98"},"modified":"2011-11-01T12:09:31","modified_gmt":"2011-11-01T18:09:31","slug":"glassfish-on-ibm-i","status":"publish","type":"post","link":"https:\/\/www.petesworkshop.com\/blog_wp\/?p=98","title":{"rendered":"Glassfish on IBM i"},"content":{"rendered":"<p>I am a *little* biased in that I think\u00a0 IBM i on Power is the greatest server platform on the planet but you really can&#8217;t blame me since it seems that it can run just about any app you can throw at it (well, any non-Windows based app). Over a year ago I had attempted to get Glassfish running on i because I had heard good things about it and wanted to give it a whirl.\u00a0 It actually started with a Ruby CMS application called Radiant that I wanted to run to demonstrate that yes, Ruby can run on i.\u00a0 This particular implementation suggested Glassfish as the web server.\u00a0 First I tried a full blown copy of Glassfish (3.0.1) but got a couple of very strange errors that seemed related to the IBM J9 JVM and after running them down with marginal success, I decided to install the Glassfish gem, which, surprisingly, ran just fine on i.\u00a0 I documented the issues to both Oracle and IBM and moved on. (BTW you can check out the Ruby on IBM i site <a title=\"Ruby on IBM i\" href=\"http:\/\/www.roroni.com\" target=\"_blank\">here<\/a>)<\/p>\n<p>The primary issue with the full Glassfish implementation was that the Admin console wouldn&#8217;t display and it was definitely due to the J9 JVM. The actual server would run fine.\u00a0 You could auto-deploy and run servlets and other apps but you couldn&#8217;t manage them.\u00a0 One of things I liked about Glassfish was the administration console, so not having a console made using Glassfish a non-starter for me.<\/p>\n<p>What a difference a year or so makes.\u00a0 Oracle released Glassfish 3.1.1 and that seems to have solved the Admin console issue for me.\u00a0 There is still one open issue now, but there is a workaround, so using Glassfish in production on IBM i is now a reality.\u00a0 Here is all you need to do:<\/p>\n<p>I downloaded the aix zip version of Glassfish 3.1.1 and just expanded it to the IFS.\u00a0 I made some changes to the domain.xml file to point to the correct IP and ports I needed and I removed references to the -server and -client java directives (they had given me trouble before, so I<br \/>\ncommented them out).\u00a0 I changed the MaxPermSize as well ( -XX:MaxPermSize=384m ).\u00a0 That was about it.\u00a0 I am running Java 6, 32bit<br \/>\nand I am pretty current on Group PTF&#8217;s.<\/p>\n<p>I came across one additional issue when running Liferay on Glassfish on IBM i: There was a java.lang.NoSuchMethodException: com.ibm.lang.management.OperatingSystemMXBeanImpl.getTotalPhysicalMemorySize() error.\u00a0 Turns out that this was patched for AIX on a previous build but that patch is conditional on the os.name system property returning &#8216;AIX&#8217;.\u00a0 This should work on i except that PASE returns &#8216;OS\/400 &#8216; instead of &#8216;AIX&#8217; so I have submitted a bug report to Oracle (could hack it myself, I guess) but there is a workaround: the Oracle developer I worked with suggested I pass this argument to the Glassfish start command:<\/p>\n<p>asadmin create-jvm-options -Dos.name=OS\/400-AIX<\/p>\n<p>That seems to work fine.\u00a0 With all that info, you should have no problems using Glassfish on IBM\u00a0 (FYI: I am running 6.1 and use the Java 6 JVM)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I am a *little* biased in that I think\u00a0 IBM i on Power is the greatest server platform on the planet but you really can&#8217;t blame me since it seems that it can run just about any app you can &hellip; <a href=\"https:\/\/www.petesworkshop.com\/blog_wp\/?p=98\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-98","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.petesworkshop.com\/blog_wp\/index.php?rest_route=\/wp\/v2\/posts\/98","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.petesworkshop.com\/blog_wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.petesworkshop.com\/blog_wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.petesworkshop.com\/blog_wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.petesworkshop.com\/blog_wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=98"}],"version-history":[{"count":1,"href":"https:\/\/www.petesworkshop.com\/blog_wp\/index.php?rest_route=\/wp\/v2\/posts\/98\/revisions"}],"predecessor-version":[{"id":99,"href":"https:\/\/www.petesworkshop.com\/blog_wp\/index.php?rest_route=\/wp\/v2\/posts\/98\/revisions\/99"}],"wp:attachment":[{"href":"https:\/\/www.petesworkshop.com\/blog_wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=98"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.petesworkshop.com\/blog_wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=98"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.petesworkshop.com\/blog_wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=98"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}