If both modules work independently, the issue could be with the DIMM slot (bent pin, or simply faulty electrically), or in the compatibility between the 2 modules themselves.
Were your modules bought together in a matching pair? ie a "kit", 2x4GB, 2x8GB etc, sold together in retail packaging?