Invalid column type SQLException with ATG 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.

Leave a Reply

Your email address will not be published. Required fields are marked *