Chitika

Tuesday, December 30, 2014

Failed to read candidate component class

I was having following error,

Failed to read candidate component class: file [/a/b/c/z$1.class]; nested exception is java.lang.SecurityException: Prohibited package name: java.lang: Prohibited package name: java.lang applicationContext-jpa.xml /im4/src/main/resources/META-INF/spring line 5 Spring Beans Problem

When clicked on it, it opens applicationContext-jpa.xml, with line <repositories base-package="a.b.c" />

Looking into the code of z.java, it is found out that it is util class having package a.b.c, which spring scans for beans.

Changing the package to a.b.z resolves the issue.

No comments:

Post a Comment