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

petra.lang dependency missing when enabling "liferay.workspace.modules.jsp.precompile.enabled=true"

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: Master
    • Fix Version/s: None
    • Component/s: Dev Tools > Workspace
    • Labels:
      None

      Description

      • Liferay workspace plugin: 2.2.3
      • Gradle 5.6.4
      • Target Platform: 7.1.10.fp14

      I get exception:

      > Task :modules:foo-portlet:generateJSPJava FAILED
      Exception in thread "main" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
              at com.liferay.jasper.jspc.JspC.main(JspC.java:52)
      Caused by: java.lang.reflect.InvocationTargetException
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at com.liferay.jasper.jspc.JspC._runWithClassPath(JspC.java:168)
              at com.liferay.jasper.jspc.JspC.main(JspC.java:46)
      Caused by: java.lang.NoClassDefFoundError: com/liferay/petra/lang/CentralizedThreadLocal
              at com.liferay.portal.kernel.util.Validator.<clinit>(Validator.java:1346)
              at com.liferay.taglib.portlet.ActionURLTei.getVariableInfo(ActionURLTei.java:33)
              at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:868)
              at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1502)
              at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2297)
              at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2347)
              at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2353)
              at org.apache.jasper.compiler.Node$Root.accept(Node.java:499)
              at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2297)
              at org.apache.jasper.compiler.Validator.validate(Validator.java:1890)
              at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:223)
              at org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
              at org.apache.jasper.JspC.processFile(JspC.java:1178)
              at org.apache.jasper.JspC.execute(JspC.java:1345)
              ... 6 more
      Caused by: java.lang.ClassNotFoundException: com.liferay.petra.lang.CentralizedThreadLocal
              at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:419)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:352)
              ... 20 more
       

      I can work around the issue by making sure each project is configured with:

              dependencies {
                  jspC group: "com.liferay", name: "com.liferay.petra.lang"
              } 

        Attachments

          Activity

            People

            Assignee:
            support-lep@liferay.com SE Support
            Reporter:
            raymond.auge Raymond Auge
            Participants of an Issue:
            Recent user:
            Raymond Auge
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Days since last comment:
              1 year, 38 weeks, 4 days ago

                Packages

                Version Package