Android Question Set Up RDC on Windowes 64bit server

Gearcam

Active Member
Licensed User
Longtime User
I have downloaded the RDC on the windows server unpacked it
Also downloaded the JDBC driver from here as you suggest for the MS SQL server I have (Ver 1.3.1)

Tried to run the RunRLC.bat but get an error the system can not find the specified path.
(I have it all on my desktop in a folder)



This is the error !!

Code:
C:\Users\Administrator.SERVER-2\Desktop\RemoteDatabaseConnector>"C:\Program Files (x86)\Java\jdk1.7.0\bin\java" -Xmx256m -cp .;libs\*;jdbc_driver\* anywheresoftware.b4a.remotedatabase.RemoteServer
The system cannot find the path specified.

C:\Users\Administrator.SERVER-2\Desktop\RemoteDatabaseConnector>pause
Press any key tocontinue . . .
I do not have this directory
C:\Program Files (x86)\Java\jdk1.7.0

The server does not have B4A installed.

What have I missed ?

do I need B4J on the server ?

Steve
 
Last edited:

incendio

Well-Known Member
Licensed User
Longtime User
Where is your jave.exe folder?
Edit runrlc.bat file, change c\program files(x86) ..... to java.exe folder.
 
Upvote 0

Gearcam

Active Member
Licensed User
Longtime User
Hi its
C:\Program Files (x86)\Java

then sub folder jre1.5.0_07

Java.exe is in here C:\Program Files (x86)\Java\jre1.5.0_07\bin

But I get this after changing path
B4X:
C:\Users\Administrator.SERVER-2\Desktop\RemoteDatabaseConnector>"C:\Program F
iles (x86)\Java\jdk1.5.0_07\bin\java" -Xmx256m -cp .;libs\*;jdbc_driver\* anywhe
resoftware.b4a.remotedatabase.RemoteServer
The system cannot find the path specified.

C:\Users\Administrator.SERVER-2\Desktop\RemoteDatabaseConnector>pause
Press any key to continue . . .
 
Upvote 0

Gearcam

Active Member
Licensed User
Longtime User
So many versions of Java !!
Can not find 6+ can find SE can you point me to the correct download
Do I need the development version or the runtime ?
 
Upvote 0

Gearcam

Active Member
Licensed User
Longtime User
reinstalled V7 seems to have run now !!

This is what I get after install
B4X:
C:\Users\Administrator.SERVER-2\Desktop\RemoteDatabaseConnector>"C:\Program F
iles (x86)\Java\jre7\bin\java" -Xmx256m -cp .;libs\*;jdbc_driver\* anywheresoftw
are.b4a.remotedatabase.RemoteServer
B4A Remote Database Connecter (version 0.9)
loading: C:\Users\Administrator.SERVER-2\Desktop\RemoteDatabaseConnector\conf
ig.properties
2014-09-08 16:00:49.175:INFO::jetty-7.4.2.v20110526
2014-09-08 16:00:49.223:INFO::started o.e.j.s.ServletContextHandler{/,null}
Sep 08, 2014 4:00:49 PM com.mchange.v2.log.MLog <clinit>
INFO: MLog clients using java 1.4+ standard logging.
Sep 08, 2014 4:00:49 PM com.mchange.v2.c3p0.C3P0Registry banner
INFO: Initializing c3p0-0.9.2.1 [built 20-March-2013 11:16:28 +0000; debug? true
; trace: 10]
2014-09-08 16:00:49.874:INFO::Started [email protected]:17178 START
ING

but this http://10.0.0.37:17178/?method=test shows website can not be displayed

I have the DOS box still open so can see lots of lines of "conversation"

This is my Config file

B4X:
#Lines starting with '#' are comments.
#Backslash character at the end of line means that the command continues in the next line.
#DriverClass=com.mysql.jdbc.Driver
#JdbcUrl=jdbc:mysql://localhost/test?characterEncoding=utf8

#SQL Server
DriverClass=net.sourceforge.jtds.jdbc.Driver
#JdbcUrl=jdbc:jtds:sqlserver://10.0.0.37/Order System
JdbcUrl=jdbc:jtds:SERVER-2://10.0.0.37/Order System
User=Administrator
Password=xxxxx
ServerPort=17178
#If Debug is true then this file will be reloaded on every query.
#This is useful if you need to modify the queries.
#Debug=true

#commands
sql.create_table=CREATE TABLE animals (\
    id INT NOT NULL AUTO_INCREMENT,\
    name CHAR(30) NOT NULL,\
    image BLOB,\
    PRIMARY KEY (id))
sql.insert_animal=INSERT INTO animals VALUES (null, ?,?)
sql.select_animal=SELECT name, image FROM animals WHERE name = ?

Steve
 
