Comments (2)
Hi @sidneyrens, I had the same problem using Eclipse STS, then I googled the error and found a solution:
java.lang.IllegalArgumentException: Invalid character found in method name [0x160x030x010x000xf70x010x000x000xf30x030x03H0x160xe30xc9Z0x1cr0xc00xc60x7f0x05Y0x08[0x150xa70xaf0xa70xdc0x1b0xf9'0xa5q0x8d;0xe10xd20x180xca0x840xe8 ]. HTTP method names must be tokens
It has to do with using https / http ->
Employee API makes the following call:
$ curl -v localhost:8080/employees
or
$ curl -v https://localhost:8080/employees
Orders API makes the following call:
$ curl -v http://localhost:8080/orders
Essentially, swapping "http" with "https" will fix the problem.
😎
from tut-rest.
Hi @sidneyrens. Thank you for the issue. I think I see the problem.
The Problem
class you linked to comes from the Spring Framework project. You are correct that this class does not have a create()
method, so that code would cause an error.
The correct Problem
class should be the one that comes from the Spring HATEOAS project. This one does have an implementation of create()
.
While the code has the correct implementation in the form of the import:
import org.springframework.hateoas.mediatype.problem.Problem;
The text in the README
doesn't call out the imports explicitly, leaving it to the user and their IDE to infer.
I will close the issue for now as I don't think it is a bug. If others have the same issue we can revisit the README
and add the import explicitly like we've done in other situations.
from tut-rest.
Related Issues (20)
- Complete Building REST services with Spring tutorial with OrderNotFoundAdvice Class HOT 1
- Misleading Put method in non-REST EmployeeController HOT 1
- Confused by DELETE http://localhost:8080/orders/4/cancel HOT 1
- isse in postman to post mapping HOT 2
- unable to proceed when adding links in one method of EmployeeController class HOT 1
- Error: The method methodOn(Class) is undefined for the type EmployeeController. HOT 4
- Error: java.lang.IllegalArgumentException: Invalid character found in method name [] . HTTP method names must be tokens HOT 3
- Missing Code Snippets in README.md HOT 1
- Logging of preloading data has changed HOT 1
- Link to HAL returns 404 HOT 3
- Package imports for Jakarta are not correct with latest version of Spring Boot HOT 1
- Employee.java imports javax.persistence-api.* not found HOT 2
- Mentioning correct curl commands for Windows HOT 1
- Not a managed entity error HOT 5
- 415 when attempting to post json object HOT 2
- warning: You aren't using a compiler supported by lombok, so lombok will not work and has been disabled. Your processor is: org.gradle.api.internal.tasks.compile.processing.IncrementalProcessingEnvironment Lombok supports: OpenJDK javac, ECJ HOT 3
- Duplicated, outdated tutorial HOT 5
- EntityModel is Deprecated
- Improvements for beginners HOT 6
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 tut-rest.