root cause of servletexception.
java.lang.linkageerror: loader constraint violation: loader (instance of weblogic/utils/classloaders/changeawareclassloader)
previously initiated loading for a different type with name "javax/xml/namespace/qname"
at java.lang.classloader.defineclass1(native method)
at java.lang.classloader.defineclass(classloader.java:763)
at java.security.secureclassloader.defineclass(secureclassloader.java:142)
at weblogic.utils.classloaders.genericclassloader.defineclass(genericclassloader.java:343)
at weblogic.utils.classloaders.genericclassloader.findlocalclass(genericclassloader.java:302)
at weblogic.utils.classloaders.genericclassloader.findclass(genericclassloader.java:270)
at weblogic.utils.classloaders.changeawareclassloader.findclass(changeawareclassloader.java:64)
at weblogic.utils.classloaders.changeawareclassloader.loadclass(changeawareclassloader.java:49)
at java.lang.class.getdeclaredmethods0(native method)
at java.lang.class.privategetdeclaredmethods(class.java:2701)
at java.lang.class.privategetmethodrecursive(class.java:3048)
at java.lang.class.getmethod0(class.java:3018)
at java.lang.class.getmethod(class.java:1784)
at org.apache.xmlbeans.xmlbeans.buildmethod(xmlbeans.java:174)
at org.apache.xmlbeans.xmlbeans.buildnoargmethod(xmlbeans.java:190)
at org.apache.xmlbeans.xmlbeans.buildgetcontexttypeloadermethod(xmlbeans.java:200)
at org.apache.xmlbeans.xmlbeans.<clinit>(xmlbeans.java:126)
at org.openxmlformats.schemas.spreadsheetml.x2006.main.ctworkbook$factory.newinstance(unknown source)
at org.apache.poi.xssf.usermodel.xssfworkbook.onworkbookcreate(xssfworkbook.java:290)
at org.apache.poi.xssf.usermodel.xssfworkbook.<init>(xssfworkbook.java:170)
at com.kayak.web.base.util.export.exportexcelxssf.export(exportexcelxssf.java:893)
at com.kayak.web.base.action.exportexcelaction.exportexcel(exportexcelaction.java:318)
at sun.reflect.nativemethodaccessorimpl.invoke0(native method)
at sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:62)
at sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43)
at java.lang.reflect.method.invoke(method.java:498)
at org.springframework.web.method.support.invocablehandlermethod.doinvoke(invocablehandlermethod.java:221)
at org.springframework.web.method.support.invocablehandlermethod.invokeforrequest(invocablehandlermethod.java:137)
at org.springframework.web.servlet.mvc.method.annotation.servletinvocablehandlermethod.invokeandhandle(servletinvocablehandlermethod.java:110)
at org.springframework.web.servlet.mvc.method.annotation.requestmappinghandleradapter.invokehandlemethod(requestmappinghandleradapter.java:777)
at org.springframework.web.servlet.mvc.method.annotation.requestmappinghandleradapter.handleinternal(requestmappinghandleradapter.java:706)
at org.springframework.web.servlet.mvc.method.abstracthandlermethodadapter.handle(abstracthandlermethodadapter.java:85)
at org.springframework.web.servlet.dispatcherservlet.dodispatch(dispatcherservlet.java:943)
at org.springframework.web.servlet.dispatcherservlet.doservice(dispatcherservlet.java:877)
at org.springframework.web.servlet.frameworkservlet.processrequest(frameworkservlet.java:966)
at org.springframework.web.servlet.frameworkservlet.dopost(frameworkservlet.java:868)
at javax.servlet.http.httpservlet.service(httpservlet.java:727)
at org.springframework.web.servlet.frameworkservlet.service(frameworkservlet.java:842)
at javax.servlet.http.httpservlet.service(httpservlet.java:820)
at weblogic.servlet.internal.stubsecurityhelper$servletserviceaction.run(stubsecurityhelper.java:227)
at weblogic.servlet.internal.stubsecurityhelper.invokeservlet(stubsecurityhelper.java:125)
at weblogic.servlet.internal.servletstubimpl.execute(servletstubimpl.java:301)
at weblogic.servlet.internal.tailfilter.dofilter(tailfilter.java:26)
at weblogic.servlet.internal.filterchainimpl.dofilter(filterchainimpl.java:60)
at com.kayak.web.user.filter.logincertifyfilter.dofilter(logincertifyfilter.java:125)
at weblogic.servlet.internal.filterchainimpl.dofilter(filterchainimpl.java:60)
at org.springframework.web.filter.characterencodingfilter.dofilterinternal(characterencodingfilter.java:88)
at org.springframework.web.filter.onceperrequestfilter.dofilter(onceperrequestfilter.java:107)
at weblogic.servlet.internal.filterchainimpl.dofilter(filterchainimpl.java:60)
at com.kayak.web.base.filter.localrequestfilter.dofilter(localrequestfilter.java:28)
at weblogic.servlet.internal.filterchainimpl.dofilter(filterchainimpl.java:60)
at weblogic.servlet.internal.requesteventsfilter.dofilter(requesteventsfilter.java:27)
at weblogic.servlet.internal.filterchainimpl.dofilter(filterchainimpl.java:60)
at weblogic.servlet.internal.webappservletcontext$servletinvocationaction.wraprun(webappservletcontext.java:3748)
at weblogic.servlet.internal.webappservletcontext$servletinvocationaction.run(webappservletcontext.java:3714)
at weblogic.security.acl.internal.authenticatedsubject.doas(authenticatedsubject.java:321)
at weblogic.security.service.securitymanager.runas(securitymanager.java:120)
at weblogic.servlet.internal.webappservletcontext.securedexecute(webappservletcontext.java:2283)
at weblogic.servlet.internal.webappservletcontext.execute(webappservletcontext.java:2182)
at weblogic.servlet.internal.servletrequestimpl.run(servletrequestimpl.java:1499)
at weblogic.work.executethread.execute(executethread.java:263)
at weblogic.work.executethread.run(executethread.java:221)
错误内容很长,但是要学会辨认,我刚开始就被一大堆错误误导了。关键的都是下面的这个:
loader (instance of weblogic/utils/classloaders/changeawareclassloader)
previously initiated loading for a different type with name "javax/xml/namespace/qname"
root cause of servletexception.
java.lang.noclassdeffounderror: could not initialize class org.apache.xmlbeans.xmlbeans
at org.openxmlformats.schemas.spreadsheetml.x2006.main.ctworkbook$factory.newinstance(unknown source)
at org.apache.poi.xssf.usermodel.xssfworkbook.onworkbookcreate(xssfworkbook.java:290)
at org.apache.poi.xssf.usermodel.xssfworkbook.<init>(xssfworkbook.java:170)
at com.kayak.web.base.util.export.exportexcelxssf.export(exportexcelxssf.java:893)
at com.kayak.web.base.action.exportexcelaction.exportexcel(exportexcelaction.java:318)
at sun.reflect.nativemethodaccessorimpl.invoke0(native method)
at sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:62)
at sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43)
at java.lang.reflect.method.invoke(method.java:498)