You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-user@hadoop.apache.org by "Johannes.Lichtenberger" <Jo...@uni-konstanz.de> on 2010/09/27 14:45:56 UTC

setXIncludeAware(true) exception

I'm getting an exception when running Hadoop:

10/09/27 14:31:34 ERROR conf.Configuration: Failed to set
setXIncludeAware(true) for parser
org.apache.xerces.jaxp.DocumentBuilderFactoryImpl@406754d6:java.lang.UnsupportedOperationException:
This parser does not support specification "null" version "null"
java.lang.UnsupportedOperationException: This parser does not support
specification "null" version "null"
	at
javax.xml.parsers.DocumentBuilderFactory.setXIncludeAware(DocumentBuilderFactory.java:590)

I've searched through the web and found a solution, setting a system
property (in the default constructor):

    /**
     * Default constructor.
     */
    public SortWiki() {
        System.setProperty("javax.xml.parsers.DocumentBuilderFactory",

"com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl");
    }

    /**
     * Main method.
     *
     * @param args
     *            Program arguments.
     * @throws Exception
     *             Any exception which might have been occured while
running Hadoop.
     */
    public static void main(final String[] args) throws Exception {
        final long start = System.currentTimeMillis();
        System.out.println("Running!");
        final int res = ToolRunner.run(new Configuration(), new
SortWiki(), args);
        System.out.println("Done in " + (System.currentTimeMillis() -
start / 60) + " seconds");
        System.exit(res);
    }

But it seems it has no effect. I've also tried it with a static system
property:

    static {
        System.setProperty("javax.xml.parsers.DocumentBuilderFactory",

"com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl");
    }

    /**
     * Default constructor.
     */
    public SortWiki() {

    }

Nothing works...

Besides I still have the problem with setting up my testcase.

regards,
Johannes

Re: setXIncludeAware(true) exception

Posted by "Johannes.Lichtenberger" <Jo...@uni-konstanz.de>.
Sorry, my fault, I've had to include it in my setup of the TestCase. But
nontheless some output, when starting:

10/09/27 14:47:12 ERROR mapred.MiniMRCluster: Job tracker crashed
java.lang.NullPointerException
	at java.io.File.<init>(File.java:222)
	at org.apache.hadoop.mapred.JobHistory.init(JobHistory.java:267)
	at org.apache.hadoop.mapred.JobTracker.<init>(JobTracker.java:1650)
	at org.apache.hadoop.mapred.JobTracker.startTracker(JobTracker.java:199)
	at
org.apache.hadoop.mapred.MiniMRCluster$JobTrackerRunner.run(MiniMRCluster.java:106)
	at java.lang.Thread.run(Thread.java:619)
10/09/27 14:47:13 INFO mapred.MiniMRCluster: mapred.local.dir is
/tmp/hadoop-johannes/mapred/local/0_0,/tmp/hadoop-johannes/mapred/local/0_0,/tmp/hadoop-johannes/mapred/local/0_0
10/09/27 14:47:18 INFO http.HttpServer: Port returned by
webServer.getConnectors()[0].getLocalPort() before open() is -1. Opening
the listener on 0
10/09/27 14:47:18 INFO http.HttpServer: listener.getLocalPort() returned
58745 webServer.getConnectors()[0].getLocalPort() returned 58745
10/09/27 14:47:18 INFO http.HttpServer: Jetty bound to port 58745
10/09/27 14:47:18 INFO jvm.JvmMetrics: Initializing JVM Metrics with
processName=TaskTracker, sessionId=
10/09/27 14:47:18 INFO metrics.RpcMetrics: Initializing RPC Metrics with
hostName=TaskTracker, port=56907
10/09/27 14:47:18 INFO ipc.Server: IPC Server Responder: starting
10/09/27 14:47:18 INFO ipc.Server: IPC Server handler 0 on 56907: starting
10/09/27 14:47:18 INFO ipc.Server: IPC Server listener on 56907: starting
10/09/27 14:47:18 INFO ipc.Server: IPC Server handler 1 on 56907: starting
10/09/27 14:47:18 INFO ipc.Server: IPC Server handler 2 on 56907: starting
10/09/27 14:47:18 INFO mapred.TaskTracker: TaskTracker up at:
localhost/127.0.0.1:56907
10/09/27 14:47:18 INFO mapred.TaskTracker: Starting tracker
tracker_host0.foo.com:localhost/127.0.0.1:56907
10/09/27 14:47:18 INFO ipc.Server: IPC Server handler 3 on 56907: starting
10/09/27 14:47:19 INFO ipc.Client: Retrying connect to server:
localhost/127.0.0.1:0. Already tried 0 time(s).
10/09/27 14:47:20 INFO ipc.Client: Retrying connect to server:
localhost/127.0.0.1:0. Already tried 1 time(s).

My Test setup is as follows:

    @Override
    @Before
    public void setUp() throws Exception {
        System.setProperty("javax.xml.parsers.DocumentBuilderFactory",

"com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl");
        XMLUnit.setIgnoreWhitespace(true);
    }

    @Override
    @After
    public void tearDown() throws Exception {
        OUTPUT.delete();
    }

    @Test
    public void testWithLocal() throws Exception {
        MiniMRCluster mr = null;
        try {
            mr = new MiniMRCluster(2, "file:///", 3);
            final Configuration conf = mr.createJobConf();
            runSortWiki(conf);
        } finally {
            if (mr != null) {
                mr.shutdown();
            }
        }
    }

    ...

I assume it's a problem with setting up a MiniMRCluster :-/

regards,
Johannes