Last edited:
Upvote 0

Gearcam

Active Member
Licensed User
Longtime User
Erel

all tests are done on the server

I changed the IP address in config.properties and http://127.0.0.1:17178/?method=test
The same error results

I changed the IP address in config.properties back to 10.0.0.37 which is the server IP address
and http://127.0.0.1:17178/?method=test
The same error result

this is the log

B4X:
C:\Users\Administrator.SERVER-2\Desktop\RemoteDatabaseConnector>"C:\Program F
iles (x86)\Java\jre7\bin\java" -Xmx256m -cp .;libs\*;jdbc_driver\* anywheresoftw
are.b4a.remotedatabase.RemoteServer
B4A Remote Database Connecter (version 0.9)
loading: C:\Users\Administrator.SERVER-2\Desktop\RemoteDatabaseConnector\conf
ig.properties
2014-09-09 07:45:50.006:INFO::jetty-7.4.2.v20110526
2014-09-09 07:45:50.052:INFO::started o.e.j.s.ServletContextHandler{/,null}
Sep 09, 2014 7:45:50 AM com.mchange.v2.log.MLog <clinit>
INFO: MLog clients using java 1.4+ standard logging.
Sep 09, 2014 7:45:50 AM com.mchange.v2.c3p0.C3P0Registry banner
INFO: Initializing c3p0-0.9.2.1 [built 20-March-2013 11:16:28 +0000; debug? true
; trace: 10]
2014-09-09 07:45:50.447:INFO::Started [email protected]:17178 START
ING
Sep 09, 2014 7:46:43 AM com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource ge
tPoolManager
INFO: Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acqu
ireIncrement -> 3, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCo
mmitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> fa
lse, checkoutTimeout -> 20000, connectionCustomizerClassName -> null, connection
TesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, dataSourceN
ame -> 2rvxut94oqlu4psl3wgp|127a20c, debugUnreturnedConnectionStackTraces -> fal
se, description -> null, driverClass -> net.sourceforge.jtds.jdbc.Driver, factor
yClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToke
n -> 2rvxut94oqlu4psl3wgp|127a20c, idleConnectionTestPeriod -> 600, initialPoolS
ize -> 3, jdbcUrl -> jdbc:jtds:AGTSERVER-2://10.0.0.37/AcedesOrderSystem, maxAdm
inistrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 1800, maxIdleTim
eExcessConnections -> 0, maxPoolSize -> 15, maxStatements -> 150, maxStatementsP
erConnection -> 0, minPoolSize -> 3, numHelperThreads -> 3, preferredTestQuery -
> null, properties -> {user=******, password=******}, propertyCycle -> 0, statem
entCacheNumDeferredCloseThreads -> 0, testConnectionOnCheckin -> false, testConn
ectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, userOverrides -> {}
, usesTraditionalReflectiveProxies -> false ]
java.sql.SQLException: An attempt by a client to checkout a Connection has timed
out.
        at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:118)
        at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:77)
        at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConne
ction(C3P0PooledConnectionPool.java:687)
        at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(A
bstractPoolBackedDataSource.java:140)
        at anywheresoftware.b4a.remotedatabase.Servlet.doGet(Servlet.java:64)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:538
)
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java
:478)
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandl
er.java:937)
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:
406)
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandle
r.java:871)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.j
ava:117)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper
.java:110)
        at org.eclipse.jetty.server.Server.handle(Server.java:346)
        at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.
java:589)
        at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete
(HttpConnection.java:1048)
        at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:601)
        at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:214)

        at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:41
1)
        at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEn
dPoint.java:535)
        at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEnd
Point.java:40)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool
.java:529)
        at java.lang.Thread.run(Unknown Source)
Caused by: com.mchange.v2.resourcepool.TimeoutException: A client timed out whil
e waiting to acquire a resource from com.mchange.v2.resourcepool.BasicResourcePo
ol@173f82f -- timeout at awaitAvailable()
        at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicRes
ourcePool.java:1416)
        at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(
BasicResourcePool.java:606)
        at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicR
esourcePool.java:526)
        at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutAndMarkConn
ectionInUse(C3P0PooledConnectionPool.java:755)
        at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConne
ction(C3P0PooledConnectionPool.java:682)
        ... 21 more
Sep 09, 2014 7:47:13 AM com.mchange.v2.resourcepool.BasicResourcePool$ScatteredA
cquireTask run
WARNING: com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@11bd
80c -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to
acquire a needed new resource, we failed to succeed more than the maximum number
of allowed acquisition attempts (30). Last acquisition attempt exception:
java.sql.SQLException: The syntax of the connection URL 'jdbc:jtds:SERVER-2:/
/10.0.0.37/OrderSystem' is invalid.
        at net.sourceforge.jtds.jdbc.Driver.setupConnectProperties(Driver.java:2
42)
        at net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:182)
        at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManag
