Integer vertex attributes requires OpenGL 3.0 and GLSL >= 1.30.
Maybe you are using GLEW? You should check that (void*)(glVertexAttribI1i) != 0
before using it.
Moreover, when an attribute has the same value for each vertex, like in the snippet you posted, you should use uniforms.