You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jclouds.apache.org by f 62 <ma...@gmail.com> on 2014/06/23 08:00:42 UTC

java.lang.IllegalArgumentException: No enum constant org.jclouds.openstack.neutron.v2_0.domain.State.active

HI,

   I am new to JClouds. I was trying one quick sample code to test neutron
API. I tried fro list network. But I got *java.lang.IllegalArgumentException:
No enum constant
org.jclouds.openstack.neutron.v2_0.domain.State.active *exception.
I can see in the terminal all the list of network and it happened at the
the time of formatting. Any Help ? I am attaching the java and pom file.


Thnx

Re: java.lang.IllegalArgumentException: No enum constant org.jclouds.openstack.neutron.v2_0.domain.State.active

Posted by Ignasi Barrera <na...@apache.org>.
Zack, could this be caused by the "active" value being lower case?

The current enum in master does not have the "fromValue" method (is it
present in the refactored branch?) and could be the place to add the
lowercase fix, if needed.
El 25/06/2014 05:54, "f 62" <ma...@gmail.com> escribió:

> @Zack , I followed the instruction in page u said, and here is the stdout
> output http://pastie.org/9321600
>
> Is at all JCloud is tested for openstack ?
>
>
> On Tue, Jun 24, 2014 at 8:50 AM, f 62 <ma...@gmail.com> wrote:
>
>> @Zack No I wl try once again and try to post the log.
>>
>> Thnx
>>
>>
>> On Mon, Jun 23, 2014 at 11:36 PM, Zack Shoylev <
>> zack.shoylev@rackspace.com> wrote:
>>
>>> Just in case, do you also have a wire-level log you can add? (
>>> https://jclouds.apache.org/reference/logging/)
>>>
>>> ________________________________________
>>> From: Andrew Phillips [andrewp@apache.org]
>>> Sent: Monday, June 23, 2014 7:25 AM
>>> To: user@jclouds.apache.org
>>> Subject: Re: java.lang.IllegalArgumentException: No enum constant
>>> org.jclouds.openstack.neutron.v2_0.domain.State.active
>>>
>>> >>     Here is the output of : http://pastie.org/9315980 *mvn
>>> >> dependency:tree, *as u asked.
>>>
>>> Thanks, Vikash. That indeed looks fine:
>>>
>>>    org.apache.jclouds:jclouds-core:jar:1.7.3:compile
>>>
>>> I can't quite figure out how we could then have
>>>
>>>    ~[jclouds-core-1.7.2.jar:1.7.2]
>>>
>>> in the stacktrace. Hopefully someone who's more familiar with the
>>> OpenStack examples will be able to shed some more light on this...
>>>
>>> Regards
>>>
>>> ap
>>>
>>
>>
>

Re: java.lang.IllegalArgumentException: No enum constant org.jclouds.openstack.neutron.v2_0.domain.State.active

Posted by f 62 <ma...@gmail.com>.
@Zack , I followed the instruction in page u said, and here is the stdout
output http://pastie.org/9321600

Is at all JCloud is tested for openstack ?


On Tue, Jun 24, 2014 at 8:50 AM, f 62 <ma...@gmail.com> wrote:

> @Zack No I wl try once again and try to post the log.
>
> Thnx
>
>
> On Mon, Jun 23, 2014 at 11:36 PM, Zack Shoylev <zack.shoylev@rackspace.com
> > wrote:
>
>> Just in case, do you also have a wire-level log you can add? (
>> https://jclouds.apache.org/reference/logging/)
>>
>> ________________________________________
>> From: Andrew Phillips [andrewp@apache.org]
>> Sent: Monday, June 23, 2014 7:25 AM
>> To: user@jclouds.apache.org
>> Subject: Re: java.lang.IllegalArgumentException: No enum constant
>> org.jclouds.openstack.neutron.v2_0.domain.State.active
>>
>> >>     Here is the output of : http://pastie.org/9315980 *mvn
>> >> dependency:tree, *as u asked.
>>
>> Thanks, Vikash. That indeed looks fine:
>>
>>    org.apache.jclouds:jclouds-core:jar:1.7.3:compile
>>
>> I can't quite figure out how we could then have
>>
>>    ~[jclouds-core-1.7.2.jar:1.7.2]
>>
>> in the stacktrace. Hopefully someone who's more familiar with the
>> OpenStack examples will be able to shed some more light on this...
>>
>> Regards
>>
>> ap
>>
>
>

Re: java.lang.IllegalArgumentException: No enum constant org.jclouds.openstack.neutron.v2_0.domain.State.active

Posted by f 62 <ma...@gmail.com>.
@Zack No I wl try once again and try to post the log.

Thnx


On Mon, Jun 23, 2014 at 11:36 PM, Zack Shoylev <za...@rackspace.com>
wrote:

> Just in case, do you also have a wire-level log you can add? (
> https://jclouds.apache.org/reference/logging/)
>
> ________________________________________
> From: Andrew Phillips [andrewp@apache.org]
> Sent: Monday, June 23, 2014 7:25 AM
> To: user@jclouds.apache.org
> Subject: Re: java.lang.IllegalArgumentException: No enum constant
> org.jclouds.openstack.neutron.v2_0.domain.State.active
>
> >>     Here is the output of : http://pastie.org/9315980 *mvn
> >> dependency:tree, *as u asked.
>
> Thanks, Vikash. That indeed looks fine:
>
>    org.apache.jclouds:jclouds-core:jar:1.7.3:compile
>
> I can't quite figure out how we could then have
>
>    ~[jclouds-core-1.7.2.jar:1.7.2]
>
> in the stacktrace. Hopefully someone who's more familiar with the
> OpenStack examples will be able to shed some more light on this...
>
> Regards
>
> ap
>

RE: java.lang.IllegalArgumentException: No enum constant org.jclouds.openstack.neutron.v2_0.domain.State.active

Posted by Zack Shoylev <za...@RACKSPACE.COM>.
Just in case, do you also have a wire-level log you can add? (https://jclouds.apache.org/reference/logging/)

________________________________________
From: Andrew Phillips [andrewp@apache.org]
Sent: Monday, June 23, 2014 7:25 AM
To: user@jclouds.apache.org
Subject: Re: java.lang.IllegalArgumentException: No enum constant       org.jclouds.openstack.neutron.v2_0.domain.State.active

>>     Here is the output of : http://pastie.org/9315980 *mvn
>> dependency:tree, *as u asked.

Thanks, Vikash. That indeed looks fine:

   org.apache.jclouds:jclouds-core:jar:1.7.3:compile

I can't quite figure out how we could then have

   ~[jclouds-core-1.7.2.jar:1.7.2]

in the stacktrace. Hopefully someone who's more familiar with the
OpenStack examples will be able to shed some more light on this...

Regards

ap

Re: java.lang.IllegalArgumentException: No enum constant org.jclouds.openstack.neutron.v2_0.domain.State.active

Posted by Andrew Phillips <an...@apache.org>.
>>     Here is the output of : http://pastie.org/9315980 *mvn
>> dependency:tree, *as u asked.

Thanks, Vikash. That indeed looks fine:

   org.apache.jclouds:jclouds-core:jar:1.7.3:compile

I can't quite figure out how we could then have

   ~[jclouds-core-1.7.2.jar:1.7.2]

in the stacktrace. Hopefully someone who's more familiar with the  
OpenStack examples will be able to shed some more light on this...

Regards

ap

Re: java.lang.IllegalArgumentException: No enum constant org.jclouds.openstack.neutron.v2_0.domain.State.active

Posted by f 62 <ma...@gmail.com>.
I followed following step:

1.  mvn archetype:generate -DgroupId=FourthNeutron
-DartifactId=fourthNeutron -DarchetypeArtifactId=maven-archetype-quickstart
-DinteractiveMode=false

2. Updated *pom.xml, *as attached.

3. mvn* eclipse:eclipse.*

4. Import in eclipse.

5. Wrote the attached code.

6. Run the application.






On Mon, Jun 23, 2014 at 3:57 PM, f 62 <ma...@gmail.com> wrote:

> Hi Andrew,
>
>     Here is the output of : http://pastie.org/9315980 *mvn
> dependency:tree, *as u asked.
>
> Thnx,
> Vikash
>
>
> On Mon, Jun 23, 2014 at 2:44 PM, Andrew Phillips <an...@apache.org>
> wrote:
>
>> Hi there
>>
>> It looks like you have a version conflict? From your POM, the version of
>> the jclouds OpenStack JARs will probably be 1.7.3:
>>
>>   <jclouds.version>1.7.3</jclouds.version>
>>
>> The stacktrace indicates that the jclouds core libraries are 1.7.2:
>>
>>
>>   at org.jclouds.json.internal.EnumTypeAdapterThatReturnsFrom
>> Value.deserialize(EnumTypeAdapterThatReturnsFromValue.java:44)
>> ~[jclouds-core-1.7.2.jar:1.7.2]
>>
>> Could you update your project definition so that you're using 1.7.3 for
>> all jclouds libraries? If that doesn't seem to work, could you get the full
>> dependency list by running
>>
>> mvn dependency:tree
>>
>> in your project's root directory, and putting the result in a Gist or
>> Pastie?
>>
>> Regards
>>
>> ap
>>
>>
>

Re: java.lang.IllegalArgumentException: No enum constant org.jclouds.openstack.neutron.v2_0.domain.State.active

Posted by f 62 <ma...@gmail.com>.
Hi Andrew,

    Here is the output of : http://pastie.org/9315980 *mvn dependency:tree,
*as u asked.

Thnx,
Vikash


On Mon, Jun 23, 2014 at 2:44 PM, Andrew Phillips <an...@apache.org> wrote:

> Hi there
>
> It looks like you have a version conflict? From your POM, the version of
> the jclouds OpenStack JARs will probably be 1.7.3:
>
>   <jclouds.version>1.7.3</jclouds.version>
>
> The stacktrace indicates that the jclouds core libraries are 1.7.2:
>
>
>   at org.jclouds.json.internal.EnumTypeAdapterThatReturnsFrom
> Value.deserialize(EnumTypeAdapterThatReturnsFromValue.java:44)
> ~[jclouds-core-1.7.2.jar:1.7.2]
>
> Could you update your project definition so that you're using 1.7.3 for
> all jclouds libraries? If that doesn't seem to work, could you get the full
> dependency list by running
>
> mvn dependency:tree
>
> in your project's root directory, and putting the result in a Gist or
> Pastie?
>
> Regards
>
> ap
>
>

Re: java.lang.IllegalArgumentException: No enum constant org.jclouds.openstack.neutron.v2_0.domain.State.active

Posted by Andrew Phillips <an...@apache.org>.
Hi there

It looks like you have a version conflict? From your POM, the version  
of the jclouds OpenStack JARs will probably be 1.7.3:

   <jclouds.version>1.7.3</jclouds.version>

The stacktrace indicates that the jclouds core libraries are 1.7.2:

   at  
org.jclouds.json.internal.EnumTypeAdapterThatReturnsFromValue.deserialize(EnumTypeAdapterThatReturnsFromValue.java:44)  
~[jclouds-core-1.7.2.jar:1.7.2]

Could you update your project definition so that you're using 1.7.3  
for all jclouds libraries? If that doesn't seem to work, could you get  
the full dependency list by running

mvn dependency:tree

in your project's root directory, and putting the result in a Gist or Pastie?

Regards

ap


Re: java.lang.IllegalArgumentException: No enum constant org.jclouds.openstack.neutron.v2_0.domain.State.active

Posted by f 62 <ma...@gmail.com>.
FYI,

    The error log:

11:13:01.022 [main] ERROR o.j.o.n.v.f.ParseNetworkDetails - Error parsing
input
java.lang.IllegalArgumentException: No enum constant
org.jclouds.openstack.neutron.v2_0.domain.State.active
    at java.lang.Enum.valueOf(Enum.java:236) ~[na:1.7.0_25]
    at
org.jclouds.json.internal.EnumTypeAdapterThatReturnsFromValue.deserialize(EnumTypeAdapterThatReturnsFromValue.java:44)
~[jclouds-core-1.7.2.jar:1.7.2]
    at
org.jclouds.json.internal.EnumTypeAdapterThatReturnsFromValue.deserialize(EnumTypeAdapterThatReturnsFromValue.java:35)
~[jclouds-core-1.7.2.jar:1.7.2]
    at com.google.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:58)
~[gson-2.2.4.jar:na]
    at
org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$ParameterReader.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:263)
~[jclouds-core-1.7.2.jar:1.7.2]
    at
org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:175)
~[jclouds-core-1.7.2.jar:1.7.2]
    at
org.jclouds.json.internal.NullFilteringTypeAdapterFactories$IterableTypeAdapter.readAndBuild(NullFilteringTypeAdapterFactories.java:92)
~[jclouds-core-1.7.2.jar:1.7.2]
    at
org.jclouds.json.internal.NullFilteringTypeAdapterFactories$IterableTypeAdapter.read(NullFilteringTypeAdapterFactories.java:84)
~[jclouds-core-1.7.2.jar:1.7.2]
    at
org.jclouds.json.internal.NullFilteringTypeAdapterFactories$IterableTypeAdapter.read(NullFilteringTypeAdapterFactories.java:63)
~[jclouds-core-1.7.2.jar:1.7.2]
    at
org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$ParameterReader.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:263)
~[jclouds-core-1.7.2.jar:1.7.2]
    at
