艾登艾登艾登的gravatar头像
艾登艾登艾登 2017-11-23 15:53:20

下载别人的java web项目部署后运行出错

type Exception report

message Request processing failed; nested exception is org.springframework.dao.InvalidDataAccessResourceUsageException: could not load an entity: [com.coal.entity.User#1234567890]; SQL [select user0_.uid as uid11_0_, user0_.account as account11_0_, user0_.adminname as adminname11_0_, user0_.avatar as avatar11_0_, user0_.balance as balance11_0_, user0_.cardimg1 as cardimg6_11_0_, user0_.cardimg2 as cardimg7_11_0_, user0_.cardimg3 as cardimg8_11_0_, user0_.clientid as clientid11_0_, user0_.clienttype as clienttype11_0_, user0_.companyauth as company11_11_0_, user0_.creditvalue as creditv12_11_0_, user0_.driverauth as driverauth11_0_, user0_.email as email11_0_, user0_.integral as integral11_0_, user0_.lat as lat11_0_, user0_.lng as lng11_0_, user0_.loginip as loginip11_0_, user0_.logintime as logintime11_0_, user0_.number as number11_0_, user0_.password as password11_0_, user0_.personalauth as persona22_11_0_, user0_.realname as realname11_0_, user0_.registime as registime11_0_, user0_.sex as sex11_0_, user0_.state as state11_0_, user0_.stateinfo as stateinfo11_0_, user0_.tel as tel11_0_, user0_.type as type11_0_, user0_.valid as valid11_0_ from MT_TD_User user0_ where user0_.uid=?]; nested exception is org.hibernate.exception.SQLGrammarException: could not load an entity: [com.coal.entity.User#1234567890]

description The server encountered an internal error that prevented it from fulfilling this request.

exception

org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.dao.InvalidDataAccessResourceUsageException: could not load an entity: [com.coal.entity.User#1234567890]; SQL [select user0_.uid as uid11_0_, user0_.account as account11_0_, user0_.adminname as adminname11_0_, user0_.avatar as avatar11_0_, user0_.balance as balance11_0_, user0_.cardimg1 as cardimg6_11_0_, user0_.cardimg2 as cardimg7_11_0_, user0_.cardimg3 as cardimg8_11_0_, user0_.clientid as clientid11_0_, user0_.clienttype as clienttype11_0_, user0_.companyauth as company11_11_0_, user0_.creditvalue as creditv12_11_0_, user0_.driverauth as driverauth11_0_, user0_.email as email11_0_, user0_.integral as integral11_0_, user0_.lat as lat11_0_, user0_.lng as lng11_0_, user0_.loginip as loginip11_0_, user0_.logintime as logintime11_0_, user0_.number as number11_0_, user0_.password as password11_0_, user0_.personalauth as persona22_11_0_, user0_.realname as realname11_0_, user0_.registime as registime11_0_, user0_.sex as sex11_0_, user0_.state as state11_0_, user0_.stateinfo as stateinfo11_0_, user0_.tel as tel11_0_, user0_.type as type11_0_, user0_.valid as valid11_0_ from MT_TD_User user0_ where user0_.uid=?]; nested exception is org.hibernate.exception.SQLGrammarException: could not load an entity: [com.coal.entity.User#1234567890]
	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:894)
	org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)

 

root cause

org.springframework.dao.InvalidDataAccessResourceUsageException: could not load an entity: [com.coal.entity.User#1234567890]; SQL [select user0_.uid as uid11_0_, user0_.account as account11_0_, user0_.adminname as adminname11_0_, user0_.avatar as avatar11_0_, user0_.balance as balance11_0_, user0_.cardimg1 as cardimg6_11_0_, user0_.cardimg2 as cardimg7_11_0_, user0_.cardimg3 as cardimg8_11_0_, user0_.clientid as clientid11_0_, user0_.clienttype as clienttype11_0_, user0_.companyauth as company11_11_0_, user0_.creditvalue as creditv12_11_0_, user0_.driverauth as driverauth11_0_, user0_.email as email11_0_, user0_.integral as integral11_0_, user0_.lat as lat11_0_, user0_.lng as lng11_0_, user0_.loginip as loginip11_0_, user0_.logintime as logintime11_0_, user0_.number as number11_0_, user0_.password as password11_0_, user0_.personalauth as persona22_11_0_, user0_.realname as realname11_0_, user0_.registime as registime11_0_, user0_.sex as sex11_0_, user0_.state as state11_0_, user0_.stateinfo as stateinfo11_0_, user0_.tel as tel11_0_, user0_.type as type11_0_, user0_.valid as valid11_0_ from MT_TD_User user0_ where user0_.uid=?]; nested exception is org.hibernate.exception.SQLGrammarException: could not load an entity: [com.coal.entity.User#1234567890]
	org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:635)
	org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412)
	org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:411)
	org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)
	org.springframework.orm.hibernate3.HibernateTemplate.get(HibernateTemplate.java:532)
	org.springframework.orm.hibernate3.HibernateTemplate.get(HibernateTemplate.java:526)
	com.coal.dao.impl.UserDaoImpl.findById(UserDaoImpl.java:25)
	com.coal.service.impl.UserServiceImpl.get(UserServiceImpl.java:33)
	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	java.lang.reflect.Method.invoke(Unknown Source)
	org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:319)
	org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
	org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
	org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
	org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90)
	org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
	com.sun.proxy.$Proxy46.get(Unknown Source)
	com.coal.controller.IndexController.doIndex(IndexController.java:25)
	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	java.lang.reflect.Method.invoke(Unknown Source)
	org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:219)
	org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
	org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:100)
	org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:604)
	org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:565)
	org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
	org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)
	org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
	org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)

 

