You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Dirk Olmes <di...@xanthippe.ping.de> on 2007/11/23 16:09:59 UTC
Re: cannot find symbol
helio wrote:
> Hi,
>
> I've encountered a strange error executing "mvn compile", as follows:
>
> [DEBUG]
> /home/helio/buscape/projetos/tsunami/eclipse-desenv/SOA-Ofertas-modulos/src/main/java
>
> [INFO] Compiling 17 source files to
> /home/helio/buscape/projetos/tsunami/eclipse-desenv/SOA-Ofertas-modulos/target/classes
>
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Compilation failure
>
> /home/helio/buscape/projetos/tsunami/eclipse-desenv/SOA-Ofertas-modulos/src/main/java/com/buscape/oferta/lookup/OfferLookupManager.java:[126,39]
> cannot find symbol
> symbol : method
> binarySearch(java.util.List<byte[]>,byte[],java.util.Comparator<byte[]>)
> location: class java.util.Collections
>
> as you see, it can not find the method "binarySearch" of the class
> "java.util.Collections". That method does exist and the call is correct
> -- I've tried to create another project using the same method
> "binarySearch" and the new application works fine. But I can not
> understand why this error has happened. If I try to remove the class
> "OfferLookupManager", the project can be compiled by maven.
>
> I'm using the maven 2.0.7 and Java 1.5.0_09. Could anybody help me,
> please?
Are you sure that your JAVA_HOME points to the 1.5 JDK? I have seen
cases where the java that's invoked from the commandline is not in sync
with where JAVA_HOME points, leading to all kinds of trouble.
-dirk
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: cannot find symbol
Posted by helio <he...@buscape-inc.com>.
Dirk,
thanks for your answer! But the problem is not the Java version. I
verify that JAVA_HOME points to 1.5 and maven shows this when I run it
with "-X" option:
[helio@tecnologia37 SOA-Ofertas-modulos]$ mvn -X compile
+ Error stacktraces are turned on.
Maven version: 2.0.7
Java version: 1.5.0_09
OS name: "linux" version: "2.6.20-1.2925.fc6" arch: "i386"
...
Helio
Dirk Olmes escreveu:
> helio wrote:
>
>> Hi,
>>
>> I've encountered a strange error executing "mvn compile", as follows:
>>
>> [DEBUG]
>> /home/helio/buscape/projetos/tsunami/eclipse-desenv/SOA-Ofertas-modulos/src/main/java
>>
>> [INFO] Compiling 17 source files to
>> /home/helio/buscape/projetos/tsunami/eclipse-desenv/SOA-Ofertas-modulos/target/classes
>>
>> [INFO]
>> ------------------------------------------------------------------------
>> [ERROR] BUILD FAILURE
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Compilation failure
>>
>> /home/helio/buscape/projetos/tsunami/eclipse-desenv/SOA-Ofertas-modulos/src/main/java/com/buscape/oferta/lookup/OfferLookupManager.java:[126,39]
>> cannot find symbol
>> symbol : method
>> binarySearch(java.util.List<byte[]>,byte[],java.util.Comparator<byte[]>)
>> location: class java.util.Collections
>>
>> as you see, it can not find the method "binarySearch" of the class
>> "java.util.Collections". That method does exist and the call is correct
>> -- I've tried to create another project using the same method
>> "binarySearch" and the new application works fine. But I can not
>> understand why this error has happened. If I try to remove the class
>> "OfferLookupManager", the project can be compiled by maven.
>>
>> I'm using the maven 2.0.7 and Java 1.5.0_09. Could anybody help me,
>> please?
>>
>
> Are you sure that your JAVA_HOME points to the 1.5 JDK? I have seen
> cases where the java that's invoked from the commandline is not in sync
> with where JAVA_HOME points, leading to all kinds of trouble.
>
> -dirk
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
--
* Helio Marci de Oliveira *
Departamento de Tecnologia
helio@buscape-inc.com <ma...@buscape-inc.com>
tel: + 55 11 3848 8700 ramal:8780
skype: helio.marci
<http://www.buscape.com>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org