java 连接sysbase,初学者请教hibernate连接sysbase问题

ca56232b3bbedf9a539d07f37fffb99a.gif

3144d8b7615c79d9f638db40d5689d26.gif

a218af6549b45ee526caf607ebff1358.gif

0f8df0e29816ae721419de940fb833d1.gif

初学者请教hibernate连接sysbase问题

log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).

log4j:WARN Please initialize the log4j system properly.

Hibernate: insert into users (name, birthday) values (?, ?)

select @@identity

Exception in thread "main" org.hibernate.exception.SQLGrammarException: could not insert: [cn.itcast.bean.Users]

at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)

at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)

at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:40)

at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2158)

at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2638)

at org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:48)

at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:250)

at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:298)

at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:181)

at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:107)

at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:187)

at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:33)

at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:172)

at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:27)

at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)

at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:535)

at org.hibernate.impl.SessionImpl.save(SessionImpl.java:523)

at org.hibernate.impl.SessionImpl.save(SessionImpl.java:519)

at cn.itcast.hibernate.TestHibernate.main(TestHibernate.java:26)

Caused by: com.sybase.jdbc2.jdbc.SybSQLException: users not found. Specify owner.objectname or use sp_help to check whether the object exists (sp_help may produce lots of output).

at com.sybase.jdbc2.tds.Tds.processEed(Tds.java:2535)

at com.sybase.jdbc2.tds.Tds.nextResult(Tds.java:1916)

at com.sybase.jdbc2.jdbc.ResultGetter.nextResult(ResultGetter.java:69)

at com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:201)

at com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:182)

at com.sybase.jdbc2.jdbc.SybStatement.executeLoop(SybStatement.java:1596)

at com.sybase.jdbc2.jdbc.SybStatement.execute(SybStatement.java:1588)

at com.sybase.jdbc2.jdbc.SybPreparedStatement.execute(SybPreparedStatement.java:580)

at org.hibernate.id.IdentityGenerator$InsertSelectDelegate.executeAndExtract(IdentityGenerator.java:108)

at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:33)

... 16 more

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值