用IDEA跑spring+struts2+ibates的项目,tomcat启动报异常,但是能启动成功,就是不能执行sql语句

代码是没问题的,之前怀疑是IDEA的编码格式的问题,但是修改了也没有,没辙了,求助大神们,给个建议

(SYS)[2019-03-28 23:55:09,533] -3751 [RMI TCP Connection(2)-127.0.0.1] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory(AbstractAutowireCapableBeanFactory.java:459) : Eagerly caching bean 'weeklyAccessReport' to allow for resolving potential circular references
(SYS)[2019-03-28 23:55:09,608] -3826 [RMI TCP Connection(2)-127.0.0.1] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory(AbstractBeanFactory.java:214) : Returning cached instance of singleton bean 'org.springframework.transaction.config.internalTransactionAdvisor'
(SYS)[2019-03-28 23:55:09,611] -3829 [RMI TCP Connection(2)-127.0.0.1] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory(AbstractAutowireCapableBeanFactory.java:411) : Finished creating instance of bean 'weeklyAccessReport'
(SYS)[2019-03-28 23:55:09,612] -3830 [RMI TCP Connection(2)-127.0.0.1] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory(DefaultSingletonBeanRegistry.java:214) : Creating shared instance of singleton bean 'luckyDrawPhaseAction'
(SYS)[2019-03-28 23:55:09,612] -3830 [RMI TCP Connection(2)-127.0.0.1] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory(AbstractAutowireCapableBeanFactory.java:383) : Creating instance of bean 'luckyDrawPhaseAction'
(SYS)[2019-03-28 23:55:09,637] -3855 [RMI TCP Connection(2)-127.0.0.1] DEBUG com.anyplex.service.util.SqlMapClientUtil(SqlMapClientUtil.java:47) : build reader ok
java.lang.RuntimeException: Error occurred.  Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'.  Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMap/insert'.  Cause: java.util.NoSuchElementException
(SYS)[2019-03-28 23:55:09,955] -4173 [RMI TCP Connection(2)-127.0.0.1] FATAL com.anyplex.service.util.SqlMapClientUtil(SqlMapClientUtil.java:58) : initialize ibatis config failure
    at com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:49)
    at com.ibatis.sqlmap.client.SqlMapClientBuilder.buildSqlMapClient(SqlMapClientBuilder.java:63)
    at com.anyplex.service.util.SqlMapClientUtil.getSqlMapClient(SqlMapClientUtil.java:48)
    at com.anyplex.service.util.SqlMapClientUtil.getSqlMapClient(SqlMapClientUtil.java:29)
    at com.anyplex.service.util.OSCacheUtil.<clinit>(OSCacheUtil.java:35)
    at com.anyplex.service.AnyplexConfigure.getInstance(AnyplexConfigure.java:23)
    at com.anyplex.service.AnyplexServer.<clinit>(AnyplexServer.java:76)
    at com.anyplex.common.web.AnyplexActionSupport.<init>(AnyplexActionSupport.java:110)
    at com.anyplex.crm.auto.luckyDraw.LuckyDrawPhaseAction.<init>(LuckyDrawPhaseAction.java:14)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:100)
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:61)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:877)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:839)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
    at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5099)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5615)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
    at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1863)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
    at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:618)
    at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:565)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
    at com.sun.jmx.remote.security.MBeanServerAccessController.invoke(MBeanServerAccessController.java:468)
    at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1487)
    at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:97)
    at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1328)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1427)
    at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:848)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)
    at sun.rmi.transport.Transport$2.run(Transport.java:202)
    at sun.rmi.transport.Transport$2.run(Transport.java:199)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.Transport.serviceCall(Transport.java:198)
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:567)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:828)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.access$400(TCPTransport.java:619)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler$1.run(TCPTransport.java:684)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler$1.run(TCPTransport.java:681)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:681)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'.  Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMap/insert'.  Cause: java.util.NoSuchElementException
    at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:53)
    at com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:46)
    ... 80 more
Caused by: java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'.  Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMap/insert'.  Cause: java.util.NoSuchElementException
    at com.ibatis.common.xml.NodeletParser.processNodelet(NodeletParser.java:123)
    at com.ibatis.common.xml.NodeletParser.process(NodeletParser.java:84)
    at com.ibatis.common.xml.NodeletParser.process(NodeletParser.java:102)
    at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:72)
    at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:51)
    ... 81 more
Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMap/insert'.  Cause: java.util.NoSuchElementException
    at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:53)
    at com.ibatis.sqlmap.engine.builder.xml.SqlMapParser.parse(SqlMapParser.java:40)
    at com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser$10.process(SqlMapConfigParser.java:270)
    at com.ibatis.common.xml.NodeletParser.processNodelet(NodeletParser.java:121)
    ... 85 more
Caused by: java.lang.RuntimeException: Error parsing XPath '/sqlMap/insert'.  Cause: java.util.NoSuchElementException
    at com.ibatis.common.xml.NodeletParser.processNodelet(NodeletParser.java:123)
    at com.ibatis.common.xml.NodeletParser.process(NodeletParser.java:84)
    at com.ibatis.common.xml.NodeletParser.process(NodeletParser.java:102)
    at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:72)
    at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:51)
    ... 88 more
Caused by: java.util.NoSuchElementException
    at java.util.StringTokenizer.nextToken(StringTokenizer.java:349)
    at com.ibatis.sqlmap.engine.mapping.parameter.InlineParameterMapParser.parseInlineParameterMap(InlineParameterMapParser.java:55)
    at com.ibatis.sqlmap.engine.builder.xml.XMLSqlSource.parseDynamicTags(XMLSqlSource.java:62)
    at com.ibatis.sqlmap.engine.builder.xml.XMLSqlSource.getSql(XMLSqlSource.java:33)
    at com.ibatis.sqlmap.engine.config.MappedStatementConfig.<init>(MappedStatementConfig.java:79)
    at com.ibatis.sqlmap.engine.config.SqlMapConfiguration.newMappedStatementConfig(SqlMapConfiguration.java:159)
    at com.ibatis.sqlmap.engine.builder.xml.SqlStatementParser.parseGeneralStatement(SqlStatementParser.java:73)
    at com.ibatis.sqlmap.engine.builder.xml.SqlMapParser$18.process(SqlMapParser.java:347)
    at com.ibatis.common.xml.NodeletParser.processNodelet(NodeletParser.java:121)
    ... 92 more

麻烦大佬们看看,给点意见,参考参考

2个回答

java.lang.RuntimeException: Error parsing XPath '/sqlMap/insert'
Caused by: java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap
这里不就已经暴露了问题了吗,好好去对应位置检查一下吧

sqlMap/insert配置文件呢,有没有问题。
其次,如果怀疑编码问题,先调整编码后再看看。

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!