Java 1.5 javac bug

I'm getting an error message that dumps what looks like a stack trace when I try to compile a medium-sized application with a number of different classes in different packages. The problem seems to occur when I specify a list of .java files to compile and one of the earlier ones depends on one of the later ones or on one that's not listed on the command line at all. All necessary files are in the classpath.
Does anyone know a workaround? Where do I go to report the bug to Sun? Is there a special bug database for Java 1.5 beta? What is the URL?
Here is the stack trace:
An exception has occurred in the compiler (1.5.0-beta). Please file a bug at the Java Developer Connection (http://java.sun.com/cgi-bin/bugreport.cgi) 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.Resolve.findFun(Resolve.java:753)
at com.sun.tools.javac.comp.Resolve.resolveMethod(Resolve.java:1115)
at com.sun.tools.javac.comp.Attr.visitIdent(Attr.java:1552)
at com.sun.tools.javac.tree.Tree$Ident.accept(Tree.java:1006)
at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:256)
at com.sun.tools.javac.comp.Attr.attribExpr(Attr.java:271)
at com.sun.tools.javac.comp.Attr.visitApply(Attr.java:1083)
at com.sun.tools.javac.tree.Tree$Apply.accept(Tree.java:817)
at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:256)
at com.sun.tools.javac.comp.Attr.attribExpr(Attr.java:271)
at com.sun.tools.javac.comp.Attr.visitVarDef(Attr.java:532)
at com.sun.tools.javac.tree.Tree$VarDef.accept(Tree.java:511)
at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:256)
at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:291)
at com.sun.tools.javac.comp.Attr.attribStats(Attr.java:307)
at com.sun.tools.javac.comp.Attr.visitBlock(Attr.java:562)
at com.sun.tools.javac.tree.Tree$Block.accept(Tree.java:540)
at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:256)
at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:291)
at com.sun.tools.javac.comp.Attr.visitTry(Attr.java:727)
at com.sun.tools.javac.tree.Tree$Try.accept(Tree.java:674)
at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:256)
at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:291)
at com.sun.tools.javac.comp.Attr.attribStats(Attr.java:307)
at com.sun.tools.javac.comp.Attr.visitBlock(Attr.java:557)
at com.sun.tools.javac.tree.Tree$Block.accept(Tree.java:540)
at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:256)
at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:291)
at com.sun.tools.javac.comp.Attr.attribClassBody(Attr.java:2301)
at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:2235)
at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:2188)
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:412)
at com.sun.tools.javac.main.Main.compile(Main.java:593)
at com.sun.tools.javac.main.Main.compile(Main.java:545)
at com.sun.tools.javac.Main.compile(Main.java:44)
at com.sun.tools.javac.Main.main(Main.java:35)
-Sam

The URL is in your own message, namely:
http://java.sun.com/cgi-bin/bugreport.cgi
The known bugs may be searched here:
http://developer.java.sun.com/developer/bugParade/
Note:
Your bug is already known, look here:
http://developer.java.sun.com/developer/bugParade/bugs/4979456.html

