play + Ebean + postgreSQL 错误集锦

公司在用这三个框架 , 记录一下工作中遇到的错误

1.

Unexpected exception

PersistenceException: ERROR executing DML bindLog[] error[错误: 无效的 "UTF8" 编码字节顺序: 0x00]

No source available, here is the exception stack trace:

->javax.persistence.PersistenceException: ERROR executing DML bindLog[] error[错误: 无效的 "UTF8" 编码字节顺序: 0x00]

com.avaje.ebeaninternal.server.persist.dml.DmlBeanPersister.execute(DmlBeanPersister.java:97)

com.avaje.ebeaninternal.server.persist.dml.DmlBeanPersister.insert(DmlBeanPersister.java:57)

com.avaje.ebeaninternal.server.persist.DefaultPersistExecute.executeInsertBean(DefaultPersistExecute.java:72)

com.avaje.ebeaninternal.server.core.PersistRequestBean.executeNow(PersistRequestBean.java:481)

com.avaje.ebeaninternal.server.core.PersistRequestBean.executeOrQueue(PersistRequestBean.java:511)

com.avaje.ebeaninternal.server.persist.DefaultPersister.insert(DefaultPersister.java:387)

com.avaje.ebeaninternal.server.persist.DefaultPersister.saveEnhanced(DefaultPersister.java:326)

com.avaje.ebeaninternal.server.persist.DefaultPersister.saveRecurse(DefaultPersister.java:296)

com.avaje.ebeaninternal.server.persist.DefaultPersister.save(DefaultPersister.java:263)

com.avaje.ebeaninternal.server.core.DefaultServer.save(DefaultServer.java:1610)

com.avaje.ebeaninternal.server.core.DefaultServer.save(DefaultServer.java:1600)

com.avaje.ebean.Ebean.save(Ebean.java:505)

play.db.ebean.Model.save(Model.java:91)

models.BaseModel.save(BaseModel.java:55)

base.services.SessionDetailService.saveErrorDetail(SessionDetailService.java:55)

base.services.SessionDetailService.saveErrorDetail(SessionDetailService.java:37)

Global.processOnError(Global.java:106)

Global.onError(Global.java:82)

play.core.j.JavaGlobalSettingsAdapter$$anonfun$onError$1.apply(JavaGlobalSettingsAdapter.scala:30)

play.core.j.JavaGlobalSettingsAdapter$$anonfun$onError$1.apply(JavaGlobalSettingsAdapter.scala:30)

play.core.j.JavaHelpers$class.invokeWithContext(JavaHelpers.scala:180)

play.core.j.JavaHelpers$.invokeWithContext(JavaHelpers.scala:187)

play.core.j.JavaGlobalSettingsAdapter.onError(JavaGlobalSettingsAdapter.scala:30)

play.api.Application$class.liftedTree1$1(Application.scala:312)

play.api.Application$class.handleError(Application.scala:301)

play.api.DefaultApplication.handleError(Application.scala:383)

play.core.server.netty.PlayDefaultUpstreamHandler$$anon$2$$anonfun$handle$1.apply(PlayDefaultUpstreamHandler.scala:132)

play.core.server.netty.PlayDefaultUpstreamHandler$$anon$2$$anonfun$handle$1.apply(PlayDefaultUpstreamHandler.scala:128)

play.api.libs.concurrent.PlayPromise$$anonfun$extend1$1.apply(Promise.scala:113)

play.api.libs.concurrent.PlayPromise$$anonfun$extend1$1.apply(Promise.scala:113)

play.api.libs.concurrent.PlayPromise$$anonfun$extend$1$$anonfun$apply$1.apply(Promise.scala:104)

scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24)

scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24)

java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)

java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)

java.lang.Thread.run(Thread.java:662)


解决 : 这里就只是用了简单的查询就报了这个错 ,检查了一下 ,是Ebean对象关系映射的时候对应关系弄错了 ,Bigint对应成了Timestamp

你可能感兴趣的:(play + Ebean + postgreSQL 错误集锦)