Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-75881

JRuby scripts can't find Liferay classes

Details

    Description

      Try to execute this Ruby script from Liferay's script console:

      require 'java'
      
      java_import com.liferay.portal.kernel.service.UserLocalServiceUtil
      
      userCount = UserLocalServiceUtil.getUsersCount();
      
      print userCount;
      

      Result: This error occurs:

      NameError: missing class name (`com.liferay.portal.kernel.service.UserLocalServiceUtil')
      ...
      java.util.concurrent.ExecutionException: org.jruby.embed.EvalFailedException: (NameError) missing class name (`com.liferay.portal.kernel.service.UserLocalServiceUtil')

      Attachments

        Activity

          People

            support-lep@liferay.com SE Support
            jesse.rao Jesse Rao
            Kiyoshi Lee Kiyoshi Lee
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              4 years, 51 weeks, 6 days ago

              Packages

                Version Package