I figured out what this is.
When I used Axis to generate my client stubs (WSDL2Java), it generates new packages for every type used by the web service.
So, for example, WSDL2Java created a new java.lang package with only the relevant types in it for the service.
Because of this, the compiler uses the generated java.lang package instead of the full java.lang package, and I get funny errors.
The solution was to remove the generated types that I didn't need, since I already have access to them anyway.