hibernate jpa 注解 项目启动报错

openDatabase 发布于 2016/08/16 16:36
阅读 572
收藏 0

商户(trade)  店铺(trade_shop)  店铺管理员(trade_admin)

店铺表有字段trade_id 指向商户表主键

店铺管理员表有字段trade_id 指向商户表主键


1.商户类

package com.vivebest.shop.entity;



import java.util.Date;
import java.util.HashSet;
import java.util.Set;


import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;


@Entity
@Table(name = "gbm_trade")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "trade_sequence")
public class Trade extends BaseEntity {


private static final long serialVersionUID = -802243610844989819L;

/** 商户名称 */
private String name;

/** 商户地址 */
private String addr;

/** 开通日期 */
private Date apply_date;

/** 商户logo */
private String logo_url;

/** 联系人 */
private String apply;

/** 联系方式 */
private String apply_tel;

/** 证件号码 */
private String cert_no;

/** 组织机构代码编号 */
private String group_no;

/** 组织机构营业证照片 */
private String group_photo;

/** 邮箱 */
private String email;

/** 状态 */
private int status;

/** 备注 */
private String remark;

/** 银行名称 */
private String bank_name;

/** 银行卡号 */
private String card_no;

/** 开户人姓名 */
private String card_name;

/** TradeShop */
@OneToMany(fetch = FetchType.LAZY)
private Set<TradeShop> tradeShops = new HashSet<TradeShop>();

/** TradeAdmin */
@OneToMany(fetch = FetchType.LAZY)
private Set<TradeAdmin> tradeAdmins = new HashSet<TradeAdmin>();

public String getName() {
return name;
}


public void setName(String name) {
this.name = name;
}


public String getAddr() {
return addr;
}


public void setAddr(String addr) {
this.addr = addr;
}


public Date getApply_date() {
return apply_date;
}


public void setApply_date(Date apply_date) {
this.apply_date = apply_date;
}


public String getLogo_url() {
return logo_url;
}


public void setLogo_url(String logo_url) {
this.logo_url = logo_url;
}


public String getApply() {
return apply;
}


public void setApply(String apply) {
this.apply = apply;
}


public String getApply_tel() {
return apply_tel;
}


public void setApply_tel(String apply_tel) {
this.apply_tel = apply_tel;
}


public String getCert_no() {
return cert_no;
}


public void setCert_no(String cert_no) {
this.cert_no = cert_no;
}


public String getGroup_no() {
return group_no;
}


public void setGroup_no(String group_no) {
this.group_no = group_no;
}


public String getGroup_photo() {
return group_photo;
}


public void setGroup_photo(String group_photo) {
this.group_photo = group_photo;
}


public String getEmail() {
return email;
}


public void setEmail(String email) {
this.email = email;
}


public int getStatus() {
return status;
}


public void setStatus(int status) {
this.status = status;
}


public String getRemark() {
return remark;
}


public void setRemark(String remark) {
this.remark = remark;
}


public String getBank_name() {
return bank_name;
}


public void setBank_name(String bank_name) {
this.bank_name = bank_name;
}


public String getCard_no() {
return card_no;
}


public void setCard_no(String card_no) {
this.card_no = card_no;
}


public String getCard_name() {
return card_name;
}


public void setCard_name(String card_name) {
this.card_name = card_name;
}

public Set<TradeShop> getTradeShops() {
return tradeShops;
}


public void setTradeShops(Set<TradeShop> tradeShops) {
this.tradeShops = tradeShops;
}


public Set<TradeAdmin> getTradeAdmins() {
return tradeAdmins;
}


public void setTradeAdmins(Set<TradeAdmin> tradeAdmins) {
this.tradeAdmins = tradeAdmins;
}

}


2.店铺类

package com.vivebest.shop.entity;


import java.util.Date;


import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;