org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:175)
~[jclouds-core-1.7.2.jar:1.7.2]
    at com.google.gson.Gson.fromJson(Gson.java:803) ~[gson-2.2.4.jar:na]
    at com.google.gson.Gson.fromJson(Gson.java:768) ~[gson-2.2.4.jar:na]
    at com.google.gson.Gson.fromJson(Gson.java:717) ~[gson-2.2.4.jar:na]
    at org.jclouds.json.internal.GsonWrapper.fromJson(GsonWrapper.java:45)
~[jclouds-core-1.7.2.jar:1.7.2]
    at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:84)
~[jclouds-core-1.7.2.jar:1.7.2]
    at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:78)
~[jclouds-core-1.7.2.jar:1.7.2]
    at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:64)
~[jclouds-core-1.7.2.jar:1.7.2]
    at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:44)
~[jclouds-core-1.7.2.jar:1.7.2]
    at
com.google.common.base.Functions$FunctionComposition.apply(Functions.java:210)
~[guava-15.0.jar:na]
    at
org.jclouds.rest.internal.InvokeHttpMethod.invoke(InvokeHttpMethod.java:93)
~[jclouds-core-1.7.2.jar:1.7.2]
    at
org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:76)
~[jclouds-core-1.7.2.jar:1.7.2]
    at
