activiti:Caused by: java.sql.SQLException: Cannot convert value '2018-08-13 15:17:17.000' from colum

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/wang2dog/article/details/81633312

从正式环境拷贝了一个测试数据库出来,然后其中的一个审批意见表取数据会报错,报错如下

Caused by: org.apache.ibatis.executor.result.ResultMapException: Error attempting to get column 'TIME_' from result set.  Cause: java.sql.SQLException: Cannot convert value '2018-08-13 15:17:17.000' from column 3 to TIMESTAMP.
    at org.apache.ibatis.type.BaseTypeHandler.getResult(BaseTypeHandler.java:68)
    at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.getPropertyMappingValue(DefaultResultSetHandler.java:411)
    at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.applyPropertyMappings(DefaultResultSetHandler.java:384)
    at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.getRowValue(DefaultResultSetHandler.java:346)
    at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleRowValuesForSimpleResultMap(DefaultResultSetHandler.java:298)
    at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleRowValues(DefaultResultSetHandler.java:273)
    at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleResultSet(DefaultResultSetHandler.java:246)
    at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleResultSets(DefaultResultSetHandler.java:160)
    at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:63)
    at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:78)
    at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:62)
    at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:303)
    at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:154)
    at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:102)
    at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:82)
    at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:120)
    ... 89 more
Caused by: java.sql.SQLException: Cannot convert value '2018-08-13 15:17:17.000' from column 3 to TIMESTAMP.
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926)
    at com.mysql.jdbc.ResultSetRow.getTimestampFast(ResultSetRow.java:1336)
    at com.mysql.jdbc.BufferRow.getTimestampFast(BufferRow.java:575)
    at com.mysql.jdbc.ResultSetImpl.getTimestampInternal(ResultSetImpl.java:6687)
    at com.mysql.jdbc.ResultSetImpl.getTimestamp(ResultSetImpl.java:6006)
    at com.mysql.jdbc.ResultSetImpl.getTimestamp(ResultSetImpl.java:6044)
    at org.apache.ibatis.type.DateTypeHandler.getNullableResult(DateTypeHandler.java:39)
    at org.apache.ibatis.type.DateTypeHandler.getNullableResult(DateTypeHandler.java:28)
    at org.apache.ibatis.type.BaseTypeHandler.getResult(BaseTypeHandler.java:66)
    ... 104 more
Caused by: java.lang.IllegalArgumentException: nanos > 999999999 or < 0
    at java.sql.Timestamp.setNanos(Unknown Source)
    at com.mysql.jdbc.TimeUtil.fastTimestampCreate(TimeUtil.java:1153)
    at com.mysql.jdbc.ResultSetImpl.fastTimestampCreate(ResultSetImpl.java:1056)
    at com.mysql.jdbc.ResultSetRow.getTimestampFast(ResultSetRow.java:1325)
    ... 111 more

 

最后跟跟代码都没发现什么问题,但是根据这个报错的说法,数据库的时间字段,存的精度是有毫秒的。

OK,处理完成

展开阅读全文

cannot convert from Integer to int

01-09

源代码如下:rnimport javax.servlet.http.HttpServletRequest; rn rnimport org.hibernate.Hibernate; rn rnimport com.xlh.hibernate.model.Pager; rn rn/** rn * @author wangguangxu 用于得到一个Pager的实例 rn */ rnpublic class PagerUtil rn public static Pager getPager(HttpServletRequest request, int totalRows) rn //得到页面传入的pagesize参数,也就是用户选中的值 rn String pageSizesString = request.getParameter("showcount"); rn int pageSize; rn //如果这个参数为空的话,说明是第一次浏览,初始化页面默认的pagesize 为五条数据 rn if (pageSizesString==null) rn pageSize = 5; rn else rn //否则讲pageSize属性设置为用户选择的大小 rn [color=#FF0000] pageSize = new Integer(pageSizesString); [/color] rnrn rn //根据数据库中的数据总数和每页显示的pagesize,创建一个初始化的Pager对象 rn Pager pager = new Pager(totalRows,pageSize); rn // 得到页面传输近来的当前页 rn String current = request.getParameter("current"); rn // 如果传入的参数为空,则访问首页,默认当前页为第一页 rn // 如果不为空就重新设置当前页面的值 rn if (current != null) rn [color=#FF0000]pager.setCurrentPage(new Integer(current)); [/color] rn // 得到用户请求操作,首页,尾页,上一页,下一页 rn rn String pagedo = request.getParameter("pagedo"); rn if (pagedo != null) rn if ("first".equalsIgnoreCase(pagedo)) rn pager.firsPage(); rn else if ("last".equalsIgnoreCase(pagedo)) rn pager.lastPage(); rn else if ("previous".equalsIgnoreCase(pagedo)) rn pager.previousPage(); rn else if ("next".equalsIgnoreCase(pagedo)) rn pager.nextPage(); rn else if ("go".equalsIgnoreCase(pagedo)) rn //接受用户输入的跳转页 rn String gocount = request.getParameter("gocount"); rn // 初始化为回到第一页(也许用户输入的数据合法,那么这时候我们应当默认回到第一页) rn int go = 1; rn try rn [color=#FF0000]go = new Integer(gocount[/color]); rn catch (Exception e) rn e.printStackTrace(); rn rn pager.goPage(go); rn else if ("select".equalsIgnoreCase(pagedo)) rn String showcount = request.getParameter("showcount"); rn // 初始化为每页5条数据 rn int size = 5; rn try rn [color=#FF0000] size = new Integer(showcount); [/color] catch (Exception e) rn e.printStackTrace(); rn rn pager.showcount(size); rn rn rn return pager; rn rn rn rnrnrn上述代码中的红色代码部分报错:cannot convert from Integer to int,,该如何解决?谢谢!!!!!!!! 论坛

