I am creating a Maven Spring project, which includes MVC, Data and Security. My Spring applicationContext-*.xml files are located at \\src\\main\\resources\\spring\\
My
The problem is insufficient memory to load context.
Try to set VM options:
-da -Xmx2048m -Xms1024m -XX:MaxPermSize=2048m
Add in in pom.xml give the following plugin:
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.10</version>
<configuration>
<useFile>false</useFile>
</configuration>
</plugin>
try as below
@ContextConfiguration (locations = "classpath*:/spring/applicationContext*.xml")
this will load all 3 of your application context xml file.
I faced the same error and realized that pom.xml had java 1.7 and STS compiler pointed to Java 1.8. Upon changing compiler to 1.7 and rebuild fixed the issue.
PS: This answer is not related to actual question posted but applies to similar error for app Context not loading
For me, I was missing @ActiveProfile at my test class
@ActiveProfiles("sandbox")
class MyTestClass...
If you are using intellij, then try restarting intellij cache
See if it works, it worked for me.