Forums

Home » Liferay IDE » English

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Todd Gerspacher
Help getting Liferay bundled with GlassFish to work
January 2, 2014 9:05 AM
Answer

Todd Gerspacher

Rank: New Member

Posts: 3

Join Date: January 2, 2014

Recent Posts

I'm able to start GlassFish and view the admin web console, but I can only do it once. If I try to start GlassFish again it times out. Also nothing ever shows up when I try to view the portal page (ie. http://localhost:8080/portal).

I don't understand what I'm doing wrong. Why can't I view the portal page? Why does GlassFish start up fine once and then hang after that?

While I was on the admin page for GlassFish, I noticed that the following applications were enabled. Could someone enlighten me on what they do? I tried doing a Google search on them, but nothing came up.

* marketplace-portlet
* portal-compat-hook
* resources-importer-web
* welcome-theme
James Falkner
RE: Help getting Liferay bundled with GlassFish to work
January 2, 2014 9:18 AM
Answer

James Falkner

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1229

Join Date: September 17, 2010

Recent Posts

Todd Gerspacher:
I'm able to start GlassFish and view the admin web console, but I can only do it once. If I try to start GlassFish again it times out. Also nothing ever shows up when I try to view the portal page (ie. http://localhost:8080/portal).

I don't understand what I'm doing wrong. Why can't I view the portal page? Why does GlassFish start up fine once and then hang after that?


Welcome to the community, Todd! After the second time you start GlassFish, does anything "bad" appear in the server log file (domains/domain1/logs/server.log I believe)? There is likely some clue as to what the problem is in there.


While I was on the admin page for GlassFish, I noticed that the following applications were enabled. Could someone enlighten me on what they do? I tried doing a Google search on them, but nothing came up.

* marketplace-portlet
* portal-compat-hook
* resources-importer-web
* welcome-theme



marketplace-portlet is the client application for the Liferay Marketplace, and it shows up when you go to Control Panel -> Apps -> Store (or Apps -> Purchased)
portal-compat-hook is a mechanism for Marketplace apps to deliver portal patches (e.g. security fixes needed for the app to work properly)
resources-importer-web is a mechanism for Marketplace apps to bundle "resources" (e.g. images, web content articles, pdfs) and have them automatically get imported when the plugin is deployed
welcome-theme provides the content for the "welcome to Liferay" screen you first see (i.e. the screen shot in step 3 of the Liferay Quick Start).
Todd Gerspacher
RE: Help getting Liferay bundled with GlassFish to work
January 3, 2014 4:12 AM
Answer

Todd Gerspacher

Rank: New Member

Posts: 3

Join Date: January 2, 2014

Recent Posts

Thanks James.