@Entity
@Table(name = "gbm_trade_shop")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "trade_shop_sequence")
public class TradeShop extends BaseEntity {


private static final long serialVersionUID = 5522270054903623318L;


/** 开通日期 */
private Date apply_date;

/** 商户id */
@ManyToOne(fetch = FetchType.LAZY)
private Trade trade;

/** 店铺名称 */
private String name;

/** 店铺logo */
private String logo_url;

/** 店铺评分 */
private String score;

/** 开始工作时间 */
private String begin_worktime;

/** 结束工作时间 */
private String end_worktime;

/** 在线客服,多个|分隔 */
private String customer_service;

/** 服务地址 */
private String addr;

/** 店铺公告 */
private String shop_board;

/** 状态 */
private int status;

/** 备注 */
private String remark;


public Date getApply_date() {
return apply_date;
}


public void setApply_date(Date apply_date) {
this.apply_date = apply_date;
}


public Trade getTrade() {
return trade;
}


public void setTrade(Trade trade) {
this.trade = trade;
}


public String getName() {
return name;
}


public void setName(String name) {
this.name = name;
}


public String getLogo_url() {
return logo_url;
}


public void setLogo_url(String logo_url) {
this.logo_url = logo_url;
}


public String getScore() {
return score;
}


public void setScore(String score) {
this.score = score;
}


public String getBegin_worktime() {
return begin_worktime;
}


public void setBegin_worktime(String begin_worktime) {
this.begin_worktime = begin_worktime;
}


public String getEnd_worktime() {
return end_worktime;
}


public void setEnd_worktime(String end_worktime) {
this.end_worktime = end_worktime;
}


public String getCustomer_service() {
return customer_service;
}


public void setCustomer_service(String customer_service) {
this.customer_service = customer_service;
}


public String getAddr() {
return addr;
}


public void setAddr(String addr) {
this.addr = addr;
}


public String getShop_board() {
return shop_board;
}


public void setShop_board(String shop_board) {
this.shop_board = shop_board;
}


public int getStatus() {
return status;
}


public void setStatus(int status) {
this.status = status;
}


public String getRemark() {
return remark;
}


public void setRemark(String remark) {
this.remark = remark;
}


}


3.店铺管理员类


package com.vivebest.shop.entity;


import java.util.Date;


import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
@Entity
@Table(name = "gbm_trade_admin")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "trade_admin_sequence")
public class TradeAdmin extends BaseEntity {


private static final long serialVersionUID = 4394109768544058338L;


/** 部门 */
private String department;

/** e-mail */
private String email;


/** 是否启用 */
private int is_enabled;

/** 是否锁定 */
private int is_locked;

/** 锁定日期 */
private Date locked_date;

/** 最后登录日期 */
private Date login_date;

/** 连续登录失败次数 */
private int login_failure_count;

/** 最后登录ip */
private String login_ip;

/** 姓名 */
private String name;

/** 密码 */
private String password;

/** 用户名 */
private String username;

/** 商户id */
@ManyToOne(fetch = FetchType.LAZY)
private Trade trade;


public String getDepartment() {
return department;
}


public void setDepartment(String department) {
this.department = department;
}


public String getEmail() {
return email;
}


public void setEmail(String email) {
this.email = email;
}


public int getIs_enabled() {
return is_enabled;
}


public void setIs_enabled(int is_enabled) {
this.is_enabled = is_enabled;
}


public int getIs_locked() {
return is_locked;
}


public void setIs_locked(int is_locked) {
this.is_locked = is_locked;
}


public Date getLocked_date() {
return locked_date;
}


public void setLocked_date(Date locked_date) {
this.locked_date = locked_date;
}


public Date getLogin_date() {
return login_date;
}


public void setLogin_date(Date login_date) {
this.login_date = login_date;
}


public int getLogin_failure_count() {
return login_failure_count;
}


public void setLogin_failure_count(int login_failure_count) {
this.login_failure_count = login_failure_count;
}


public String getLogin_ip() {
return login_ip;
}


public void setLogin_ip(String login_ip) {
this.login_ip = login_ip;
}


public String getName() {
return name;
}


public void setName(String name) {
this.name = name;
}


public String getPassword() {
return password;
}


public void setPassword(String password) {
this.password = password;
}


public String getUsername() {
return username;
}


public void setUsername(String username) {
this.username = username;
}


public Trade getTrade() {
return trade;
}


public void setTrade(Trade trade) {
this.trade = trade;
}


}


