Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4925951

TEST_BUG: javax/print/attribute/SidesPageRangesTest.java fails with error

XMLWordPrintable

    • 2d
    • tiger
    • x86
    • solaris_10
    • Verified



      Name: iaR10016 Date: 09/22/2003


      Filed By : J2SE-SQA [###@###.###
      JDK : JDK1.5.0-b20
      Testbase : Regression-test
      Platform[s] : all
      switch/Mode : all
      Falling test[s]: javax/print/attribute/SidesPageRangesTest.java

      Regtest-test test javax/print/attribute/SidesPageRangesTest.java fails with
      "java.lang.IllegalAccessException" error when running using jtreg. The test works fine
      if I just compile and run it manually.

      The problem is that SidesPageRangesTest class is not declared as "public", so harness
      can not get access to it:

      --------- SidesPageRangesTest.java ---------
      001> /*
      002> * @test 1.1 @(#)SidesPageRangesTest.java 1.1
      003> * @bug 4903366
      004> * @summary No crash should occur.
      005> * @run main SidesPageRangesTest
      006> */
      007> import java.awt.*;
      008> import javax.print.*;
      009> import javax.print.attribute.standard.*;
      010> import javax.print.attribute.*;
      011> import java.io.*;
      012> import java.util.Locale;
      013> import java.net.URL;
      014>
      015> class SidesPageRangesTest {
      ...
      --------------------------------------------

      Test source location:
      =====================
      /java/re/jdk/1.5.0/promoted/latest/ws/j2se/test/javax/print/attribute/SidesPageRangesTest.java

      jtr file location:
      ==================
      /net/jtgb4u4c.sfbay/export/sail15/results.2/tiger/b20/regtest/x86/sol10_x86_gnome_linux-18/workDir/test/javax/print/attribute/SidesPageRangesTest.jtr

      How to reproduce:
      =================
      Run the following script (you may need to change its variables):
      --- script start ---
      #!/bin/sh
      RESULT_DIR=`pwd`
      WORK_DIR=$RESULT_DIR/workDir/test
      REPORT_DIR=$RESULT_DIR/reportDir
      JT_HOME="/java/re/jct-tools/3.1.2/archive/fcs/binaries"
      #JT_HOME="/net/linux-15/export/home/java/jct"
      JAVA_HOME="/java/re/jdk/1.5.0/promoted/latest/binaries/sparc"
      #JAVA_HOME="/net/linux-15/export/home/java/jdk1.5.0/x86"
      TEST_BASE_PATH="/java/re/jdk/1.5.0/promoted/latest/ws/j2se/test"
      #TEST_BASE_PATH="/net/linux-15/export/home/java/regtest.tiger/test"
      TESTVMOPTS="-client"
      export CLASSPATH="$JT_HOME/classes:$JT_HOME/lib/javatest.jar:$JT_HOME/lib/jtreg.jar"
      TEST="javax/print/attribute/SidesPageRangesTest.java"

      mkdir -p $WORK_DIR/scratch 2>&1
      mkdir -p $WORK_DIR/jtData 2>&1
      mkdir -p $REPORT_DIR 2>&1
      #rm $WORK_DIR/jtData/ResultCache.jtw 2>&1
      cd $WORK_DIR/scratch

      $JAVA_HOME/bin/java -server -DenvVars=TESTJAVAHOME=$JAVA_HOME,TESTVMOPTS=$TESTVMOPTS,DISPLAY=:0,HOME=$HOME/.regtest,PATH=/bin:/usr/bin,CPAPPEND=$JT_HOME/jemmy/jemmy.jar,TZ=,LC_ALL=en_US,LC_CTYPE=en_US,LANG=en_US,LPDEST= -DDISPLAY=:0 -DlocalHost="linux-18" -Dprogram=jtreg com.sun.javatest.regtest.Main -a -v default -batch -params -w "$WORK_DIR" -r "$REPORT_DIR" -t "$TEST_BASE_PATH" "$TEST_BASE_PATH/$TEST"
      --- script end ---

      Script output:
      ==============
      java version "1.5.0-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta-b20)
      Java HotSpot(TM) Server VM (build 1.5.0-beta-b20, mixed mode)
      JavaTest HTTPd - Success, active on port 1903
      JavaTest HTTPd server available at http://129.144.234.222:1903/
      runner starting test: javax/print/attribute/SidesPageRangesTest.java
      runner finished test: javax/print/attribute/SidesPageRangesTest.java
      Error. java.lang.IllegalAccessException: Class com.sun.javatest.regtest.MainWrapper$MainThread can not access a member of class SidesPageRangesTest with modifiers "public static"
      Test results: error: 1
      Report written to /net/linux-15/export/home/store/users/ira/bugs/reportDir/report.html
      Results written to /net/linux-15/export/home/store/users/ira/bugs/workDir/test
      Error: Some tests failed or other problems occurred.

      Test output (jtr part):
      =======================
      #section:script_messages
      ----------messages:(4/222)----------
      JDK under test: (/net/linux-15/export/home/java/jdk1.5.0/x86)
      java version "1.5.0-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta-b20)
      Java HotSpot(TM) Client VM (build 1.5.0-beta-b20, mixed mode)

      #section:build
      ----------messages:(3/106)----------
      command: build SidesPageRangesTest
      reason: Named class compiled on demand
      elapsed time (seconds): 0.0020
      result: Passed. No need to compile: SidesPageRangesTest.java

      #section:main
      ----------messages:(3/125)----------
      command: main SidesPageRangesTest
      reason: User specified action: run main SidesPageRangesTest
      elapsed time (seconds): 0.697
      ----------System.out:(0/0)----------
      ----------System.err:(10/722)----------
      java.lang.IllegalAccessException: Class com.sun.javatest.regtest.MainWrapper$MainThread can not access a member of class SidesPageRangesTest with modifiers "public static"
            at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:57)
            at java.lang.reflect.Method.invoke(Method.java:317)
            at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:82)
            at java.lang.Thread.run(Thread.java:549)

      JavaTest Message: Verify that the class defining the test is
      JavaTest Message: declared public (test invoked via reflection)

      STATUS:Error.java.lang.IllegalAccessException: Class com.sun.javatest.regtest.MainWrapper$MainThread can not access a member of class SidesPageRangesTest with modifiers "public static"
      result: Error. java.lang.IllegalAccessException: Class com.sun.javatest.regtest.MainWrapper$MainThread can not access a member of class SidesPageRangesTest with modifiers "public static"

      test result: Error. java.lang.IllegalAccessException: Class com.sun.javatest.regtest.MainWrapper$MainThread can not access a member of class SidesPageRangesTest with modifiers "public static"

      Specific machine info:
      ======================
      Hostname: linux-18
      OS: Solaris 10 (x86) (CDE)

      ======================================================================

            jgodinez Jennifer Godinez (Inactive)
            irasunw Ira Ira (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: