B4J Question (SQLException) java.sql.SQLException: invalid database address in packet, not in debug

Hello all,

I have a problem with a mysql connection.

In debug mode is working without problems
Dim ConexionMySQL As JdbcSQL
ConectaMySQL(ConexionMySQL)


Sub ConectaMySQL(MySQLDB As JdbcSQL)
Dim driver As String = "com.mysql.cj.jdbc.Driver"
Dim odboURL As String = "jdbc:mysql://REMOTEIP:3306/DDBBNAME?useUnicode=true&characterEncoding=UTF-8"
MySQLDB.Initialize2(driver,odboURL,myuser,mypass)
End Sub


When i'm in debug mode it works correctly, but when I create the packet and execute It I get this error:
(SQLException) java.sql.SQLException: invalid database address

I'm using: #AdditionalJar: mysql-connector-java-8.0.30.jar
 
Last edited:
Declares and functions:
Dim ConexionMySQL As JdbcSQL
ConectaMySQL(ConexionMySQL)




Sub ConectaMySQL(MySQLDB As JdbcSQL)


        Dim driver As String = "com.mysql.cj.jdbc.Driver"


        Dim odboURL As String = "jdbc:mysql://REMOTEIP:3306/DDBBNAME?useUnicode=true&characterEncoding=UTF-8"


        MySQLDB.Initialize2(driver,odboURL,myuser,mypass)
 
Upvote 0
Same error if I do MySQLDB.InitializeAsync

java.sql.SQLException: invalid database address: jdbc:mysql://REMOTEIP:3306/DDBBNAME?useUnicode=true&characterEncoding=UTF-8
at b4j/org.sqlite.JDBC.createConnection(Unknown Source)
at b4j/org.sqlite.JDBC.connect(Unknown Source)
at java.sql/java.sql.DriverManager.getConnection(Unknown Source)
at java.sql/java.sql.DriverManager.getConnection(Unknown Source)
at b4j/anywheresoftware.b4j.objects.SQL.Initialize2(Unknown Source)
at b4j/anywheresoftware.b4j.objects.SQL$1.call(Unknown Source)
at b4j/anywheresoftware.b4j.objects.SQL$1.call(Unknown Source)
at b4j/anywheresoftware.b4a.BA$4.run(Unknown Source)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
 
Upvote 0
Top