Suppose that $R = S/I = k[x\_1, \dots, x\_n]/I$ is a (normal) domain of finite type over a field (or any semi-local ring $k$ with a dualizing complex). In this case, I can define $\omega\_R = \textrm{Ext}^{n - \dim R}\_{S}(R, S)$.


$R$ is called *quasi-Gorenstein* if $\omega\_R$ is locally free of rank 1. Presumably there are easy examples where $\omega\_R$ is locally free but not free, does anyone know one off the top of their head? 


**EDIT:** Of course, It would be even better to have a Gorenstein (ie, quasi-Gorenstein + CM) example too.


Obviously I can choose a canonical module up to tensoring with a locally free at some level, but for many purposes the $\omega\_R$ I defined above is better to work with.



An easy example of a (1/quasi-)Gorenstein ring with non-trival canonical divisor class.
Karl, I think one can construct a smooth affine curve with non-zero canonical class by removing some general points from a smooth projective curve of genus $>1$. Details can be found in this [paper](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.52.6348) (Theorem 6), which I gave in this [answer](https://mathoverflow.net/questions/9751/is-every-smooth-affine-curve-isomorphic-to-a-smooth-affine-plane-curve).