I'm not sure what I did, but I can start and stop GlassFish now. I did notice, however, the following exceptions were being thrown when I shut GlassFish down.
  1
  22014-01-03T11:51:45.981+0000|INFO: Redirecting to /
  32014-01-03T11:51:46.713+0000|INFO: Admin Console: Initializing Session Attributes...
  42014-01-03T11:51:48.434+0000|INFO: Update Center option set to "NEVER". Ping is disabled. No checking for available update.
  52014-01-03T11:52:35.150+0000|INFO: Server shutdown initiated
  62014-01-03T11:52:35.326+0000|INFO: Plugin marketplace-portlet requires portal-compat-hook
  72014-01-03T11:52:35.338+0000|SEVERE: java.lang.NullPointerException
  8java.lang.NullPointerException
  9    at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireUndeployEvent(HotDeployUtil.java:31)
 10    at com.liferay.portal.kernel.servlet.PluginContextListener.fireUndeployEvent(PluginContextListener.java:169)
 11    at com.liferay.portal.kernel.servlet.PluginContextListener.doPortalDestroy(PluginContextListener.java:132)
 12    at com.liferay.portal.kernel.util.BasePortalLifecycle.portalDestroy(BasePortalLifecycle.java:31)
 13    at com.liferay.portal.kernel.servlet.PluginContextListener.contextDestroyed(PluginContextListener.java:97)
 14    at org.apache.catalina.core.StandardContext.contextListenerStop(StandardContext.java:4840)
 15    at org.apache.catalina.core.StandardContext.stop(StandardContext.java:5584)
 16    at com.sun.enterprise.web.WebModule.stop(WebModule.java:527)
 17    at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:1049)
 18    at com.sun.enterprise.web.WebContainer.unloadWebModule(WebContainer.java:2230)
 19    at com.sun.enterprise.web.WebContainer.unloadWebModule(WebContainer.java:2185)
 20    at com.sun.enterprise.web.WebApplication.stop(WebApplication.java:159)
 21    at org.glassfish.internal.data.EngineRef.stop(EngineRef.java:169)
 22    at org.glassfish.internal.data.ModuleInfo.stop(ModuleInfo.java:302)
 23    at org.glassfish.internal.data.ApplicationInfo.stop(ApplicationInfo.java:329)
 24    at com.sun.enterprise.v3.server.ApplicationLifecycle.unload(ApplicationLifecycle.java:998)
 25    at com.sun.enterprise.v3.server.ApplicationLifecycle.disable(ApplicationLifecycle.java:1970)
 26    at com.sun.enterprise.v3.server.ApplicationLoaderService.stopApplication(ApplicationLoaderService.java:454)
 27    at com.sun.enterprise.v3.server.ApplicationLoaderService.preDestroy(ApplicationLoaderService.java:422)
 28    at com.sun.hk2.component.AbstractCreatorInhabitantImpl.dispose(AbstractCreatorInhabitantImpl.java:83)
 29    at com.sun.hk2.component.SingletonInhabitant.release(SingletonInhabitant.java:81)
 30    at com.sun.hk2.component.EventPublishingInhabitant.release(EventPublishingInhabitant.java:108)
 31    at com.sun.hk2.component.LazyInhabitant.release(LazyInhabitant.java:133)
 32    at com.sun.enterprise.v3.server.AppServerStartup.stop(AppServerStartup.java:429)
 33    at com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.stop(GlassFishImpl.java:88)
 34    at com.sun.enterprise.glassfish.bootstrap.GlassFishDecorator.stop(GlassFishDecorator.java:68)
 35    at com.sun.enterprise.v3.admin.StopServer.doExecute(StopServer.java:70)
 36    at com.sun.enterprise.v3.admin.StopDomainCommand.execute(StopDomainCommand.java:95)
 37    at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)
 38    at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.run(CommandRunnerImpl.java:377)
 39
 402014-01-03T11:52:35.353+0000|WARNING: Preventing the removal of the plugin class loader
 412014-01-03T11:52:35.370+0000|INFO: Plugin resources-importer-web requires portal-compat-hook
 422014-01-03T11:52:35.371+0000|SEVERE: java.lang.NullPointerException
 43java.lang.NullPointerException
 44    at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireUndeployEvent(HotDeployUtil.java:31)
 45    at com.liferay.portal.kernel.servlet.PluginContextListener.fireUndeployEvent(PluginContextListener.java:169)
 46    at com.liferay.portal.kernel.servlet.PluginContextListener.doPortalDestroy(PluginContextListener.java:132)
 47    at com.liferay.portal.kernel.util.BasePortalLifecycle.portalDestroy(BasePortalLifecycle.java:31)
 48    at com.liferay.portal.kernel.servlet.PluginContextListener.contextDestroyed(PluginContextListener.java:97)
 49    at org.apache.catalina.core.StandardContext.contextListenerStop(StandardContext.java:4840)
 50    at org.apache.catalina.core.StandardContext.stop(StandardContext.java:5584)
 51    at com.sun.enterprise.web.WebModule.stop(WebModule.java:527)
 52    at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:1049)
 53    at com.sun.enterprise.web.WebContainer.unloadWebModule(WebContainer.java:2230)
 54    at com.sun.enterprise.web.WebContainer.unloadWebModule(WebContainer.java:2185)
 55    at com.sun.enterprise.web.WebApplication.stop(WebApplication.java:159)
 56    at org.glassfish.internal.data.EngineRef.stop(EngineRef.java:169)
 57    at org.glassfish.internal.data.ModuleInfo.stop(ModuleInfo.java:302)
 58    at org.glassfish.internal.data.ApplicationInfo.stop(ApplicationInfo.java:329)
 59    at com.sun.enterprise.v3.server.ApplicationLifecycle.unload(ApplicationLifecycle.java:998)
 60    at com.sun.enterprise.v3.server.ApplicationLifecycle.disable(ApplicationLifecycle.java:1970)
 61    at com.sun.enterprise.v3.server.ApplicationLoaderService.stopApplication(ApplicationLoaderService.java:454)
 62    at com.sun.enterprise.v3.server.ApplicationLoaderService.preDestroy(ApplicationLoaderService.java:422)
 63    at com.sun.hk2.component.AbstractCreatorInhabitantImpl.dispose(AbstractCreatorInhabitantImpl.java:83)
 64    at com.sun.hk2.component.SingletonInhabitant.release(SingletonInhabitant.java:81)
 65    at com.sun.hk2.component.EventPublishingInhabitant.release(EventPublishingInhabitant.java:108)
 66    at com.sun.hk2.component.LazyInhabitant.release(LazyInhabitant.java:133)
 67    at com.sun.enterprise.v3.server.AppServerStartup.stop(AppServerStartup.java:429)
 68    at com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.stop(GlassFishImpl.java:88)
 69    at com.sun.enterprise.glassfish.bootstrap.GlassFishDecorator.stop(GlassFishDecorator.java:68)
 70    at com.sun.enterprise.v3.admin.StopServer.doExecute(StopServer.java:70)
 71    at com.sun.enterprise.v3.admin.StopDomainCommand.execute(StopDomainCommand.java:95)
 72    at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)
 73    at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.run(CommandRunnerImpl.java:377)
 74
 752014-01-03T11:52:35.377+0000|WARNING: Preventing the removal of the plugin class loader
 762014-01-03T11:52:35.405+0000|INFO: Plugin welcome-theme requires portal-compat-hook, resources-importer-web
 772014-01-03T11:52:35.406+0000|SEVERE: java.lang.NullPointerException
 78java.lang.NullPointerException
 79    at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireUndeployEvent(HotDeployUtil.java:31)
 80    at com.liferay.portal.kernel.servlet.PluginContextListener.fireUndeployEvent(PluginContextListener.java:169)
 81    at com.liferay.portal.kernel.servlet.PluginContextListener.doPortalDestroy(PluginContextListener.java:132)
 82    at com.liferay.portal.kernel.util.BasePortalLifecycle.portalDestroy(BasePortalLifecycle.java:31)
 83    at com.liferay.portal.kernel.servlet.PluginContextListener.contextDestroyed(PluginContextListener.java:97)
 84    at org.apache.catalina.core.StandardContext.contextListenerStop(StandardContext.java:4840)
 85    at org.apache.catalina.core.StandardContext.stop(StandardContext.java:5584)
 86    at com.sun.enterprise.web.WebModule.stop(WebModule.java:527)
 87    at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:1049)
 88    at com.sun.enterprise.web.WebContainer.unloadWebModule(WebContainer.java:2230)
 89    at com.sun.enterprise.web.WebContainer.unloadWebModule(WebContainer.java:2185)
 90    at com.sun.enterprise.web.WebApplication.stop(WebApplication.java:159)
 91    at org.glassfish.internal.data.EngineRef.stop(EngineRef.java:169)
 92    at org.glassfish.internal.data.ModuleInfo.stop(ModuleInfo.java:302)
 93    at org.glassfish.internal.data.ApplicationInfo.stop(ApplicationInfo.java:329)
 94    at com.sun.enterprise.v3.server.ApplicationLifecycle.unload(ApplicationLifecycle.java:998)
 95    at com.sun.enterprise.v3.server.ApplicationLifecycle.disable(ApplicationLifecycle.java:1970)
 96    at com.sun.enterprise.v3.server.ApplicationLoaderService.stopApplication(ApplicationLoaderService.java:454)
 97    at com.sun.enterprise.v3.server.ApplicationLoaderService.preDestroy(ApplicationLoaderService.java:422)
 98    at com.sun.hk2.component.AbstractCreatorInhabitantImpl.dispose(AbstractCreatorInhabitantImpl.java:83)
 99    at com.sun.hk2.component.SingletonInhabitant.release(SingletonInhabitant.java:81)