cannot convert from 'void *' to 'struct *

08-01

《C/C++实用开发者指南》里的一段示例代码,编译时出现ompiling...rntest.cpprnD:\控制台程序\console test\test.cpp(27) : error C2440: '=' : cannot convert from 'void *' to 'struct person *'rn Conversion from 'void*' to pointer to non-'void' requires an explicit castrnError executing cl.exe.rn错误,查了一下bsearch函数的原型,rnbsearch  函数名: bsearchrn  功 能: 二分法搜索rn  用 法: void *bsearch(const void *key, const void *base, size_t *nelem, size_t width, int(*fcmp)(const void *, const *));rnrn弄不明白,为什么会出现这样的编译错误?rn[code=C/C++]rn#includern#includern#includernstruct personrnrn char last[16];rn char first[11];rn char phone[13];rn int age;rn;rnrnstatic int comp(const void *,const void *);rnint main()rnrn int i;rn struct person *p;rn static struct person key="","","555-1965",0;rn static struct person people[]=rn rn "Ford","Henry","555-1903",98,rn "Lincoln","Abraham","555-1865",161,rn "Ford","Edsel","555-1965",53,rn "Trump","Donald","555-1988",49rn ;rnrn qsort(people,4,sizeof people[0],comp);rn p=bsearch(&key,people,4,sizeof people[0],comp); //rn if(p!=NULL)rn rn printf("%s, %s, %s, %d\n",p->last,p->first,p->phone,p->age);rn rn else rn puts("Not found");rn return 0;rnrnstatic int comp(const void *x,const void *y)rnrn struct person *p1=(struct person *) x;rn struct person *p2=(struct person *) y;rn return strcmp(p1->phone,p2->phone);rn //return strcmp((struct person *)x->phone,(struct person *)y->phone);rnrn[/code] 论坛

Caused by: java.sql.SQLException: 不支持的特性

10-20

