Announcement Announcement Module
Collapse
No announcement yet.
failover Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • failover

    Hi,

    Need your advise for the failover the following it the version have in my project
    1. Spring 3.0.2 (bundled with hibernate 3.5 - if not wrong as I read from the release is mention hibernate 3.5)
    2. MSSQL 2005

    The part I would like to do is (setup the database mirroring) when primary database is dead it will point to secondary database by monitor with witness (this all done) but when I try set in the jdbc:sqlserver with the failoverPartner it will fail
    for more information please reference as following

    JDBC Connection:
    jdbc:sqlserver://127.0.0.1:1433;DatabaseName=testing_temo;failoverP artner=192.168.1.1;

    Error:

    org.springframework.transaction.CannotCreateTransa ctionException: Could not open Hibernate Session for transaction; nested exception is org.hibernate.TransactionException: JDBC begin failed:
    at org.springframework.orm.hibernate3.HibernateTransa ctionManager.doBegin(HibernateTransactionManager.j ava:596)
    at org.springframework.transaction.support.AbstractPl atformTransactionManager.getTransaction(AbstractPl atformTransactionManager.java:371)
    at org.springframework.transaction.interceptor.Transa ctionAspectSupport.createTransactionIfNecessary(Tr ansactionAspectSupport.java:354)
    at org.springframework.transaction.interceptor.Transa ctionInterceptor.invoke(TransactionInterceptor.jav a:103)
    at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :172)
    at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:202)
    at $Proxy37.getUserAuthen(Unknown Source)
    at com.n2n.beacon.service.coreSystem.CoreSystemServic eImpl.getUserAuthenByLoginId(CoreSystemServiceImpl .java:223)
    at com.n2n.beacon.web.springSecurity.BcnUserDetailsSe rvice.loadUserByUsername(BcnUserDetailsService.jav a:67)
    at org.springframework.security.authentication.dao.Da oAuthenticationProvider.retrieveUser(DaoAuthentica tionProvider.java:82)
    at org.springframework.security.authentication.dao.Ab stractUserDetailsAuthenticationProvider.authentica te(AbstractUserDetailsAuthenticationProvider.java: 124)
    at org.springframework.security.authentication.Provid erManager.doAuthentication(ProviderManager.java:12 0)
    at org.springframework.security.authentication.Abstra ctAuthenticationManager.authenticate(AbstractAuthe nticationManager.java:48)
    at org.springframework.security.authentication.Provid erManager.doAuthentication(ProviderManager.java:13 8)
    at org.springframework.security.authentication.Abstra ctAuthenticationManager.authenticate(AbstractAuthe nticationManager.java:48)
    at org.springframework.security.web.authentication.Us ernamePasswordAuthenticationFilter.attemptAuthenti cation(UsernamePasswordAuthenticationFilter.java:9 7)
    at org.springframework.security.web.authentication.Ab stractAuthenticationProcessingFilter.doFilter(Abst ractAuthenticationProcessingFilter.java:200)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 355)
    at org.springframework.security.web.authentication.lo gout.LogoutFilter.doFilter(LogoutFilter.java:105)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 355)
    at org.springframework.security.web.context.SecurityC ontextPersistenceFilter.doFilter(SecurityContextPe rsistenceFilter.java:79)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 355)
    at org.springframework.security.web.session.Concurren tSessionFilter.doFilter(ConcurrentSessionFilter.ja va:109)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 355)
    at org.springframework.security.web.FilterChainProxy. doFilter(FilterChainProxy.java:149)
    at org.springframework.web.filter.DelegatingFilterPro xy.invokeDelegate(DelegatingFilterProxy.java:237)
    at org.springframework.web.filter.DelegatingFilterPro xy.doFilter(DelegatingFilterProxy.java:167)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:191)
    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.invok e(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:286)
    at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyo teHandler.java:190)
    at org.apache.jk.common.HandlerRequest.invoke(Handler Request.java:283)
    at org.apache.jk.common.ChannelSocket.invoke(ChannelS ocket.java:767)
    at org.apache.jk.common.ChannelSocket.processConnecti on(ChannelSocket.java:697)
    at org.apache.jk.common.ChannelSocket$SocketConnectio n.runIt(ChannelSocket.java:889)
    at org.apache.tomcat.util.threads.ThreadPool$ControlR unnable.run(ThreadPool.java:690)
    at java.lang.Thread.run(Unknown Source)
    Caused by: org.hibernate.TransactionException: JDBC begin failed:
    at org.hibernate.transaction.JDBCTransaction.begin(JD BCTransaction.java:96)
    at org.hibernate.impl.SessionImpl.beginTransaction(Se ssionImpl.java:1353)
    at org.springframework.orm.hibernate3.HibernateTransa ctionManager.doBegin(HibernateTransactionManager.j ava:555)
    ... 41 more
    Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Connection reset by peer: socket write error
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.t erminate(SQLServerConnection.java:1368)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.t erminate(SQLServerConnection.java:1355)
    at com.microsoft.sqlserver.jdbc.TDSChannel.write(IOBu ffer.java:1548)
    at com.microsoft.sqlserver.jdbc.TDSWriter.flush(IOBuf fer.java:2368)
    at com.microsoft.sqlserver.jdbc.TDSWriter.writePacket (IOBuffer.java:2270)
    at com.microsoft.sqlserver.jdbc.TDSWriter.endMessage( IOBuffer.java:1877)
    at com.microsoft.sqlserver.jdbc.TDSCommand.startRespo nse(IOBuffer.java:4403)
    at com.microsoft.sqlserver.jdbc.TDSCommand.startRespo nse(IOBuffer.java:4389)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection$1 ConnectionCommand.doExecute(SQLServerConnection.ja va:1457)
    at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IO Buffer.java:4026)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.e xecuteCommand(SQLServerConnection.java:1416)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.c onnectionCommand(SQLServerConnection.java:1462)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.s etAutoCommit(SQLServerConnection.java:1610)
    at org.apache.commons.dbcp.DelegatingConnection.setAu toCommit(DelegatingConnection.java:371)
    at org.apache.commons.dbcp.PoolingDataSource$PoolGuar dConnectionWrapper.setAutoCommit(PoolingDataSource .java:328)
    at org.hibernate.transaction.JDBCTransaction.begin(JD BCTransaction.java:91)
    ... 43 more

    I have try google and search around cannot find any useful answer, hope someone can guide me about this.

    Thank You in advance....

  • #2
    Hi,

    Anyone have meet this error before? I've try google for this few days unable to find any clue. Hope someone can answer my following question

    1) Hibernate support failover?
    2) If (1) if yes, which class use for? (As currently is using org.springframework.orm.hibernate3.annotation.Anno tationSessionFactoryBean and org.apache.commons.dbcp.BasicDataSource but did not work for the failover)

    * I just need to configure when the [1st] database is fail and it will connect to [2nd] database the data is synronized do not need worry about it but the tomcat to database connection.

    Thank you again

    Comment

    Working...
    X