org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:47)
~[jclouds-core-1.7.2.jar:1.7.2]
    at
org.jclouds.reflect.FunctionalReflection$FunctionalInvocationHandler.handleInvocation(FunctionalReflection.java:117)
~[jclouds-core-1.7.2.jar:1.7.2]
    at
com.google.common.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:79)
~[guava-15.0.jar:na]
    at com.sun.proxy.$Proxy49.listInDetail(Unknown Source) ~[na:na]
    at FirstNeutron.listNetworks(FirstNeutron.java:48) ~[neutron1/:na]
    at FirstNeutron.main(FirstNeutron.java:22) ~[neutron1/:na]
java.lang.IllegalArgumentException: No enum constant
org.jclouds.openstack.neutron.v2_0.domain.State.active
    at java.lang.Enum.valueOf(Enum.java:236)
    at
org.jclouds.json.internal.EnumTypeAdapterThatReturnsFromValue.deserialize(EnumTypeAdapterThatReturnsFromValue.java:44)
    at
org.jclouds.json.internal.EnumTypeAdapterThatReturnsFromValue.deserialize(EnumTypeAdapterThatReturnsFromValue.java:35)
    at com.google.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:58)
    at
org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$ParameterReader.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:263)
    at
org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:175)
    at
org.jclouds.json.internal.NullFilteringTypeAdapterFactories$IterableTypeAdapter.readAndBuild(NullFilteringTypeAdapterFactories.java:92)
    at