100    at com.sun.hk2.component.EventPublishingInhabitant.release(EventPublishingInhabitant.java:108)
101    at com.sun.hk2.component.LazyInhabitant.release(LazyInhabitant.java:133)
102    at com.sun.enterprise.v3.server.AppServerStartup.stop(AppServerStartup.java:429)
103    at com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.stop(GlassFishImpl.java:88)
104    at com.sun.enterprise.glassfish.bootstrap.GlassFishDecorator.stop(GlassFishDecorator.java:68)
105    at com.sun.enterprise.v3.admin.StopServer.doExecute(StopServer.java:70)
106    at com.sun.enterprise.v3.admin.StopDomainCommand.execute(StopDomainCommand.java:95)
107    at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)
108    at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.run(CommandRunnerImpl.java:377)
109
1102014-01-03T11:52:35.408+0000|WARNING: Preventing the removal of the plugin class loader
1112014-01-03T11:52:35.423+0000|SEVERE: java.lang.NullPointerException
112java.lang.NullPointerException
113    at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireUndeployEvent(HotDeployUtil.java:31)
114    at com.liferay.portal.kernel.servlet.PluginContextListener.fireUndeployEvent(PluginContextListener.java:169)
115    at com.liferay.portal.kernel.servlet.SecurePluginContextListener.fireUndeployEvent(SecurePluginContextListener.java:281)
116    at com.liferay.portal.kernel.servlet.PluginContextListener.doPortalDestroy(PluginContextListener.java:132)
117    at com.liferay.portal.kernel.util.BasePortalLifecycle.portalDestroy(BasePortalLifecycle.java:31)
118    at com.liferay.portal.kernel.servlet.PluginContextListener.contextDestroyed(PluginContextListener.java:97)
119    at org.apache.catalina.core.StandardContext.contextListenerStop(StandardContext.java:4840)
120    at org.apache.catalina.core.StandardContext.stop(StandardContext.java:5584)
121    at com.sun.enterprise.web.WebModule.stop(WebModule.java:527)
122    at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:1049)
123    at com.sun.enterprise.web.WebContainer.unloadWebModule(WebContainer.java:2230)
124    at com.sun.enterprise.web.WebContainer.unloadWebModule(WebContainer.java:2185)
125    at com.sun.enterprise.web.WebApplication.stop(WebApplication.java:159)
126    at org.glassfish.internal.data.EngineRef.stop(EngineRef.java:169)
127    at org.glassfish.internal.data.ModuleInfo.stop(ModuleInfo.java:302)
128    at org.glassfish.internal.data.ApplicationInfo.stop(ApplicationInfo.java:329)
129    at com.sun.enterprise.v3.server.ApplicationLifecycle.unload(ApplicationLifecycle.java:998)
130    at com.sun.enterprise.v3.server.ApplicationLifecycle.disable(ApplicationLifecycle.java:1970)
131    at com.sun.enterprise.v3.server.ApplicationLoaderService.stopApplication(ApplicationLoaderService.java:454)
132    at com.sun.enterprise.v3.server.ApplicationLoaderService.preDestroy(ApplicationLoaderService.java:422)
133    at com.sun.hk2.component.AbstractCreatorInhabitantImpl.dispose(AbstractCreatorInhabitantImpl.java:83)
134    at com.sun.hk2.component.SingletonInhabitant.release(SingletonInhabitant.java:81)
135    at com.sun.hk2.component.EventPublishingInhabitant.release(EventPublishingInhabitant.java:108)
136    at com.sun.hk2.component.LazyInhabitant.release(LazyInhabitant.java:133)
137    at com.sun.enterprise.v3.server.AppServerStartup.stop(AppServerStartup.java:429)
138    at com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.stop(GlassFishImpl.java:88)
139    at com.sun.enterprise.glassfish.bootstrap.GlassFishDecorator.stop(GlassFishDecorator.java:68)
140    at com.sun.enterprise.v3.admin.StopServer.doExecute(StopServer.java:70)
141    at com.sun.enterprise.v3.admin.StopDomainCommand.execute(StopDomainCommand.java:95)
142    at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)
143    at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.run(CommandRunnerImpl.java:377)
144
1452014-01-03T11:52:35.424+0000|WARNING: Preventing the removal of the plugin class loader
1462014-01-03T11:52:38.723+0000|INFO: JMX002: JMXStartupService: Stopped JMXConnectorServer: null
1472014-01-03T11:52:38.724+0000|INFO: JMX001: JMXStartupService and JMXConnectors have been shut down.
1482014-01-03T11:52:38.724+0000|INFO: Shutdown procedure finished

