Uploaded image for project: 'PUBLIC - Liferay Maven'
  1. PUBLIC - Liferay Maven
  2. MAVEN-97

mvn liferay:build-service failed with Unable to initialize PropsUtil NPE if plugin or portlet embed hook with portal.properties

    Details

    • Type: Bug
    • Status: Selected for Development
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 6.2.0 GA1, 6.1.2 CE GA3
    • Fix Version/s: None
    • Component/s: Plugins
    • Labels:
      None
    • Environment:

      Description

      To reproduce just create a new service archetype and add portal.properties in src/main/resources of related portlet

      INFO: Properties for portal loaded from file:/C:/Temp/service/service-portlet/src/main/resources/portal.properties
      Loading file:/C:/Temp/service/service-portlet/src/main/resources/portal.properties
      set 12, 2013 4:36:06 PM com.liferay.portal.kernel.log.Jdk14LogImpl error
      SEVERE: Unable to initialize PropsUtil
      java.lang.NullPointerException
      at java.util.Hashtable.put(Hashtable.java:542)
      at java.util.Properties.setProperty(Properties.java:161)
      at java.lang.System.setProperty(System.java:786)
      at com.liferay.portal.kernel.util.SystemProperties.set(SystemProperties.java:67)
      at com.liferay.portal.util.PropsUtil.<init>(PropsUtil.java:175)
      at com.liferay.portal.util.PropsUtil.<clinit>(PropsUtil.java:343)
      at com.liferay.portal.util.PropsImpl.get(PropsImpl.java:36)
      at com.liferay.portal.kernel.util.PropsUtil.get(PropsUtil.java:32)
      at com.liferay.util.log4j.Log4JUtil._getLiferayHome(Log4JUtil.java:245)
      at com.liferay.util.log4j.Log4JUtil._getURLContent(Log4JUtil.java:254)
      at com.liferay.util.log4j.Log4JUtil.configureLog4J(Log4JUtil.java:101)
      at com.liferay.util.log4j.Log4JUtil.configureLog4J(Log4JUtil.java:60)
      at com.liferay.portal.util.InitUtil.init(InitUtil.java:100)
      at com.liferay.portal.util.InitUtil.initWithSpring(InitUtil.java:186)
      at com.liferay.portal.util.InitUtil.initWithSpring(InitUtil.java:165)
      at com.liferay.portal.tools.servicebuilder.ServiceBuilder.main(ServiceBuilder.java:198)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at com.liferay.maven.plugins.AbstractLiferayMojo.executeTool(AbstractLiferayMojo.java:217)
      at com.liferay.maven.plugins.ServiceBuilderMojo.doExecute(ServiceBuilderMojo.java:167)
      at com.liferay.maven.plugins.AbstractLiferayMojo.execute(AbstractLiferayMojo.java:74)

        Attachments

          Activity

            People

            • Votes:
              8 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Days since last comment:
                2 years, 32 weeks, 3 days ago

                Packages

                Version Package