Bug 731996 - Unknown SQL error when accessing /owners/KEY/events
Summary: Unknown SQL error when accessing /owners/KEY/events
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Candlepin
Classification: Community
Component: candlepin
Version: 0.5
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: William Poteat
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-08-19 12:20 UTC by Tyler Smart
Modified: 2015-05-14 15:23 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-07-17 13:03:58 UTC


Attachments (Terms of Use)

Description Tyler Smart 2011-08-19 12:20:31 UTC
Description of problem:

Whenever I hit /owners/KEY/events I get this error in the latest master build of candlepin.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:

<tsmart> Aug 18 09:12:09 [http-8443-1] DEBUG org.fedoraproject.candlepin.auth.interceptor.SecurityInterceptor - Verifying READ_ONLY access to class org.fedoraproject.
<tsmart> candlepin.model.Owner: admin
<tsmart> Aug 18 09:12:09 [http-8443-1] WARN  org.hibernate.util.JDBCExceptionReporter - SQL Error: 0, SQLState: 42601
<tsmart> Aug 18 09:12:09 [http-8443-1] ERROR org.hibernate.util.JDBCExceptionReporter - ERROR: syntax error at or near "$1"
org.jboss.resteasy.spi.ApplicationException: org.hibernate.exception.SQLGrammarException: could not execute query
        at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:154)
        at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:248)
        at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:216)
        at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:205)
        at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:489)
        at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:466)
        at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:120)
        at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:200)
        at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:48)
        at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:43)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:216)
        at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:141)
        at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:93)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:63)
        at org.fedoraproject.candlepin.servlet.filter.VersionFilter.doFilter(VersionFilter.java:47)
        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:129)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:59)
        at org.fedoraproject.candlepin.servlet.filter.logging.LoggingFilter.doFilter(LoggingFilter.java:55)
        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:129)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:59)
        at com.wideplay.warp.persist.PersistenceFilter$3.run(PersistenceFilter.java:141)
        at com.wideplay.warp.persist.internal.Lifecycles.failEarlyAndLeaveNoOneBehind(Lifecycles.java:29)
        at com.wideplay.warp.persist.PersistenceFilter.doFilter(PersistenceFilter.java:155)
        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:129)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:59)
        at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:122)
        at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:110)
        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.coyote.http11.Http11Processor.process(Http11Processor.java:859)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:679)
Caused by: org.hibernate.exception.SQLGrammarException: could not execute query
        at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:90)
        at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
        at org.hibernate.loader.Loader.doList(Loader.java:2235)
        at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2129)
        at org.hibernate.loader.Loader.list(Loader.java:2124)
        at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:118)
        at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1597)
        at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:306)
        at org.fedoraproject.candlepin.model.EventCurator.listMostRecent(EventCurator.java:58)

Expected results:


Additional info:

Comment 1 Jesus M. Rodriguez 2011-09-01 14:14:46 UTC
dialect should be read from persistence.xml, setting it in candlepin.conf will
mask the error.

#jpa.config.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect

Comment 2 Jesus M. Rodriguez 2011-09-01 14:16:45 UTC
curl -k -u admin:admin https://localhost:8443/candlepin/owners/admin/events

Comment 3 William Poteat 2011-09-01 15:16:44 UTC
https://fedorahosted.org/candlepin/wiki/Configuration

This is needed for the proper function.

Comment 4 Bryan Kearney 2012-07-17 13:03:58 UTC
Marking all community bugs modified or beyong as closed.


Note You need to log in before you can comment on or make changes to this bug.