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

» JWorld@TW » Java Application Framework » Spring  

按列印兼容模式列印這個話題 列印話題    把這個話題寄給朋友 寄給朋友    訂閱主題
reply to topicthreaded modego to previous topicgo to next topic
話題被移動
該話題已被移動 - koji , 2008-10-17 01:04
如果您尚不清楚該話題被移動的原因,請參考論壇規則以及本版公告或者聯系本版版主。
本主題所含的標籤
無標籤
作者 有關LocalSessionFactoryBean類別使用的問題
iori59483





發文: 38
積分: 0
於 2008-10-17 00: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
1:請問Spring會自動控管org.springframework.orm.hibernate3.LocalSessionFactoryBean類別嗎(就是類似ThreadLocal那樣子,只會有一個session)?

2:我在載入session時,如下

ApplicationContext context = new ClassPathXmlApplicationContext();
LocalSessionFactoryBean sf = (LocalSessionFactoryBean) context.getBean("sessionFactory");

發生下例錯誤,是什麼意思呢?
org.springframework.web.util.NestedServletException:
Request processing failed; nested exception is java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext   org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:583)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
com.bt.internal.filter.EncodingFilter.doFilter(EncodingFilter.java:41)


reply to postreply to post
作者 Re:有關LocalSessionFactoryBean類別使用的問題 [Re:iori59483]
koji

秒速5センチメートル

站長

發文: 8415
積分: 19
於 2008-10-17 01:04 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
BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext

koji


reply to postreply to post
JCConf Taiwan 2015 開始售票了!!
Facebook上的TWJUG社團,歡迎加入
» JWorld@TW »  Java Application Framework » Spring

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

JWorld@TW 本站商標資訊

Powered by Powerful JuteForum® Version Jute 1.5.8