erDataSource.java:146)
        at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnecti
on(WrapperConnectionPoolDataSource.java:195)
        at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnecti
on(WrapperConnectionPoolDataSource.java:184)
        at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionRe
sourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:200)
        at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResource
Pool.java:1086)
        at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPe
ndingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1073)
        at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourc
ePool.java:44)
        at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.ru
n(BasicResourcePool.java:1810)
        at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(Thre
adPoolAsynchronousRunner.java:648)

Sep 09, 2014 7:47:13 AM com.mchange.v2.resourcepool.BasicResourcePool forceKillA
cquires
WARNING: Having failed to acquire a resource, com.mchange.v2.resourcepool.BasicR
esourcePool@173f82f is interrupting all Threads waiting on a resource to check o
ut. Will try again in response to new client requests.
Sep 09, 2014 7:47:13 AM com.mchange.v2.resourcepool.BasicResourcePool$ScatteredA
cquireTask run
WARNING: com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@d320
28 -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to a
cquire a needed new resource, we failed to succeed more than the maximum number
of allowed acquisition attempts (30). Last acquisition attempt exception:
java.sql.SQLException: The syntax of the connection URL 'jdbc:jtds:SERVER-2:/
/10.0.0.37/OrderSystem' is invalid.
        at net.sourceforge.jtds.jdbc.Driver.setupConnectProperties(Driver.java:2
42)
        at net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:182)
        at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManag
erDataSource.java:146)
        at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnecti
on(WrapperConnectionPoolDataSource.java:195)
        at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnecti
on(WrapperConnectionPoolDataSource.java:184)
        at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionRe
sourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:200)
        at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResource
Pool.java:1086)
        at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPe
ndingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1073)
        at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourc
ePool.java:44)
        at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.ru
n(BasicResourcePool.java:1810)
        at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(Thre
adPoolAsynchronousRunner.java:648)

Sep 09, 2014 7:47:13 AM com.mchange.v2.resourcepool.BasicResourcePool forceKillA
cquires
WARNING: Having failed to acquire a resource, com.mchange.v2.resourcepool.BasicR
esourcePool@173f82f is interrupting all Threads waiting on a resource to check o
ut. Will try again in response to new client requests.
Sep 09, 2014 7:47:13 AM com.mchange.v2.resourcepool.BasicResourcePool$ScatteredA
cquireTask run
WARNING: com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@4491
6c -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to a
cquire a needed new resource, we failed to succeed more than the maximum number
of allowed acquisition attempts (30). Last acquisition attempt exception:
java.sql.SQLException: The syntax of the connection URL 'jdbc:jtds:SERVER-2:/
/10.0.0.37/OrderSystem' is invalid.
        at net.sourceforge.jtds.jdbc.Driver.setupConnectProperties(Driver.java:2
42)
        at net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:182)
        at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManag
erDataSource.java:146)
        at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnecti
on(WrapperConnectionPoolDataSource.java:195)
        at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnecti
on(WrapperConnectionPoolDataSource.java:184)
        at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionRe
sourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:200)
        at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResource
Pool.java:1086)
        at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPe
ndingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1073)
        at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourc
ePool.java:44)
        at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.ru
n(BasicResourcePool.java:1810)
        at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(Thre
adPoolAsynchronousRunner.java:648)

Sep 09, 2014 7:47:13 AM com.mchange.v2.resourcepool.BasicResourcePool forceKillA
cquires
WARNING: Having failed to acquire a resource, com.mchange.v2.resourcepool.BasicR
esourcePool@173f82f is interrupting all Threads waiting on a resource to check o
ut. Will try again in response to new client requests.
 
Last edited:
Upvote 0

Gearcam

Active Member
Licensed User
Longtime User
Erel

I have tried all sorts of combinations of IP address locally on the server and on my client PC (SQL is always on server)
I have the B4A running on my phone but that always gives either a time out error or failed to connect

It just will not work

Help !!

Steve
 
Upvote 0

Gearcam

Active Member
Licensed User
Longtime User
hi it is open
I am only testing directly on the server so its all local and still will not work

I am using V7 of Java could that be the problem ?

I get the same with Java V6 & V7 (runtimes)

V6 is update 45 64-bit
 
Last edited:
Upvote 0

Gearcam

Active Member
Licensed User
Longtime User
Ok found the problem its to do with the username and password.
It did not like to use existing client names from the domain.
I created a new user in SQL with SQL authentication

And it runs !!!

On to the B4A to see if I can create a table
read data from existing Table
Update existing Table

Use the SQL logs to find the problem
 
Last edited:
Upvote 0
Top