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

            Assignee:
            support-lep@liferay.com SE Support
            Reporter:
            jesse.rao Jesse Rao
            Participants of an Issue:
            Recent user:
            Beck Liu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Days since last comment:
              4 years, 7 weeks, 3 days ago

                Packages

                Version Package