org.springframework.dao.DataAccessResourceFailureException: Error retrieving database metadata; nested exception is org.springframework.jdbc.support.MetaDataAccessException: Connection returned by DataSource [dataSource] was null

Stack Overflow | imoteb | 3 months ago
  1. 1

    Java Spring Testing JDBC

    Stack Overflow | 3 months ago | imoteb
    org.springframework.dao.DataAccessResourceFailureException: Error retrieving database metadata; nested exception is org.springframework.jdbc.support.MetaDataAccessException: Connection returned by DataSource [dataSource] was null
  2. 0

    How to configure C3P0 or BoneCP Datasources to withstand database failover/outage

    Stack Overflow | 3 years ago | user2836274
    org.springframework.dao.DataAccessResourceFailureException: Cannot open connection; nested exception is org.hibernate.exception.JDBCConnectionException: Cannot open connection
  3. 0

    How to configure C3P0 or BoneCP Datasources to withstand database failover/outage

    dolinked.com | 12 months ago
    org.springframework.dao.DataAccessResourceFailureException: Cannot open connection; nested exception is org.hibernate.exception.JDBCConnectionException: Cannot open connection
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Scenario MRIR with a StaxEventItemReader as the delegate and several resources to loop through. Simplest failure scenario is if one of the XML files is truncated. A call to MRIR.read() gets the following exception: org.springframework.dao.DataAccessResourceFailureException: Error while reading from event reader; nested exception is javax.xml.stream.XMLStreamException: ParseError at [row,col]:[8,2] Message: Element type "thing" must be followed by either attribute specifications, ">" or "/>". at org.springframework.batch.item.xml.StaxEventItemReader.moveCursorToNextFragment(OXMStaxEventItemReader.java:198) at org.springframework.batch.item.xml.StaxEventItemReader.doRead(OXMStaxEventItemReader.java:336) at org.springframework.batch.item.support.AbstractItemCountingItemStreamItemReader.read(AbstractItemCountingItemStreamItemReader.java:85) at org.springframework.batch.item.file.MultiResourceItemReader.readNextItem(MultiResourceItemReader.java:111) at org.springframework.batch.item.file.MultiResourceItemReader.read(MultiResourceItemReader.java:99) Without any particular handling of the scenario, MRIR treats this as an item-specific problem and will keep retrying to reaD() the delegate without ever giving up. DataAccessResourceException javadoc : "Data access exception thrown when a resource fails completely: for example, if we can't connect to a database using JDBC." A) MRIR should recognise the resource has failed completely and "jump" to the next on the next call to read(). B) I'm not sure what exception to base this behaviour upon because the Exception inheritance is topsy-turvy. The generated exception is actually a child of NonTransientDataAccessResourceException (though the classname hints that it is more specific) with identical javadoc "Data access exception thrown when a resource fails completely and the failure is permanent." I'll be attaching a proposed patch for handling of this.

    Spring JIRA | 6 years ago | drekbour
    org.springframework.dao.DataAccessResourceFailureException: Error while reading from event reader; nested exception is javax.xml.stream.XMLStreamException: ParseError at [row,col]:[8,2] Message: Element type "thing" must be followed by either attribute specifications, ">" or "/>".
  6. 0

    GitHub comment 18770#166278080

    GitHub | 12 months ago | Dreampie
    org.springframework.dao.DataAccessResourceFailureException: Timed out after 10000 ms while waiting to connect. Client view of cluster state is {type=Unknown, servers=[{address=192.168.60.41:27017, type=Unknown, state=Connecting, exception={com.mongodb.MongoException$Network: Exception opening the socket}, caused by {java.net.SocketTimeoutException: connect timed out}}]; nested exception is com.mongodb.MongoTimeoutException: Timed out after 10000 ms while waiting to connect. Client view of cluster state is {type=Unknown, servers=[{address=192.168.60.41:27017, type=Unknown, state=Connecting, exception={com.mongodb.MongoException$Network: Exception opening the socket}, caused by {java.net.SocketTimeoutException: connect timed out}}]","path":"/users"}

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.springframework.dao.DataAccessResourceFailureException

      Error retrieving database metadata; nested exception is org.springframework.jdbc.support.MetaDataAccessException: Connection returned by DataSource [dataSource] was null

      at org.springframework.jdbc.core.metadata.CallMetaDataProviderFactory.createMetaDataProvider()
    2. Spring Framework
      CallMetaDataContext.initializeMetaData
      1. org.springframework.jdbc.core.metadata.CallMetaDataProviderFactory.createMetaDataProvider(CallMetaDataProviderFactory.java:141)
      2. org.springframework.jdbc.core.metadata.CallMetaDataContext.initializeMetaData(CallMetaDataContext.java:286)
      2 frames