- 浏览: 45532 次
- 性别:
- 来自: 北京
最新评论
-
zhafengliang:
...
jQuery+json+struts2 开发备忘录(一) -
曾经、流泪过:
顶下
jsp页面打印功能 -
147805112:
月份下标从0-11开始,所以用的时候要小心!!
js 比较日期大小 -
147805112:
isStartEndDate 不正确!!
js 比较日期大小
在开发中遇到这样问题在执行查询时提示:
再次访问时报该连接已关闭异常:
在仔细查阅资料后解决办法如下:
在配置文件中加hibernate.connection.release_mode管理为auto
[org.hibernate.jdbc.ConnectionManager] finalize unclosed connection, forgot to call close() on your session?
再次访问时报该连接已关闭异常:
[org.hibernate.jdbc.AbstractBatcher] closeQueryStatement exception clearing maxRows/queryTimeout com.microsoft.sqlserver.jdbc.SQLServerException: 该连接已关闭。 at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerConnection.checkClosed(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerStatement.checkClosed(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerStatement.getMaxRows(Unknown Source) at org.apache.commons.dbcp.DelegatingStatement.getMaxRows(DelegatingStatement.java:234) at org.hibernate.jdbc.AbstractBatcher.closeQueryStatement(AbstractBatcher.java:223) at org.hibernate.jdbc.AbstractBatcher.closeQueryStatement(AbstractBatcher.java:160) at org.hibernate.loader.Loader.getResultSet(Loader.java:1685) at org.hibernate.loader.Loader.doQuery(Loader.java:662) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:223) at org.hibernate.loader.Loader.doList(Loader.java:2147) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2026) at org.hibernate.loader.Loader.list(Loader.java:2021) at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:94) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1455) at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:298) at com.kcyg.dao.impl.TBulBulletinDaoImpl.findHt(TBulBulletinDaoImpl.java:55) at com.kcyg.service.impl.TBulletinServiceImpl.findHt(TBulletinServiceImpl.java:67) 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:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:296) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:177) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy3.findHt(Unknown Source) at com.kcyg.web.office.manage.action.bul.TBulletinAction.findHt(TBulletinAction.java:118) 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:597) at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:404) at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:267) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:229) at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:221) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:150) at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:48) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:123) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:167) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:105) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:83) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:207) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:74) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:127) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) at org.apache.struts2.interceptor.ProfilingActivationInterceptor.intercept(ProfilingActivationInterceptor.java:107) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:206) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:115) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:143) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:121) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:170) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:123) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:50) at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:504) at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:99) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619) 2010-06-08 10:35:21,218 WARN [org.hibernate.util.JDBCExceptionReporter] logExceptions SQL Error: 0, SQLState: 08S01 2010-06-08 10:35:21,218 ERROR [org.hibernate.util.JDBCExceptionReporter] logExceptions 在 DBComms.transmit 操作期间发生异常。异常:Socket closed。上下文:(3) [Thread[http-9080-2,5,main], IO:dc15c, Dbc:19158]。 2010-06-08 10:35:21,218 WARN [org.hibernate.util.JDBCExceptionReporter] logExceptions SQL Error: 0, SQLState: null 2010-06-08 10:35:21,234 ERROR [org.hibernate.util.JDBCExceptionReporter] logExceptions 该连接已关闭。 2010-6-8 10:35:21 org.apache.catalina.core.StandardWrapperValve invoke
在仔细查阅资料后解决办法如下:
在配置文件中加hibernate.connection.release_mode管理为auto
<property name="hibernateProperties"> <props> <prop key="hibernate.dialect"> org.hibernate.dialect.SQLServerDialect </prop> <prop key="hibernate.query.factory_class"> org.hibernate.hql.ast.ASTQueryTranslatorFactory </prop> <prop key="hibernate.show_sql">true</prop> <prop key="hibernate.format_sql">true</prop> <prop key="hibernate.generate_statistics">true</prop> <prop key="hibernate.jdbc.use_streams_for_binary">true</prop> <!-- 查询多条数据时会提升性能 --> <prop key="hibernate.jdbc.fetch_size">50</prop> <!-- 大批量删除、更新 --> <prop key="hibernate.jdbc.betch_size">25</prop> <prop key="hibernate.cache.use_query_cache">false</prop> <prop key="hibernate.cache.use_second_level_cache">false</prop> <prop key="hibernate.cache.provider_class">org.hibernate.cache.EhCacheProvider</prop> <prop key="hibernate.connection.isolation">2</prop> <prop key="hibernate.hbm2ddl.auto">update</prop> <prop key="hibernate.connection.release_mode">auto</prop> </props> </property>
相关推荐
SSH(Secure Shell)是一种安全的网络协议,用于远程登录和管理计算机。然而,在使用 SSH 登录时,可能会遇到 Connection Refused 的问题。本文将详细介绍导致 Connection Refused 的原因和解决方法。 原因一:目标...
Ganymed SSH-2库是由ETH Zurich(瑞士苏黎世联邦理工学院)开发的,它的主要类包括`ch.ethz.ssh2.Connection`和`ch.ethz.ssh2.SCPClient`。这两个类提供了SSH连接管理和SCP文件传输的核心功能。 1. `ch.ethz.ssh2....
SSH2 jar包是一种常用于建立安全远程连接的Java库,主要应用于Secure Shell (SSH) 协议版本2。SSH协议提供了在网络中加密通信的能力,确保数据传输的安全性,避免了密码和其他敏感信息在传输过程中被窃取。SSH2 jar...
1. Connection:代表一个SSH2连接,负责建立和管理与服务器的连接。 2. Session:表示一个会话,可以执行命令、打开通道、进行文件传输等操作。 3. Channel:是会话上的一个数据通道,可以是命令执行通道、SFTP通道...
Java通过ganymed-ssh2-build210.jar库实现SSH远程连接Linux终端是一个常见的应用场景,主要用于自动化运维、系统管理或者开发过程中需要与Linux服务器交互的场景。ganymed-ssh2-build210.jar是Java的一个开源SSH库,...
总的来说,Ganymed SSH2是一个强大的工具,它使得Java开发者能够轻松地在程序中集成SSH连接,实现远程服务器的自动化管理和控制,提升了开发效率和安全性。对于需要处理远程服务器任务的Java应用程序来说,这是一个...
** ganymed-ssh2 工具类 ** 在IT行业中,远程服务器管理是一项至关重要的任务,而SSH(Secure Shell)协议则是实现安全远程访问的标准...通过学习和熟练使用ganymed-ssh2,开发者可以更高效、更安全地管理远程服务器。
虽然SSH2通常不直接与Web框架打交道,但这里可能是为构建SSH2相关Web服务或管理界面而准备的。 8. **log4j-1.2.15.jar** - Log4j是Apache的一个日志记录框架,用于收集和处理应用程序的调试信息。在SSH2实现中,...
标题“ganymed-ssh2-build210”指的是一个基于Java实现的SSH(Secure Shell)库,专门用于远程管理Linux服务器。这个库是 Ganymed SSH-2 的一个特定版本,版本号为210。SSH协议允许用户通过安全加密的通道与远程主机...
在SSH2项目中,Maven通过pom.xml文件定义项目的依赖关系,自动下载并管理所需的库,使得项目结构清晰,易于维护和协作。 在实现登录功能的过程中,开发者可能需要以下步骤: 1. **创建Struts2配置**:在struts.xml...
SSH2在MyEclipse中的配置是一项关键任务,对于开发基于Spring、Struts和Hibernate这三大框架的Java Web应用至关重要。SSH2(Spring、Struts2和Hibernate2)是这些技术的升级版本,提供了更强大的功能和更好的性能。...
SSH-2协议分为几个主要组件,包括身份验证、加密、压缩、密钥交换和通道管理。Ganymed SSH-2库实现了这些组件,允许Java应用进行以下操作: 1. **身份验证**:支持多种身份验证方式,如密码、公钥/私钥对、键盘交互...
17. Spring框架是SSH2中的重要组成部分,它提供依赖注入(DI)和面向切面编程(AOP),以及事务管理等功能。Spring MVC是Spring框架的一个模块,用于构建Web应用。 18. Spring的IoC(Inversion of Control,倒置...
SSH2 Jar 包是开发Java Web应用程序时常用的一组库,它们包含了Struts2、Spring和Hibernate这三大框架的核心组件。这些框架在企业级应用开发中扮演着重要角色,极大地提高了开发效率和代码的可维护性。以下是关于这...
主要类包括`Connection`,负责建立和管理SSH连接;`Session`,处理通道和会话;以及`Sftp`类,实现了SFTP协议。开发者可以通过这些类的实例化和方法调用来实现所需的SSH功能,如打开通道、执行命令、传输文件等。 ...
SSH2框架,全称为Struts2、Spring和Hibernate2,是Java Web开发中常见的三大开源框架集成。它们各自负责Web应用程序的不同层面,协同工作以构建高效、可维护的系统。Struts2作为MVC(模型-视图-控制器)框架处理用户...
这个库不仅支持标准的SSH2连接,还支持SFTP(SSH文件传输协议),使得开发者能够安全地进行文件传输和远程系统管理。`ssh2_python`库适用于Python 2.7版本,且本例中提供的`0.11.0`版本已针对AMD64架构进行了优化。 ...
public SSHService(SSHConnection sshConnection) { this.sshConnection = sshConnection; } public void executeRemoteCommand(String command) { // 使用sshConnection执行远程命令 } } @Configuration ...
在IT行业中,远程服务器管理是不可或缺的一部分,尤其是在分布式系统和...在深入研究ssh-2-server-connection-pool-master这个项目的源代码和文档后,开发者将能够更好地掌握其工作原理,并将其应用到自己的项目中。