请教大神Spring问题

问题描述

2014-6-2215:20:52org.apache.catalina.core.StandardContextlistenerStart严重:Exceptionsendingcontextinitializedeventtolistenerinstanceofclassorg.springframework.web.context.ContextLoaderListenerorg.springframework.beans.factory.BeanCreationException:Errorcreatingbeanwithname'productTypeServiceBean':Injectionofpersistencefieldsfailed;nestedexceptionisorg.springframework.beans.factory.BeanCreationException:Errorcreatingbeanwithname'entityManagerFactory'definedinclasspathresource[beans.xml]:Invocationofinitmethodfailed;nestedexceptionisjavax.persistence.PersistenceException:[PersistenceUnit:jiangzhf]UnabletobuildEntityManagerFactoryatorg.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessAfterInstantiation(PersistenceAnnotationBeanPostProcessor.java:311)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:959)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)atjava.security.AccessController.doPrivileged(NativeMethod)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)atorg.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)atorg.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221)atorg.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)atorg.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)atorg.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)atorg.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)atorg.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729)atorg.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381)atorg.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)atorg.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)atorg.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)atorg.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4172)atorg.apache.catalina.core.StandardContext.start(StandardContext.java:4671)atorg.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)atorg.apache.catalina.core.StandardHost.start(StandardHost.java:785)atorg.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)atorg.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)atorg.apache.catalina.core.StandardService.start(StandardService.java:525)atorg.apache.catalina.core.StandardServer.start(StandardServer.java:701)atorg.apache.catalina.startup.Catalina.start(Catalina.java:585)atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)atsun.reflect.NativeMethodAccessorImpl.invoke(UnknownSource)atsun.reflect.DelegatingMethodAccessorImpl.invoke(UnknownSource)atjava.lang.reflect.Method.invoke(UnknownSource)atorg.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)atorg.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)Causedby:org.springframework.beans.factory.BeanCreationException:Errorcreatingbeanwithname'entityManagerFactory'definedinclasspathresource[beans.xml]:Invocationofinitmethodfailed;nestedexceptionisjavax.persistence.PersistenceException:[PersistenceUnit:jiangzhf]UnabletobuildEntityManagerFactoryatorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1337)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)atjava.security.AccessController.doPrivileged(NativeMethod)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)atorg.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)atorg.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221)atorg.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)atorg.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)atorg.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)atorg.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:308)atorg.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:297)atorg.springframework.beans.factory.BeanFactoryUtils.beansOfTypeIncludingAncestors(BeanFactoryUtils.java:224)atorg.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findDefaultEntityManagerFactory(PersistenceAnnotationBeanPostProcessor.java:503)atorg.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findEntityManagerFactory(PersistenceAnnotationBeanPostProcessor.java:473)atorg.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor$PersistenceElement.resolveEntityManager(PersistenceAnnotationBeanPostProcessor.java:598)atorg.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor$PersistenceElement.getResourceToInject(PersistenceAnnotationBeanPostProcessor.java:569)atorg.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:180)atorg.springframework.beans.factory.annotation.InjectionMetadata.injectFields(InjectionMetadata.java:105)atorg.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessAfterInstantiation(PersistenceAnnotationBeanPostProcessor.java:308)...31moreCausedby:javax.persistence.PersistenceException:[PersistenceUnit:jiangzhf]UnabletobuildEntityManagerFactoryatorg.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:677)atorg.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:132)atorg.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:224)atorg.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:291)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1368)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1334)...50more这是什么原因造成的呢。配置文件

解决方案

解决方案二:
你最好把源码贴上来,
解决方案三:
和jiangzhf相关的类是不是有问题
解决方案四:
Errorcreatingbeanwithname'productTypeServiceBean':Injectionofpersistencefieldsfailed;nestedexceptionisorg.springframework.beans.factory.BeanCreationException:Errorcreatingbeanwithname'entityManagerFactory'definedinclasspathresource[beans.xml]:‘把你的beans.xml贴出来看看
解决方案五:
应该是spring的配置文件.xml有问题
解决方案六:
Errorcreatingbeanwithname'productTypeServiceBean':Injectionofpersistencefieldsfailed;nestedexceptionisorg.springframework.beans.factory.BeanCreationException:Errorcreatingbeanwithname'entityManagerFactory'definedinclasspathresource[beans.xml]:beans.xml配制的entityManagerFactory的class的path的源码有问题?英文不好。。。

