spring mvc - Tomcat doesn't seem to be picking up jars in my WEB-INF/lib folder -
i have maven pom builds required libraries web-inf/lib folder, packages war. when try deploy war, tomcat throws many classnotfoundexceptions - latest 1 being "java.lang.classnotfoundexception: javax.xml.bind.annotation.accessororder"; way i've found fix copy required library files web-inf/lib folder , tossing them tomcat/lib, can't correct way of doing it.
is there have tomcat make in web-inf/lib folders? there have in source tell tomcat there? stuck having have tomcat/lib folder filled 50+ jars?
maybe it's relevant, i'm using cxf , spring-mvc technologies.
i'd post source code, don't know file put, i'll post current error:
org.springframework.beans.factory.beancreationexception: error creating bean name 'publisher' defined in servletcontext resource [/web-inf/forum-servlet.xml]: instantiation of bean failed; nested exception org.springframework.beans.beaninstantiationexception: not instantiate bean class [publisher.publisher]: constructor threw exception; nested exception java.lang.noclassdeffounderror: javax/xml/bind/annotation/accessororder @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.instantiatebean(abstractautowirecapablebeanfactory.java:883) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.createbeaninstance(abstractautowirecapablebeanfactory.java:839) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.docreatebean(abstractautowirecapablebeanfactory.java:440) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory$1.run(abstractautowirecapablebeanfactory.java:409) @ java.security.accesscontroller.doprivileged(native method) caused by: org.springframework.beans.beaninstantiationexception: not instantiate bean class [publisher.publisher]: constructor threw exception; nested exception java.lang.noclassdeffounderror: javax/xml/bind/annotation/accessororder @ org.springframework.beans.beanutils.instantiateclass(beanutils.java:115) @ org.springframework.beans.factory.support.simpleinstantiationstrategy.instantiate(simpleinstantiationstrategy.java:61) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.instantiatebean(abstractautowirecapablebeanfactory.java:877) ... 36 more caused by: java.lang.noclassdeffounderror: javax/xml/bind/annotation/accessororder @ com.sun.xml.bind.v2.model.impl.runtimemodelbuilder.createclassinfo(runtimemodelbuilder.java:59) @ com.sun.xml.bind.v2.model.impl.runtimemodelbuilder.createclassinfo(runtimemodelbuilder.java:41) @ com.sun.xml.bind.v2.model.impl.modelbuilder.getclassinfo(modelbuilder.java:123) @ com.sun.xml.bind.v2.model.impl.runtimemodelbuilder.getclassinfo(runtimemodelbuilder.java:49) @ com.sun.xml.bind.v2.model.impl.runtimemodelbuilder.getclassinfo(runtimemodelbuilder.java:41) @ com.sun.xml.bind.v2.model.impl.modelbuilder.gettypeinfo(modelbuilder.java:189) @ com.sun.xml.bind.v2.model.impl.modelbuilder.gettypeinfo(modelbuilder.java:204) @ com.sun.xml.bind.v2.runtime.jaxbcontextimpl.gettypeinfoset(jaxbcontextimpl.java:327) @ com.sun.xml.bind.v2.runtime.jaxbcontextimpl.<init>(jaxbcontextimpl.java:198) @ com.sun.xml.bind.v2.contextfactory.createcontext(contextfactory.java:76) @ com.sun.xml.bind.v2.contextfactory.createcontext(contextfactory.java:55) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:39) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:25) @ java.lang.reflect.method.invoke(method.java:597) thanks help
use maven correct way: use "war" packaging , put needed libraries dependencies.
Comments
Post a Comment