Skip to content

Seeing NullPointerException on latest 2.4.1-Beta version #895

@prabhushrikant

Description

@prabhushrikant

Expected behavior

  • Controller tests should pass but instead started receiving Nullpointer exception.

Actual behavior

java.lang.NullPointerException at com.microsoft.applicationinsights.web.internal.WebRequestTrackingFilter.doFilter

To Reproduce

  • Write a simple controller test
  • Try to execute the same
@WebMvcTest(value = SimpleController.class, secure = false)
@ContextConfiguration(classes = {ControllerTestInitializer.class})
@Slf4j
public class SimpleControllerTests {

  @Autowired
  private MockMvc mockMvc;

@Test
  public void testGetVersionSuccess() throws Exception { 
    <...test logic >
}

Sample Application

If applicable, provide a sample application which reproduces the issue.

System information

Please provide the following information:

  • SDK Version: Java 1.8u202
  • OS type and version: Ubuntu Linux 1604
  • Application Server type and version (if applicable): Tomcat 9.0.16
  • Using spring-boot? Yes , Spring boot 2.1.3
  • Additional relevant libraries (with version, if applicable): Guice

Logs

java.lang.NullPointerException at com.microsoft.applicationinsights.web.internal.WebRequestTrackingFilter.doFilter

Metadata

Metadata

Assignees

No one assigned

    Labels

    Spring Boot StarterSpring boot starter issues, feature asks and questions

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions