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 6118443
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:26:13+00:00 2026-05-23T15:26:13+00:00

This is driving me nuts. I have a simple spring app with just a

  • 0

This is driving me nuts. I have a simple spring app with just a servlet context file configured like this:

<context:component-scan base-package="au.com.mypackage.service" />
<context:annotation-config />
<mvc:annotation-driven />

And a simple controller:

@Controller
public class MyController {

    @RequestMapping(value = "/data/{id}", method=RequestMethod.GET)
    @ResponseBody public Bean getData(@PathVariable String id) {
        Bean bean = new Bean();
        bean.setSomething("hello");
        bean.setSomethingElse(5);
        return bean;
    }

Which makes use of message converters to do it’s work. I then submit this request from SoapUI:

GET http://localhost:8080/spring/data/123 HTTP/1.1

Accept-Encoding: gzip,deflate

Accept: application/json

User-Agent: Jakarta Commons-HttpClient/3.1

Host: localhost:8080

And it appears to work ok. BUT, when I look in the tomcat logs I see that the controller is called twice. This is ok for JSON. But when I switch to requesting XML it goes horribly wrong. The second request (which should not happen anyway) triggers as massive error in XStream because of socket closures, etc.

The root of the problem is the calling of the controller twice. Does anyone know why this would be happening?

  • 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-05-23T15:26:14+00:00Added an answer on May 23, 2026 at 3:26 pm

    Solved it. The problem seems to be SoapUI. I switched to WizTools RESTClient and the double calls stopped. I don’t know why SoapUI was doing this, although I got the impression the second call was always for XML regardless of what the first call was for.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm sure this is simple but it's driving me nuts. I have a ListBox
This is driving me nuts... I have an input string like so: String input
So this has just been driving me nuts! I have looked through tons of
This must be something simple but it's driving me nuts! I have a migration
This is really simple, though still driving my nuts. I have a uitableview where
This is really driving me nuts, I have a datagridview bound to a bindingsource,
NHibernate is driving me 'Nuts'!!! I have the following mapping. Which returns this error
Ok, this is driving me nuts. I've done just about everything I can to
Ok, this is driving me nuts... I'm trying to rewrite my urls like this:
This is driving me nuts. I have a working text based application. It has

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.