项目启动报错:


2016-08-16 16:26:38 [ INFO] (Version.java:39) - Hibernate Search 3.4.2.Final
2016-08-16 16:26:38 [ INFO] (DefaultSingletonBeanRegistry.java:444) - Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@f4ea3fe: defining beans [org.springframework.context.support.PropertySourcesPlaceholderConfigurer#0,adDaoImpl,adPositionDaoImpl,adminDaoImpl,areaDaoImpl,articleCategoryDaoImpl,articleDaoImpl,attributeDaoImpl,bookingDaoImpl,brandDaoImpl,busniessCooperateDaoImpl,cartDaoImpl,cartItemDaoImpl,changesDaoImpl,changesItemDaoImpl,consultationDaoImpl,couponActosDaoImpl,couponCodeDaoImpl,couponDaoImpl,deliveryCenterDaoImpl,deliveryCorpDaoImpl,deliveryTemplateDaoImpl,depositDaoImpl,emailCheckDaoImpl,friendLinkDaoImpl,gameRecordDaoImpl,goodsDaoImpl,guessYouLikeDaoImpl,integrationRuleDaoImpl,logDaoImpl,memberAttributeDaoImpl,memberBirthdayRigthsDaoImpl,memberDaoImpl,memberRankDaoImpl,memberRankRigthsDaoImpl,messageDaoImpl,navigationDaoImpl,orderDaoImpl,orderItemDaoImpl,orderLogDaoImpl,parameterDaoImpl,parameterGroupDaoImpl,paymentDaoImpl,paymentMethodDaoImpl,pluginConfigDaoImpl,pointActosDaoImpl,posterDaoImpl,productCateIndexDaoImpl,productCategoryDaoImpl,productDaoImpl,productNotifyDaoImpl,productRecommondDaoImpl,promotionDaoImpl,promotionProductsDaoImpl,questionTransferDaoImpl,questionnaireAnswerDaoImpl,receiverDaoImpl,refundsDaoImpl,returnsDaoImpl,reviewDaoImpl,rightsOrderDaoImpl,rightOrderItemDaoImpl,rightsBrandDaoImpl,rightsBrandTypeDaoImpl,rightsCategoryDaoImpl,rightsCodeDaoImpl,rightsDaoImpl,rightsTradeDaoImpl,roleDaoImpl,seoDaoImpl,shippingCalculateDaoImpl,shippingDaoImpl,shippingMethodDaoImpl,signInDaoImpl,signInRuleDaoImpl,smsDaoImpl,snDaoImpl,specificationDaoImpl,specificationValueDaoImpl,tagDaoImpl,tieInSaleCatetoryDaoImpl,tieInSaleDaoImpl,tieInSaleTitleDaoImpl,siteStatusFilter,alipayBankPlugin,alipayDirectPlugin,alipayDualPlugin,alipayPartnerPlugin,filePlugin,ftpPlugin,ossPlugin,pay99billPlugin,pay99billBankPlugin,paypalPlugin,tenpayBankPlugin,tenpayDirectPlugin,tenpayPartnerPlugin,unionpayPlugin,yeepayPlugin,adPositionServiceImpl,adServiceImpl,adminServiceImpl,areaServiceImpl,articleCategoryServiceImpl,articleServiceImpl,attributeServiceImpl,bookingServiceImpl,brandServiceImpl,busniessCooperateServiceImpl,cacheServiceImpl,captchaServiceImpl,cartItemServiceImpl,cartServiceImpl,changesItemServiceImpl,changesServiceImpl,consultationServiceImpl,couponActosServiceImpl,couponCodeServiceImpl,couponServiceImpl,creditServiceImpl,deliveryCenterServiceImpl,deliveryCorpServiceImpl,deliveryTemplateServiceImpl,depositServiceImpl,emailCheckServiceImpl,fileServiceImpl,friendLinkServiceImpl,apiGBMQYServiceImpl,gameRecordServiceImpl,goodsServiceImpl,guessYouLikeServiceImpl,integrationRuleServiceImpl,logConfigServiceImpl,logServiceImpl,mailServiceImpl,memberAttributeServiceImpl,memberBirthdayRigthsServiceImpl,memberRankRigthsServiceImpl,memberRankServiceImpl,memberServiceImpl,messageServiceImpl,navigationServiceImpl,orderItemServiceImpl,orderLogServiceImpl,orderServiceImpl,parameterGroupServiceImpl,parameterServiceImpl,paymentMethodServiceImpl,paymentServiceImpl,pluginConfigServiceImpl,pluginServiceImpl,pointActosServiceImpl,posterServiceImpl,productCateIndexServiceImpl,productCategoryServiceImpl,productImageServiceImpl,productNotifyServiceImpl,productRecommondServiceImpl,productServiceImpl,promotionProductsServiceImpl,promotionServiceImpl,questionTransferServiceImpl,questionnareAnswerServiceImpl,rsaServiceImpl,receiverServiceImpl,refundsServiceImpl,returnsServiceImpl,reviewServiceImpl,rightsOrderItemServiceImpl,rightsOrderServiceImpl,rightsBrandServiceImpl,rightsBrandTypeServiceImpl,rightsCategoryServiceImpl,rightsCodeServiceImpl,rightsServiceImpl,rightsTradeServiceImpl,roleServiceImpl,searchServiceImpl,seoServiceImpl,shippingCalculateServiceImpl,shippingMethodServiceImpl,shippingServiceImpl,signInRuleServiceImpl,signInServiceImpl,smsServiceImpl,snServiceImpl,specificationServiceImpl,specificationValueServiceImpl,staticServiceImpl,tagServiceImpl,templateServiceImpl,tieInSaleCatetoryServiceImpl,tieInSaleServiceImpl,tieInSaleTitleServiceImpl,adPositionDirective,articleCategoryChildrenListDirective,articleCategoryParentListDirective,articleCategoryRootListDirective,articleListDirective,brandListDirective,choiceBookingDirective,consultationListDirective,currentMemberDirective,dailySpecialDirective,executeTimeDirective,favoriteProductDirective,flashMessageDirective,followBusinessDirective,friendLinkListDirective,guessYouLikeDirective,homeBrandDirective,homeGuessYouFavoriteDirective,homeRightDirective,memberAttributeListDirective,mzProductDirective,navigationListDirective,niciwapFlashMessageDirective,paginationDirective,productCateIndexListDirective,productCategoryChildrenListDirective,productCategoryIndexListDirective,productCategoryParentListDirective,productCategoryRootListDirective,productListDirective,promotionListDirective,recommendTradeDirective,reviewListDirective,saleHotProductDirective,saleProductDirective,seoDirective,tagListDirective,wapFlashMessageDirective,abbreviateMethod,currencyMethod,messageMethod,springUtils,robotKeywordDaoImpl,rebotMessageDaoImpl,rebotKeywordServiceImpl,rebotMessageServiceImpl,tradeAdminDaoImpl,tradeApplyDaoImpl,tradeDaoImpl,tradeShopDaoImpl,tradeAdminServiceImpl,tradeApplyServiceImpl,tradeServiceImpl,tradeShopServiceImpl,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,dataSource,entityManagerFactory,transactionManager,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0,org.springframework.transaction.interceptor.TransactionInterceptor#0,org.springframework.transaction.config.internalTransactionAdvisor,org.springframework.cache.annotation.AnnotationCacheOperationSource#0,org.springframework.cache.interceptor.CacheInterceptor#0,org.springframework.cache.config.internalCacheAdvisor,org.springframework.beans.factory.config.MethodInvokingFactoryBean#0,messageSource,ehCacheManager,cacheManager,localeResolver,imageCaptchaService,taskExecutor,org.springframework.context.annotation.internalAsyncAnnotationProcessor,org.springframework.context.annotation.internalScheduledAnnotationProcessor,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor]; root of factory hierarchy
2016-08-16 16:26:38 [ INFO] (DruidDataSource.java:1288) - {dataSource-1} closed
2016-08-16 16:26:38 [ERROR] (ContextLoader.java:319) - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in URL [file:/C:/workSpace/workSpace_ZHMall/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/mall-web-merchant/WEB-INF/classes/applicationContext.xml]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build EntityManagerFactory
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1488)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstrac八月 16, 2016 4:26:38 下午 org.apache.catalina.core.StandardContext listenerStart
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in URL [file:/C:/workSpace/workSpace_ZHMall/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/mall-web-merchant/WEB-INF/classes/applicationContext.xml]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build EntityManagerFactory
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1488)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1117)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:922)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4842)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5303)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1407)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1397)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build EntityManagerFactory
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:915)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:74)
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:288)
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:310)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
... 21 more
Caused by: org.hibernate.MappingException: Could not determine type for: java.util.Set, at table: gbm_trade, for columns: [org.hibernate.mapping.Column(trade_shops)]
at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:306)
at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:290)
at org.hibernate.mapping.Property.isValid(Property.java:243)
at org.hibernate.mapping.PersistentClass.validate(PersistentClass.java:464)
at org.hibernate.mapping.RootClass.validate(RootClass.java:235)
at org.hibernate.cfg.Configuration.validate(Configuration.java:1362)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1865)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:906)
... 26 more