Also, am I supposed to launch the welcome-theme application?
James Falkner
RE: Help getting Liferay bundled with GlassFish to work
January 3, 2014 6:44 AM
Answer

James Falkner

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1229

Join Date: September 17, 2010

Recent Posts

Todd Gerspacher:
Thanks James.

I'm not sure what I did, but I can start and stop GlassFish now. I did notice, however, the following exceptions were being thrown when I shut GlassFish down.
 1
 22014-01-03T11:51:45.981+0000|INFO: Redirecting to /
 32014-01-03T11:51:46.713+0000|INFO: Admin Console: Initializing Session Attributes...
 42014-01-03T11:51:48.434+0000|INFO: Update Center option set to "NEVER". Ping is disabled. No checking for available update.
 52014-01-03T11:52:35.150+0000|INFO: Server shutdown initiated
 62014-01-03T11:52:35.326+0000|INFO: Plugin marketplace-portlet requires portal-compat-hook
 72014-01-03T11:52:35.338+0000|SEVERE: java.lang.NullPointerException
 8java.lang.NullPointerException
 9    at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireUndeployEvent(HotDeployUtil.java:31)
10...
112014-01-03T11:52:38.724+0000|INFO: Shutdown procedure finished


I recommend filing a bug at issues.liferay.com - shutdown exceptions are in almost all cases not a problem, as long as everything shuts down in the end. Of course, errors in the log may be a symptom of a larger issue in the plugin architecture, so it should be investigated in any case.