2012-10-20 0:02:46 org.apache.catalina.core.AprLifecycleListener initrn信息: Loaded APR based Apache Tomcat Native library 1.1.14.rn2012-10-20 0:02:46 org.apache.catalina.core.AprLifecycleListener initrn信息: APR capabilities: IPv6 [false], sendfile [true], accept filters [false], random [true].rn2012-10-20 0:02:47 org.apache.coyote.http11.Http11AprProtocol initrn信息: Initializing Coyote HTTP/1.1 on http-8080rn2012-10-20 0:02:47 org.apache.coyote.ajp.AjpAprProtocol initrn信息: Initializing Coyote AJP/1.3 on ajp-8009rn2012-10-20 0:02:47 org.apache.catalina.startup.Catalina loadrn信息: Initialization processed in 1908 msrn2012-10-20 0:02:47 org.apache.catalina.core.StandardService startrn信息: Starting service Catalinarn2012-10-20 0:02:47 org.apache.catalina.core.StandardEngine startrn信息: Starting Servlet Engine: Apache Tomcat/6.0.18rn2012-10-20 0:02:48 org.apache.catalina.core.ApplicationContext logrn信息: Initializing Spring root WebApplicationContextrnlog4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).rnlog4j:WARN Please initialize the log4j system properly.rnSLF4J: Class path contains multiple SLF4J bindings.rnSLF4J: Found binding in [jar:file:/D:/MyEclipse%208.5/OfficeOASystem/WebContent/WEB-INF/lib/slf4j-log4j12-1.5.6.jar!/org/slf4j/impl/StaticLoggerBinder.class]rnSLF4J: Found binding in [jar:file:/D:/MyEclipse%208.5/OfficeOASystem/WebContent/WEB-INF/lib/slf4j-nop-1.5.8.jar!/org/slf4j/impl/StaticLoggerBinder.class]rnSLF4J: Found binding in [jar:file:/D:/MyEclipse%208.5/OfficeOASystem/WebContent/WEB-INF/lib/slf4j-simple-1.5.8.jar!/org/slf4j/impl/StaticLoggerBinder.class]rnSLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.rn2012-10-20 0:02:51 org.apache.catalina.core.StandardContext listenerStartrn严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListenerrnorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/classes/applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Unable to access java.sql.DatabaseMetaData to determine appropriate Dialect to usernCaused by: org.hibernate.HibernateException: Unable to access java.sql.DatabaseMetaData to determine appropriate Dialect to usern at org.hibernate.dialect.resolver.DialectFactory.determineDialect(DialectFactory.java:140)rn at org.hibernate.dialect.resolver.DialectFactory.buildDialect(DialectFactory.java:96)rn at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:117)rn at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2863)rn at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2859)rn at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1870)rn at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:805)rn at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:745)rn at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:134)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1203)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1172)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:427)rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:285)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)rn at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)rn at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:189)rn at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)rn at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)rn at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)rn at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)rn at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)rn at org.apache.catalina.core.StandardService.start(StandardService.java:516)rn at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)rn at org.apache.catalina.startup.Catalina.start(Catalina.java:578)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)rn at java.lang.reflect.Method.invoke(Unknown Source)rn at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)rnCaused by: java.sql.SQLException: 不支持的特性rn at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)rn at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)rn at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)rn at oracle.jdbc.dbaccess.DBError.throwUnsupportedFeatureSqlException(DBError.java:689)rn at oracle.jdbc.OracleDatabaseMetaData.getDatabaseMajorVersion(OracleDatabaseMetaData.java:4442)rn at org.hibernate.dialect.resolver.DialectFactory.determineDialect(DialectFactory.java:130)rn ... 35 morern2012-10-20 0:02:51 org.apache.catalina.core.StandardContext startrn严重: Error listenerStartrn2012-10-20 0:02:51 org.apache.catalina.core.StandardContext startrn严重: Context [/OfficeOASystem] startup failed due to previous errorsrn2012-10-20 0:02:51 org.apache.catalina.core.ApplicationContext logrn信息: Closing Spring root WebApplicationContextrn2012-10-20 0:02:52 org.apache.catalina.core.ApplicationContext logrn信息: ContextListener: contextInitialized()rn2012-10-20 0:02:52 org.apache.catalina.core.ApplicationContext logrn信息: SessionListener: contextInitialized()rn2012-10-20 0:02:53 org.apache.coyote.http11.Http11AprProtocol startrn信息: Starting Coyote HTTP/1.1 on http-8080rn2012-10-20 0:02:53 org.apache.coyote.ajp.AjpAprProtocol startrn信息: Starting Coyote AJP/1.3 on ajp-8009rn2012-10-20 0:02:53 org.apache.catalina.startup.Catalina startrn信息: Server startup in 6128 msrnrnrn我是初学,请各位帮忙看看,不支持特性是什么错误?谢谢 论坛

Caused by: java.sql.SQLException: #HY000

06-30

org.springframework.jdbc.UncategorizedSQLException: rn### Error querying database. Cause: java.sql.SQLException: #HY000rn### The error may exist in file [/usr/local/tomcat2/webapps/cmwbMaven/WEB-INF/classes/com/cmcc/cmwb/mapper/CmwbUserinfoDao.xml]rn### The error may involve com.cmcc.cmwb.dao.CmwbUserinfoDao.findUserByUsername-Inlinern### The error occurred while setting parametersrn### SQL: select userid,username,nickname,head_image_url,header,userPass,account_type,password_car,user_tel,user_mail,gender,realname,idcard,birthday,address,qq,create_time,update_time,region1,region2,region3,uuid,status,is_auth,is_cmmoblie,circleid,column1,column2,column3,column4,column5,belong_location,machine_factory,machine_type,parent_id from cmwb_userinfo where username = ?rn### Cause: java.sql.SQLException: #HY000rn; uncategorized SQLException for SQL []; SQL state [HY000]; error code [1105]; #HY000; nested exception is java.sql.SQLException: #HY000rn at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:84)rn at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81)rn at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81)rn at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:71)rn at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:365)rn at com.sun.proxy.$Proxy15.selectList(Unknown Source)rn at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:195)rn at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:119)rn at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:63)rn at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:52)rn at com.sun.proxy.$Proxy16.findUserByUsername(Unknown Source)rn at com.cmcc.cmwb.service.impl.UserServiceImpl.userLogin(UserServiceImpl.java:63)rn at com.cmcc.cmwb.service.impl.UserServiceImpl$$FastClassBySpringCGLIB$$a6dfb857.invoke()rn at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)rn at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:708)rn at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)rn at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:98)rn at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:262)rn at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:95)rn at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)rn at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)rn at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)rn at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:644)rn at com.cmcc.cmwb.service.impl.UserServiceImpl$$EnhancerBySpringCGLIB$$87ff235c.userLogin()rn at com.cmcc.cmwb.action.api.UserController.accinfoLogin(UserController.java:48)rn at sun.reflect.GeneratedMethodAccessor43.invoke(Unknown Source)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)rn at java.lang.reflect.Method.invoke(Method.java:606)rn at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215)rn at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)rn at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)rn at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:749)rn at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:689)rn at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:83)rn at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:938)rn at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:870)rn at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)rn at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)rn at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)rn at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)rn at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)rn at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)rn at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)rn at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)rn at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)rn at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)rn at java.lang.Thread.run(Thread.java:745)rnCaused by: java.sql.SQLException: #HY000rn at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1074)rn at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4120)rn at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4052)rn at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:925)rn at com.mysql.jdbc.MysqlIO.nextRow(MysqlIO.java:1939)rn at com.mysql.jdbc.MysqlIO.readSingleRowSet(MysqlIO.java:3426)rn at com.mysql.jdbc.MysqlIO.getResultSet(MysqlIO.java:488)rn at com.mysql.jdbc.MysqlIO.readResultsForQueryOrUpdate(MysqlIO.java:3131)rn at com.mysql.jdbc.MysqlIO.readAllResults(MysqlIO.java:2299)rn at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2722)rn at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2794)rn at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2155)rn at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1379)rn at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.execute(NewProxyPreparedStatement.java:989)rn at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:59)rn at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:73)rn at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:60)rn at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:267)rn at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:137)rn at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:96)rn at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:77)rn at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:108)rn at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:102)rn at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)rn at java.lang.reflect.Method.invoke(Method.java:606)rn at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:355)rn ... 56 more 论坛

