Java开发案例全程实录 欣想商城部署失败
发表在JavaWeb图书答疑 2016-12-21
是否精华
版块置顶:

报错信息如下,不知道是为什么?跟老师请教下。
我用的是myeclipse5.5.1 sqlserver2000。已经用上你们最新的jar包了。

2016-12-21 16:47:30 org.springframework.web.servlet.FrameworkServlet initServletBean

严重: Context initialization failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/config/dao-config.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Unable to instantiate default tuplizer [org.hibernate.tuple.component.PojoComponentTuplizer]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:563)

at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)

at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:442)

at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:458)

at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:339)

at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:306)

at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:127)

at javax.servlet.GenericServlet.init(GenericServlet.java:212)

at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1139)

at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)

at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3956)

at org.apache.catalina.core.StandardContext.start(StandardContext.java:4230)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)

at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)

at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)

at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)

at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)

at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)

at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)

at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)

at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)

at org.apache.catalina.core.StandardService.start(StandardService.java:448)

at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)

at org.apache.catalina.startup.Catalina.start(Catalina.java:552)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)


2016-12-21 16:45:05编辑
分享到:
精彩评论 32
herocx
学分:29 LV2
2016-12-21
沙发

Caused by: org.hibernate.HibernateException: Unable to instantiate default tuplizer [org.hibernate.tuple.component.PojoComponentTuplizer]

at org.hibernate.tuple.component.ComponentTuplizerFactory.constructTuplizer(ComponentTuplizerFactory.java:101)

at org.hibernate.tuple.component.ComponentTuplizerFactory.constructDefaultTuplizer(ComponentTuplizerFactory.java:122)

at org.hibernate.tuple.component.ComponentEntityModeToTuplizerMapping.<init>(ComponentEntityModeToTuplizerMapping.java:75)

at org.hibernate.tuple.component.ComponentMetamodel.<init>(ComponentMetamodel.java:73)

at org.hibernate.mapping.Component.buildType(Component.java:184)

at org.hibernate.mapping.Component.getType(Component.java:177)

at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:290)

at org.hibernate.mapping.RootClass.validate(RootClass.java:236)

at org.hibernate.cfg.Configuration.validate(Configuration.java:1332)

at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1835)

at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:860)

at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:779)

at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)

... 41 more

Caused by: java.lang.reflect.InvocationTargetException

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)

at java.lang.reflect.Constructor.newInstance(Unknown Source)

at org.hibernate.tuple.component.ComponentTuplizerFactory.constructTuplizer(ComponentTuplizerFactory.java:98)

... 55 more

Caused by: java.lang.UnsupportedClassVersionError: Bad version number in .class file

at java.lang.ClassLoader.defineClass1(Native Method)

at java.lang.ClassLoader.defineClass(Unknown Source)

at java.security.SecureClassLoader.defineClass(Unknown Source)

at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1852)

at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:876)

at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1329)

at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1208)

at java.lang.ClassLoader.loadClassInternal(Unknown Source)

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Unknown Source)

at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:192)

at org.hibernate.mapping.Component.getComponentClass(Component.java:133)

at org.hibernate.tuple.component.PojoComponentTuplizer.buildGetter(PojoComponentTuplizer.java:156)

at org.hibernate.tuple.component.AbstractComponentTuplizer.<init>(AbstractComponentTuplizer.java:65)

at org.hibernate.tuple.component.PojoComponentTuplizer.<init>(PojoComponentTuplizer.java:60)

... 60 more

2016-12-21 16:47:30 org.apache.catalina.core.ApplicationContext log


herocx
学分:29 LV2
2016-12-21
板凳

严重: StandardWrapper.Throwable

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/config/dao-config.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Unable to instantiate default tuplizer [org.hibernate.tuple.component.PojoComponentTuplizer]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:563)

at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)

at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:442)

at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:458)

at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:339)

at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:306)

at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:127)

at javax.servlet.GenericServlet.init(GenericServlet.java:212)

at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1139)

at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)

at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3956)

at org.apache.catalina.core.StandardContext.start(StandardContext.java:4230)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)

at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)

at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)

at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)

at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)

at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)

at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)

at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)

at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)

at org.apache.catalina.core.StandardService.start(StandardService.java:448)

at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)

at org.apache.catalina.startup.Catalina.start(Catalina.java:552)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)

Caused by: org.hibernate.HibernateException: Unable to instantiate default tuplizer [org.hibernate.tuple.component.PojoComponentTuplizer]

at org.hibernate.tuple.component.ComponentTuplizerFactory.constructTuplizer(ComponentTuplizerFactory.java:101)

at org.hibernate.tuple.component.ComponentTuplizerFactory.constructDefaultTuplizer(ComponentTuplizerFactory.java:122)

at org.hibernate.tuple.component.ComponentEntityModeToTuplizerMapping.<init>(ComponentEntityModeToTuplizerMapping.java:75)

at org.hibernate.tuple.component.ComponentMetamodel.<init>(ComponentMetamodel.java:73)

at org.hibernate.mapping.Component.buildType(Component.java:184)

at org.hibernate.mapping.Component.getType(Component.java:177)

at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:290)

at org.hibernate.mapping.RootClass.validate(RootClass.java:236)

at org.hibernate.cfg.Configuration.validate(Configuration.java:1332)

at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1835)

at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:860)

at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:779)

at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)

... 41 more


herocx
学分:29 LV2
2016-12-21
地板

Caused by: java.lang.reflect.InvocationTargetException

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)

at java.lang.reflect.Constructor.newInstance(Unknown Source)

at org.hibernate.tuple.component.ComponentTuplizerFactory.constructTuplizer(ComponentTuplizerFactory.java:98)

... 55 more

Caused by: java.lang.UnsupportedClassVersionError: Bad version number in .class file

