B4J Question [Solved - ABMaterial] Mysql timeout running jar file

Harris

Expert
Licensed User
Longtime User
New Win 8.1 Acer laptop PC
Bought it for a client to run my ABMaterial webapp.

Same code runs fine on my dev pc - which is identical.
Using same wamp server on both - and same database with same username and password / permissions.

Installed lasted java jdk and jre...

What the heck am I missing?

Thanks




B4X:
C:\USBwebserver\root\www>java -jar tripinspect.jar
init mysql
Feb 05, 2016 10:01:27 PM com.mchange.v2.log.MLog <clinit>
INFO: MLog clients using java 1.4+ standard logging.
Feb 05, 2016 10:01:28 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]
emp page inited..
Feb 05, 2016 10:01:28 PM com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource g
etPoolManager
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 -> 2wp7py9e1e9nxjc1tqun6h|2957fcb0, debugUnreturnedConnectionStackTraces ->
false, description -> null, driverClass -> com.mysql.jdbc.Driver, factoryClassLo
cation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 2wp
7py9e1e9nxjc1tqun6h|2957fcb0, idleConnectionTestPeriod -> 600, initialPoolSize -
> 3, jdbcUrl -> jdbc:mysql://localhost/harris?characterEncoding=utf8, maxAdminis
trativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 1800, maxIdleTimeExc
essConnections -> 0, maxPoolSize -> 100, maxStatements -> 150, maxStatementsPerC
onnection -> 0, minPoolSize -> 3, numHelperThreads -> 3, preferredTestQuery -> n
ull, properties -> {user=******, password=******}, propertyCycle -> 0, statement
CacheNumDeferredCloseThreads -> 0, testConnectionOnCheckin -> false, testConnect
ionOnCheckout -> true, unreturnedConnectionTimeout -> 0, userOverrides -> {}, us
esTraditionalReflectiveProxies -> false ]
dbm._getsql (java line: 354)
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.b4j.object.ConnectionPool.GetConnection(ConnectionPo
ol.java:41)
        at abmtripinspect.ti.com.dbm._getsql(dbm.java:354)
        at abmtripinspect.ti.com.employees._buildvehicleinputsheet(employees.jav
a:1407)
        at abmtripinspect.ti.com.employees._buildpage(employees.java:1002)
        at abmtripinspect.ti.com.employees._initialize(employees.java:2151)
        at abmtripinspect.ti.com.main._appstart(main.java:62)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at anywheresoftware.b4a.BA.raiseEvent2(BA.java:93)
        at anywheresoftware.b4a.BA.raiseEvent(BA.java:84)
        at abmtripinspect.ti.com.main.main(main.java:29)
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@7e0babb1 -- 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)
        ... 14 more


C:\USBwebserver\root\www>
 

Harris

Expert
Licensed User
Longtime User
MySQL server port was set to (default) 3307. Needed to be set to 3306.
Now working.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
MySQL server port was set to (default) 3307. Needed to be set to 3306.
Usually you can use any port... If you configure to use 3307 for mysql then you need to configure the connectors to use the same port...

In my mysql-connector-wrappings you can set a host, a user and a password.

B4X:
connect("hostname.com","user","password")

To use another port than the default one (3306) you need to write
B4X:
connect("hostname.com:3307","user","password")
in this case...

That´s only for my wrappings. But i guess it will work with any other mysqlconnector too
 
Upvote 0
Top