root cause

org.hibernate.exception.SQLGrammarException: could not load an entity: [com.coal.entity.User#1234567890]
	org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:92)
	org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
	org.hibernate.loader.Loader.loadEntity(Loader.java:2041)
	org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:86)
	org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:76)
	org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:3294)
	org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:496)
	org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:477)
	org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:227)
	org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:285)
	org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:152)
	org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:1090)
	org.hibernate.impl.SessionImpl.get(SessionImpl.java:1005)
	org.springframework.orm.hibernate3.HibernateTemplate$2.doInHibernate(HibernateTemplate.java:538)
	org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:406)
	org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)
	org.springframework.orm.hibernate3.HibernateTemplate.get(HibernateTemplate.java:532)
	org.springframework.orm.hibernate3.HibernateTemplate.get(HibernateTemplate.java:526)
	com.coal.dao.impl.UserDaoImpl.findById(UserDaoImpl.java:25)
	com.coal.service.impl.UserServiceImpl.get(UserServiceImpl.java:33)
	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	java.lang.reflect.Method.invoke(Unknown Source)
	org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:319)
	org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
	org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
	org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
	org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90)
	org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
	com.sun.proxy.$Proxy46.get(Unknown Source)
	com.coal.controller.IndexController.doIndex(IndexController.java:25)
	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	java.lang.reflect.Method.invoke(Unknown Source)
	org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:219)
	org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
	org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:100)
	org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:604)
	org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:565)
	org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
	org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)
	org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
	org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)

 

root cause

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'user0_.clientid' in 'field list'
	sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
	sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
	java.lang.reflect.Constructor.newInstance(Unknown Source)
	com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
	com.mysql.jdbc.Util.getInstance(Util.java:381)
	com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1030)
	com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
	com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3558)
	com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3490)
	com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1959)
	com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2109)
	com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2643)
	com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2077)
	com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2228)
	org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93)
	org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208)
	org.hibernate.loader.Loader.getResultSet(Loader.java:1953)
	org.hibernate.loader.Loader.doQuery(Loader.java:802)
	org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)
	org.hibernate.loader.Loader.loadEntity(Loader.java:2037)
	org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:86)
	org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:76)
	org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:3294)
	org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:496)
	org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:477)
	org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:227)
	org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:285)
	org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:152)
	org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:1090)
	org.hibernate.impl.SessionImpl.get(SessionImpl.java:1005)
	org.springframework.orm.hibernate3.HibernateTemplate$2.doInHibernate(HibernateTemplate.java:538)
	org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:406)
	org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)
	org.springframework.orm.hibernate3.HibernateTemplate.get(HibernateTemplate.java:532)
	org.springframework.orm.hibernate3.HibernateTemplate.get(HibernateTemplate.java:526)
	com.coal.dao.impl.UserDaoImpl.findById(UserDaoImpl.java:25)
	com.coal.service.impl.UserServiceImpl.get(UserServiceImpl.java:33)
	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	java.lang.reflect.Method.invoke(Unknown Source)
	org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:319)
	org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
	org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
	org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
	org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90)
	org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
	com.sun.proxy.$Proxy46.get(Unknown Source)
	com.coal.controller.IndexController.doIndex(IndexController.java:25)
	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	java.lang.reflect.Method.invoke(Unknown Source)
	org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:219)
	org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
	org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:100)
	org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:604)
	org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:565)
	org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
	org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)
	org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
	org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)

 

note The full stack trace of the root cause is available in the Apache Tomcat/7.0.79 logs.

所有回答列表(6)
JackTech的gravatar头像
JackTech  LV4 2017年11月30日

常见原因是使用hibernate连接数据库时出错,应查看dao文件目录下sql语句书写方法(包括标点符号)。具体原因可以贴出猜测有错的代码,也可以通过最代码网站联系我。

评论(0) 最佳答案
comejl的gravatar头像
comejl  LV11 2017年11月25日

看一看是不是mysql数据库的问题

禅之禅的gravatar头像
禅之禅  LV9 2017年11月25日

User 的实体 表 加载了

a784748083的gravatar头像
a784748083  LV9 2017年11月29日

没有在数据库中找到User表

 

HTZone的gravatar头像
HTZone  LV1 2017年12月1日

org.hibernate.exception.SQLGrammarException: could not load an entity: [com.coal.entity.User#1234567890]
 

不能加载实体,你看看User

xueyiblood的gravatar头像
xueyiblood  LV1 2017年12月4日

jdbc改没改自己的数据库账号密码啊

顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友