You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@santuario.apache.org by Scott M Stark <sc...@jboss.com> on 2004/07/21 07:16:34 UTC

JDK 1.4.2_05 incompatibility

I was seeing an IllegalAccessError in some code using the xmlsec jar
when switching from JDK 1.4.2_04 to 1.4.2_05 so I pulled down the code
to compile it and this fails under JDK 1.4.2_05:

[starksm@banshee9100 xml-security-1_1_0]$ ant compile
Buildfile: build.xml
  [taskdef] Could not load definitions from resource clovertasks. It
could not be found.

init:

     [echo]
-------------------------------------------------------------------
     [echo] --------- Apache-XML-Security-J v1.1.0 [2000-2004]
-----------
     [echo]
-------------------------------------------------------------------
     [echo] Building with Apache Ant version 1.6.1 compiled on February
12 2004
     [echo] Java 1.4.2_05 located at C:\usr\java\j2sdk1.4.2_05\jre
     [echo]
-------------------------------------------------------------------


do.check.libs.jce:

do.check.libs:

do.build.src:

env.mk.dirs:

do.check.bindist:

build.src:
    [javac] Compiling 145 source files to
C:\usr\local\Java\XML\xml-security-1_1_0\build\classes
    [javac]
C:\usr\local\Java\XML\xml-security-1_1_0\src\org\apache\xml\security
\Init.java:149: m_functions has private access in
org.apache.xpath.compiler.FunctionTable
    [javac]                for (int i = 0; i <
FunctionTable.m_functions.length; i++) {
    [javac]                                                 ^
    [javac]
C:\usr\local\Java\XML\xml-security-1_1_0\src\org\apache\xml\security
\Init.java:150: m_functions has private access in
org.apache.xpath.compiler.FunctionTable
    [javac]                   FuncLoader loader =
FunctionTable.m_functions[i];
    [javac]                                                    ^
    [javac]
C:\usr\local\Java\XML\xml-security-1_1_0\src\org\apache\xml\security
\Init.java:156: m_functions has private access in
org.apache.xpath.compiler.FunctionTable
    [javac]                         FunctionTable.m_functions[i] =
funcHereLoader;
    [javac]                                      ^
    [javac] 3 errors

The problem is an incompatible accessibility change in the
FunctionTable.m_functions
member from public to private between 1.4.2_05 and 1.4.2_04:

[starksm@banshee9100 xml-security-1_1_0]$
/usr/java/j2sdk1.4.2_05/bin/javap -pr
ivate org.apache.xpath.compiler.FunctionTable
Compiled from "FunctionTable.java"
public class org.apache.xpath.compiler.FunctionTable extends
java.lang.Object{
    public static final int FUNC_CURRENT;
    public static final int FUNC_LAST;
    public static final int FUNC_POSITION;
    public static final int FUNC_COUNT;
    public static final int FUNC_ID;
    public static final int FUNC_KEY;
    public static final int FUNC_LOCAL_PART;
    public static final int FUNC_NAMESPACE;
    public static final int FUNC_QNAME;
    public static final int FUNC_GENERATE_ID;
    public static final int FUNC_NOT;
    public static final int FUNC_TRUE;
    public static final int FUNC_FALSE;
    public static final int FUNC_BOOLEAN;
    public static final int FUNC_NUMBER;
    public static final int FUNC_FLOOR;
    public static final int FUNC_CEILING;
    public static final int FUNC_ROUND;
    public static final int FUNC_SUM;
    public static final int FUNC_STRING;
    public static final int FUNC_STARTS_WITH;
    public static final int FUNC_CONTAINS;
    public static final int FUNC_SUBSTRING_BEFORE;
    public static final int FUNC_SUBSTRING_AFTER;
    public static final int FUNC_NORMALIZE_SPACE;
    public static final int FUNC_TRANSLATE;
    public static final int FUNC_CONCAT;
    public static final int FUNC_SUBSTRING;
    public static final int FUNC_STRING_LENGTH;
    public static final int FUNC_SYSTEM_PROPERTY;
    public static final int FUNC_LANG;
    public static final int FUNC_EXT_FUNCTION_AVAILABLE;
    public static final int FUNC_EXT_ELEM_AVAILABLE;
    public static final int FUNC_UNPARSED_ENTITY_URI;
    public static final int FUNC_DOCLOCATION;
    private static org.apache.xpath.compiler.FuncLoader[] m_functions;
    private static final int NUM_BUILT_IN_FUNCS;
    private static final int NUM_ALLOWABLE_ADDINS;
    static int m_funcNextFreeIndex;
    static {};
    public org.apache.xpath.compiler.FunctionTable();
    static java.lang.String getFunctionName(int);
    public static void installFunction(org.apache.xpath.Expression,int);
    public static org.apache.xpath.functions.Function getFunction(int);
       throws javax/xml/transform/TransformerException
    public static int
installFunction(java.lang.String,org.apache.xpath.Expression);
}

[starksm@banshee9100 xml-security-1_1_0]$
/usr/java/j2sdk1.4.2_04/bin/javap -pr
ivate org.apache.xpath.compiler.FunctionTable
Compiled from "FunctionTable.java"
public class org.apache.xpath.compiler.FunctionTable extends
java.lang.Object{
    public static final int FUNC_CURRENT;
    public static final int FUNC_LAST;
    public static final int FUNC_POSITION;
    public static final int FUNC_COUNT;
    public static final int FUNC_ID;
    public static final int FUNC_KEY;
    public static final int FUNC_LOCAL_PART;
    public static final int FUNC_NAMESPACE;
    public static final int FUNC_QNAME;
    public static final int FUNC_GENERATE_ID;
    public static final int FUNC_NOT;
    public static final int FUNC_TRUE;
    public static final int FUNC_FALSE;
    public static final int FUNC_BOOLEAN;
    public static final int FUNC_NUMBER;
    public static final int FUNC_FLOOR;
    public static final int FUNC_CEILING;
    public static final int FUNC_ROUND;
    public static final int FUNC_SUM;
    public static final int FUNC_STRING;
    public static final int FUNC_STARTS_WITH;
    public static final int FUNC_CONTAINS;
    public static final int FUNC_SUBSTRING_BEFORE;
    public static final int FUNC_SUBSTRING_AFTER;
    public static final int FUNC_NORMALIZE_SPACE;
    public static final int FUNC_TRANSLATE;
    public static final int FUNC_CONCAT;
    public static final int FUNC_SUBSTRING;
    public static final int FUNC_STRING_LENGTH;
    public static final int FUNC_SYSTEM_PROPERTY;
    public static final int FUNC_LANG;
    public static final int FUNC_EXT_FUNCTION_AVAILABLE;
    public static final int FUNC_EXT_ELEM_AVAILABLE;
    public static final int FUNC_UNPARSED_ENTITY_URI;
    public static final int FUNC_DOCLOCATION;
    public static org.apache.xpath.compiler.FuncLoader[] m_functions;
    private static final int NUM_BUILT_IN_FUNCS;
    private static final int NUM_ALLOWABLE_ADDINS;
    static int m_funcNextFreeIndex;
    public org.apache.xpath.compiler.FunctionTable();
    public static org.apache.xpath.functions.Function getFunction(int);
       throws javax/xml/transform/TransformerException
    public static int
installFunction(java.lang.String,org.apache.xpath.Expression);
    public static void installFunction(org.apache.xpath.Expression,int);
    static {};
}


Re: JDK 1.4.2_05 incompatibility

Posted by Davanum Srinivas <da...@gmail.com>.
try latest cvs or drop latest xalan into your jre\lib\endorsed.

-- dims

On Wed, 21 Jul 2004 00:16:34 -0500, Scott M Stark <sc...@jboss.com> wrote:
> I was seeing an IllegalAccessError in some code using the xmlsec jar
> when switching from JDK 1.4.2_04 to 1.4.2_05 so I pulled down the code
> to compile it and this fails under JDK 1.4.2_05:
> 
> [starksm@banshee9100 xml-security-1_1_0]$ ant compile
> Buildfile: build.xml
>   [taskdef] Could not load definitions from resource clovertasks. It
> could not be found.
> 
> init:
> 
>      [echo]
> -------------------------------------------------------------------
>      [echo] --------- Apache-XML-Security-J v1.1.0 [2000-2004]
> -----------
>      [echo]
> -------------------------------------------------------------------
>      [echo] Building with Apache Ant version 1.6.1 compiled on February
> 12 2004
>      [echo] Java 1.4.2_05 located at C:\usr\java\j2sdk1.4.2_05\jre
>      [echo]
> -------------------------------------------------------------------
> 
> do.check.libs.jce:
> 
> do.check.libs:
> 
> do.build.src:
> 
> env.mk.dirs:
> 
> do.check.bindist:
> 
> build.src:
>     [javac] Compiling 145 source files to
> C:\usr\local\Java\XML\xml-security-1_1_0\build\classes
>     [javac]
> C:\usr\local\Java\XML\xml-security-1_1_0\src\org\apache\xml\security
> \Init.java:149: m_functions has private access in
> org.apache.xpath.compiler.FunctionTable
>     [javac]                for (int i = 0; i <
> FunctionTable.m_functions.length; i++) {
>     [javac]                                                 ^
>     [javac]
> C:\usr\local\Java\XML\xml-security-1_1_0\src\org\apache\xml\security
> \Init.java:150: m_functions has private access in
> org.apache.xpath.compiler.FunctionTable
>     [javac]                   FuncLoader loader =
> FunctionTable.m_functions[i];
>     [javac]                                                    ^
>     [javac]
> C:\usr\local\Java\XML\xml-security-1_1_0\src\org\apache\xml\security
> \Init.java:156: m_functions has private access in
> org.apache.xpath.compiler.FunctionTable
>     [javac]                         FunctionTable.m_functions[i] =
> funcHereLoader;
>     [javac]                                      ^
>     [javac] 3 errors
> 
> The problem is an incompatible accessibility change in the
> FunctionTable.m_functions
> member from public to private between 1.4.2_05 and 1.4.2_04:
> 
> [starksm@banshee9100 xml-security-1_1_0]$
> /usr/java/j2sdk1.4.2_05/bin/javap -pr
> ivate org.apache.xpath.compiler.FunctionTable
> Compiled from "FunctionTable.java"
> public class org.apache.xpath.compiler.FunctionTable extends
> java.lang.Object{
>     public static final int FUNC_CURRENT;
>     public static final int FUNC_LAST;
>     public static final int FUNC_POSITION;
>     public static final int FUNC_COUNT;
>     public static final int FUNC_ID;
>     public static final int FUNC_KEY;
>     public static final int FUNC_LOCAL_PART;
>     public static final int FUNC_NAMESPACE;
>     public static final int FUNC_QNAME;
>     public static final int FUNC_GENERATE_ID;
>     public static final int FUNC_NOT;
>     public static final int FUNC_TRUE;
>     public static final int FUNC_FALSE;
>     public static final int FUNC_BOOLEAN;
>     public static final int FUNC_NUMBER;
>     public static final int FUNC_FLOOR;
>     public static final int FUNC_CEILING;
>     public static final int FUNC_ROUND;
>     public static final int FUNC_SUM;
>     public static final int FUNC_STRING;
>     public static final int FUNC_STARTS_WITH;
>     public static final int FUNC_CONTAINS;
>     public static final int FUNC_SUBSTRING_BEFORE;
>     public static final int FUNC_SUBSTRING_AFTER;
>     public static final int FUNC_NORMALIZE_SPACE;
>     public static final int FUNC_TRANSLATE;
>     public static final int FUNC_CONCAT;
>     public static final int FUNC_SUBSTRING;
>     public static final int FUNC_STRING_LENGTH;
>     public static final int FUNC_SYSTEM_PROPERTY;
>     public static final int FUNC_LANG;
>     public static final int FUNC_EXT_FUNCTION_AVAILABLE;
>     public static final int FUNC_EXT_ELEM_AVAILABLE;
>     public static final int FUNC_UNPARSED_ENTITY_URI;
>     public static final int FUNC_DOCLOCATION;
>     private static org.apache.xpath.compiler.FuncLoader[] m_functions;
>     private static final int NUM_BUILT_IN_FUNCS;
>     private static final int NUM_ALLOWABLE_ADDINS;
>     static int m_funcNextFreeIndex;
>     static {};
>     public org.apache.xpath.compiler.FunctionTable();
>     static java.lang.String getFunctionName(int);
>     public static void installFunction(org.apache.xpath.Expression,int);
>     public static org.apache.xpath.functions.Function getFunction(int);
>        throws javax/xml/transform/TransformerException
>     public static int
> installFunction(java.lang.String,org.apache.xpath.Expression);
> }
> 
> [starksm@banshee9100 xml-security-1_1_0]$
> /usr/java/j2sdk1.4.2_04/bin/javap -pr
> ivate org.apache.xpath.compiler.FunctionTable
> Compiled from "FunctionTable.java"
> public class org.apache.xpath.compiler.FunctionTable extends
> java.lang.Object{
>     public static final int FUNC_CURRENT;
>     public static final int FUNC_LAST;
>     public static final int FUNC_POSITION;
>     public static final int FUNC_COUNT;
>     public static final int FUNC_ID;
>     public static final int FUNC_KEY;
>     public static final int FUNC_LOCAL_PART;
>     public static final int FUNC_NAMESPACE;
>     public static final int FUNC_QNAME;
>     public static final int FUNC_GENERATE_ID;
>     public static final int FUNC_NOT;
>     public static final int FUNC_TRUE;
>     public static final int FUNC_FALSE;
>     public static final int FUNC_BOOLEAN;
>     public static final int FUNC_NUMBER;
>     public static final int FUNC_FLOOR;
>     public static final int FUNC_CEILING;
>     public static final int FUNC_ROUND;
>     public static final int FUNC_SUM;
>     public static final int FUNC_STRING;
>     public static final int FUNC_STARTS_WITH;
>     public static final int FUNC_CONTAINS;
>     public static final int FUNC_SUBSTRING_BEFORE;
>     public static final int FUNC_SUBSTRING_AFTER;
>     public static final int FUNC_NORMALIZE_SPACE;
>     public static final int FUNC_TRANSLATE;
>     public static final int FUNC_CONCAT;
>     public static final int FUNC_SUBSTRING;
>     public static final int FUNC_STRING_LENGTH;
>     public static final int FUNC_SYSTEM_PROPERTY;
>     public static final int FUNC_LANG;
>     public static final int FUNC_EXT_FUNCTION_AVAILABLE;
>     public static final int FUNC_EXT_ELEM_AVAILABLE;
>     public static final int FUNC_UNPARSED_ENTITY_URI;
>     public static final int FUNC_DOCLOCATION;
>     public static org.apache.xpath.compiler.FuncLoader[] m_functions;
>     private static final int NUM_BUILT_IN_FUNCS;
>     private static final int NUM_ALLOWABLE_ADDINS;
>     static int m_funcNextFreeIndex;
>     public org.apache.xpath.compiler.FunctionTable();
>     public static org.apache.xpath.functions.Function getFunction(int);
>        throws javax/xml/transform/TransformerException
>     public static int
> installFunction(java.lang.String,org.apache.xpath.Expression);
>     public static void installFunction(org.apache.xpath.Expression,int);
>     static {};
> }
> 
> 


-- 
Davanum Srinivas - http://webservices.apache.org/~dims/