Android Question [SOLVED] JRDC2 error after Java Update

makis_best

Well-Known Member
Licensed User
Longtime User
Hi all

I have one project using JRDC2 and Android as clients.
Jrdc2 is on a Windows Server and Microsoft SQL
The project was working fine for many months until yesterday Java update by it self.

Then my connection stop working.

If I run JRDC2 on my client computer through B4J, connection is working fine.
From my browser on my client computer I get
B4X:
http://localhost:17178/test
Then I get correct
RemoteServer is running (05/10/2021 11:02:27)
Connection successful.

But if i try to connect to my Windows Server with JRDC2 running I get
B4X:
http://192.168.1.2:17178/test
Then I get
RemoteServer is running (05/10/2021 11:14:06)
Error fetching connection.

Why that happen?

Any idea?
 

makis_best

Well-Known Member
Licensed User
Longtime User
You need to allow incoming connections on port 17178 in Windows Firewall. You probably had a rule, created automatically, for the previous Java version.
Firewall is all off as before.
We down have firewall working on any computer on our network cuz on Internet connection we have a watchguard running
 
Upvote 0

makis_best

Well-Known Member
Licensed User
Longtime User
I misread the server response. Your post isn't formatted correctly.

My guess is that it isn't related to the new Java.

Where is the database server located? Check the configuration file.
What do you see in the jRDC2 server logs?

On B4J I see
B4X:
Waiting for debugger to connect...
Program started.
2021-05-10 11:00:30.170:INFO::main: Logging initialized @608ms to org.eclipse.jetty.util.log.StdErrLog
ΞΞ±Ο 10, 2021 11:00:30 Ξ Ξ com.mchange.v2.log.MLog
INFO: MLog clients using java 1.4+ standard logging.
ΞΞ±Ο 10, 2021 11:00:30 Ξ Ξ com.mchange.v2.c3p0.C3P0Registry
INFO: Initializing c3p0-0.9.5.2 [built 08-December-2015 22:06:04 -0800; debug? true; trace: 10]
2021-05-10 11:00:30.676:INFO:oejs.Server:main: jetty-9.4.z-SNAPSHOT; built: 2018-05-03T15:56:21.710Z; git: daa59876e6f384329b122929e70a80934569428c; jvm 1.8.0_281-b09
2021-05-10 11:00:30.720:INFO:oejs.session:main: DefaultSessionIdManager workerName=node0
2021-05-10 11:00:30.720:INFO:oejs.session:main: No SessionScavenger set, using defaults
2021-05-10 11:00:30.722:INFO:oejs.session:main: node0 Scavenging every 660000ms
2021-05-10 11:00:30.727:INFO:oejsh.ContextHandler:main: Started o.e.j.s.ServletContextHandler@7276c8cd{/,file:///C:/MEGA/B4J%20Project/jRDC2/jRDC/Objects/www,AVAILABLE}
2021-05-10 11:00:30.731:INFO:oejs.AbstractNCSARequestLog:main: Opened C:\MEGA\B4J Project\jRDC2\jRDC\Objects\logs\b4j-2021_05_10.request.log
2021-05-10 11:00:30.744:INFO:oejs.AbstractConnector:main: Started ServerConnector@727803de{HTTP/1.1,[http/1.1]}{0.0.0.0:17178}
2021-05-10 11:00:30.744:INFO:oejs.Server:main: Started @1185ms
Emulated network latency: 100ms
jRDC is running (version = 2.22)
ΞΞ±Ο 10, 2021 11:02:27 Ξ Ξ com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource
INFO: Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 3, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 20000, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, contextClassLoaderSource -> caller, dataSourceName -> 1hgeby9ahnnyfma1ui5vrs|23223dd8, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> com.microsoft.sqlserver.jdbc.SQLServerDriver, extensions -> {}, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, forceSynchronousCheckins -> false, forceUseNamedDriverClass -> false, identityToken -> 1hgeby9ahnnyfma1ui5vrs|23223dd8, idleConnectionTestPeriod -> 600, initialPoolSize -> 3, jdbcUrl -> jdbc:sqlserver://192.168.1.2;databaseName=EXPIosif;, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTi...

And on Server I see
B4X:
192.168.1.2 - - [10/May/2021:08:14:06 +0000] "GET /test HTTP/1.1" 200 76 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36"
0:0:0:0:0:0:0:1 - - [10/May/2021:08:14:37 +0000] "GET /favicon.ico HTTP/1.1" 404 326 "http://localhost:17178/test" "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36"
192.168.1.2 - - [10/May/2021:08:14:38 +0000] "GET /favicon.ico HTTP/1.1" 404 326 "http://192.168.1.2:17178/test" "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36"

When I run it from my pc connection made to the Windows server through lan
But when running local on server connection is not made.
Server firewall is off


When I do a request on chrome inside windows server task manager show that resources are used but no response.

 
Last edited:
Upvote 0

makis_best

Well-Known Member
Licensed User
Longtime User
What the error means?
B4X:
com.microsoft.sqlserver.jdbc.SQLServerException: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "The server selected protocol version TLS10 is not accepted by client preferences [TLS12]". ClientConnectionId:76ada2a4-294a-41ff-8c64-24918c688a30
 
Upvote 0

makis_best

Well-Known Member
Licensed User
Longtime User
I try you solution but not working for me
 
Upvote 0

makis_best

Well-Known Member
Licensed User
Longtime User
My problem is why when I run jRDC.jar on my PC working just fine and when I run it on Wondows Server not.
 
Upvote 0

josejad

Expert
Licensed User
Longtime User
Have you tried some of the google solutions?



 
Upvote 0

makis_best

Well-Known Member
Licensed User
Longtime User

I try those also.... Nothing change
 
Upvote 0

makis_best

Well-Known Member
Licensed User
Longtime User
OK....

After lot of research about why the same jar file working fine in 4 different pc's on the
same lan but not on the server of the lan come to nothing.

So I decide to change tactic... I decide to change driver.
So I jump from com.microsoft.sqlserver.jdbc.SQLServerDriver
to net.sourceforge.jtds.jdbc.Driver

I compile again..... and Boom.... everything working fine.
Maybe a new jRDC3 need to come out with more SSL options integrated

The question remain but for the moment problem solved
Thank you all for your help.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…