jsp项目开发全程实录(欣想电子商城)
发表在JavaWeb图书答疑 2010-03-18
是否精华
版块置顶:
// 获取单个商品信息
public TbGoods getGoods(Long id) {
return (TbGoods) getHibernateTemplate().get(TbGoods.class, id);
}
我导入这个项目就有很多错咯,然后导了些包进去就剩下这个错误
不能编译 500错误
这个是类DAO的错误
getHibernateTemplate().get(TbGoods.class, id); 这个显示错误

编译错误的显示:
javax.servlet.ServletException: Servlet.init() for servlet dispatcher threw exception
org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:670)
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:637)
org.apache.jsp.index_jsp._jspService(index_jsp.java:45)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


root cause 

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/config/dao-config.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'driverClassName' threw exception; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Could not load JDBC driver class [com.microsoft.jdbc.sqlserver.SQLServerDriver]; nested exception is java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1130)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:862)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:423)
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:291)
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:332)
org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:266)
org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:236)
org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:126)
javax.servlet.GenericServlet.init(GenericServlet.java:211)
org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:670)
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:637)
org.apache.jsp.index_jsp._jspService(index_jsp.java:45)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


root cause 

org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'driverClassName' threw exception; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Could not load JDBC driver class [com.microsoft.jdbc.sqlserver.SQLServerDriver]; nested exception is java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver
org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:104)
org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:59)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1127)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:862)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:423)
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:291)
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:332)
org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:266)
org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:236)
org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:126)
javax.servlet.GenericServlet.init(GenericServlet.java:211)
org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:670)
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:637)
org.apache.jsp.index_jsp._jspService(index_jsp.java:45)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

分享到:
精彩评论 3
绿草_mrkj
学分:0 LV1
2010-03-18
沙发
  把错误提示信息发表到论坛中。
lxgroach
学分:0 LV1
TA的每日心情
。。
2024-11-05 10:47:32
2010-03-18
板凳
[FIELDSET][LEGEND]引自:1楼[/LEGEND]
  把错误提示信息发表到论坛中。
[/FIELDSET]

回复:
  修改了 请看看
柠檬草
学分:0 LV1
2010-03-19
地板
读者您好!
检查一下项目中的数据源的配置。
首页上一页 1 下一页尾页 3 条记录 1/1页
手机同步功能介绍
友情提示:以下图书配套资源能够实现手机同步功能
明日微信公众号
明日之星 明日之星编程特训营
客服热线(每日9:00-17:00)
400 675 1066
mingrisoft@mingrisoft.com
吉林省明日科技有限公司Copyright ©2007-2022,mingrisoft.com, All Rights Reserved长春市北湖科技开发区盛北大街3333号长春北湖科技园项目一期A10号楼四、五层
吉ICP备10002740号-2吉公网安备22010202000132经营性网站备案信息 营业执照