八月 16, 2016 4:26:38 下午 org.apache.catalina.core.StandardContext startInternal
严重: One or more listeners failed to start. Full details will be found in the appropriate container log file
八月 16, 2016 4:26:38 下午 org.apache.catalina.core.StandardContext startInternal
严重: Context [/mer] startup failed due to previous errors
八月 16, 2016 4:26:38 下午 org.apache.catalina.core.ApplicationContext log
信息: Closing Spring root WebApplicationContext
八月 16, 2016 4:26:38 下午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesJdbc
警告: The web application [mer] registered the JDBC driver [com.alibaba.druid.proxy.DruidDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
八月 16, 2016 4:26:38 下午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesJdbc
警告: The web application [mer] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
八月 16, 2016 4:26:38 下午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
警告: The web application [mer] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.lang.Object.wait(Native Method)
 java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:135)
 com.mysql.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:40)
八月 16, 2016 4:26:38 下午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
警告: The web application [mer] appears to have started a thread named [Druid-ConnectionPool-Create-1869501443] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 sun.misc.Unsafe.park(Native Method)
 java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)
 java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2043)
 com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(DruidDataSource.java:1629)
tBeanFactory.java:194)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1117)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:922)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4842)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5303)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1407)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1397)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build EntityManagerFactory
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:915)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:74)
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:288)
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:310)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
... 21 more
Caused by: org.hibernate.MappingException: Could not determine type for: java.util.Set, at table: gbm_trade, for columns: [org.hibernate.mapping.Column(trade_shops)]
at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:306)
at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:290)
at org.hibernate.mapping.Property.isValid(Property.java:243)
at org.hibernate.mapping.PersistentClass.validate(PersistentClass.java:464)
at org.hibernate.mapping.RootClass.validate(RootClass.java:235)
at org.hibernate.cfg.Configuration.validate(Configuration.java:1362)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1865)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:906)
... 26 more
八月 16, 2016 4:26:38 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-nio-8080"]
八月 16, 2016 4:26:38 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-nio-8009"]
八月 16, 2016 4:26:38 下午 org.apache.catalina.startup.Catalina start
信息: Server startup in 13993 ms




加载中
返回顶部
顶部