Till now, most calibration methods only compensate geometric error caused by inaccurate kinematic parameters, while the desired accuracy may still not be achieved when the robot is performing long-stroke, heavy-duty loading and unloading tasks. In this paper, a generalized semi-analytical beam deformation model is firstly proposed for the Cartesian robot to compensate the non-geometric error due to structural deformation under both distributed and concentrated loads. The adjustment factors are introduced in this model to deal with the over-constrained boundary conditions for both intermediate and side modules of the long-stroke Cartesian robot. This improves the fitness of the coming geometric error model, which assumes the beam to be rigid and straight. In addition, as the major error components which do not conform to the Gaussian distribution have been extracted in earlier steps, the Gaussian process regression model is imported to predict the residual error more accurately. In this way, comprehensive geometric and nongeometric error modeling and compensation procedures are formed for the multi-module, long-stroke Cartesian robot. Simulations and real-time experiments are conducted to validate the effectiveness of the proposed method.