Consider this situation:
I have a class A and B and C.
Class B extends abstract class A and class C want to use class B as a member to perform operations.
@Service
public abstract class A{
}
@Component
public class B extends A{
}
@Service
Public class C {
private class B b;
@Autowired
public C(Class B b){ // constructor
this.b = b;
}
private void setB(B b){
this.b = b;
}
private B getB(){
return b;
}
}
When ever I try to do a component scan, the tomcat does not load. I have already successful inject beans in this way for non inherit objects.
The error I receive is a listen start error:
Jun 14, 2015 12:09:04 PM org.apache.catalina.core.StandardContext startInternal SEVERE: Error listenerStart Jun 14, 2015 12:09:04 PM org.apache.catalina.core.StandardContext startInternal SEVERE: Context [] startup failed due to previous errors Jun 14, 2015 12:09:05 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
Thanks for the assistance.
There was a dependencies issue I was able to print the tomcat stack trace by adding a logging.properties file in the WEB-INF/conf
with this value:
org.apache.catalina.core.ContainerBase.[Catalina].level = INFO org.apache.catalina.core.ContainerBase.[Catalina].handlers = java.util.logging.ConsoleHandler