Results 1 to 3 of 3
  1. #1
    bmbsage is offline Member
    Join Date
    May 2012
    Posts
    3
    Rep Power
    0

    Default Java.lang.NullPointerException at

    I can run my program but when I try to create a Jar file via clean and build.
    I'm getting the following errors..


    An exception has occurred in the compiler (1.7.0_01). Please file a bug at the Java Developer Connection (Report a Bug or Request a Feature) after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report. Thank you.
    java.lang.NullPointerException
    at com.sun.tools.javac.comp.Lower.visitStringSwitch(L ower.java:3456)
    at com.sun.tools.javac.comp.Lower.visitSwitch(Lower.j ava:3357)
    at com.sun.tools.javac.tree.JCTree$JCSwitch.accept(JC Tree.java:959)
    at com.sun.tools.javac.tree.TreeTranslator.translate( TreeTranslator.java:58)
    at com.sun.tools.javac.comp.Lower.translate(Lower.jav a:2160)
    at com.sun.tools.javac.tree.TreeTranslator.translate( TreeTranslator.java:70)
    at com.sun.tools.javac.tree.TreeTranslator.visitBlock (TreeTranslator.java:160)
    at com.sun.tools.javac.comp.Lower.visitBlock(Lower.ja va:3311)
    at com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCT ree.java:781)
    at com.sun.tools.javac.tree.TreeTranslator.translate( TreeTranslator.java:58)
    at com.sun.tools.javac.comp.Lower.translate(Lower.jav a:2160)
    at com.sun.tools.javac.tree.TreeTranslator.visitMetho dDef(TreeTranslator.java:144)
    at com.sun.tools.javac.comp.Lower.visitMethodDefInter nal(Lower.java:2619)
    at com.sun.tools.javac.comp.Lower.visitMethodDef(Lowe r.java:2538)
    at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accep t(JCTree.java:669)
    at com.sun.tools.javac.tree.TreeTranslator.translate( TreeTranslator.java:58)
    at com.sun.tools.javac.comp.Lower.translate(Lower.jav a:2160)
    at com.sun.tools.javac.comp.Lower.visitClassDef(Lower .java:2283)
    at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept (JCTree.java:591)
    at com.sun.tools.javac.tree.TreeTranslator.translate( TreeTranslator.java:58)
    at com.sun.tools.javac.comp.Lower.translate(Lower.jav a:2160)
    at com.sun.tools.javac.comp.Lower.visitClassDef(Lower .java:2283)
    at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept (JCTree.java:591)
    at com.sun.tools.javac.tree.TreeTranslator.translate( TreeTranslator.java:58)
    at com.sun.tools.javac.comp.Lower.translate(Lower.jav a:2160)
    at com.sun.tools.javac.comp.Lower.translate(Lower.jav a:2180)
    at com.sun.tools.javac.comp.Lower.translateTopLevelCl ass(Lower.java:3650)
    at com.sun.tools.javac.main.JavaCompiler.desugar(Java Compiler.java:1393)
    at com.sun.tools.javac.main.JavaCompiler.desugar(Java Compiler.java:1271)
    at com.sun.tools.javac.main.JavaCompiler.compile2(Jav aCompiler.java:870)
    at com.sun.tools.javac.main.JavaCompiler.compile(Java Compiler.java:829)
    at com.sun.tools.javac.main.Main.compile(Main.java:41 7)
    at com.sun.tools.javac.main.Main.compile(Main.java:33 1)
    at com.sun.tools.javac.main.Main.compile(Main.java:32 2)
    at com.sun.tools.javac.Main.compile(Main.java:76)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.apache.tools.ant.taskdefs.compilers.Javac13.ex ecute(Javac13.java:56)
    at org.apache.tools.ant.taskdefs.Javac.compile(Javac. java:1153)
    at org.apache.tools.ant.taskdefs.Javac.execute(Javac. java:930)
    at org.netbeans.modules.java.source.ant.JavacTask.exe cute(JavacTask.java:144)
    at org.apache.tools.ant.UnknownElement.execute(Unknow nElement.java:291)
    at sun.reflect.GeneratedMethodAccessor351.invoke(Unkn own Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.apache.tools.ant.dispatch.DispatchUtils.execut e(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.taskdefs.Sequential.execute(S equential.java:68)
    at org.apache.tools.ant.UnknownElement.execute(Unknow nElement.java:291)
    at sun.reflect.GeneratedMethodAccessor351.invoke(Unkn own Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.apache.tools.ant.dispatch.DispatchUtils.execut e(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.taskdefs.MacroInstance.execut e(MacroInstance.java:398)
    at org.apache.tools.ant.UnknownElement.execute(Unknow nElement.java:291)
    at sun.reflect.GeneratedMethodAccessor351.invoke(Unkn own Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.apache.tools.ant.dispatch.DispatchUtils.execut e(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:39 2)
    at org.apache.tools.ant.Target.performTasks(Target.ja va:413)
    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.execut eTargets(DefaultExecutor.java:41)
    at org.apache.tools.ant.Project.executeTargets(Projec t.java:1251)
    at org.apache.tools.ant.module.bridge.impl.BridgeImpl .run(BridgeImpl.java:285)
    at org.apache.tools.ant.module.run.TargetExecutor.run (TargetExecutor.java:539)
    at org.netbeans.core.execution.RunClassThread.run(Run ClassThread.java:153)
    C:\ProdDev\VDR PC Software\VDR_Main_Frame\nbproject\build-impl.xml:630: The following error occurred while executing this line:
    C:\ProdDev\VDR PC Software\VDR_Main_Frame\nbproject\build-impl.xml:271: Compile failed; see the compiler error output for details.
    BUILD FAILED (total time: 0 seconds)

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,949
    Rep Power
    19

    Default Re: Java.lang.NullPointerException at

    "An exception has occurred in the compiler (1.7.0_01). Please file a bug at the Java Developer Connection (Report a Bug or Request a Feature) after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report. Thank you."

    That's pretty clearly not something we can deal with here.
    I would suggest trying first off by upgrading your 1.7 SDK to 04 (I think that's the latest).
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  3. #3
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,450
    Blog Entries
    7
    Rep Power
    20

    Default Re: Java.lang.NullPointerException at

    That most certainly is a bug in the compiler; from the stack trace I can see that it wants to 'desugar' statements in the AST (Abstract Syntax Tree); most probably a swith on Strings values; and there it meets its Swan Lake ... check if the bug has been reported before (and fixed!); if not, report it.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

Similar Threads

  1. PLEASE HELP ME-i got java.lang.NullPointerException
    By nandhinianand in forum NetBeans
    Replies: 4
    Last Post: 08-05-2011, 06:35 AM
  2. Java.Lang.NullPointerException, but I am not sure why???
    By buildakicker in forum New To Java
    Replies: 22
    Last Post: 07-21-2011, 01:20 AM
  3. java.lang.NullPointerException
    By alaa in forum New To Java
    Replies: 1
    Last Post: 04-15-2011, 06:21 PM
  4. java.lang.NullPointerException
    By stevemcc in forum AWT / Swing
    Replies: 2
    Last Post: 02-08-2008, 09:01 AM
  5. java.lang.NullPointerException
    By ravian in forum New To Java
    Replies: 1
    Last Post: 01-13-2008, 07:39 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •