  We present a weighted version of the Caffarelli-Kohn-Nirenberg inequality in
the framework of variable exponents. The combination of this inequality with a
variant of the fountain theorem, yields the existence of infinitely many
solutions for a class of non-homogeneous problems with Dirichlet boundary
condition.
