PUBLIC - Liferay Portal Community Edition
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-13241

CLONE -Failed to bring up /web/guest page with java.lang.NoClassDefFoundError: Could not initialize class org.portletbridge.portlet.DefaultIdGenerator error

    Details

    • Type: Bug Bug
    • Status: Closed
    • Resolution: No Longer Reproducible
    • Affects Version/s: 5.2.3
    • Fix Version/s: --Sprint 12/11, 6.1.0 CE RC1
    • Component/s: Bookmarks
    • Labels:
      None
    • Environment:
      fedora 11
    • Liferay Contributor's Agreement:
      Accept
    • Similar Issues:
      Show 5 results 

      Description

      I just installed liferay 5.2.3 SE on a new fedora 11 installed box. When I tried to start up liferay 5.2.3, the default page, http://localhost:8080, did not come up. When I tied to access it from the firefox browser, I got the following error:

      INFO: Server startup in 119512 ms
      17:39:38,366 WARN [PortalImpl:2948] Current URL /web/guest generates exception:

      {groupId=16,privateLayout=false}

      does not have any layouts
      Starting Liferay Portal Standard Edition 5.2.3 (Augustine / Build 5203 / May 20, 2009)
      17:39:38,902 INFO [DBUtil:498] Database supports case sensitive queries
      17:39:43,367 ERROR [OpenSSOFilter:139] javax.servlet.ServletException: Servlet.init() for servlet Main Servlet threw exception
      javax.servlet.ServletException: Servlet.init() for servlet Main Servlet threw exception
      at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1213)
      at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:808)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:599)
      at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
      at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
      at com.liferay.portal.util.PortalImpl.sendError(PortalImpl.java:3010)
      at com.liferay.portal.util.PortalUtil.sendError(PortalUtil.java:919)
      at com.liferay.portal.servlet.FriendlyURLServlet.service(FriendlyURLServlet.java:119)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
      at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:142)
      at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
      at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:94)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
      at com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java:140)
      at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
      at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:282)
      at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
      at com.liferay.portal.servlet.filters.cache.CacheFilter.processFilter(CacheFilter.java:368)
      at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
      at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:257)
      at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
      at com.liferay.portal.servlet.filters.sso.opensso.OpenSSOFilter.processFilter(OpenSSOFilter.java:73)
      at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
      at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:193)
      at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
      at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.doFilter(VirtualHostFilter.java:191)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
      at com.liferay.portal.servlet.filters.threadlocalcache.ThreadLocalCacheFilter.processFilter(ThreadLocalCacheFilter.java:55)
      at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
      at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:94)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      at java.lang.Thread.run(Thread.java:636)
      Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.portletbridge.portlet.DefaultIdGenerator
      at org.portletbridge.portlet.PortletBridgePortlet.createViewPortlet(PortletBridgePortlet.java:219)
      at org.portletbridge.portlet.PortletBridgePortlet.init(PortletBridgePortlet.java:73)
      at com.liferay.portlet.webproxy.WebProxyPortlet.init(WebProxyPortlet.java:57)
      at javax.portlet.GenericPortlet.init(GenericPortlet.java:107)
      at com.liferay.portlet.InvokerPortletImpl.init(InvokerPortletImpl.java:250)
      at com.liferay.portlet.PortletInstanceFactoryImpl.init(PortletInstanceFactoryImpl.java:245)
      at com.liferay.portlet.PortletInstanceFactoryImpl.init(PortletInstanceFactoryImpl.java:217)
      at com.liferay.portlet.PortletInstanceFactoryImpl.create(PortletInstanceFactoryImpl.java:140)
      at com.liferay.portlet.PortletInstanceFactoryUtil.create(PortletInstanceFactoryUtil.java:47)
      at com.liferay.portal.servlet.MainServlet.init(MainServlet.java:231)
      at javax.servlet.GenericServlet.init(GenericServlet.java:212)
      at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1172)
      ... 81 more

        Activity

        Hide
        David Jung added a comment -

        I am seeing this same issue on a 'fresh' Ubuntu install on Amazon EC2.
        It may well be also a DNS issue, but unfortunately, I cannot add an /etc/hosts entry for the domain (- since it is hosted in the EC2 where the public and internal IP addresses are different and constantly changing).

        It shouldn't be sensitive this this issue.

        NB: this is on LR 6 CE GA3 & Tomcat 6

        Show
        David Jung added a comment - I am seeing this same issue on a 'fresh' Ubuntu install on Amazon EC2. It may well be also a DNS issue, but unfortunately, I cannot add an /etc/hosts entry for the domain (- since it is hosted in the EC2 where the public and internal IP addresses are different and constantly changing). It shouldn't be sensitive this this issue. NB: this is on LR 6 CE GA3 & Tomcat 6
        Hide
        David Jung added a comment -

        PS: This is a clone of LPS-3796 - it wouldn't let me reopen that issue.

        Show
        David Jung added a comment - PS: This is a clone of LPS-3796 - it wouldn't let me reopen that issue.
        Hide
        David Jung added a comment -

        So, after some debugging, I've narrowed down the issue further.
        It is actually an issue with EHCache which is being initialized by Hibernate. Basically, EHCache is failing to init because the hostname is unresolvable (a perfectly normal condition in a dynamic cloud of virtual hosts where the IP and hostnames frequently change).

        However, Liferay shouldn't be sensitive to this issue and should instead startup with a warning that the cache wasn't able to be initialized (or somesuch). I'm guessing it is the second-level cache being used by Hibernate or perhaps Spring.

        Here is a relevant piece of the stack-trace:

        19:35:44,702 INFO [DialectDetector:69] Determining dialect for MySQL 5
        19:35:45,296 INFO [DialectDetector:49] Using dialect org.hibernate.dialect.MySQLDialect
        19:35:45,750 ERROR [Cache:168] Unable to set localhost. This prevents creation of a GUID. Cause was: ec2-184-72-191-160.compute-1.amazonaws.com: ec2-184-72-191-160.compute-1.amazonaws.com
        java.net.UnknownHostException: ec2-184-72-191-160.compute-1.amazonaws.com: ec2-184-72-191-160.compute-1.amazonaws.com
        at java.net.InetAddress.getLocalHost(InetAddress.java:1354)
        at net.sf.ehcache.Cache.<clinit>(Cache.java:166)
        at net.sf.ehcache.config.ConfigurationHelper.createCache(ConfigurationHelper.java:303)
        at net.sf.ehcache.config.ConfigurationHelper.createDefaultCache(ConfigurationHelper.java:218)
        at net.sf.ehcache.CacheManager.configure(CacheManager.java:551)
        at net.sf.ehcache.CacheManager.init(CacheManager.java:323)
        at net.sf.ehcache.CacheManager.<init>(CacheManager.java:208)
        at net.sf.ehcache.hibernate.EhCacheProvider.start(EhCacheProvider.java:99)
        at com.liferay.portal.dao.orm.hibernate.CacheProviderWrapper.start(CacheProviderWrapper.java:62)
        at com.liferay.portal.dao.orm.hibernate.EhCacheProvider.start(EhCacheProvider.java:66)
        at org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge.start(RegionFactoryCacheProviderBridge.java:72)
        at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:248)
        at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1385)
        at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:855)

        So, I consider the Liferay bug is that it doesn't startup when EHCache doesn't initialize, but I'll also be filing a bug report with EHCache folks.

        Thanks.

        Show
        David Jung added a comment - So, after some debugging, I've narrowed down the issue further. It is actually an issue with EHCache which is being initialized by Hibernate. Basically, EHCache is failing to init because the hostname is unresolvable (a perfectly normal condition in a dynamic cloud of virtual hosts where the IP and hostnames frequently change). However, Liferay shouldn't be sensitive to this issue and should instead startup with a warning that the cache wasn't able to be initialized (or somesuch). I'm guessing it is the second-level cache being used by Hibernate or perhaps Spring. Here is a relevant piece of the stack-trace: 19:35:44,702 INFO [DialectDetector:69] Determining dialect for MySQL 5 19:35:45,296 INFO [DialectDetector:49] Using dialect org.hibernate.dialect.MySQLDialect 19:35:45,750 ERROR [Cache:168] Unable to set localhost. This prevents creation of a GUID. Cause was: ec2-184-72-191-160.compute-1.amazonaws.com: ec2-184-72-191-160.compute-1.amazonaws.com java.net.UnknownHostException: ec2-184-72-191-160.compute-1.amazonaws.com: ec2-184-72-191-160.compute-1.amazonaws.com at java.net.InetAddress.getLocalHost(InetAddress.java:1354) at net.sf.ehcache.Cache.<clinit>(Cache.java:166) at net.sf.ehcache.config.ConfigurationHelper.createCache(ConfigurationHelper.java:303) at net.sf.ehcache.config.ConfigurationHelper.createDefaultCache(ConfigurationHelper.java:218) at net.sf.ehcache.CacheManager.configure(CacheManager.java:551) at net.sf.ehcache.CacheManager.init(CacheManager.java:323) at net.sf.ehcache.CacheManager.<init>(CacheManager.java:208) at net.sf.ehcache.hibernate.EhCacheProvider.start(EhCacheProvider.java:99) at com.liferay.portal.dao.orm.hibernate.CacheProviderWrapper.start(CacheProviderWrapper.java:62) at com.liferay.portal.dao.orm.hibernate.EhCacheProvider.start(EhCacheProvider.java:66) at org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge.start(RegionFactoryCacheProviderBridge.java:72) at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:248) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1385) at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:855) So, I consider the Liferay bug is that it doesn't startup when EHCache doesn't initialize, but I'll also be filing a bug report with EHCache folks. Thanks.

          People

          • Assignee:
            Dale Shan
            Reporter:
            David Jung
            Recent user:
            Randy Zhu
            Participants of an Issue:
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Days since last comment:
              4 years, 20 weeks, 6 days ago

              Development

                Structure Helper Panel