I am working with Web3j 4.1.1 and have been having the same problem. I was running a local (i.e. private/custom) block chain using geth, thinking it would be an ideal way to do my earliest tests in privacy instead of using or abusing an actual testnet by littering it with dozens hundreds of abandoned or broken contract instances. I also hoped to learn a lot.
While the latter part came true, no contract deployed onto my local private blockchain ever worked. First I tried using Web3j to deploy the contract, while inspecting it in MetaMask. While it deployed successfully (and consumed some eth in gas costs), all subsequent calls to the contract returned 0.
I next tried deploying the same contract using MetaMask (both by deploying the code, and by pointing to the previous existing address), and in all cases I got the same error you did:
Internal JSON-RPC error
I tried stopping and restarting geth, to no avail.
However, when I instead started a new geth pointed at Rinkeby, everything started to work. The Web3J contract deployment worked perfectly, and all calls I've made to the contract are returning correct values, using both Web3j and MetaMask.
I never figured out why the local blockchain wouldn't work and it remains a mystery. If anyone would like to help diagnose, here are the geth commands I used:
Local (unable to interact with deployed contract):
geth --datadir . --keystore ./keystore --networkid 8888 --syncmode "fast" --rpc --rpcapi db,eth,net,web3,personal,admin --cache=1024 --rpcport 8545 --rpcaddr 127.0.0.1 --rpccorsdomain "*" --mine --miner.threads=1 --miner.gasprice "1000000000" --unlock 0 --password ./config/default-password.txt
Rinkeby (able to deploy and interact with contract):
geth --rinkeby --syncmode "fast" --rpc --rpcapi db,eth,net,web3,personal,admin --cache=1024 --rpcport 8545 --rpcaddr 127.0.0.1 --rpccorsdomain "*"