hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John DeTreville (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HADOOP-4448) "hadoop jar" runs wrong jar file in case of name clash
Date Fri, 17 Oct 2008 23:22:47 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-4448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12640698#action_12640698
] 

John DeTreville commented on HADOOP-4448:
-----------------------------------------

I should have been more clear.

In my example, the jar file that was submitted and the jar file that was incorrectly run both
had the same full class name.

Of course, my command line didn't mention the class name. It gave the name of a jar file.
Hadoop looked at my jar file, found the class name inside, then loaded another jar file from
the CLASSPATH that happened to have the same class name.

The simple fix for me was to change my class name, but it took an awfully long time to figure
out what was wrong.

Cheers,
John



> "hadoop  jar" runs wrong jar file in case of name clash
> -------------------------------------------------------
>
>                 Key: HADOOP-4448
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4448
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: util
>         Environment: RHEL Linux
>            Reporter: John DeTreville
>             Fix For: 0.17.3
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> Imagine I run a command as follows:
>     hadoop jar test.jar
> Let's imagine that my main module in test.jar is named Sort.
> Let's also imagine that some jar file in my CLASSPATH contains a module also named Sort,
which also defines main.
> Hadoop will run THAT jar file, not the one I specified.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message