Docker Community Forums

Share and learn in the Docker community.

Docker blocking when read byte[] in JAVA from external database BLOB

470 / 5000

Resultados de tradução

I’m facing a curious issue in my application. I have an application in JAVA + TOMCAT, which at a certain point reads an image from a database, this image is stored as a BLOB and in JAVA I read it as a byte.
Interestingly at this time my application crashes, it does not go beyond this point and this only occurs when I am with the default network, if I am with network_mode=host this crash does not occur.

The database is external

Anyone can help me to solve this ?


version: '3'

    container_name: XXXX
    # network_mode: host
      - "8080:8080"
      - internet
    driver: bridge

Java Code

byte[] logo = this.getNamedParameterJdbcTemplate().queryForObject( query.toString(), params, byte[].class );

Is this database also run in docker?
I am asking, because the network docker0 uses the cidr, which if the database is not in a container would indicate a netwowrk colision. A form search for “bip default-address-pools” should yield threads that discuss how to change the default network range.