1 Reply Latest reply on Feb 26, 2010 5:29 PM by Dean Hiller

    any seam-spec experts? long conv. pattern broke here...

    Dean Hiller Expert

      The pattern is great on the surface(and with postgres, it rocks)....


      tx.begin();
      
      //do code including 
      
      tx.commit();



      But in many cases you are just showing a semi-static page like error.xhtml(the tabs in the template are not static), but there are no hits to the database.  Is there someone in the specification that says tx.begin() should not result in a call to the database(I thought there was some info on this).  Oracle hits the database on tx.begin putting seam in an infinite redirect if the database is down as it keeps trying to redirect to error.xhtml.


      I have tried moving error.xhtml to JSF(while keeping it in facelets) but seam's redirect was not working at all(and this feels like a hack since postgres works here).


      Is there any info in the specifications to get oracle to make their driver work like postgres driver?


      The stack trace we saw with oracle was this(over and over as it keeps trying to load the error.xhtml page and redirecting to itself)....


      Feb 25, 2010 8:33:43 AM org.hibernate.util.JDBCExceptionReporter
      logExceptions
      WARNING: SQL Error: 1034, SQLState: 08006
      Feb 25, 2010 8:33:43 AM org.hibernate.util.JDBCExceptionReporter
      logExceptions
      SEVERE: ORA-01034: ORACLE not available
      ORA-27101: shared memory realm does not exist
      Linux-x86_64 Error: 2: No such file or directory
      
      - handled and logged exception
      java.lang.IllegalStateException: Could not start transaction
              at
      org.jboss.seam.jsf.SeamPhaseListener.begin(SeamPhaseListener.java:598)
              at
      org.jboss.seam.jsf.SeamPhaseListener.begin(SeamPhaseListener.java:583)
              at
      org.jboss.seam.jsf.SeamPhaseListener.handleTransactionsBeforePhase(SeamP
      haseListener.java:327)
              at
      org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListene
      r.java:144)
              at
      org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:
      118)
              at
      com.sun.faces.lifecycle.Phase.handleBeforePhase(Phase.java:214)
              at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:96)
              at
      com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
              at
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
              at
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
      tionFilterChain.java:290)
              at
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
      erChain.java:206)
              at
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.ja
      va:83)
              at
      org.jboss.seam.web.RewriteFilter.doFilter(RewriteFilter.java:63)
              at
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.ja
      va:69)
              at
      org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
              at
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.ja
      va:69)
              at
      org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
              at
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.ja
      va:69)
              at
      org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
              at
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.ja
      va:69)
              at
      org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
              at
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.ja
      va:69)
              at
      org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
              at
      org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
              at
      org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter
      .java:368)
              at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)
              at
      org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
              at
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.ja
      va:69)
              at
      org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
              at
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.ja
      va:69)
              at
      org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)
              at
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.ja
      va:69)
              at
      org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
              at
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
      tionFilterChain.java:235)
              at
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
      erChain.java:206)
              at
      net.voicelog.web.http.LogHttpReqFilter.doFilter(LogHttpReqFilter.java:60
      )
              at
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
      tionFilterChain.java:235)
              at
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
      erChain.java:206)
              at
      net.voicelog.web.http.FilterForLogging.doFilter(FilterForLogging.java:52
      )
              at
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
      tionFilterChain.java:235)
              at
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
      erChain.java:206)
              at
      org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
      e.java:233)
              at
      org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
      e.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.invoke(StandardEngineValve.
      java:109)
              at
      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:2
      93)
              at
      org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:84
      9)
              at
      org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
      Http11Protocol.java:583)
              at
      org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
              at java.lang.Thread.run(Thread.java:619)
      Caused by: javax.persistence.PersistenceException:
      org.hibernate.exception.JDBCConnectionException: Cannot open connection
              at
      org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(Ab
      stractEntityManagerImpl.java:614)
              at
      org.hibernate.ejb.TransactionImpl.begin(TransactionImpl.java:41)
              at
      org.jboss.seam.transaction.EntityTransaction.begin(EntityTransaction.jav
      a:82)
              at
      org.jboss.seam.jsf.SeamPhaseListener.begin(SeamPhaseListener.java:593)
              ... 50 more
      Caused by: org.hibernate.exception.JDBCConnectionException: Cannot open
      connection
              at
      org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java
      :97)
              at
      org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.
      java:66)
              at
      org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.
      java:52)
              at
      org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.ja
      va:449)
              at
      org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.jav
      a:167)
              at
      org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:142)
              at
      org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:85)
              at
      org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1354)
              at
      org.hibernate.ejb.TransactionImpl.begin(TransactionImpl.java:38)
              ... 52 more
      Caused by: java.sql.SQLRecoverableException: ORA-01034: ORACLE not
      available
      ORA-27101: shared memory realm does not exist
      Linux-x86_64 Error: 2: No such file or directory
      
              at
      oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:
      101)
              at
      oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
              at
      oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:20
      6)
              at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
              at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:406)
              at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:399)
              at
      oracle.jdbc.driver.T4CTTIoauthenticate.receiveOsesskey(T4CTTIoauthentica
      te.java:308)
              at
      oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:364)
              at
      oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:508
      )
              at
      oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:203)
              at
      oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.j
      ava:33)
              at
      oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:510)
              at java.sql.DriverManager.getConnection(DriverManager.java:582)
              at java.sql.DriverManager.getConnection(DriverManager.java:154)
              at
      org.hibernate.connection.DriverManagerConnectionProvider.getConnection(D
      riverManagerConnectionProvider.java:133)
              at
      org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.ja
      va:446)
              ... 57 more
      





      thanks,
      Dean