Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7864639
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T23:50:37+00:00 2026-06-02T23:50:37+00:00

i am trying to access a Rest Resource for which i am able to

  • 0

i am trying to access a Rest Resource for which i am able to test using curl
id length should be 11 charecters
if id’s length is less than 11 for example ‘12345’
https://somesite.com:7677/something/id/{id} iam getting 404 HTTP Error from my java code and curl which is as expected

if id’s length is equal to 11 and it is invalid id
then iam getting the same responce from curl and java

but if i give the valid id which is alredy present by curl
i am getting proper json response but when iam trying to access the Rest resource from restTemplate it is showing the error as shown below

The request sent by the client was syntactically incorrect (). and there are no error logs for this request

Iam not able to figure it out from last 2 days, please provide your thoughts on this so that it will eb really help full for me
My rest template configuration:

<bean id="restTemplate" class="org.springframework.web.client.RestTemplate">
        <property name="messageConverters">
            <list>
                <ref bean="jsonHttpMessageConverter" />
            </list>
        </property>
    </bean>

Code which from which iam trying to access is

public List<Account> getAccounts(PersonNumber personNumber) {
        logger.warn("Inside getAccounts of TransferAgreement client");

        String url = "https://somesite.com:7677/something/id/12345";
        logger.warn("URL acessing "+personNumber.toString()+"  URL  "+ url);
       String a = restTemplate.getForObject(url, String.class);
       System.out.println(a);
        return null;
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T23:50:38+00:00Added an answer on June 2, 2026 at 11:50 pm

    Assume that you are using Eclipse.

    Enable logging for Spring

    • set logging level to debug or trace for Spring, see Logging
    • run your java example
    • add the logging output to your post

    I think that enabling logging is enough, I expect an exception within Spring. But additionally, test if a request is executed:

    • setup a proxy, see how-to-trace-soap-message-in-eclipse-ide – don’t care if it is REST or SOAP, it is a TCP/IP monitor
    • run your curl example
    • run your java example
    • add both requests to your post
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to access rest service using ajax. If I'll paste this link on
I'm currently trying to access a REST API for the first time using visual
I'm trying to access an OAuth-protected resource on Google App Engine using a Java/Groovy
I'm trying to build a REST api(using Restler) which takes in username and password
I have a bugzilla server which i am trying to access through the rest
I am trying access a REST API. I can get it working in Curl/REST
I'm trying to access the REST Disqus API using the following url: http://disqus.com/api/3.0/threads/listPosts.json ?api_key=myKey
I have a REST API that I am trying to access using Rails 3.0.1
I'm trying to use HTTPWebRequest to access a REST service, and am having problems
I'm trying to access list data using SSRS 2008. I have created an XML

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.