eclipse-lyo / lyo.client

Lyo project repository (lyo.client)
11 stars 16 forks source link

NoSuchFieldError: EXCLUDE_EMPTY #47

Closed berezovskyi closed 5 years ago

berezovskyi commented 5 years ago

With the new client in place of the old one, I am getting the following exception:

java.lang.NoSuchFieldError: EXCLUDE_EMPTY
    at org.glassfish.jersey.client.ClientConfig$State.<init>(ClientConfig.java:150)
    at org.glassfish.jersey.client.ClientConfig.<init>(ClientConfig.java:468)
    at org.glassfish.jersey.client.JerseyClientBuilder.<init>(JerseyClientBuilder.java:94)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at javax.ws.rs.client.FactoryFinder.newInstance(FactoryFinder.java:114)
    at javax.ws.rs.client.FactoryFinder.find(FactoryFinder.java:209)
    at javax.ws.rs.client.ClientBuilder.newBuilder(ClientBuilder.java:94)
    at org.eclipse.lyo.oslc4j.client.OslcClient.<init>(OslcClient.java:101)
berezovskyi commented 5 years ago

https://github.com/ContainX/openstack4j/issues/123#issuecomment-370926616 suggests it might be simply due to jersey-common missing.

@jadelkhoury did you have a similar error before?

berezovskyi commented 5 years ago

Can confirm, jersey-common does not fix it.

berezovskyi commented 5 years ago

Correction: jersey-common did fix it, the problem was actually Jersey version mismatch.