The reasons might be it cannot able to connect to the database to run the query. But for us it was failing because our In-Use connections were equal to max-pool-size thus it does not have the connection pool to execute our query. As you can see below its giving us the warning first that it is "Failed to obtain /create connection from connection pool". The reason being com.sun.appserv.connectors.internal.api.PoolingException: In-use connections equal max-pool-size and expired max-wait-time. Cannot allocate more connections.
To solve this error you need to increase the max-pool-size (we have increased from 32 to 48) and increase the max-wait-time (we have increased from 60000 to 120000). After doing this when we ran the solr Full Import again, it ran successfully.
So any point of time if you are getting SEVERE exceptions try looking at the Warning message as well. Might be your exception can be linked to that warning.
Please Like and Share the CodingDefined Blog, if you find it interesting and helpful.