Similar Messages

  • Javac bug database still being maintained?

    After the Oracle acquisition, is the javac bug database still being maintained? I submitted a bug report on 04/20/2010 and received an e-mail response back confirming it was a new bug on 04/22/2010. The e-mail said it would be posted in the external database in "a day or two", but now 12 days later Bug ID [6946211|http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6946211] is still not visible. I tried replying back to the e-mail but no response.
    If anyone's interested, here is the sample code I submitted with the bug report.
    public interface BaseType {
        BaseType clone() throws CloneNotSupportedException;
    public interface SubType<T extends BaseType & java.io.Closeable> extends BaseType {
    }It should compile correctly but fails. It appears to be a generics bug.

    I am rather certain that years ago (thus pre Oracle) it could take weeks before posted bugs showed up.
    And presumably this was discussed in the Generics forum before posting it as a bug.

  • Javac bug with lower bounded wildcard?

    Hi all,
    I have found the below code snippet not to compile with javac (1.5 & 1.6) even though
    I think that it is correct. Also the Eclipse Java compiler accepts this code without errors.
    Can anyone confirm that this is a bug in javac or maybe explain why the code is really wrong as javac is claiming?
    Thanks a lot for any help!
    $$$ cat A.java
    interface I { }
    class C1 { }
    class C2 extends C1 implements I { }
    public class A<T extends C1 & I> {
    A<? super C2> a;
    $$$ javac A.java
    A.java:6: type parameter ? super C2 is not within its bound
    A<? super C2> a;
    ^
    1 error

    Hi Danny,
    thanks for your feedback. Actually, "? super C2" does not allow any arbitrary supertype of C2 since each type argument must also respect the bounds of the type parameter. Therefore, "? super C2" represents all supertypes of C2 which are also subtypes of C1 and I. In our case here, the only such type is C2.
    Here is also an attempt at showing that the code is correct based on the JLS3: Any type parameter is correct iff it is a subtype of all the types in the bound of the type parameter. To check this, you should take the capture conversion (JLS3 5.1.10) of "? super C2" which is a fresh type variable, let's say CAP, with the upper bound "C1 & I" which clearly is a subtype of the type parameter T as it has the same types in the bound. Or am I just missing something?

  • Java 1.6.0_04 bug?

    I have a program, crashed under java 1.6.0_04 , but work fine with java 1.6.0_03.
    The problem exists at when I retrieve the embeded object of the second embeded level.
    For expamel
    JNIEXPORT jint JNICALL Java_com_...
    (JNIEnv *env, jobject obj, jint licHandle, jlong featureID, jobject featureInfo)
    The featureInfo has a member object mbOjectLevel1, the mbOjectLevel1 also has a member object mbOjectLevel2.
    The function GetObjectField,GetObjectClass works fine to get mbOjectLevel1.
    These functions also pass for mbOjectLevel2.
    But, the GetFieldID SetIntField of mbOjectLevel2 will crash the JVM.
    Instead, when I use FindClass, NewObject for mbOjectLevel2, everything is fine now!
    So java 1.6.0_04 has a bug that it can not manage well with the embeded object in an embeded object???

    The -Xint does not help.
    Below is the test case:
    Four java files under com directory.
    StopTime.java
    package com;
    public class StopTime {
    public int year;
    public short month;
    public short day;
    public short hour;
    public short minute;
    public short second;
    public StopTime() {
    year = 0;
    month = 0;
    day = 0;
    hour = 0;
    minute = 0;
    second = 0;
    TimeControl.java:
    package com;
    public class TimeControl {
    public int duration;
    public StopTime stopTime = new StopTime();
    public TimeControl() {
    duration = 0;
    FeatureInfo.java:
    package com;
    public class FeatureInfo {
    public long featureType;
    public TimeControl timeControl = new TimeControl();
    public FeatureInfo() {
    featureType = 0;
    MyDisplay.java:
    package com;
    import java.io.*;
    public class MyDisplay {
    public native int GetFeatureInfo(com.FeatureInfo featureInfo /*OUT*/);
    static {
    System.loadLibrary("MyDisplay"); //load the JNI library
    public MyDisplay() {
    public static void main(String[] ar) {
    MyDisplay.c:
    #include "com_MyDisplay.h"
    #include "MyDisplay.h"
    #include <windows.h>     
    JNIEXPORT jint JNICALL Java_com_MyDisplay_GetFeatureInfo
    (JNIEnv *env, jobject obj, jobject featureInfo)
         SP_STATUS status = 0;
         jclass clsFeatureInfo, clsStopTime, clsTimeControl;
         jfieldID fidfeatureType, fIdTimeControl, fidStopTime;
         // Stop Time field id
         jfieldID fidYear, fidMonth, fidDay, fidHour, fidMinute, fidSecond,fidDuration;
         jobject objStopTime, objTimeControl;
         SP_FEATURE_INFO featureinfo;
    jmethodID mSvrContor;
         memset(&featureinfo, 0 , sizeof(SP_FEATURE_INFO));
         featureinfo.featureType = 3;
    featureinfo.timeControl.duration = 10;
    featureinfo.timeControl.stopTime.dayOfMonth =11;
    featureinfo.timeControl.stopTime.hour = 3;
    featureinfo.timeControl.stopTime.minute = 19;
    featureinfo.timeControl.stopTime.month = 11;
    featureinfo.timeControl.stopTime.second = 54;
    featureinfo.timeControl.stopTime.year = 2008;
         clsFeatureInfo = (*env)->GetObjectClass(env, featureInfo);//get class
         fidfeatureType = (*env)->GetFieldID(env, clsFeatureInfo,"featureType", "J");
         fIdTimeControl = (*env)->GetFieldID(env, clsFeatureInfo,"timeControl", "Lcom/TimeControl;");
         (*env)->SetLongField(env,featureInfo, fidfeatureType, (jlong)(featureinfo.featureType));
         objTimeControl = (*env)->GetObjectField(env, featureInfo, fIdTimeControl);
         clsTimeControl = (*env)->GetObjectClass(env, objTimeControl);//get class
         fidDuration = (*env)->GetFieldID(env, clsTimeControl,"duration", "I");
         fidStopTime = (*env)->GetFieldID(env, clsTimeControl,"stopTime", "Lcom/StopTime;");
         (*env)->SetIntField(env,objTimeControl, fidDuration, (jint)(featureinfo.timeControl.duration));
         /*below cause crash*/
         objStopTime = (*env)->GetObjectField(env, objTimeControl, fIdTimeControl);
    printf("objStopTime %p\n",objStopTime);
         clsStopTime = (*env)->GetObjectClass(env, objStopTime );//get class
    printf("clsStopTime %p\n",clsStopTime);
    /*below package work well*/
         clsStopTime = (*env)->FindClass(env,"com/StopTime");
    printf("clsStopTime %p\n",clsStopTime);
    mSvrContor = (*env)->GetMethodID(env, clsStopTime, "<init>", "()V");
    objStopTime = (*env)->NewObject(env, clsStopTime, mSvrContor);
    printf("objStopTime %p\n",objStopTime);
         fidYear = (*env)->GetFieldID(env, clsStopTime,"year", "I");//get field Ids
    printf("fidYear %p\n",fidYear);
         fidMonth = (*env)->GetFieldID(env, clsStopTime,"month", "S");
    printf("fidMonth %p\n",fidMonth);
         fidDay = (*env)->GetFieldID(env, clsStopTime,"day", "S");
    printf("fidDay %p\n",fidDay);
         fidHour = (*env)->GetFieldID(env, clsStopTime,"hour", "S");
    printf("fidHour %p\n",fidHour);
         fidMinute = (*env)->GetFieldID(env, clsStopTime,"minute", "S");//get field Ids
    printf("fidMinute %p\n",fidMinute);
         fidSecond = (*env)->GetFieldID(env, clsStopTime,"second", "S");//get field Ids
    printf("fidSecond %p\n",fidSecond);
         (*env)->SetIntField(env,objStopTime, fidYear, (jint)(featureinfo.timeControl.stopTime.year));
         (*env)->SetShortField(env,objStopTime, fidMonth, (jshort)(featureinfo.timeControl.stopTime.month));
         (*env)->SetShortField(env,objStopTime, fidDay, (jshort)(featureinfo.timeControl.stopTime.dayOfMonth));
         (*env)->SetShortField(env,objStopTime, fidHour, (jshort)(featureinfo.timeControl.stopTime.hour));
         (*env)->SetShortField(env,objStopTime, fidMinute, (jshort)(featureinfo.timeControl.stopTime.minute));
         (*env)->SetShortField(env,objStopTime, fidSecond, (jshort)(featureinfo.timeControl.stopTime.second));
    // (*env)->SetObjectField(env,objTimeControl, fidStopTime,objStopTime);
         return (jint)status;
    the test UseMyDisplay.java
    import java.util.*;
    import java.io.*;
    import java.lang.*;
    class UseMyDisplay
    public static void main(String args[])
    int status =0;
    com.MyDisplay objMyDisplay= new com.MyDisplay();
    System.out.println("\nMyDisplay:");
    com.FeatureInfo featureInfo = new com.FeatureInfo();
    status = objMyDisplay.GetFeatureInfo(featureInfo);
    System.out.println("\n Display date: (format - Date YYYY\\MM\\DD\\ Time - HH:MM:SS)"      + "\nDate- " + featureInfo.timeControl.stopTime.year + "\\" + featureInfo.timeControl.stopTime.month + "\\" + featureInfo.timeControl.stopTime.day + " Time- "+ featureInfo.timeControl.stopTime.hour + ":"+ featureInfo.timeControl.stopTime.minute + ":" +featureInfo.timeControl.stopTime.second);
    One header file for MyDisplay.c:
    MyDisplay.h
    #ifndef MYDISPLAYH
    #define MYDISPLAYH
         typedef long SP_LONG;
         typedef unsigned long SP_ULONG;
         typedef unsigned long SP_DWORD;
    typedef void SP_VOID;
    typedef char SP_CHAR;
    typedef      int SP_INT;     
    typedef short int SP_SHORT;
    typedef unsigned char SP_BOOLEAN;
    typedef unsigned char SP_BYTE;
    typedef unsigned char SP_UCHAR;
    typedef unsigned short int SP_USHORT;
    typedef unsigned short int SP_WORD;
    #ifndef SP_HANDLE
    typedef void * SP_HANDLE;
    #endif
    typedef void * SP_SYS_HANDLE;
    typedef SP_CHAR * SPP_CHAR;
    typedef SP_SHORT * SPP_SHORT;
    typedef SP_LONG * SPP_LONG;
    typedef SP_BOOLEAN * SPP_BOOLEAN;
    typedef SP_BYTE * SPP_BYTE;
    typedef SP_UCHAR * SPP_UCHAR;
    typedef SP_USHORT * SPP_USHORT;
    typedef SP_WORD * SPP_WORD;
    typedef SP_ULONG * SPP_ULONG;
    typedef SP_DWORD * SPP_DWORD;
    typedef SP_VOID * SPP_VOID;
    typedef SP_HANDLE * SPP_HANDLE;
    typedef SP_SYS_HANDLE * SPP_SYS_HANDLE;
    typedef SP_DWORD     SP_STATUS;
    #pragma pack(8)
    typedef struct SP_DateTime
    SP_DWORD year;
    SP_BYTE month;
    SP_BYTE dayOfMonth;
    SP_BYTE hour;
    SP_BYTE minute;
    SP_BYTE second;
    } SP_DATE_TIME, *SPP_DATE_TIME;
    typedef struct SP_TimeCtrl
    SP_DWORD duration;
    SP_DATE_TIME stopTime;
    } SP_TIME_CONTROL, *SPP_TIME_CONTROL;
    typedef struct SP_Feature_Info
    SP_DWORD featureType;
    SP_TIME_CONTROL timeControl;
    } SP_FEATURE_INFO, *SPP_FEATURE_INFO;
    #pragma pack()
    #endif
    The directory structure:
    \MYDISPLAY
    �� com_MyDisplay.h
    �� MyDisplay.dll
    �� MyDisplay.h
    �� MyDisplayJDK.c
    �� UseMyDisplay.java
    ��
    ����com
    FeatureInfo.java
    MyDisplay.java
    StopTime.java
    TimeControl.java
    Steps:
    1. generate the com_display.h
    javac com\*.java
    javah -jni com.MyDisplay
    2. use visual c++ 6.0 to build the dll
    3. build and run the UseMyDisplay.jva to test it
    Errors:
    MyDisplay:
    objStopTime 02ACC61C
    # An unexpected error has been detected by Java Runtime Environment:
    # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d94183a, pid=664, tid=2264
    # Java VM: Java HotSpot(TM) Client VM (10.0-b19 interpreted mode, sharing window
    s-x86)
    # Problematic frame:
    # V [jvm.dll+0xd183a]
    #

  • Path not working in win xp pro, can call java but not javac !

    Hello,
    I just upgraded to win xp and set up the J2SDK. I have set the path variable in the environment settings.
    when I tried to test this by typing java from my documents directory it works all right but not the javac command, to which it gives the error
    "'javac' is not recognized as an internal or external command,
    operable program or batch file."
    when I type path then I get the following result -
    PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\FSC\PCOBOL32;C:\Program Files\FSC\PCOBOL32;C:\WINDOWS\System32\Wbem;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;c:\borland\bcc55\bin; c:\jdk1.4.0_01\bin;C:\FSC\PCOBOL32;C:\PROGRAM\PCOBOL32 , so my path settings are correct.
    Why is this happening? Thanks for any help.
    - rdg
    P.S. I also am also unable to invoke the c++ compiler from my documents, so I think this may be a problem with my path, but then how am i able to call the java.exe ?

    -----BEGIN PGP SIGNED MESSAGE-----
    In win xp you must type the name of the directory as Dos-8 format,
    for example, if you want to use c:\J2sdk1.4.0_01 you must write in
    the path c:\j2sdk1~1.0_0
    -----BEGIN PGP SIGNATURE-----
    Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
    iQEVAwUBPWL6quIx3Zm+mBoJAQFhVwf/dM2pfQYN5Wp5AnmD+HV1Nx+5MSm1zmUs
    b3UPC8xJt0JhJItyims6YLEJKAv+Mrm0sk3fVyfg1o4Tcpw0bzG/RsVdsTsrmlDu
    vUlqWrxgTRH85IAjro83lGNuLUo6PKs10hVj4h4tqL8BkLE4pCkZfLT2tpG7VLt0
    YylUFx6DZQzF1HVK9+6MqYOvBEjxLhkNRHThNysUJj6SBkNHKDbDgnOcUQf+8PpZ
    RxItuKGUys6FdLSvrxonbj2qbHJ34Ewb/a8DL1MXcCOtP2QGIta4ozq/3SVPDAK4
    BD/NG97FsuYbL/l18Je4EzXRWqtG9IlIY8WBhbdx8X3B3fpuq8gICw==
    =UJDG
    -----END PGP SIGNATURE-----

  • Parser for Java v2 decimal formatting bug

    XML Parser for Java v2 (up to 2.0.2.7) does not seem to format decimal numbers correctly with format-number() function. It can handle floats, but not doubles. When can this bug get fixed?
    BTW, is there a bug database for Java XML Parser?
    Thanks,
    null

    Thanks for your prompt response, here is one test:
    format.xml:
    <?xml version="1.0"?>
    <numberlist>
    <number>1234567.123456789</number>
    <number>12345678.123456789</number>
    <number>123456789.123456789</number>
    </numberlist>
    format.xsl:
    <?xml version="1.0"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:template match="number">
    <xsl:value-of select="format-number(current(), '#,##0.00000000')"/>
    </xsl:template>
    </xsl:stylesheet>
    The following output was generated from 2.0.2.7:
    <?xml version = '1.0' encoding = 'UTF-8'?>
    1,234,567.12500000
    12,345,678.00000000
    123,456,792.00000000
    Apache Xalan 0.20 generates the following:
    <?xml version="1.0" encoding="UTF-8"?>
    1,234,567.12345679
    12,345,678.12345679
    123,456,789.12345679
    This problem also exists in v2 versions before 2.0.2.7.
    A month ago, I posted another bug report, but didn't get any reponse. Can someone look into the problem? I suspect XMLElement.setAttribute(name, value) doesn't add attributes of ID type to the internal list of ID's. The posting is at:
    http://technet.oracle.com:89/ubb/Forum11/HTML/000994.html
    Thanks,
    null

  • Java SDO API import bug

    There is a bug in the Oracle Java SDO API. It cannot import compound geometries which consist of either 3 or 4 sub-elements. e.g., the following geometry cannot be imported:
    SDO_GEOMETRY(2002, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 4, 4, 1, 2, 1, 9, 2, 2, 13
    , 2, 2, 17, 2, 1), SDO_ORDINATE_ARRAY(278222.37, 179102.519, 278222.37, 179111.223,
    278222.37, 179176.31, 278223.164, 179194.567, 278224.751, 179206.473, 278238.913,
    179237.143, 278262.587, 179261.242, 278288.15, 179273.083, 278316.033, 179277.117,
    278336.935, 179274.471, 278357.997, 179271.272))
    Apparently the API does not validate the SDO_ETYPE when checking the SDO_INTERPRETATION value in the geometry.
    SDO_INTERPRETATION values of 3 and 4 are assumed to be a rectangle and circle, respectively, independent of the SDO_ETYPE value. In fact, these SDO_INTERPRETATION should be handled such only for SDO_ETYPE value of 3.
    For an SDO_ETYPE value of 4 (as in the example above), the SDO_INTERPRETATION value indicates the number of sub-elements in the compound geometry element.
    Any ideas for a workaround or fix for this bug?

    Hi Sunil,
    This is a bug. There doesn't seem to be a workaround.
    Can you contact me via email or post your email?
    Thanks.

  • Getting Java set up - javac and PATH problems..

    Just as the title suggests, I am brand new to Java. I am getting the seemingly "classic" newbie Java error in comman prompt: " 'javac' is not recognized as an internal or external command, operable program or batch file." I have read help sites and threads, and I do believe it must be something wrong with my PATH environments, but I can't figure out what. Also, I have tried several different java versions, so I can only believe that my current version is jdk1.6.0_03 (According to the official website I have 6, Version 3). I am running Windows XP (Service Pack 2).
    Here is the exact text as listed in the variable PATH: C:\ WINNT; C:\ WINNT\ SYSTEM32; C:\ jdk1.6.0_ 03\ bin
    I also have another variable called CLASSPATH, which is: .;C:\Program Files\Java\j2re1.4.2\lib\ext\QTJava.zip
    A friend suggested that I learn with DrJava, because he said that is the way he learned, but of course that only helped with learning some basic code, and it only postponed the problem I am now having to face.
    I know I am utterly useless, and I am sure that whatever alien language I just put up there must be just way off base, but please bear with this poor beginner. Any help is useful, literally any, and I am going to wipe any previous thoughts of what I thought was correct away.

    Are you able to set the PATH without any errors on command line ? Or another best way is to set the path in the user and system variables.
    Go to
    MyComputers->Properties->Advanced (tab)and click the
    Environment VariablesAbove you will see
    User variables
    IF there is already a variable name PATH then add the
    C:\jdk1.6.0_03\binElse
    Click the
    New type PATH as the Variable Name
    and the C:\jdk1.6.0_03\bin as the variable value.
    Re-start your command prompt and check with the javac or java commands.

  • Java via proxy question (bug?)

    Hi folks,
    I'm testing running Java apps through a web proxy (Squid) that's using NTLM authentication. However, I seem to be having problems getting any apps to run over https. For some reason, the JRE just keeps prompting for authentication -- even after a correct username and pw is entered. At no point does the app download and run. Testing shows that this only occurs on the Win32 versions of the JRE (tested 1.4.2_12, 1.5.0_08, and 1.6 beta2), and occurs regardless of browser (IE6 and Firefox 1.5+). The Linux version of the JRE seems to work fine. Searching through the bug db has turned up somewhat similar items, but notthing quite the same. Same with google. Has anyone else run into this problem?

    Hello everybody,
    I am experiencing the same problem with JRE 1.5.0._10 and JRE 1.6.0. My proxy is a squid/2.6.STABLE9, browser is IE 6 and client is winXP.
    What I found looking at the HTTP traffic is that Java tries to authenticate using HTTP/1.1, while squid replies using HTTP/1.0.
    Furthermore, if I compare IE connections and java connections, I found that IE requires "Proxy-connection: keep-alive" while this is not done by java. This could explain the behaviour of squid that closes the TCP connection after the reply to java, so preventing NTLM authentication.
    Maybe a bug should be open?

  • Java rounding error **** JDK bug ****

    Is this bug well known or not ?
    Try this litte bit of code
    public static void main(String[] args){
    System.out.println(10.12 + 10.0);
    The result should be
    20.12
    But Java prints
    20.11999999999997
    Used on Solaris 8 JKD 1.4.1 and Windows 1.4.1
    I dont know if it gives the same results in 1.3 so try it out.
    In addition 10.13 + 10 does not give the correct awnser.

    It is not possible for Java to represent that particular DECIMAL floating point number EXACTLY internally using a BINARY representation. This is all completely normal.
    It's not a bug. If you want to know more, look up the IEEE standards on floating point numbers (the JVM specification and Java language specification conform to these).
    If you want to represent decimal floating point numbers exactly, you need to use the classes that are provided specifically for that purpose, e.g. BigDecimal.
    Regards,
    Dave.

  • Java.util.MissingResourceException - A Bug?

    Hi all,
    I think there maybe an bug with the plugin /deploy.jar the JRE 1.5.0_06.
    There is an exception at the end when my signed applet is trying to install an extension for the JRE, it seems to be caused by
    java.util.MissingResourceException: Can't find resource for bundle com.sun.deploy.resources.Deployment, key security.dialog.buttonYes.acceleratorKey
    the resources are defined in com.sun.deploy.resources.Deployment.java and it does not contain that key.
    Is this a bug?
    This happens in both Internet explorer and mozilla/firefox.
    Thanks for any help,
    Ashley
    Java Plug-in 1.5.0_06
    Using JRE version 1.5.0_06 Java HotSpot(TM) Client VM
    User home directory = C:\Documents and Settings\hayesac
    network: Loading user-defined proxy configuration ...
    network: Done.
    network: Loading proxy configuration from Netscape Navigator ...
    network: Reading user preference file from C:\DOCUMENTS AND SETTINGS\HAYESAC\APPLICATION DATA\Mozilla\Profiles\default\c8ovvpcr.slt\prefs.js
    network: network.proxy.ftp=192.168.50.8
    network: network.proxy.ftp_port=8080
    network: network.proxy.gopher=192.168.50.8
    network: network.proxy.gopher_port=8080
    network: network.proxy.http=192.168.50.8
    network: network.proxy.http_port=8080
    network: network.proxy.socks=192.168.50.8
    network: network.proxy.socks_port=8080
    network: network.proxy.ssl=192.168.50.8
    network: network.proxy.ssl_port=8080
    network: Proxy enable: 1
    network: Done.
    network: Loading browser proxy configuration ...
    network: Done.
    network: Proxy Configuration: Browser Proxy Configuration
    basic: Cache is enabled
    basic: Location: C:\Documents and Settings\hayesac\Application Data\Sun\Java\Deployment\cache\javapi\v1.0
    basic: Maximum size: unlimited
    basic: Compression level: 0
    c: clear console window
    f: finalize objects on finalization queue
    g: garbage collect
    h: display this help message
    l: dump classloader list
    m: print memory usage
    o: trigger logging
    p: reload proxy configuration
    q: hide console
    r: reload policy configuration
    s: dump system and deployment properties
    t: dump thread list
    v: dump thread stack
    x: clear classloader cache
    0-5: set trace level to <n>
    basic: Registered modality listener
    security: Accessing keys and certificate in Mozilla user profile: C:\DOCUMENTS AND SETTINGS\HAYESAC\APPLICATION DATA\Mozilla\Profiles\default\c8ovvpcr.slt
    security: JSS package is not found
    security: JSS is not configured
    basic: Referencing classloader: sun.plugin.ClassLoaderInfo@480457, refcount=1
    basic: Added progress listener: sun.plugin.util.GrayBoxPainter@6b97fd
    basic: Loading applet ...
    basic: Initializing applet ...
    basic: Starting applet ...
    network: Connecting [manually removed] with proxy=DIRECT
    security: Loading Root CA certificates from C:\PROGRA~1\Java\JRE15~1.0_0\lib\security\cacerts
    security: Loaded Root CA certificates from C:\PROGRA~1\Java\JRE15~1.0_0\lib\security\cacerts
    security: Loading SSL Root CA certificates from C:\PROGRA~1\Java\JRE15~1.0_0\lib\security\cacerts
    security: Loaded SSL Root CA certificates from C:\PROGRA~1\Java\JRE15~1.0_0\lib\security\cacerts
    security: Loading certificates from Deployment session certificate store
    security: Loaded certificates from Deployment session certificate store
    security: Checking if certificate is in Deployment session certificate store
    security: Checking if SSL certificate is in Deployment permanent certificate store
    security: Check if certificate can be verified using certificates in Root CA certificate store
    security: Certificate to be verified:
    [certificate trace stuff manually removed]
    liveconnect: JavaScript: UniversalJavaPermission enabled
    basic: Stopping applet ...
    basic: Removed progress listener: sun.plugin.util.GrayBoxPainter@6b97fd
    basic: Finding information ...
    basic: Releasing classloader: sun.plugin.ClassLoaderInfo@480457, refcount=0
    basic: Caching classloader: sun.plugin.ClassLoaderInfo@480457
    basic: Current classloader cache size: 1
    basic: Done ...
    basic: Joining applet thread ...
    liveconnect: JavaScript: UniversalBrowserRead enabled
    liveconnect: JavaScript: UniversalJavaPermission enabled
    basic: Destroying applet ...
    basic: Disposing applet ...
    basic: Quiting applet ...
    basic: Joined applet thread ...
    basic: Unregistered modality listener
    liveconnect: JavaScript: UniversalBrowserRead enabled
    liveconnect: JavaScript: UniversalJavaPermission enabled
    liveconnect: JavaScript: UniversalBrowserRead enabled
    liveconnect: JavaScript: UniversalJavaPermission enabled
    basic: Registered modality listener
    basic: Referencing classloader: sun.plugin.ClassLoaderInfo@288051, refcount=1
    basic: Added progress listener: sun.plugin.util.GrayBoxPainter@90cb03
    basic: Loading applet ...
    basic: Initializing applet ...
    basic: Starting applet ...
    basic: httpCompression = true
    network: Connecting [manually removed]
    security: Loading certificates from Deployment session certificate store
    security: Loaded certificates from Deployment session certificate store
    security: Checking if certificate is in Deployment session certificate store
    network: Connecting https://[manually removed]
    basic: Downloading https://[manually removed]
    basic: encoding = null for [manually removed]
    basic: Cached file name: [manually removed]
    extensions: Installing optional package Extension : title(null), name([manually removed]), spec vendor(Macalla Software), spec version(3.6.3), impl vendor(Macalla Software), impl vendor id(com.macalla), impl version(3.6.3), impl url([manually removed])
    java.util.MissingResourceException: Can't find resource for bundle com.sun.deploy.resources.Deployment, key security.dialog.buttonYes.acceleratorKey
    at java.util.ResourceBundle.getObject(Unknown Source)
    at com.sun.deploy.resources.ResourceManager.getAcceleratorKey(Unknown Source)
    at com.sun.deploy.util.DialogFactory.showDownloadDialogImpl(Unknown Source)
    at com.sun.deploy.util.DialogFactory.access$200(Unknown Source)
    at com.sun.deploy.util.DialogFactory$4.execute(Unknown Source)
    at sun.plugin.util.PluginSysUtil$SysExecutionThread.run(Unknown Source)
    extensions: Optional package download not granted by user
    sun.misc.ExtensionInstallationException: User denied installation of [manually removed]
    at sun.plugin.extension.ExtensionInstallationImpl$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.plugin.extension.ExtensionInstallationImpl.installExtension(Unknown Source)
    at sun.misc.ExtensionDependency.installExtension(Unknown Source)
    at sun.misc.ExtensionDependency.checkExtension(Unknown Source)
    at sun.misc.ExtensionDependency.checkExtensions(Unknown Source)
    at sun.misc.ExtensionDependency.checkExtensionsDependencies(Unknown Source)
    at sun.misc.URLClassPath$JarLoader.parseExtensionsDependencies(Unknown Source)
    at sun.misc.URLClassPath$JarLoader.getClassPath(Unknown Source)
    at sun.misc.URLClassPath.getLoader(Unknown Source)
    at sun.misc.URLClassPath.getResource(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at sun.applet.AppletClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.applet.AppletClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.applet.AppletClassLoader.loadCode(Unknown Source)
    at sun.applet.AppletPanel.createApplet(Unknown Source)
    at sun.plugin.AppletViewer.createApplet(Unknown Source)
    at sun.applet.AppletPanel.runLoader(Unknown Source)
    at sun.applet.AppletPanel.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    basic: Modality pushed
    basic: Modality popped
    extensions: Optional package installation failed.
    security: Loading certificates from Deployment session certificate store

    Guys,
    i am having almost the same problem with my signed applet, it was working on all previous jres, now it crashes when trying to download imageio, giving the error: sun.misc.ExtensionInstallationException: User denied installation of...
    Is this the same bug? is it really a bug?
    besides, Rita, you mentioned filing it as a bug, but i cannot find it in the bug database
    Thanks guys,
    Best,
    Mohammad

  • The Java Programming Language (Javac.exe, java.exe) source code.

    Where can I get the java programming language source code ?
    Ernest Keshi
    [email protected]

    Check the 'Downloads' dropdown menu here at the top navigation bar.

  • Java SQL prepare statement bug?

    Hi,
    I got some problem...refer to the statement below the second parameter 'a b c', the value will be trim in the store procedure during runtime which become 'abc'.
    java.sql.CallableStatement call = conn.prepareCall("{call usp_test '','a b c',?}");

    Hi,
    I able to solve the problem by changing the driver to JTDS but another problem arise.
    Exception
    =======
    java.sql.SQLException: Output parameter not allowed as argument list prevents use of RPC.
    Snipet of the Code
    ==============
    java.sql.CallableStatement call = conn.prepareCall("{call usp_test '','a b c',?}");
    call.registerOutParameter(1, java.sql.Types.VARCHAR);
    call.setString(1, "My Client");
    ResultSet result = call.executeQuery();
    Thankx

  • Cannot resolve Java variables - a Nitrox bug?

    Hi. I just installed Nitrox 2.0 to try it with my project. Quite a lot of JSP code shows up as having syntax problems - vairous variables show up as "cannot be resolved" in Eclipse "Problems" tab.
    I narrowed down the problem to the following:
    <script>
    <%String myVar = "Hello";%>
    </script>
    <%out.println(myVar);%>
    myVar is inidcated as "unresolved" in the println statement. Basically if any Java vars are declared inside <script> tags, Nitrox cannot resolve them outside the tags.
    My Eclipse version is 3.0.1

    Putting the scriptlet before the script tag isn't always an option, though.
    Here's an example where I'm doing the typical prefetch of a set of images (so they're in browser cache). The logic:iterator tag is used to traverse a collection that has the image info and to construct the necessary javascript.
    <script language="JavaScript" type="text/javascript">
    var previews = new Array();
    var previewImg;
    <logic:iterate id="item" ...>
    previewImg = new Image();
    previewImg.src = '<%= item.getPreviewImgSrc() %>';
    previews[ '<%= item.getName() %>' ] = previewImg;
    </logic:iterate>
    </script>
    In the above example, NitroX complains that "item cannot be resolved", but the "item" bean is defined inside the script tag as part of the logic:iterate tag.
    Any suggestions?

  • Installer & java 1.4.2 bug (jre1.6 works)

    Hello,
    I'm working with JWS and jre 1.4.2 and I need to use an "installer" to copy special files.
    So, I tried to create an application JNLP using this JSP:
    <%@ page contentType="application/x-java-jnlp-file" autoFlush="true"%>
    <?xml version='1.0' encoding='UTF-8' ?>
    <jnlp spec='1.0'
          codebase='http://localhost:9080/deployerWeb'
          href='application.jsp'>
      <information>
        <title>Application</title>
        <vendor>Company</vendor>
        <description kind='one-line'>
          Application
        </description>
      </information>
      <resources>
        <j2se version='1.4+' />
        <extension href='http://10.142.87.92:9080/deployerWeb/installer.jsp' />
        <jar href='application.jar' main='true' />
      </resources>
      <application-desc main-class='com.company.jws.Application' />
    </jnlp>and an installer using this one:
    <%@ page contentType="application/x-java-jnlp-file" autoFlush="true"%>
    <?xml version='1.0' encoding='UTF-8' ?>
    <jnlp spec='1.0'
          codebase='http://localhost:9080/deployerWeb'
          href='installer.jsp'>
      <information>
        <title>Installer</title>
        <vendor>Company</vendor>
        <description kind='one-line'>
          Installer
        </description>
      </information>
      <resources>
        <j2se version='1.4+' />
        <jar href='installer.jar' main='true' />
      </resources>
      <installer-desc main-class='com.company.jws.Installer' />
    </jnlp>The installer does nothing:
    package com.company.jws;
    import javax.jnlp.ExtensionInstallerService;
    import javax.jnlp.ServiceManager;
    import javax.jnlp.UnavailableServiceException;
    public class Installer {
         protected static void install() {
              try {
                   ExtensionInstallerService installerService = (ExtensionInstallerService) ServiceManager
                             .lookup("javax.jnlp.ExtensionInstallerService");
                   boolean installed = false;
                   try {
                        //JOptionPane.showMessageDialog(null, "TODO: write common files");
                        installed = true;
                   } finally {
                        if (installed) {
                             installerService.installSucceeded(false);
                        } else {
                             installerService.installFailed();
              } catch (UnavailableServiceException e) {
                   //JOptionPane.showMessageDialog(null, "Install failed!");
         protected static void uninstall() {
              //JOptionPane.showMessageDialog(null, "TODO: delete common files");
         public static void main(String[] args) throws UnavailableServiceException {
              if (args[0].equals("install")) {
                   install();
              } else {
                   uninstall();
    }When I launch the application JNLP, everything is downloaded correctly, but when JWS start the installer, the progress bar is blicking.
    When I finally decide to cancel the installer, I have the following error:
    JNLPException[category: Erreur dans le fichier de lancement ("Error in the launching file"): Exception: null : LaunchDesc:
    <jnlp spec="1.0" codebase="http://10.142.87.92:9080/deployerWeb/" href="http://10.142.87.92:9080/deployerWeb/installer.jsp">
      <information>
        <title>Installer</title>
        <vendor>Company</vendor>
        <homepage href="null"/>
        <description></description>
        <description kind="short"></description>
        <description kind="one-line">
          Installer
        </description>
        <description kind="tooltip"></description>
      </information>
      <resources>
        <j2se initial-heap-size="-1" max-heap-size="-1" version="1.4+"/>
        <jar href="http://localhost:9080/deployerWeb/installer.jar" download="eager" main="true"/>
      </resources>
      <installer-desc main-class="com.michelin.jws.Installer"/>
    </jnlp> ]
         at com.sun.javaws.Launcher.executeInstallers(Unknown Source)
         at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
         at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
         at com.sun.javaws.Launcher.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)I spend the entire day to search solution over internet, but I didn't find anything relevant.
    The same code and JNLPs are working fine with java 1.6...
    Can someone help me please !!!

    Hello all,
    Sorry for the inconvenience, I finally found my problem...
    It was a big mistake from me. The compiler was defined on java 1.5 for the installer project...

Maybe you are looking for