JWorld@TW the best professional Java site in Taiwan
      註冊 | 登入 | 全文檢索 | 排行榜  

» JWorld@TW » Object Relational Mapping » Hibernate  

按列印兼容模式列印這個話題 列印話題    把這個話題寄給朋友 寄給朋友    訂閱主題
reply to postflat modego to previous topicgo to next topic
本主題所含的標籤
無標籤
作者 在Spring+hibernate应用程序下出现JDBC错误
unser





發文: 26
積分: 0
於 2006-03-29 23:27 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
工程:Spring,Hibernate 3
注意是应用程序,不是Web Project

该应用程序在windows下可以正常运行,但在linux下就出现以下错误:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
- SQL Error: 0, SQLState: S0022
- Column 'mailid' not found.
org.hibernate.exception.GenericJDBCException: could not execute query
        at org.hibernate.exception.ErrorCodeConverter.handledNonSpecificException(ErrorCodeConverter.java:92)
        at org.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter.java:80)
        at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
        at org.hibernate.loader.Loader.doList(Loader.java:1596)
        at org.hibernate.loader.Loader.list(Loader.java:1577)
        at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:395)
        at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:271)
        at org.hibernate.impl.SessionImpl.list(SessionImpl.java:844)
        at org.hibernate.impl.QueryImpl.list(QueryImpl.java:74)
        at cn.soyu.sender.mail.Hibernate.MailWithDAOHibernateImpl.getUnSendMail(MailWithDAOHibernateImpl.java:36)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:292)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:155)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:122)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:174)
        at $Proxy1.getUnSendMail(Unknown Source)
        at cn.soyu.sender.mail.SendMailHelper.getUnSendMail(SendMailHelper.java:33)
        at cn.soyu.sender.mail.SendMailTask.run(SendMailTask.java:60)
Caused by: java.sql.SQLException: Column 'mailid' not found.
        at com.mysql.jdbc.ResultSet.findColumn(ResultSet.java:2368)
        at com.mysql.jdbc.ResultSet.getInt(ResultSet.java:1364)
        at org.hibernate.type.IntegerType.get(IntegerType.java:26)
        at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:77)
        at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:68)
        at org.hibernate.loader.Loader.getKeyFromResultSet(Loader.java:759)
        at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:292)
        at org.hibernate.loader.Loader.doQuery(Loader.java:412)
        at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:218)
        at org.hibernate.loader.Loader.doList(Loader.java:1593)
        ... 19 more
- org.hibernate.exception.GenericJDBCException: could not execute query


数据库结构是没有问题的,因为是同一个数据库的,为什么会出现这种情况呢?是不是没有加载哪些包的问题?


reply to postreply to post
話題樹型展開
人氣 標題 作者 字數 發文時間
1878 在Spring+hibernate应用程序下出现JDBC错误 unser 3228 2006-03-29 23:27
1449 Re:在Spring+hibernate应用程序下出现JDBC错误 koji 85 2006-03-30 00:08
» JWorld@TW »  Object Relational Mapping » Hibernate

reply to postflat modego to previous topicgo to next topic
  已讀文章
  新的文章
  被刪除的文章
Jump to the top of page

JWorld@TW 本站商標資訊

Powered by Powerful JuteForum® Version Jute 1.5.8