I'm using spring social in my project. I already completed integration with facebook and twitter, but had trouble with linkedin.
if I try create connection:
Connection <LinkedIn> connection = connectionFactory.createConnection(accessToken);
then I have this exception:
java.lang.NoSuchMethodError:
org.codehaus.jackson.map.SerializationConfig.withSerializationInclusion(Lorg/codehaus/jackson/map/annotate/JsonSerialize$Inclusion;)Lorg/codehaus/jackson/map/SerializationConfig;
I already tried use different versions of spring-social-linkedin and different version of jackson lib (v 1.9.2 and above) but unsuccessful.
Can anyone tell me how resolve this trouble?
The method is available since v1.9 of the API.
The only reason this can happen is that you are compiling against the right libraries at compile time, but at runtime this method is unavailable. There is a stale version (< 1.9) of the library on your classpath somewhere.
withSerializationInclusion
public SerializationConfig withSerializationInclusion(JsonSerialize.Inclusion incl)
Since:
1.9
Related
Migrated to openApi3 SpringBoot project. But I'm not able to get swagger ui page while /v3/api-docs/ url working. But swagger url showing 404 not found. I'm also able to access /v3/api-docs/swagger-config/.
I'm using springdoc-openapi-ui dependency having version 1.6.11. I tried every possible way. For one time UI was displaying somehow but after restarting server it disappears. FYI, I've implemented SwaggerConfig.java and ConfigWebSecurity.java for ignoring url from spring security.In short i have implemented all those things which is mentioned for migration from swagger to openApi3 in official documentation.
FYI -
I have migrated 2 other applications by following same process. But for this app I'm facing this issue.
Thank in advance
what url are you trying for ui page ?
Try using localhost:YourPort/swagger-ui.html .
We use fabric8-maven-plugin to manage the full lifecycle of all of our kubernetes services. We are having a problem upgrading statefulsets (similar to this post but we dont use the kubernetes-client). The version of the maven plugin is 4.3.1. We have no issues with daemonsets but I just cant find a way to update statefulsets. We get the same error as the afore mentioned post.
Forbidden: updates to statefulset spec for fields other than 'replicas', 'template', and 'updateStrategy' are forbidden..
I have tried to set the updateStrategy to rolling but that doesn't seem to do anything.
Thanks Paul
I am using Eclipse Luna (versions 4.4.2) and Glassfish 4 to build a REST web-app using JAX-RS.
All POST and PUT operations, which were previously working fine, are now throwing this error on the webserver:
Warning: StandardWrapperValve[Jersey Web Application]: Servlet.service() for servlet Jersey Web Application threw exception
java.lang.ClassNotFoundException: javax.xml.parsers.ParserConfigurationException not found by org.eclipse.persistence.moxy
I have found out (in the comments here: https://java.net/jira/browse/JERSEY-2888) that it has been fixed in EclipseLink 2.6.1 and Jersey 2.19.
I have updated to Jersey 2.22.1.
Eclipselink 2.6.1 has been released on Oct 15th 2015, as you can see here: http://www.eclipse.org/eclipselink/releases/
However, as you can see here, it doesn't seem to have been incorporated into eclipse for "help -> update software": http://download.eclipse.org/rt/eclipselink/updates/
Does anybody know how to get 2.6.1 working with Eclipse? At the moment, it is preventing me from completing my application, and this problem I've had for 4 weeks.
Or is there another way to fix it?
All help much appreciated...
File a bug report at https://bugs.eclipse.org/bugs/enter_bug.cgi?product=EclipseLink indicating that it's neither in the main repository nor downloadable as a P2 repository on its own.
I am coding my first web app in java and got stuck in db stuff. Followed two tutorials (ref: https://netbeans.org/kb/docs/web/mysql-webapp.html and part1:http://www.javaguicodexample.com/javawebmysqljspjstljsf5.html part2: http://www.javaguicodexample.com/javawebmysqljspjstljsf5_1.html) and got the same issue regarding db config. Crosschecked multiple times and found that mysql-connector-java-5.1.23-bin.jar is there in the desired path and configured properly but is not deployed on running the app. Due to this getting TABLE/VIEW not found.
Kindly help as I am debugging by crosschecking the steps of the provided manuals but its not sufficient.
If you are receiving "TABLE/VIEW not found" that means application is successful in making database connection. There is no such table/view exists in the database.
Regarding dependencies, I would suggest to use some build tool like maven or gradle to make sure all dependencies and versions are managed properly
Hi I am currently using the JodaTime library in my NetBeans restful web services on GlassFish Server using Jackson libraries.
I get a java.lang.NoClassDefFoundError for org/joda/time/ReadablePartial when I try to create an instance of a class that uses the JodaTime library in one of the Resource files.
E.g:
In the studentResource file:
Controller c = new Controller();
Where the Controller class imports and uses JodaTime libraries
I have checked that the libraries I needed are in the project.
In fact, if I run a separate project outside of the restful web services, everything runs smoothly. Is there an additional classpath issue that I have to address?
In case someone stumbles upon the same problem using Spring:
This problem comes up if you are trying to map JSON to a Java object using Jackson either via #RequestBody annotation on controller parameter or manually deserializing using an ObjectMapper().readValue(json, Class.class). Everything works fine on local machine but when deploying application to GlassFish deserialization fails.
Keeg's workaround to copy Joda-Time.jar to glassfish/modules and restarting fixes the issue.
There seems to be a bug open on Jira about this issue:
https://java.net/jira/browse/GLASSFISH-20808
Just in case someone else stumbles upon this problem, we had a similar issue with the combination of Glassfish 3.1.1, Jersey and use of Joda time. Stacktraces like this:
Caused by: java.lang.ClassNotFoundException: org.joda.time.ReadableInstant not found by jackson-mapper-asl [128]
at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1460)
etc.
The workaround I just found was dumping a copy of our joda-time jar into glassfish/modules. Not exactly pretty, but...
Ok I found the solution. Apparently all I needed to do was to move the jar file up in the list of libraries/jar files. I do that in the library tab in the project's properties. More specifically, the jar file has to be moved above the REST libraries.