betweenGo

Invalid column type SQLException with ATG Repository

by Frank Kim on May.28, 2008, under Repository

Recently I was seeing this exception.

CONTAINER:atg.repository.RepositoryException; SOURCE:java.sql.SQLException: Invalid column type
        at atg.adapter.gsa.GSAItemDescriptor.executeQuery(GSAItemDescriptor.java:6682)
        at atg.adapter.gsa.GSAView.executeUncachedQuery(GSAView.java:291)
        at atg.adapter.gsa.GSAView.executeQuery(GSAView.java:1027)
        at atg.repository.rql.RqlStatement.executeQuery(RqlStatement.java:208)

For the longest time I could not figure out what this meant and then it dawned on me as I laid in bed.

ATG expects certain Java class types for certain repository types which correspond to certain class types. I talk about this in my Date and Timestamp Repository Data Types post.

I was trying to do this RQL query:

      lastModified > ?0

with this parameter:

      java.util.Calendar param = java.util.Calendar.getInstance();

When I changed the parameter to type:

      java.sql.Timestamp

I no longer saw this exception which makes sense because the lastModified property is of data-type timestamp.

  • Share/Bookmark

Related posts:

  1. Date and Timestamp Repository Data Types
  2. user-defined property type gotcha’s
  3. ATG Repository User-Defined Property Types
  4. Set ATG Repository Item Date or Timestamp Properties to the Current Time
  5. Repository creating tables automatically

:

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!