Hive
  1. Hive
  2. HIVE-4231

Build fails with "WrappedRuntimeException: Content is not allowed in prolog." when _JAVA_OPTIONS="-Dfile.encoding=UTF-8"

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 0.11.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Build failed with the follwing error when I set _JAVA_OPTIONS to "-Dfile.encoding=UTF-8":

      extract-functions:
           [xslt] Processing /Users/sho/src/apache/hive/build/builtins/metadata/class-info.xml to /Users/sho/src/apache/hive/build/builtins/metadata/class-registration.sql
           [xslt] Loading stylesheet /Users/sho/src/apache/hive/pdk/scripts/class-registration.xsl
           [xslt] : Error! Content is not allowed in prolog.
           [xslt] : Error! com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Content is not allowed in prolog.
           [xslt] Failed to process /Users/sho/src/apache/hive/build/builtins/metadata/class-info.xml
      
      BUILD FAILED
      /Users/sho/src/apache/hive/build.xml:517: The following error occurred while executing this line:
      /Users/sho/src/apache/hive/builtins/build.xml:37: The following error occurred while executing this line:
      /Users/sho/src/apache/hive/pdk/scripts/build-plugin.xml:118: javax.xml.transform.TransformerException: javax.xml.transform.TransformerException: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Content is not allowed in prolog.
      	at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:735)
      	at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:336)
      	at org.apache.tools.ant.taskdefs.optional.TraXLiaison.transform(TraXLiaison.java:194)
      	at org.apache.tools.ant.taskdefs.XSLTProcess.process(XSLTProcess.java:852)
      	at org.apache.tools.ant.taskdefs.XSLTProcess.execute(XSLTProcess.java:388)
      	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
      	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
      	at org.apache.tools.ant.Task.perform(Task.java:348)
      	at org.apache.tools.ant.Target.execute(Target.java:390)
      	at org.apache.tools.ant.Target.performTasks(Target.java:411)
      	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
      	at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
      	at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
      	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
      	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
      	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
      	at org.apache.tools.ant.Task.perform(Task.java:348)
      	at org.apache.tools.ant.Target.execute(Target.java:390)
      	at org.apache.tools.ant.Target.performTasks(Target.java:411)
      	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
      	at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
      	at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
      	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
      	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
      	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
      	at org.apache.tools.ant.Task.perform(Task.java:348)
      	at org.apache.tools.ant.Target.execute(Target.java:390)
      	at org.apache.tools.ant.Target.performTasks(Target.java:411)
      	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
      	at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
      	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
      	at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
      	at org.apache.tools.ant.Main.runBuild(Main.java:809)
      	at org.apache.tools.ant.Main.startAnt(Main.java:217)
      	at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
      	at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
      Caused by: javax.xml.transform.TransformerException: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Content is not allowed in prolog.
      	at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.getDOM(TransformerImpl.java:564)
      	at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:725)
      	... 44 more
      Caused by: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Content is not allowed in prolog.
      	at com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager.getDTM(XSLTCDTMManager.java:460)
      	at com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager.getDTM(XSLTCDTMManager.java:248)
      	at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.getDOM(TransformerImpl.java:542)
      	... 45 more
      

      easy workaround: unset _JAVA_OPTIONS

        Activity

        Sho Shimauchi created issue -
        Hide
        Vikram Dixit K added a comment -

        Could you provide a method to reproduce this issue? What target should I be building. I have exported _JAVA_OPTS="-Dfile.encoding=UTF-8" in my environment and compiling the package target did not produce this issue.

        Show
        Vikram Dixit K added a comment - Could you provide a method to reproduce this issue? What target should I be building. I have exported _JAVA_OPTS="-Dfile.encoding=UTF-8" in my environment and compiling the package target did not produce this issue.
        Hide
        Sho Shimauchi added a comment -

        Sure, here is my environment:

        OS: MacOS X 10.8.3
        Java:
        java version "1.6.0_43"
        Java(TM) SE Runtime Environment (build 1.6.0_43-b01-447-11M4203)
        Java HotSpot(TM) 64-Bit Server VM (build 20.14-b01-447, mixed mode)

        How to reproduce: run "ant [clean] package".

        Show
        Sho Shimauchi added a comment - Sure, here is my environment: OS: MacOS X 10.8.3 Java: java version "1.6.0_43" Java(TM) SE Runtime Environment (build 1.6.0_43-b01-447-11M4203) Java HotSpot(TM) 64-Bit Server VM (build 20.14-b01-447, mixed mode) How to reproduce: run "ant [clean] package".
        Hide
        Nitin Pawar added a comment -

        Even I am running into same issue when trying to build hive project
        I have same environment at Sho
        but OS is rhel 6.3

        the log says exactly same and to add to the log contents for the failed xml file is
        [root@localhost branch-0.10]# cat /root/apache/hive/branch-0.10/build/builtins/metadata/class-info.xml
        <ClassList>
        Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/hadoop/hive/ql/exec/Description : Unsupported major.minor version 51.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
        at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
        at org.apache.hive.pdk.FunctionExtractor.main(FunctionExtractor.java:27)
        [root@localhost branch-0.10]#

        Show
        Nitin Pawar added a comment - Even I am running into same issue when trying to build hive project I have same environment at Sho but OS is rhel 6.3 the log says exactly same and to add to the log contents for the failed xml file is [root@localhost branch-0.10] # cat /root/apache/hive/branch-0.10/build/builtins/metadata/class-info.xml <ClassList> Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/hadoop/hive/ql/exec/Description : Unsupported major.minor version 51.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) at java.lang.ClassLoader.defineClass(ClassLoader.java:615) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) at java.net.URLClassLoader.access$000(URLClassLoader.java:58) at java.net.URLClassLoader$1.run(URLClassLoader.java:197) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at org.apache.hive.pdk.FunctionExtractor.main(FunctionExtractor.java:27) [root@localhost branch-0.10] #
        Hide
        subhasish saha added a comment -

        Same issue

        Ubuntu 12.04
        Java : 1.6 (openjdk 1.6.0_27 and sun java 1.6.0_45 both)

        Show
        subhasish saha added a comment - Same issue Ubuntu 12.04 Java : 1.6 (openjdk 1.6.0_27 and sun java 1.6.0_45 both)

          People

          • Assignee:
            Unassigned
            Reporter:
            Sho Shimauchi
          • Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:

              Development