时间: 2024-11-03 15:18:28

请教大神Spring问题的相关文章

springMVC报错,请教大神!

问题描述 springMVC报错,请教大神! 最近在学习springMVC,搭建好框架后,报出了如下错误,求大神指教: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userManagerBase' defined in file [F:Softwareapache-tomcat-7.0.65webappsspringWEB-INFclassescommuaaxmls

html-本人菜鸟一枚,请教大神一个关于CSS中ID和类选择器不能用,而标签选择器能用的问题

问题描述 本人菜鸟一枚,请教大神一个关于CSS中ID和类选择器不能用,而标签选择器能用的问题 FIREFOX浏览器,代码如下: HTML代码片段: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> @import url(template/default/styl

通讯录-新手请教大神们一个问题。

问题描述 新手请教大神们一个问题. 刚学习android,想做一个关于短信的小应用,我想在通讯录获得联系人,但是不是获得一个联系人,也不是全部的,就想调用那个短信群发的时候会跳转到的可以多选联系人界面上,如果是普通的通讯录我会调用: Intent intent = new Intent(Intent.ACTION_PICK ContactsContract.Contacts.CONTENT_URI); 但是调用那个多选联系人的通讯录界面我就不会了.百度也没找到有关的资料,所以请教一下各位大神!谢

hyper v-Hyper-v远程连接问题,请教大神。

问题描述 Hyper-v远程连接问题,请教大神. #define CHK_HRES(op) { HRESULT tmp_hresult___ = op; if (FAILED(tmp_hresult___)) throw CAtlException(tmp_hresult___); } void CChildDlg7::OnHyper_v(){ //CHK_HRES(pObject->Method()); CComBSTR namespacePath = L"\\"; CStri

HttpURLConnection异常 请教大神

问题描述 HttpURLConnection异常 请教大神 URL url = new URL(strUrl); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setDoOutput(true); connection.setRequestMethod("POST");DataOutputStream out = new DataOutputStream( conn

请教大神一个问题,jboss集成netty 有人知道咋弄吗

问题描述 请教大神一个问题,jboss集成netty 有人知道咋弄吗 我想把netty集成到jboss容器里,有人知道怎么弄嘛?谢谢各位了 解决方案 难道没有大神?? 很捉急啊?拜托拜托啊 解决方案二: Netty是由JBOSS提供的一个java开源框架,你直接在eclipse里开发使用就行了,应用服务器可以使用Jboss或者其它的 不需要把netty直接集成到jboss容器里 解决方案三: 关于netty学习的例子,可以参考以下链接 http://mushiqianmeng.blog.51ct

resultset可...-请教大神关于sql 的问题

问题描述 请教大神关于sql 的问题 sql中,如果有两条一样的数据,根据某个字段的不同,去最小的一条数据插入表中怎么写 ? 解决方案 向各位大神请教个问题 解决方案二: insert into tablename() value(select name from tablename where arg1<arg2); 解决方案三: insert(字段) into table (select 字段 from table where 条件) 解决方案四: 使用min函数试试看看 解决方案五: 先用

for-有个 关于 Collections.sort 排序的问题 请教大神门哈

问题描述 有个 关于 Collections.sort 排序的问题 请教大神门哈 for (RefractionCollection collection : refractionCollections) { List<RefractionCollection> list2 = new ArrayList<RefractionCollection>(); list2.add(collection); Collections.sort(list2); } 假设现在 这个list 2

补丁-本人linux小白,请教大神

问题描述 本人linux小白,请教大神 在ubuntu系统安装gcc时,如果要使编写的程序同时能在windows运行,需要安装几个补丁(如下),找到一个英文指导书,但里面有个地方不理解,截图如下: 这些图片中的'~/tools/mingw32/'.'~/tools/mingw32-binutils/'. '~/tools/mingw32-runtime/' 这三个文件夹在哪儿啊?是要自己创建吗? 解决方案 图片中的'~/tools/mingw32/'.'~/tools/mingw32-binut