Also, am I supposed to launch the welcome-theme application?

Nope.. Liferay currently relies heavily on the JavaEE architecture, and plugins for Liferay are implemented as JavaEE applications that appear to your app server as separate deployed applications, which are wired together using classloader black magic and other bridging techniques to present a single unified application to users. So when you deploy a new plugin to Liferay, the app server sees it as a separate application (bundled as a WAR file), but they aren't designed to be 'launched' independently of the 'main' application (Liferay itself). There are pros and cons to this approach, and it may change in the next major release, as we move toward an OSGi-based modular system.
Todd Gerspacher
RE: Help getting Liferay bundled with GlassFish to work
January 3, 2014 1:13 PM
Answer

Todd Gerspacher

Rank: New Member

Posts: 3

Join Date: January 2, 2014

Recent Posts

Okay, now I am confused. All I want to do is deploy some portlets through GlassFish. When I run the Liferay Plugin Project wizard it asks for a Liferay Runtime, but the only options available are all for Tomcat. That is, they look like "Liferay v6 CE (Tomcat 6)". I even tried exporting a portlet project - that I know works with OpenPortal - as a WAR and deploying it through GlassFish admin, still nothing.
James Falkner
RE: Help getting Liferay bundled with GlassFish to work
January 7, 2014 9:21 AM
Answer

James Falkner

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1229

Join Date: September 17, 2010

Recent Posts

Todd Gerspacher:
Okay, now I am confused. All I want to do is deploy some portlets through GlassFish. When I run the Liferay Plugin Project wizard it asks for a Liferay Runtime, but the only options available are all for Tomcat. That is, they look like "Liferay v6 CE (Tomcat 6)". I even tried exporting a portlet project - that I know works with OpenPortal - as a WAR and deploying it through GlassFish admin, still nothing.


The Liferay IDE only has "Native" support for Tomcat - for other app servers like GlassFish, even if it is running on the local machine/OS as Liferay IDE, you have to use the "Remote Server Adapter" (Download) (Documentation) so that IDE can "talk" to your GlassFish deployment.

Also, you must take special steps if you wish to use the GlassFish console to deploy Liferay apps. Normally one would deploy apps "through" Liferay (when you use Liferay IDE to deploy apps, it copies the app to Liferay's "hot deploy" directory via the "ant deploy" target) so that Liferay has a chance to inject dependencies and classloader magic wiring into the app's .WAR file before it is deployed to GlassFish. If you want to invoke this injection/wiring step manually, and be left with a .WAR file that *can* be deployed through GlassFish's admin cnosole you have to do it using the "direct deploy" build process (invoked using the "ant direct-deploy" target).

If you just take a "normal" exported WAR file and try to deploy it via GlassFish admin console, Liferay won't properly link with it, so it won't work properly.