java.lang.IllegalArgumentException: Cannot convert value of type [com.ssh.dao.im

08-16

rnorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userService' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type [com.ssh.dao.impl.UserDAO] to required type [com.ssh.dao.IUserDAO] for property 'userDAO'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [com.ssh.dao.impl.UserDAO] to required type [com.ssh.dao.IUserDAO] for property 'userDAO': no matching editors or conversion strategy foundrn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:478)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)rn at java.security.AccessController.doPrivileged(Native Method)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:220)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)rn at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381)rn at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)rn at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)rn at org.springframework.web.context.ContextLoaderServlet.init(ContextLoaderServlet.java:81)rn at javax.servlet.GenericServlet.init(GenericServlet.java:212)rn at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161)rn at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981)rn at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4042)rn at org.apache.catalina.core.StandardContext.start(StandardContext.java:4348)rn at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)rn at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)rn at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)rn at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)rn at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)rn at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)rn at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)rn at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)rn at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)rn at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)rn at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)rn at org.apache.catalina.core.StandardService.start(StandardService.java:516)rn at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)rn at org.apache.catalina.startup.Catalina.start(Catalina.java:566)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)rn at java.lang.reflect.Method.invoke(Unknown Source)rn at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)rnCaused by: org.springframework.beans.TypeMismatchException: Failed to convert property value of type [com.ssh.dao.impl.UserDAO] to required type [com.ssh.dao.IUserDAO] for property 'userDAO'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [com.ssh.dao.impl.UserDAO] to required type [com.ssh.dao.IUserDAO] for property 'userDAO': no matching editors or conversion strategy foundrn at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:391)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.convertForProperty(AbstractAutowireCapableBeanFactory.java:1287)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1248)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1008)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:470)rn ... 41 morernCaused by: java.lang.IllegalArgumentException: Cannot convert value of type [com.ssh.dao.impl.UserDAO] to required type [com.ssh.dao.IUserDAO] for property 'userDAO': no matching editors or conversion strategy foundrn at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:219)rn at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:138)rn at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:386)rn ... 45 morern2011-8-16 23:07:33 org.apache.catalina.core.StandardContext loadOnStartuprn严重: Servlet /ssh threw load() exceptionrnjava.lang.IllegalArgumentException: Cannot convert value of type [com.ssh.dao.impl.UserDAO] to required type [com.ssh.dao.IUserDAO] for property 'userDAO': no matching editors or conversion strategy foundrn at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:219)rn at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:138)rn at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:386)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.convertForProperty(AbstractAutowireCapableBeanFactory.java:1287)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1248)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1008)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:470)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)rn at java.security.AccessController.doPrivileged(Native Method)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:220)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)rn at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381)rn at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)rn at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)rn at org.springframework.web.context.ContextLoaderServlet.init(ContextLoaderServlet.java:81)rn at javax.servlet.GenericServlet.init(GenericServlet.java:212)rn at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161)rn rnrnSSH 框架搭建, 是启动异常 。 rn请问 是大小写的问题么, 能具体到啥问题么, 找了半天 都没找到 论坛

没有更多推荐了,返回首页