You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by Shivendra Singh <sh...@oracle.com> on 2013/06/26 20:04:34 UTC

Compile fails

Hi All,

I am trying to compile the hbase-server project after cloning the git 
repository.
However, it is errors out:
/ Failed to execute goal 
org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile 
(default-compile) on project hbase-server: Compilation failure: 
Compilation failure:
[ERROR] 
/scratch/shivends/hbase-patch/hbase/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java:[490,56] 
incompatible types; no instance(s) of type variable(s) K,V exist so that 
java.util.TreeMap<K,V> conforms to 
java.util.Map<byte[],java.util.Set<byte[]>>
[ERROR] found   : <K,V>java.util.TreeMap<K,V>/

Please help me to proceed.

Thanks,
Shivendra

Re: Compile fails

Posted by Shivendra Singh <sh...@oracle.com>.
Hi Elliott,

I have tried all options including mvn package -DskipTests.
I think it might be java version as Ted suggested.

Thanks,
Shivendra


On 6/26/2013 2:28 PM, Elliott Clark wrote:
> mvn compile doesn't work (unless you have already run install).
>
> Compile creates the class files but does not create jars.  Since we
> have a multi module project the other modules depend on jars for
> previous modules being available.  To satisfy this you have a couple
> of options:
>
> First Option:
> mvn package -DskipTests
>
> This works because package produces jars for every module.  Thus when
> something like hbase-server needs a module that was built before the
> jar is available in the target folder.
>
> Second Option:
> mvn install -DskipTests
>
> The jars for all modules in the project will be in your local maven repo.
> Now if a mvn compile runs and tries to resolve dependencies maven will
> look in your local repo and find the jars that were created. I'm not
> as fond of this option because it's tough to remember what jar you
> last put into the local maven repo.
>
> On Wed, Jun 26, 2013 at 2:16 PM, Ted Yu <yu...@gmail.com> wrote:
>> What version of JDK are you using ?
>>
>> I use java version "1.6.0_43" and don't get the error you cited on trunk.
>>
>> Cheers
>>
>> On Thu, Jun 27, 2013 at 4:36 AM, Shivendra Singh <
>> shivendra.p.singh@oracle.com> wrote:
>>
>>> Hi Jesse,
>>>
>>> Thanks for replying.
>>> I am running "mvn compile" on the entire project, what I meant in the
>>> earlier mail was that I am making changes to hbase-server.
>>> I ran "mvn clean install -DskipTests" on the entire project and still have
>>> same errors.
>>>
>>> Thanks,
>>> Shivendra
>>>
>>>
>>> On 6/26/2013 11:06 AM, Jesse Yates wrote:
>>>
>>>> You need to do a "mvn clean install -DskipTests" on the *entire HBase
>>>> project, not just hbase-server*. Should get you going.
>>>>
>>>> -Jesse
>>>> -------------------
>>>> Jesse Yates
>>>> @jesse_yates
>>>> jyates.github.com
>>>>
>>>>
>>>> On Wed, Jun 26, 2013 at 11:04 AM, Shivendra Singh <
>>>> shivendra.p.singh@oracle.com> wrote:
>>>>
>>>>     Hi All,
>>>>> I am trying to compile the hbase-server project after cloning the git
>>>>> repository.
>>>>> However, it is errors out:
>>>>> * Failed to execute goal
>>>>> org.apache.maven.plugins:**maven-compiler-plugin:2.5.1:**compile
>>>>> (default-compile) on project hbase-server: Compilation failure:
>>>>> Compilation
>>>>> failure:
>>>>> [ERROR]
>>>>> /scratch/shivends/hbase-patch/**hbase/hbase-server/src/main/**
>>>>> java/org/apache/hadoop/hbase/**security/access/**
>>>>> AccessController.java:[490,56]
>>>>> incompatible types; no instance(s) of type variable(s) K,V exist so that
>>>>> java.util.TreeMap<K,V> conforms to
>>>>> java.util.Map<byte[],java.**util.Set<byte[]>>
>>>>> [ERROR] found   : <K,V>java.util.TreeMap<K,V>*
>>>>>
>>>>> Please help me to proceed.
>>>>>
>>>>> Thanks,
>>>>> Shivendra
>>>>>
>>>>>


Re: Compile fails

Posted by Elliott Clark <ec...@apache.org>.
mvn compile doesn't work (unless you have already run install).

Compile creates the class files but does not create jars.  Since we
have a multi module project the other modules depend on jars for
previous modules being available.  To satisfy this you have a couple
of options:

First Option:
mvn package -DskipTests

This works because package produces jars for every module.  Thus when
something like hbase-server needs a module that was built before the
jar is available in the target folder.

Second Option:
mvn install -DskipTests

The jars for all modules in the project will be in your local maven repo.
Now if a mvn compile runs and tries to resolve dependencies maven will
look in your local repo and find the jars that were created. I'm not
as fond of this option because it's tough to remember what jar you
last put into the local maven repo.

On Wed, Jun 26, 2013 at 2:16 PM, Ted Yu <yu...@gmail.com> wrote:
> What version of JDK are you using ?
>
> I use java version "1.6.0_43" and don't get the error you cited on trunk.
>
> Cheers
>
> On Thu, Jun 27, 2013 at 4:36 AM, Shivendra Singh <
> shivendra.p.singh@oracle.com> wrote:
>
>> Hi Jesse,
>>
>> Thanks for replying.
>> I am running "mvn compile" on the entire project, what I meant in the
>> earlier mail was that I am making changes to hbase-server.
>> I ran "mvn clean install -DskipTests" on the entire project and still have
>> same errors.
>>
>> Thanks,
>> Shivendra
>>
>>
>> On 6/26/2013 11:06 AM, Jesse Yates wrote:
>>
>>> You need to do a "mvn clean install -DskipTests" on the *entire HBase
>>> project, not just hbase-server*. Should get you going.
>>>
>>> -Jesse
>>> -------------------
>>> Jesse Yates
>>> @jesse_yates
>>> jyates.github.com
>>>
>>>
>>> On Wed, Jun 26, 2013 at 11:04 AM, Shivendra Singh <
>>> shivendra.p.singh@oracle.com> wrote:
>>>
>>>    Hi All,
>>>>
>>>> I am trying to compile the hbase-server project after cloning the git
>>>> repository.
>>>> However, it is errors out:
>>>> * Failed to execute goal
>>>> org.apache.maven.plugins:**maven-compiler-plugin:2.5.1:**compile
>>>> (default-compile) on project hbase-server: Compilation failure:
>>>> Compilation
>>>> failure:
>>>> [ERROR]
>>>> /scratch/shivends/hbase-patch/**hbase/hbase-server/src/main/**
>>>> java/org/apache/hadoop/hbase/**security/access/**
>>>> AccessController.java:[490,56]
>>>> incompatible types; no instance(s) of type variable(s) K,V exist so that
>>>> java.util.TreeMap<K,V> conforms to
>>>> java.util.Map<byte[],java.**util.Set<byte[]>>
>>>> [ERROR] found   : <K,V>java.util.TreeMap<K,V>*
>>>>
>>>> Please help me to proceed.
>>>>
>>>> Thanks,
>>>> Shivendra
>>>>
>>>>
>>

Re: Compile fails

Posted by Shivendra Singh <sh...@oracle.com>.
Sure. I will report back if I see any error.

On 6/26/2013 5:34 PM, Ted Yu wrote:
> Can you upgrade to 1.6.0_43 or newer JDK and see if the compilation 
> error is still there ?
>
> On Thu, Jun 27, 2013 at 8:14 AM, Shivendra Singh 
> <shivendra.p.singh@oracle.com <ma...@oracle.com>> 
> wrote:
>
>     Hi Ted,
>
>     I am on 1.6.0_22
>     Is it because of the old version incompatibility?
>
>     Thanks,
>     Shivendra
>
>
>     On 6/26/2013 2:16 PM, Ted Yu wrote:
>
>         What version of JDK are you using ?
>
>         I use java version "1.6.0_43" and don't get the error you
>         cited on trunk.
>
>         Cheers
>
>         On Thu, Jun 27, 2013 at 4:36 AM, Shivendra Singh <
>         shivendra.p.singh@oracle.com
>         <ma...@oracle.com>> wrote:
>
>             Hi Jesse,
>
>             Thanks for replying.
>             I am running "mvn compile" on the entire project, what I
>             meant in the
>             earlier mail was that I am making changes to hbase-server.
>             I ran "mvn clean install -DskipTests" on the entire
>             project and still have
>             same errors.
>
>             Thanks,
>             Shivendra
>
>
>             On 6/26/2013 11:06 AM, Jesse Yates wrote:
>
>                 You need to do a "mvn clean install -DskipTests" on
>                 the *entire HBase
>                 project, not just hbase-server*. Should get you going.
>
>                 -Jesse
>                 -------------------
>                 Jesse Yates
>                 @jesse_yates
>                 jyates.github.com <http://jyates.github.com>
>
>
>                 On Wed, Jun 26, 2013 at 11:04 AM, Shivendra Singh <
>                 shivendra.p.singh@oracle.com
>                 <ma...@oracle.com>> wrote:
>
>                     Hi All,
>
>                     I am trying to compile the hbase-server project
>                     after cloning the git
>                     repository.
>                     However, it is errors out:
>                     * Failed to execute goal
>                     org.apache.maven.plugins:**maven-compiler-plugin:2.5.1:**compile
>
>
>                     (default-compile) on project hbase-server:
>                     Compilation failure:
>                     Compilation
>                     failure:
>                     [ERROR]
>                     /scratch/shivends/hbase-patch/**hbase/hbase-server/src/main/**
>                     java/org/apache/hadoop/hbase/**security/access/**
>
>                     AccessController.java:[490,56]
>                     incompatible types; no instance(s) of type
>                     variable(s) K,V exist so that
>                     java.util.TreeMap<K,V> conforms to
>                     java.util.Map<byte[],java.**util.Set<byte[]>>
>
>                     [ERROR] found   : <K,V>java.util.TreeMap<K,V>*
>
>                     Please help me to proceed.
>
>                     Thanks,
>                     Shivendra
>
>
>
>


Re: Compile fails

Posted by Ted Yu <yu...@gmail.com>.
Can you upgrade to 1.6.0_43 or newer JDK and see if the compilation error
is still there ?

On Thu, Jun 27, 2013 at 8:14 AM, Shivendra Singh <
shivendra.p.singh@oracle.com> wrote:

> Hi Ted,
>
> I am on 1.6.0_22
> Is it because of the old version incompatibility?
>
> Thanks,
> Shivendra
>
>
> On 6/26/2013 2:16 PM, Ted Yu wrote:
>
>> What version of JDK are you using ?
>>
>> I use java version "1.6.0_43" and don't get the error you cited on trunk.
>>
>> Cheers
>>
>> On Thu, Jun 27, 2013 at 4:36 AM, Shivendra Singh <
>> shivendra.p.singh@oracle.com> wrote:
>>
>>  Hi Jesse,
>>>
>>> Thanks for replying.
>>> I am running "mvn compile" on the entire project, what I meant in the
>>> earlier mail was that I am making changes to hbase-server.
>>> I ran "mvn clean install -DskipTests" on the entire project and still
>>> have
>>> same errors.
>>>
>>> Thanks,
>>> Shivendra
>>>
>>>
>>> On 6/26/2013 11:06 AM, Jesse Yates wrote:
>>>
>>>  You need to do a "mvn clean install -DskipTests" on the *entire HBase
>>>> project, not just hbase-server*. Should get you going.
>>>>
>>>> -Jesse
>>>> -------------------
>>>> Jesse Yates
>>>> @jesse_yates
>>>> jyates.github.com
>>>>
>>>>
>>>> On Wed, Jun 26, 2013 at 11:04 AM, Shivendra Singh <
>>>> shivendra.p.singh@oracle.com> wrote:
>>>>
>>>>     Hi All,
>>>>
>>>>> I am trying to compile the hbase-server project after cloning the git
>>>>> repository.
>>>>> However, it is errors out:
>>>>> * Failed to execute goal
>>>>> org.apache.maven.plugins:****maven-compiler-plugin:2.5.1:****compile
>>>>>
>>>>> (default-compile) on project hbase-server: Compilation failure:
>>>>> Compilation
>>>>> failure:
>>>>> [ERROR]
>>>>> /scratch/shivends/hbase-patch/****hbase/hbase-server/src/main/****
>>>>> java/org/apache/hadoop/hbase/****security/access/**
>>>>>
>>>>> AccessController.java:[490,56]
>>>>> incompatible types; no instance(s) of type variable(s) K,V exist so
>>>>> that
>>>>> java.util.TreeMap<K,V> conforms to
>>>>> java.util.Map<byte[],java.****util.Set<byte[]>>
>>>>>
>>>>> [ERROR] found   : <K,V>java.util.TreeMap<K,V>*
>>>>>
>>>>> Please help me to proceed.
>>>>>
>>>>> Thanks,
>>>>> Shivendra
>>>>>
>>>>>
>>>>>
>

Re: Compile fails

Posted by Jesse Yates <je...@gmail.com>.
Yep, that would do it. Older 1.6 versions of JDK have a generics
compatibility issue... can you give  _36, if not newer?
-------------------
Jesse Yates
@jesse_yates
jyates.github.com


On Wed, Jun 26, 2013 at 5:14 PM, Shivendra Singh <
shivendra.p.singh@oracle.com> wrote:

> Hi Ted,
>
> I am on 1.6.0_22
> Is it because of the old version incompatibility?
>
> Thanks,
> Shivendra
>
> On 6/26/2013 2:16 PM, Ted Yu wrote:
>
>> What version of JDK are you using ?
>>
>> I use java version "1.6.0_43" and don't get the error you cited on trunk.
>>
>> Cheers
>>
>> On Thu, Jun 27, 2013 at 4:36 AM, Shivendra Singh <
>> shivendra.p.singh@oracle.com> wrote:
>>
>>  Hi Jesse,
>>>
>>> Thanks for replying.
>>> I am running "mvn compile" on the entire project, what I meant in the
>>> earlier mail was that I am making changes to hbase-server.
>>> I ran "mvn clean install -DskipTests" on the entire project and still
>>> have
>>> same errors.
>>>
>>> Thanks,
>>> Shivendra
>>>
>>>
>>> On 6/26/2013 11:06 AM, Jesse Yates wrote:
>>>
>>>  You need to do a "mvn clean install -DskipTests" on the *entire HBase
>>>> project, not just hbase-server*. Should get you going.
>>>>
>>>> -Jesse
>>>> -------------------
>>>> Jesse Yates
>>>> @jesse_yates
>>>> jyates.github.com
>>>>
>>>>
>>>> On Wed, Jun 26, 2013 at 11:04 AM, Shivendra Singh <
>>>> shivendra.p.singh@oracle.com> wrote:
>>>>
>>>>     Hi All,
>>>>
>>>>> I am trying to compile the hbase-server project after cloning the git
>>>>> repository.
>>>>> However, it is errors out:
>>>>> * Failed to execute goal
>>>>> org.apache.maven.plugins:****maven-compiler-plugin:2.5.1:****compile
>>>>> (default-compile) on project hbase-server: Compilation failure:
>>>>> Compilation
>>>>> failure:
>>>>> [ERROR]
>>>>> /scratch/shivends/hbase-patch/****hbase/hbase-server/src/main/****
>>>>> java/org/apache/hadoop/hbase/****security/access/**
>>>>> AccessController.java:[490,56]
>>>>> incompatible types; no instance(s) of type variable(s) K,V exist so
>>>>> that
>>>>> java.util.TreeMap<K,V> conforms to
>>>>> java.util.Map<byte[],java.****util.Set<byte[]>>
>>>>> [ERROR] found   : <K,V>java.util.TreeMap<K,V>*
>>>>>
>>>>> Please help me to proceed.
>>>>>
>>>>> Thanks,
>>>>> Shivendra
>>>>>
>>>>>
>>>>>
>

Re: Compile fails

Posted by Shivendra Singh <sh...@oracle.com>.
Hi Ted,

I am on 1.6.0_22
Is it because of the old version incompatibility?

Thanks,
Shivendra

On 6/26/2013 2:16 PM, Ted Yu wrote:
> What version of JDK are you using ?
>
> I use java version "1.6.0_43" and don't get the error you cited on trunk.
>
> Cheers
>
> On Thu, Jun 27, 2013 at 4:36 AM, Shivendra Singh <
> shivendra.p.singh@oracle.com> wrote:
>
>> Hi Jesse,
>>
>> Thanks for replying.
>> I am running "mvn compile" on the entire project, what I meant in the
>> earlier mail was that I am making changes to hbase-server.
>> I ran "mvn clean install -DskipTests" on the entire project and still have
>> same errors.
>>
>> Thanks,
>> Shivendra
>>
>>
>> On 6/26/2013 11:06 AM, Jesse Yates wrote:
>>
>>> You need to do a "mvn clean install -DskipTests" on the *entire HBase
>>> project, not just hbase-server*. Should get you going.
>>>
>>> -Jesse
>>> -------------------
>>> Jesse Yates
>>> @jesse_yates
>>> jyates.github.com
>>>
>>>
>>> On Wed, Jun 26, 2013 at 11:04 AM, Shivendra Singh <
>>> shivendra.p.singh@oracle.com> wrote:
>>>
>>>     Hi All,
>>>> I am trying to compile the hbase-server project after cloning the git
>>>> repository.
>>>> However, it is errors out:
>>>> * Failed to execute goal
>>>> org.apache.maven.plugins:**maven-compiler-plugin:2.5.1:**compile
>>>> (default-compile) on project hbase-server: Compilation failure:
>>>> Compilation
>>>> failure:
>>>> [ERROR]
>>>> /scratch/shivends/hbase-patch/**hbase/hbase-server/src/main/**
>>>> java/org/apache/hadoop/hbase/**security/access/**
>>>> AccessController.java:[490,56]
>>>> incompatible types; no instance(s) of type variable(s) K,V exist so that
>>>> java.util.TreeMap<K,V> conforms to
>>>> java.util.Map<byte[],java.**util.Set<byte[]>>
>>>> [ERROR] found   : <K,V>java.util.TreeMap<K,V>*
>>>>
>>>> Please help me to proceed.
>>>>
>>>> Thanks,
>>>> Shivendra
>>>>
>>>>


Re: Compile fails

Posted by Ted Yu <yu...@gmail.com>.
What version of JDK are you using ?

I use java version "1.6.0_43" and don't get the error you cited on trunk.

Cheers

On Thu, Jun 27, 2013 at 4:36 AM, Shivendra Singh <
shivendra.p.singh@oracle.com> wrote:

> Hi Jesse,
>
> Thanks for replying.
> I am running "mvn compile" on the entire project, what I meant in the
> earlier mail was that I am making changes to hbase-server.
> I ran "mvn clean install -DskipTests" on the entire project and still have
> same errors.
>
> Thanks,
> Shivendra
>
>
> On 6/26/2013 11:06 AM, Jesse Yates wrote:
>
>> You need to do a "mvn clean install -DskipTests" on the *entire HBase
>> project, not just hbase-server*. Should get you going.
>>
>> -Jesse
>> -------------------
>> Jesse Yates
>> @jesse_yates
>> jyates.github.com
>>
>>
>> On Wed, Jun 26, 2013 at 11:04 AM, Shivendra Singh <
>> shivendra.p.singh@oracle.com> wrote:
>>
>>    Hi All,
>>>
>>> I am trying to compile the hbase-server project after cloning the git
>>> repository.
>>> However, it is errors out:
>>> * Failed to execute goal
>>> org.apache.maven.plugins:**maven-compiler-plugin:2.5.1:**compile
>>> (default-compile) on project hbase-server: Compilation failure:
>>> Compilation
>>> failure:
>>> [ERROR]
>>> /scratch/shivends/hbase-patch/**hbase/hbase-server/src/main/**
>>> java/org/apache/hadoop/hbase/**security/access/**
>>> AccessController.java:[490,56]
>>> incompatible types; no instance(s) of type variable(s) K,V exist so that
>>> java.util.TreeMap<K,V> conforms to
>>> java.util.Map<byte[],java.**util.Set<byte[]>>
>>> [ERROR] found   : <K,V>java.util.TreeMap<K,V>*
>>>
>>> Please help me to proceed.
>>>
>>> Thanks,
>>> Shivendra
>>>
>>>
>

Re: Compile fails

Posted by Shivendra Singh <sh...@oracle.com>.
Hi Jesse,

Thanks for replying.
I am running "mvn compile" on the entire project, what I meant in the 
earlier mail was that I am making changes to hbase-server.
I ran "mvn clean install -DskipTests" on the entire project and still 
have same errors.

Thanks,
Shivendra

On 6/26/2013 11:06 AM, Jesse Yates wrote:
> You need to do a "mvn clean install -DskipTests" on the *entire HBase
> project, not just hbase-server*. Should get you going.
>
> -Jesse
> -------------------
> Jesse Yates
> @jesse_yates
> jyates.github.com
>
>
> On Wed, Jun 26, 2013 at 11:04 AM, Shivendra Singh <
> shivendra.p.singh@oracle.com> wrote:
>
>>   Hi All,
>>
>> I am trying to compile the hbase-server project after cloning the git
>> repository.
>> However, it is errors out:
>> * Failed to execute goal
>> org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile
>> (default-compile) on project hbase-server: Compilation failure: Compilation
>> failure:
>> [ERROR]
>> /scratch/shivends/hbase-patch/hbase/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java:[490,56]
>> incompatible types; no instance(s) of type variable(s) K,V exist so that
>> java.util.TreeMap<K,V> conforms to
>> java.util.Map<byte[],java.util.Set<byte[]>>
>> [ERROR] found   : <K,V>java.util.TreeMap<K,V>*
>>
>> Please help me to proceed.
>>
>> Thanks,
>> Shivendra
>>


Re: Compile fails

Posted by Jesse Yates <je...@gmail.com>.
You need to do a "mvn clean install -DskipTests" on the *entire HBase
project, not just hbase-server*. Should get you going.

-Jesse
-------------------
Jesse Yates
@jesse_yates
jyates.github.com


On Wed, Jun 26, 2013 at 11:04 AM, Shivendra Singh <
shivendra.p.singh@oracle.com> wrote:

>  Hi All,
>
> I am trying to compile the hbase-server project after cloning the git
> repository.
> However, it is errors out:
> * Failed to execute goal
> org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile
> (default-compile) on project hbase-server: Compilation failure: Compilation
> failure:
> [ERROR]
> /scratch/shivends/hbase-patch/hbase/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java:[490,56]
> incompatible types; no instance(s) of type variable(s) K,V exist so that
> java.util.TreeMap<K,V> conforms to
> java.util.Map<byte[],java.util.Set<byte[]>>
> [ERROR] found   : <K,V>java.util.TreeMap<K,V>*
>
> Please help me to proceed.
>
> Thanks,
> Shivendra
>