Conexão com MySql / Wildfly / Java

2 respostas
javamysql
A
Amigos, estou tendo um problema quando tento conectar com o Mysql

Quando testo a conexão no Wildfly tenho esse aviso

<div class="lightbox-wrapper"><a class="lightbox" href="/uploads/3X/1/a/1a6d0abfea8bb01ebe18ecc037f134605e27adc2.png.webp" data-download-href="/uploads/default/1a6d0abfea8bb01ebe18ecc037f134605e27adc2" title="image.png"><img src="/uploads/3X/1/a/1a6d0abfea8bb01ebe18ecc037f134605e27adc2.png.webp" alt="image" width="553" height="500" srcset="/uploads/3X/1/a/1a6d0abfea8bb01ebe18ecc037f134605e27adc2.png.webp, /uploads/3X/1/a/1a6d0abfea8bb01ebe18ecc037f134605e27adc2.png.webp 1.5x, /uploads/3X/1/a/1a6d0abfea8bb01ebe18ecc037f134605e27adc2.png.webp 2x" data-small-upload="/uploads/3X/1/a/1a6d0abfea8bb01ebe18ecc037f134605e27adc2.png.webp"><div class="meta">
<svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use xlink:href="#far-image"></use></svg>image.png852×770 65.4 KB<svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use xlink:href="#discourse-expand"></use></svg>
</div></a></div>

no java esse

23:17:17,337 ERROR [stderr] (ServerService Thread Pool  50) Tue Dec 18 23:17:17 BRST 2018 WARN: Establishing SSL connection without servers identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isnt set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to false. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.

Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server.

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.8.0_181]

at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) [rt.jar:1.8.0_181]

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) [rt.jar:1.8.0_181]

at java.lang.reflect.Constructor.newInstance(Unknown Source) [rt.jar:1.8.0_181]

at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)

at com.mysql.jdbc.Util.getInstance(Util.java:408)

at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:918)

at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:897)

at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:886)

<div class="lightbox-wrapper"><a class="lightbox" href="/uploads/3X/b/3/b33cd21bb2f8f1f7af778b3313b2cb91d9b34bda.png.webp" data-download-href="/uploads/default/b33cd21bb2f8f1f7af778b3313b2cb91d9b34bda" title="image.png"><img src="/uploads/3X/b/3/b33cd21bb2f8f1f7af778b3313b2cb91d9b34bda.png.webp" alt="image" width="690" height="59" data-small-upload="/uploads/3X/b/3/b33cd21bb2f8f1f7af778b3313b2cb91d9b34bda.png.webp"><div class="meta">
<svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use xlink:href="#far-image"></use></svg>image.png1577×135 6.05 KB<svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use xlink:href="#discourse-expand"></use></svg>
</div></a></div>

Meu banco de dados

Se alguém puder me salvar, agradeço muito

2 Respostas

guilhermebhte

Coloca seu persistence.xml

A

Criado 19 de dezembro de 2018
Ultima resposta 23 de dez. de 2018
Respostas 2
Participantes 2