In our case, this was a solar project and the Owner of the land and project subcontracted our company out for installation of the Solar Array. We supplied our own labor and we further subcontracted out post pounding and racking/module installations.
If you do not in fact require a contractor's license to perform the work, the lack of license does not bar the recording of a lien. However, if you were hired for the installation of the solar array and not simply the supply of the materials (whether you subcontracted the labor or not) you likely required a license.