Debug web app classpath problems
I have a Spring project named AppGen, building with Maven, that worked fine in STS 2.9.2.RELEASE.
I refactored a bit and moved some classes to a second project named commons.rest and added a dependency
to it from AppGen/pom.xml - compiles/validates fine in Eclipse.
However, after this refactoring, when I launch tc Server, I get classloader exceptions, shown at the bottom
The Servers view in STS shows the server, with AppGen [Synchronized] and when I expand that,
it shows commons.rest [Synchronized] beneath AppGen. (The class com.sas.commons.rest.Collection exists in commons.rest in src/main/java.)
How do I figure out what's broken - i.e. what the constructed classpath is, and why my class is not found?
if I close the commons.rest project (so that AppGen reconfigures its Maven class path to use the jar in the Maven repo instead of the commons.rest classes directory), the app starts up correctly. But I want to keep both projects open for developing/testing.
Is this an STS problem, or an Eclipse WebTools problem, or something else?
thanks
traceback:
Code:
java.lang.ClassNotFoundException: com.sas.commons.rest.Collection
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1701)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1546)
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
at java.lang.Class.getDeclaredMethods(Class.java:1791)
at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findPersistenceMetadata(PersistenceAnnotationBeanPostProcessor.java:383)
at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(PersistenceAnnotationBeanPostProcessor.java:321)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyMergedBeanDefinitionPostProcessors(AbstractAutowireCapableBeanFactory.java:830)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:493)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)