Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-3615

Updating from 3.11.X to 3.12.X breaks

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Declined
    • Icon: Major - P3 Major - P3
    • None
    • 3.12.0, 3.12.1
    • None
    • None

    Description

      When I try to upgradeĀ mongo-java-driver from 3.11.X to 3.12.X. The following code breaks.

      @RunWith(SpringJUnit4ClassRunner.class)
      @ContextConfiguration("classpath:spring-mvc-servlet.xml")
      public class DatabaseTest {
       
      	@Autowired
      	private IPersonService personService;
      	
      	@Test
      	public void testConnection() {
      		try {
      			personService.findById("1");
      		} catch (Exception e) {
      			System.out.println("!!!!!!!!");
      			fail("Database connection failed!");
      		}
      	}
      }
      

      public interface IPersonService {
       
      	Person findById(String id);
      }
      

      public class Person {
          private String id;
      }
      

      The test should pass, but it failed with the error "Database connection failed!"
      The related configuration files are in the attachment.

      Attachments

        1. mongodb-config.xml
          1.0 kB
        2. spring-mvc-servlet.xml
          1 kB

        Activity

          People

            jeff.yemin@mongodb.com Jeffrey Yemin
            xia0c512@gmail.com Lingchao Chen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: