Comments (4)
Hi
This is very strange, I can not reproduce this issue. Also MultiValueMap is definitely part of spring-core and spring-web is definitely included in pom. See dependency tree below:
--- maven-dependency-plugin:2.8:tree (default-cli) @ wp-api-v2-client-java ---
[INFO] com.afrozaar.wordpress:wp-api-v2-client-java:jar:4.14.0-SNAPSHOT
[INFO] +- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.13:compile
[INFO] | - org.codehaus.jackson:jackson-core-asl:jar:1.9.13:compile
[INFO] +- junit:junit:jar:4.11:test
[INFO] | - org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] +- com.fasterxml.jackson.core:jackson-annotations:jar:2.6.5:compile
[INFO] +- com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:jar:2.6.5:compile
[INFO] | +- com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:jar:2.6.5:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-core:jar:2.6.5:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-databind:jar:2.6.5:compile
[INFO] | - com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.6.5:compile
[INFO] +- org.assertj:assertj-core:jar:3.0.0:compile
[INFO] +- org.springframework:spring-web:jar:4.1.7.RELEASE:compile
[INFO] | +- org.springframework:spring-aop:jar:4.1.7.RELEASE:compile
[INFO] | | - aopalliance:aopalliance:jar:1.0:compile
[INFO] | +- org.springframework:spring-beans:jar:4.1.7.RELEASE:compile
[INFO] | +- org.springframework:spring-context:jar:4.1.7.RELEASE:compile
[INFO] | | - org.springframework:spring-expression:jar:4.1.7.RELEASE:compile
[INFO] | - org.springframework:spring-core:jar:4.1.7.RELEASE:compile
[INFO] +- com.google.guava:guava:jar:18.0:compile
[INFO] +- org.slf4j:slf4j-api:jar:1.7.12:compile
[INFO] +- ch.qos.logback:logback-classic:jar:1.1.3:compile
[INFO] | - ch.qos.logback:logback-core:jar:1.1.3:compile
[INFO] +- org.yaml:snakeyaml:jar:1.15:compile
[INFO] +- com.github.tomakehurst:wiremock:jar:1.55:test
[INFO] | +- org.apache.httpcomponents:httpclient:jar:4.3.5:test
[INFO] | | +- org.apache.httpcomponents:httpcore:jar:4.3.2:test
[INFO] | | - commons-codec:commons-codec:jar:1.6:test
[INFO] | +- xmlunit:xmlunit:jar:1.5:test
[INFO] | +- org.mortbay.jetty:jetty:jar:6.1.26:test
[INFO] | | +- org.mortbay.jetty:jetty-util:jar:6.1.26:test
[INFO] | | - org.mortbay.jetty:servlet-api:jar:2.5-20081211:test
[INFO] | +- org.skyscreamer:jsonassert:jar:1.2.3:test
[INFO] | | - org.json:json:jar:20090211:test
[INFO] | +- com.jayway.jsonpath:json-path:jar:0.8.1:test
[INFO] | | +- net.minidev:json-smart:jar:1.1.1:test
[INFO] | | - commons-lang:commons-lang:jar:2.6:test
[INFO] | - net.sf.jopt-simple:jopt-simple:jar:4.7:test
[INFO] +- commons-beanutils:commons-beanutils-core:jar:1.8.3:compile
[INFO] | - commons-logging:commons-logging:jar:1.1.1:compile
[INFO] +- com.google.code.findbugs:jsr305:jar:3.0.1:compile
[INFO] - org.testcontainers:testcontainers:jar:1.7.3:test
[INFO] +- org.slf4j:slf4j-ext:jar:1.7.25:test
[INFO] +- org.jetbrains:annotations:jar:15.0:test
[INFO] +- javax.annotation:javax.annotation-api:jar:1.3.1:test
[INFO] +- org.apache.commons:commons-compress:jar:1.16.1:test
[INFO] | - org.objenesis:objenesis:jar:2.6:test
[INFO] +- javax.xml.bind:jaxb-api:jar:2.3.0:test
[INFO] +- org.rnorth.duct-tape:duct-tape:jar:1.0.7:test
[INFO] +- org.rnorth.visible-assertions:visible-assertions:jar:2.1.0:test
[INFO] | - net.java.dev.jna:jna:jar:4.5.0:test
[INFO] - org.rnorth:tcp-unix-socket-proxy:jar:1.0.2:test
[INFO] +- com.kohlschutter.junixsocket:junixsocket-native-common:jar:2.0.4:test
[INFO] | +- org.scijava:native-lib-loader:jar:2.0.2:test
[INFO] | - log4j:log4j:jar:1.2.17:test
[INFO] - com.kohlschutter.junixsocket:junixsocket-common:jar:2.0.4:test
from wp-api-v2-client-java.
I can also send the full log of maven compile evening. Can you attach the builded jar, please?)) I really need it today))) Thanks in advance.
from wp-api-v2-client-java.
from wp-api-v2-client-java.
Thank you so much!
I have included this jar to the test project and get the same Exception -
Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/util/MultiValueMap
at com.afrozaar.wordpress.wpapi.v2.config.ClientFactory.fromConfig(ClientFactory.java:12)
at wpTest.WP.main(WP.java:21)
Caused by: java.lang.ClassNotFoundException: org.springframework.util.MultiValueMap
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
Caused by: java.lang.ClassNotFoundException: org.springframework.util.MultiValueMap
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 2 more
Here is the simple project:
https://github.com/azerphoenix/wpTestJavaClient
This code works well with version 4.8.3 wich was on mvnrepository. Also I have tested this code with Java 1.8 Oracle, Java 1.8 OpenJDK, Java 11 OpenJDK.
To make it work I have also included this libraries into Gradle build
compile fileTree(include: ['*.jar'], dir: 'libs')
// https://mvnrepository.com/artifact/org.springframework/spring-core
compile group: 'org.springframework', name: 'spring-core', version: '4.1.7.RELEASE'
// https://mvnrepository.com/artifact/org.springframework/spring-web
compile group: 'org.springframework', name: 'spring-web', version: '4.1.7.RELEASE'
// https://mvnrepository.com/artifact/org.slf4j/slf4j-api
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.12'
// https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core
compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.6.5'
// https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.6.5'
// https://mvnrepository.com/artifact/com.google.guava/guava
compile group: 'com.google.guava', name: 'guava', version: '18.0'
Also per my check there is other problem in 4.8.3 & 4.14.0 versions.
final Post post = PostBuilder.aPost()
.withTitle(aTitle().withRendered(articleName).build())
.withContent(ContentBuilder.aContent().withRendered(articleContent).build())
.withLink(articleSlug)
.withSlug(articleSlug)
.withCategories(catIds)
.build();
Methods withLink() & withSlug() not working. WordPress generates slugs itself.
from wp-api-v2-client-java.
Related Issues (20)
- Add support for using a custom base context
- Creating media using ByteArrayResource causes HTTP/400 response. HOT 1
- Allow specifying request context (view | edit | embed) when requesting Media HOT 4
- 401 : rest_cannot_create HOT 1
- Can this be used to add podcast episodes to PowerPress? HOT 6
- Searching for posts by status draft
- Any existed api for wpClient.getAllPosts()? HOT 2
- Any existed api for wpClient.getAllPostsByAuthorNameOrId()?
- Can not create ParsedRestException HOT 4
- Implementing post meta crud HOT 1
- Is the project still maintained? HOT 5
- Some questions about WP API V2 Client
- getPost(id, "embed") does not work
- Error: No content to map due to end-of-input HOT 4
- While Creating / Updating post "slug" value gets ignored. HOT 1
- 401 unauthorized error HOT 2
- UTF8 characters - Latin Diacritics are not rendering properly HOT 1
- RestClientException when trying to create a post HOT 2
- Maven repositories are password protected HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wp-api-v2-client-java.