Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-6935

Better error message than java.lang.NullPointerException - org.apache.cxf.common.util.Compiler.useJava6Compiler(Compiler.java:187) when running on a JRE instead of JDK

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.6
    • Fix Version/s: 3.0.10, 3.1.7, 3.2.0
    • Component/s: None
    • Labels:
      None
    • Environment:

      java version "1.7.0_79"
      Java(TM) SE Runtime Environment (build 1.7.0_79-b15)
      Java HotSpot(TM) 64-Bit Server VM (build 24.79-b02, mixed mode)

    • Estimated Complexity:
      Unknown

      Description

      CXF needs a better error message than java.lang.NullPointerException - org.apache.cxf.common.util.Compiler.useJava6Compiler(Compiler.java:187) when running on a JRE instead of JDK.

      2016-06-06 10:47:09,902 [qtp16583278-30] ERROR: java.lang.NullPointerException - org.apache.cxf.common.util.Compiler.useJava6Compiler(Compiler.java:187)
      java.lang.NullPointerException
                      at org.apache.cxf.common.util.Compiler.useJava6Compiler(Compiler.java:187)
                      at org.apache.cxf.common.util.Compiler.compileFiles(Compiler.java:141)
                      at org.apache.cxf.common.util.Compiler.compileFiles(Compiler.java:136)
                      at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.compileJavaSrc(DynamicClientFactory.java:611)
                      at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:370)
                      at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:276)
                      at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:269)
                      at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:204)
      

      The method javax.tools.ToolProvider.getSystemJavaCompiler() is documented to return null if no compiler is provided.

        Attachments

        1. cxf.patch
          0.8 kB
          Gary Gregory

          Activity

            People

            • Assignee:
              sergey_beryozkin Sergey Beryozkin
              Reporter:
              garydgregory Gary Gregory
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: