Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 1016631

Summary: Session Time Zone not set
Product: Red Hat Satellite 5 Reporter: Matthias Summer <matthias>
Component: UpgradesAssignee: Milan Zázrivec <mzazrivec>
Status: CLOSED DUPLICATE QA Contact: Red Hat Satellite QA List <satellite-qa-list>
Severity: high Docs Contact:
Priority: unspecified    
Version: 560CC: pgervase, rnelson, tlestach
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-03-30 14:09:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 924189    

Description Matthias Summer 2013-10-08 12:53:48 UTC
Description of problem:

We did an upgrade from Satellite 5.5.0 to 5.6.0. After that the tomcat would not start. The exception ist:


2013-10-08 13:20:01,490 [TP-Processor5] ERROR com.redhat.rhn.frontend.servlets.SessionFilter - Error during transaction. Rolling back
javax.servlet.ServletException: Filter execution threw an exception
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:259)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at com.redhat.rhn.frontend.servlets.EnvironmentFilter.doFilter(EnvironmentFilter.java:100)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at com.redhat.rhn.frontend.servlets.SessionFilter.doFilter(SessionFilter.java:57)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at com.redhat.rhn.frontend.servlets.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:97)
        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:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        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:298)
        at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
        at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
        at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769)
        at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698)
        at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
        at java.lang.Thread.run(Thread.java:738)
Caused by: 
java.lang.NoClassDefFoundError: com.redhat.rhn.domain.user.UserFactory (initialization failure)
        at java.lang.J9VMInternals.initialize(J9VMInternals.java:140)
        at com.redhat.rhn.manager.user.UserManager.getTimeZone(UserManager.java:835)
        at com.redhat.rhn.frontend.servlets.LocalizedEnvironmentFilter.setTimeZone(LocalizedEnvironmentFilter.java:96)
        at com.redhat.rhn.frontend.servlets.LocalizedEnvironmentFilter.initializeContext(LocalizedEnvironmentFilter.java:80)
        at com.redhat.rhn.frontend.servlets.LocalizedEnvironmentFilter.doFilter(LocalizedEnvironmentFilter.java:66)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        ... 23 more
Caused by: 
java.lang.ExceptionInInitializerError
        at java.lang.J9VMInternals.initialize(J9VMInternals.java:222)
        at com.redhat.rhn.domain.user.UserFactory.<clinit>(UserFactory.java:64)
        at java.lang.J9VMInternals.initializeImpl(Native Method)
        at java.lang.J9VMInternals.initialize(J9VMInternals.java:200)
        ... 28 more
Caused by: 
org.hibernate.exception.GenericJDBCException: could not execute query
        at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126)
        at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114)
        at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
        at org.hibernate.loader.Loader.doList(Loader.java:2446)
        at org.hibernate.loader.Loader.listUsingQueryCache(Loader.java:2334)
        at org.hibernate.loader.Loader.list(Loader.java:2296)
        at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:414)
        at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:364)
        at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
        at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1192)
        at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
        at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:835)
        at com.redhat.rhn.domain.role.RoleFactory.lookupByLabel(RoleFactory.java:71)
        at com.redhat.rhn.domain.role.RoleFactory.<clinit>(RoleFactory.java:81)
        at java.lang.J9VMInternals.initializeImpl(Native Method)
        at java.lang.J9VMInternals.initialize(J9VMInternals.java:200)
        ... 31 more
Caused by: 
java.sql.SQLException: Session Time Zone not set!
        at oracle.jdbc.driver.TimestampltzAccessor.getTimestamp(TimestampltzAccessor.java:271)
        at oracle.jdbc.driver.OracleResultSetImpl.getTimestamp(OracleResultSetImpl.java:802)
        at oracle.jdbc.driver.OracleResultSet.getTimestamp(OracleResultSet.java:1661)
        at com.mchange.v2.c3p0.impl.NewProxyResultSet.getTimestamp(NewProxyResultSet.java:868)
        at org.hibernate.type.TimestampType.get(TimestampType.java:53)
        at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:183)
        at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:172)
        at org.hibernate.type.AbstractType.hydrate(AbstractType.java:105)
        at org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:2114)
        at org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1577)
        at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1505)
        at org.hibernate.loader.Loader.getRow(Loader.java:1403)
        at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:641)
        at org.hibernate.loader.Loader.doQuery(Loader.java:865)
        at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:298)
        at org.hibernate.loader.Loader.doList(Loader.java:2443)
        ... 43 more
2013-10-08 13:23:25,064 [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1] WARN  com.redhat.rhn.common.db.RhnConnectionCustomizer - Failed to set session time zone.
2013-10-08 13:23:25,077 [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0] WARN  com.redhat.rhn.common.db.RhnConnectionCustomizer - Failed to set session time zone.
2013-10-08 13:23:25,085 [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2] WARN  com.redhat.rhn.common.db.RhnConnectionCustomizer - Failed to set session time zone.
2013-10-08 13:23:25,088 [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1] WARN  com.redhat.rhn.common.db.RhnConnectionCustomizer - Failed to set session time zone.
Oct 8, 2013 1:25:25 PM org.apache.coyote.http11.Http11Protocol pause
INFO: Pausing Coyote HTTP/1.1 on http-127.0.0.1-8080
Oct 8, 2013 1:25:26 PM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina


Version-Release number of selected component (if applicable):
Satellite: 5.6.0.10-1.el6sat
Tomcat6: 6.0.24-57.el6_4

How reproducible:
Every time when starting rhn-satellite

Steps to Reproduce:
1. Upgrade from Satellite 5.5.0 to 5.6.0
2. Start satellite

Actual results:

See desription

Expected results:

Satellite should start.

Additional info:

Adding JAVA_OPTS="-Duser.timezone=Europe/Zurich" in the tomcat6.conf solves the problem.

Comment 1 Matthias Summer 2013-10-11 07:25:49 UTC
We also get this exception (rhn_taskomatic_daemon.log):

INFO   | jvm 1    | 2013/10/11 09:23:08 | 2013-10-11 08:23:08,588 [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1] WARN  com.redhat.rhn.common.db.RhnConnectionCustomizer - Failed to set session time zone.
INFO   | jvm 1    | 2013/10/11 09:23:08 | 2013-10-11 08:23:08,588 [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2] WARN  com.redhat.rhn.common.db.RhnConnectionCustomizer - Failed to set session time zone.
INFO   | jvm 1    | 2013/10/11 09:23:08 | 2013-10-11 08:23:08,588 [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0] WARN  com.redhat.rhn.common.db.RhnConnectionCustomizer - Failed to set session time zone.
INFO   | jvm 1    | 2013/10/11 09:23:08 | 2013-10-11 08:23:08,616 [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1] WARN  com.redhat.rhn.common.db.RhnConnectionCustomizer - Failed to set session time zone.
INFO   | jvm 1    | 2013/10/11 09:23:08 | 2013-10-11 08:23:08,616 [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2] WARN  com.redhat.rhn.common.db.RhnConnectionCustomizer - Failed to set session time zone.
INFO   | jvm 1    | 2013/10/11 09:23:10 | 2013-10-11 08:23:10,006 [Thread-46] WARN  org.hibernate.util.JDBCExceptionReporter - SQL Error: 0, SQLState: null
INFO   | jvm 1    | 2013/10/11 09:23:10 | 2013-10-11 08:23:10,007 [Thread-46] ERROR org.hibernate.util.JDBCExceptionReporter - Session Time Zone not set!
INFO   | jvm 1    | 2013/10/11 09:23:10 | org.hibernate.exception.GenericJDBCException: could not execute query
INFO   | jvm 1    | 2013/10/11 09:23:10 |       at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126)
INFO   | jvm 1    | 2013/10/11 09:23:10 |       at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114)
INFO   | jvm 1    | 2013/10/11 09:23:10 |       at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
INFO   | jvm 1    | 2013/10/11 09:23:10 |       at org.hibernate.loader.Loader.doList(Loader.java:2446)
INFO   | jvm 1    | 2013/10/11 09:23:10 |       at org.hibernate.loader.Loader.doList(Loader.java:2428)
INFO   | jvm 1    | 2013/10/11 09:23:10 |       at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2304)
INFO   | jvm 1    | 2013/10/11 09:23:10 |       at org.hibernate.loader.Loader.list(Loader.java:2299)
INFO   | jvm 1    | 2013/10/11 09:23:10 |       at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:414)
INFO   | jvm 1    | 2013/10/11 09:23:10 |       at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:364)
INFO   | jvm 1    | 2013/10/11 09:23:10 |       at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
INFO   | jvm 1    | 2013/10/11 09:23:10 |       at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1192)
INFO   | jvm 1    | 2013/10/11 09:23:10 |       at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
INFO   | jvm 1    | 2013/10/11 09:23:10 |       at com.redhat.rhn.common.hibernate.HibernateFactory.listObjectsByNamedQuery(HibernateFactory.java:267)
INFO   | jvm 1    | 2013/10/11 09:23:10 |       at com.redhat.rhn.common.hibernate.HibernateFactory.listObjectsByNamedQuery(HibernateFactory.java:208)
INFO   | jvm 1    | 2013/10/11 09:23:10 |       at com.redhat.rhn.taskomatic.TaskoFactory.listActiveSchedulesByOrg(TaskoFactory.java:235)
INFO   | jvm 1    | 2013/10/11 09:23:10 |       at com.redhat.rhn.taskomatic.core.SchedulerKernel.initializeAllSatSchedules(SchedulerKernel.java:229)
INFO   | jvm 1    | 2013/10/11 09:23:10 |       at com.redhat.rhn.taskomatic.core.SchedulerKernel.startup(SchedulerKernel.java:166)
INFO   | jvm 1    | 2013/10/11 09:23:10 |       at com.redhat.rhn.taskomatic.core.TaskomaticDaemon$1.run(TaskomaticDaemon.java:102)
INFO   | jvm 1    | 2013/10/11 09:23:10 |       at java.lang.Thread.run(Thread.java:738)
INFO   | jvm 1    | 2013/10/11 09:23:10 | Caused by: java.sql.SQLException: Session Time Zone not set!
INFO   | jvm 1    | 2013/10/11 09:23:10 |       at oracle.jdbc.driver.TimestampltzAccessor.getTimestamp(TimestampltzAccessor.java:271)
INFO   | jvm 1    | 2013/10/11 09:23:10 |       at oracle.jdbc.driver.OracleResultSetImpl.getTimestamp(OracleResultSetImpl.java:802)
INFO   | jvm 1    | 2013/10/11 09:23:10 |       at oracle.jdbc.driver.OracleResultSet.getTimestamp(OracleResultSet.java:1661)
INFO   | jvm 1    | 2013/10/11 09:23:10 |       at com.mchange.v2.c3p0.impl.NewProxyResultSet.getTimestamp(NewProxyResultSet.java:868)
INFO   | jvm 1    | 2013/10/11 09:23:10 |       at org.hibernate.type.TimestampType.get(TimestampType.java:53)
INFO   | jvm 1    | 2013/10/11 09:23:10 |       at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:183)
INFO   | jvm 1    | 2013/10/11 09:23:10 |       at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:172)
INFO   | jvm 1    | 2013/10/11 09:23:10 |       at org.hibernate.type.AbstractType.hydrate(AbstractType.java:105)
INFO   | jvm 1    | 2013/10/11 09:23:10 |       at org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:2114)
INFO   | jvm 1    | 2013/10/11 09:23:10 |       at org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1577)
INFO   | jvm 1    | 2013/10/11 09:23:10 |       at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1505)
INFO   | jvm 1    | 2013/10/11 09:23:10 |       at org.hibernate.loader.Loader.getRow(Loader.java:1403)
INFO   | jvm 1    | 2013/10/11 09:23:10 |       at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:641)
INFO   | jvm 1    | 2013/10/11 09:23:10 |       at org.hibernate.loader.Loader.doQuery(Loader.java:865)
INFO   | jvm 1    | 2013/10/11 09:23:10 |       at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:298)
INFO   | jvm 1    | 2013/10/11 09:23:10 |       at org.hibernate.loader.Loader.doList(Loader.java:2443)
INFO   | jvm 1    | 2013/10/11 09:23:10 |       ... 15 more

Comment 2 Milan Zázrivec 2013-10-11 07:34:47 UTC
Please contact Red Hat support with the above issue who will try
to reproduce the problem and properly triage the bug report.

Thank you.

Comment 5 Tomas Lestach 2016-01-12 13:39:09 UTC
This has been fixed in Bug 1023669. I'll close this bug as an duplicate, if no one objects.

Comment 6 Tomas Lestach 2016-03-30 14:09:25 UTC
No comments/objections in the 2,5 months.
Closing as duplicate as planned in Comment 5.

*** This bug has been marked as a duplicate of bug 1023669 ***