org.jclouds.json.internal.NullFilteringTypeAdapterFactories$IterableTypeAdapter.read(NullFilteringTypeAdapterFactories.java:84)
    at
org.jclouds.json.internal.NullFilteringTypeAdapterFactories$IterableTypeAdapter.read(NullFilteringTypeAdapterFactories.java:63)
    at
org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$ParameterReader.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:263)
    at
org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:175)
    at com.google.gson.Gson.fromJson(Gson.java:803)
    at com.google.gson.Gson.fromJson(Gson.java:768)
    at com.google.gson.Gson.fromJson(Gson.java:717)
    at org.jclouds.json.internal.GsonWrapper.fromJson(GsonWrapper.java:45)
    at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:84)
    at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:78)
    at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:64)
    at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:44)
    at
com.google.common.base.Functions$FunctionComposition.apply(Functions.java:210)
    at
org.jclouds.rest.internal.InvokeHttpMethod.invoke(InvokeHttpMethod.java:93)
    at
org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:76)
    at
org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:47)
    at
org.jclouds.reflect.FunctionalReflection$FunctionalInvocationHandler.handleInvocation(FunctionalReflection.java:117)
    at
com.google.common.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:79)
    at com.sun.proxy.$Proxy49.listInDetail(Unknown Source)
    at FirstNeutron.listNetworks(FirstNeutron.java:48)
    at FirstNeutron.main(FirstNeutron.java:22)



On Mon, Jun 23, 2014 at 11:30 AM, f 62 <ma...@gmail.com> wrote:

> HI,
>
>    I am new to JClouds. I was trying one quick sample code to test neutron
> API. I tried fro list network. But I got *java.lang.IllegalArgumentException:
> No enum constant org.jclouds.openstack.neutron.v2_0.domain.State.active *exception.
> I can see in the terminal all the list of network and it happened at the
> the time of formatting. Any Help ? I am attaching the java and pom file.
>
>
> Thnx
>