将ojdbc6.jar与空间数据一起使用时,我遇到了奇怪的错误。堆栈跟踪表示类定义未找到XMLType。但只有在xml到db的情况下才需要xdb6.jar。但是我不是在代码中的任何地方处理xml到db的东西。这是堆栈跟踪。你能不能给我一些见解,一方面是复制xdb6.jar但我不想复制那个文件,因为我没有使用xml来db
org.apache.cxf.interceptor.Fault:oracle / xdb / XMLType
at org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:162) ~[cxf-api-2.7.5.jar:2.7.5]
at org.apache.cxf.jaxws.AbstractJAXWSMethodInvoker.createFault(AbstractJAXWSMethodInvoker.java:213) ~[cxf-rt-frontend-jaxws-2.7.5.jar:2.7.5]
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:128) ~[cxf-api-2.7.5.jar:2.7.5]
at org.apache.cxf.jaxws.AbstractJAXWSMethodInvoker.invoke(AbstractJAXWSMethodInvoker.java:178) ~[cxf-rt-frontend-jaxws-2.7.5.jar:2.7.5]
at org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(JAXWSMethodInvoker.java:68) ~[cxf-rt-frontend-jaxws-2.7.5.jar:2.7.5]
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:75) ~[cxf-api-2.7.5.jar:2.7.5]
at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58) ~[cxf-api-2.7.5.jar:2.7.5]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) ~[na:1.7.0_09-icedtea]
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) ~[na:1.7.0_09-icedtea]
at java.util.concurrent.FutureTask.run(FutureTask.java:166) ~[na:1.7.0_09-icedtea]
at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37) ~[cxf-api-2.7.5.jar:2.7.5]
at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:107) ~[cxf-api-2.7.5.jar:2.7.5]
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271) ~[cxf-api-2.7.5.jar:2.7.5]
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) [cxf-api-2.7.5.jar:2.7.5]
at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:239) [cxf-rt-transports-http-2.7.5.jar:2.7.5]
at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:223) [cxf-rt-transports-http-2.7.5.jar:2.7.5]
at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:203) [cxf-rt-transports-http-2.7.5.jar:2.7.5]
at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:137) [cxf-rt-transports-http-2.7.5.jar:2.7.5]
at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:158) [cxf-rt-transports-http-2.7.5.jar:2.7.5]
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:243) [cxf-rt-transports-http-2.7.5.jar:2.7.5]
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:163) [cxf-rt-transports-http-2.7.5.jar:2.7.5]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) [tomcat6-servlet-2.5-api-6.0.24.jar:na]
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:219) [cxf-rt-transports-http-2.7.5.jar:2.7.5]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) [catalina-6.0.24.jar:na]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina-6.0.24.jar:na]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) [catalina-6.0.24.jar:na]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) [catalina-6.0.24.jar:na]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) [catalina-6.0.24.jar:na]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [catalina-6.0.24.jar:na]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [catalina-6.0.24.jar:na]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) [catalina-6.0.24.jar:na]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857) [tomcat-coyote-6.0.24.jar:na]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) [tomcat-coyote-6.0.24.jar:na]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) [tomcat-coyote-6.0.24.jar:na]
at java.lang.Thread.run(Thread.java:722) [na:1.7.0_09-icedtea]
引起:java.lang.NoClassDefFoundError:oracle / xdb / XMLType
at oracle.jdbc.driver.NamedTypeAccessor.getString(NamedTypeAccessor.java:355) ~[tomcat6/:na]
at oracle.jdbc.driver.GeneratedStatement.getString(GeneratedStatement.java:327) ~[tomcat6/:na]
at oracle.jdbc.driver.GeneratedScrollableResultSet.getString(GeneratedScrollableResultSet.java:882) ~[tomcat6/:na]
at org.apache.commons.dbcp.DelegatingResultSet.getString(DelegatingResultSet.java:213) ~[commons-dbcp-1.4.jar:1.4]
at org.apache.commons.dbcp.DelegatingResultSet.getString(DelegatingResultSet.java:213) ~[commons-dbcp-1.4.jar:1.4]
at org.apache.ibatis.logging.jdbc.ResultSetLogger.printColumnValues(ResultSetLogger.java:84) ~[mybatis-3.1.1.jar:3.1.1]
at org.apache.ibatis.logging.jdbc.ResultSetLogger.invoke(ResultSetLogger.java:56) ~[mybatis-3.1.1.jar:3.1.1]
at $Proxy54.next(Unknown Source) ~[na:na]
at org.apache.ibatis.executor.resultset.FastResultSetHandler.shouldProcessMoreRows(FastResultSetHandler.java:221) ~[mybatis-3.1.1.jar:3.1.1]
at org.apache.ibatis.executor.resultset.FastResultSetHandler.handleRowValues(FastResultSetHandler.java:212) ~[mybatis-3.1.1.jar:3.1.1]
at org.apache.ibatis.executor.resultset.FastResultSetHandler.handleResultSet(FastResultSetHandler.java:186) ~[mybatis-3.1.1.jar:3.1.1]
at org.apache.ibatis.executor.resultset.FastResultSetHandler.handleResultSets(FastResultSetHandler.java:152) ~[mybatis-3.1.1.jar:3.1.1]
at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:57) ~[mybatis-3.1.1.jar:3.1.1]
at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:70) ~[mybatis-3.1.1.jar:3.1.1]
at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:57) ~[mybatis-3.1.1.jar:3.1.1]
at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:267) ~[mybatis-3.1.1.jar:3.1.1]
at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:141) ~[mybatis-3.1.1.jar:3.1.1]
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:105) ~[mybatis-3.1.1.jar:3.1.1]
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:81) ~[mybatis-3.1.1.jar:3.1.1]
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:101) ~[mybatis-3.1.1.jar:3.1.1]
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:95) ~[mybatis-3.1.1.jar:3.1.1]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_09-icedtea]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_09-icedtea]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_09-icedtea]
at java.lang.reflect.Method.invoke(Method.java:601) ~[na:1.7.0_09-icedtea]
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:355) ~[mybatis-spring-1.1.1.jar:1.1.1]
at $Proxy58.selectList(Unknown Source) ~[na:na]
at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:195) ~[mybatis-spring-1.1.1.jar:1.1.1]
at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:124) ~[mybatis-3.1.1.jar:3.1.1]
at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:90) ~[mybatis-3.1.1.jar:3.1.1]
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:40) ~[mybatis-3.1.1.jar:3.1.1]
at $Proxy59.getBeamScallopingData(Unknown Source) ~[na:na]
答案 0 :(得分:1)
简短的故事:您将需要包含XDB库。
长篇小说:如果你深入研究它,你会发现NoClassDefFoundError的原因是你正在使用的一个类(直接使用或间接使用)将引用XMLType类。
即使您没有使用XMLType,该类也必须存在于您实际用于加载的类的类路径中。