at java.lang.ClassLoader.defineClass1(Native Method)

at java.lang.ClassLoader.defineClass(Unknown Source)

at java.security.SecureClassLoader.defineClass(Unknown Source)

at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1852)

at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:876)

at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1329)

at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1208)

at java.lang.ClassLoader.loadClassInternal(Unknown Source)

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Unknown Source)

at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:192)

at org.hibernate.mapping.Component.getComponentClass(Component.java:133)

at org.hibernate.tuple.component.PojoComponentTuplizer.buildGetter(PojoComponentTuplizer.java:156)

at org.hibernate.tuple.component.AbstractComponentTuplizer.<init>(AbstractComponentTuplizer.java:65)

at org.hibernate.tuple.component.PojoComponentTuplizer.<init>(PojoComponentTuplizer.java:60)

... 60 more

2016-12-21 16:47:30 org.apache.catalina.core.StandardContext loadOnStartup

严重: Servlet /XinXiangShop threw load() exception

java.lang.UnsupportedClassVersionError: Bad version number in .class file

at java.lang.ClassLoader.defineClass1(Native Method)

at java.lang.ClassLoader.defineClass(Unknown Source)

at java.security.SecureClassLoader.defineClass(Unknown Source)

at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1852)

at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:876)

at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1329)

at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1208)

at java.lang.ClassLoader.loadClassInternal(Unknown Source)

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Unknown Source)

at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:192)

at org.hibernate.mapping.Component.getComponentClass(Component.java:133)

at org.hibernate.tuple.component.PojoComponentTuplizer.buildGetter(PojoComponentTuplizer.java:156)

at org.hibernate.tuple.component.AbstractComponentTuplizer.<init>(AbstractComponentTuplizer.java:65)

at org.hibernate.tuple.component.PojoComponentTuplizer.<init>(PojoComponentTuplizer.java:60)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)

at java.lang.reflect.Constructor.newInstance(Unknown Source)

at org.hibernate.tuple.component.ComponentTuplizerFactory.constructTuplizer(ComponentTuplizerFactory.java:98)

at org.hibernate.tuple.component.ComponentTuplizerFactory.constructDefaultTuplizer(ComponentTuplizerFactory.java:122)

at org.hibernate.tuple.component.ComponentEntityModeToTuplizerMapping.<init>(ComponentEntityModeToTuplizerMapping.java:75)

at org.hibernate.tuple.component.ComponentMetamodel.<init>(ComponentMetamodel.java:73)

at org.hibernate.mapping.Component.buildType(Component.java:184)

at org.hibernate.mapping.Component.getType(Component.java:177)

at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:290)

at org.hibernate.mapping.RootClass.validate(RootClass.java:236)

at org.hibernate.cfg.Configuration.validate(Configuration.java:1332)

at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1835)

at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:860)

at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:779)

at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:563)


herocx
学分:29 LV2
2016-12-21
4L

at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)

at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:442)

at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:458)

at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:339)

at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:306)

at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:127)

at javax.servlet.GenericServlet.init(GenericServlet.java:212)

at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1139)

at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)

at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3956)

at org.apache.catalina.core.StandardContext.start(StandardContext.java:4230)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)

at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)

at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)

at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)

at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)

at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)

at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)

at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)

at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)

at org.apache.catalina.core.StandardService.start(StandardService.java:448)

at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)

at org.apache.catalina.startup.Catalina.start(Catalina.java:552)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)


silence雪
学分:378 LV5
2016-12-21
5L

你好:

        根据 [/WEB-INF/config/dao-config.xml] 这个配置文件,去核对你项目内的实体类,看看是否是类名或者包名错误,还是丢失了。如果实体类都没有错,那也许会是数据库表结构有问题了。

herocx
学分:29 LV2
2016-12-21
6L

谢谢老师回答,不过数据库我是直接附加了光盘上的文件。

光盘上的源码,我只改了dao-config.xml这个文件以下部分。

<bean id="dataSource"

class="org.springframework.jdbc.datasource.DriverManagerDataSource">

<property name="driverClassName"

value="com.microsoft.jdbc.sqlserver.SQLServerDriver" />

<property name="url"

value="jdbc:microsoft:sqlserver://192.168.0.22:1433;DatabaseName=db_shop" />

<property name="username" value="sa"/>

<property name="password" value="x12c33"/>

</bean>

就是改了数据库IP和增加了密码

lib加了msbase.jar,mssqlserver.jar,msutil.jar这三个文件

其他地方都没改动。

herocx
学分:29 LV2
2016-12-21
7L

dao-config.xml里就只有<bean id="dao" class="com.lzw.dao.Dao">,包名和类名都是正确的,包括大小写。

查了数据库,com.lzw.model里的表和视图都是正确的,包括大小写。


silence雪
学分:378 LV5
2016-12-22
8L

你好:

        请问你安装的JDK是多少版本的,如果是8的话,换成7或者6再重新运行试一下。

herocx
学分:29 LV2
2016-12-22
9L

我用的是JDK1.6

silence雪
学分:378 LV5
2016-12-22
10L

你把dao-config.xml内容发一下,然后把你项目结构也截个图发一下。

首页上一页 1234 下一页尾页 32 条记录 1/4页
手机同步功能介绍
友情提示:以下图书配套资源能够实现手机同步功能
明日微信公众号
明日之星 明日之星编程特训营
客服热线(每日9:00-17:00)
400 675 1066
mingrisoft@mingrisoft.com
吉林省明日科技有限公司Copyright ©2007-2022,mingrisoft.com, All Rights Reserved长春市北湖科技开发区盛北大街3333号长春北湖科技园项目一期A10号楼四、五层
吉ICP备10002740号-2吉公网安备22010202000132经营性网站备案信息 营业执照