Forum Discussion

pbeaumont's avatar
New Contributor
10 years ago

TypeNotPresentExceptionProxy error when launching JUnit automation

When I launch a test with an automation JUnit (Selenium), it fails under specific conditions.


Working: If I launch using Maven Project without specifying a Test Class, it runs every test found in the project and this functions perfectly.

Failing: However, when I specify a test class (still using Maven Project), the test fails with an TypeNotPresentExceptionProxy error.


* Running without the Use Maven Project checkbox is not really viable, the classpath would be impossibly long.


Here is the stack trace:

1) initializationError(com.MyTestClass)
java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
at sun.reflect.annotation.AnnotationParser.parseClassArray(
at sun.reflect.annotation.AnnotationParser.parseArray(
at sun.reflect.annotation.AnnotationParser.parseMemberValue(
at sun.reflect.annotation.AnnotationParser.parseAnnotation2(
at sun.reflect.annotation.AnnotationParser.parseAnnotations2(
at sun.reflect.annotation.AnnotationParser.parseAnnotations(
at java.lang.Class.initAnnotationsIfNecessary(
at java.lang.Class.initAnnotationsIfNecessary(
at java.lang.Class.initAnnotationsIfNecessary(
at java.lang.Class.getAnnotation(
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(
at org.junit.runner.Computer.getRunner(
at org.junit.runner.Computer$1.runnerForClass(
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(
at org.junit.runners.model.RunnerBuilder.runners(
at org.junit.runners.model.RunnerBuilder.runners(
at org.junit.runners.Suite.(
at org.junit.runner.Computer.getSuite(
at org.junit.runner.Request.classes(
at org.junit.runner.JUnitCore.runMain(
at org.junit.runner.JUnitCore.runMainAndExit(
at org.junit.runner.JUnitCore.main(


Information that might be useful:

- The project is local on the host. 

- The projects normally builds as a war

- The project uses spring 4, with annotations and spring boot

- We use QA Complete 10


Looking over I found that this error is likely to occur when using annotions with specified classes as parameter on test classes.


I our case, our test class has the following annotations:


@SpringApplicationConfiguration(classes = { TomcatApplication.class })
@IntegrationTest({ "server.port:0", "spring.datasource.platform=fonc" })
public class MyTestClass{




I cannot really change the use of these annotations in my project, so I would like to understand what can be done to have the test work with only one specified test class.

No RepliesBe the first to reply