hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michel Tourn (JIRA)" <j...@apache.org>
Subject [jira] Created: (HADOOP-104) Reflexive access to non-public class with public ctor requires setAccessible (with some JVMs)
Date Fri, 24 Mar 2006 23:07:19 GMT
Reflexive access to non-public class with public ctor requires setAccessible (with some JVMs)

         Key: HADOOP-104
         URL: http://issues.apache.org/jira/browse/HADOOP-104
     Project: Hadoop
        Type: Bug
    Reporter: Michel Tourn

Multiple times I have hit this problem which prevents the NameNode from starting.
The only fix I had so far was to loose all my DFS data...

Exception in thread "main" java.lang.RuntimeException: java.lang.IllegalAccessException: 
Class org.apache.hadoop.io.WritableFactories can not access a member of 
class org.apache.hadoop.dfs.Block with modifiers "public"
        at org.apache.hadoop.io.WritableFactories.newInstance(WritableFactories.java:49)
        at org.apache.hadoop.io.ArrayWritable.readFields(ArrayWritable.java:81)
        at org.apache.hadoop.dfs.FSDirectory.loadFSEdits(FSDirectory.java:374)
        at org.apache.hadoop.dfs.FSDirectory.loadFSImage(FSDirectory.java:347)
        at org.apache.hadoop.dfs.FSDirectory.<init>(FSDirectory.java:258)
        at org.apache.hadoop.dfs.FSNamesystem.<init>(FSNamesystem.java:151)
        at org.apache.hadoop.dfs.NameNode.<init>(NameNode.java:82)

According to this, 
this is a known issue when using
reflexive access to a non-public class with public ctor 
(class org.apache.hadoop.dfs.Block is such a class)

This problem may not occur with all JVM releases. 
(I build on 1.5.0-b64 and run on 1.5.0_05-b05)

This problem only occured for me when 
I upgrade code or change XML configuration AND 
have existing files in the DFS.
This problem does not occur when I just stop / restart the NameServer.

In any case, the attached patch fixes it by calling setAccessible
before constructing the instance with reflection.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message