B4J Question c3p0 upgrade?

vfafou

Well-Known Member
Licensed User
Longtime User
Hello!
Is it possible to upgrade c3p0 library to 0.9.5 version?
I have the problem of slow test queries with MySQL.
Current 0.9.2 version supported is missing the preferredTestQuery parameter.
The test query sends to MySQL and slow log is logging is the following:
B4X:
SELECT TABLE_SCHEMA TABLE_CAT,
NULL  TABLE_SCHEM,
TABLE_NAME,
TABLE_TYPE,
TABLE_COMMENT REMARKS,
NULL TYPE_CAT,
NULL TYPE_SCHEM,
NULL TYPE_NAME,
NULL SELF_REFERENCING_COL_NAME,
NULL REF_GENERATION
FROM INFORMATION_SCHEMA.TABLES
WHERE (ISNULL(database()) OR (TABLE_SCHEMA = database()))
AND (TABLE_NAME = 'PROBABLYNOT')
AND TABLE_TYPE IN ('BASE TABLE')
ORDER BY TABLE_TYPE, TABLE_SCHEMA, TABLE_NAME
Thank you in advance!
 

vfafou

Well-Known Member
Licensed User
Longtime User
Hello Erel!
I've tried to do what you advised me but when I try to compile, I take the following error:
B4X:
2015-05-30 14:25:30.179:INFO::main: Logging initialized @375ms
Μαϊ 30, 2015 2:25:30 ΜΜ com.mchange.v2.log.MLog <clinit>
INFO: MLog clients using java 1.4+ standard logging.
main._appstart (java line: 92)
java.lang.NoClassDefFoundError: com/mchange/v2/cfg/MConfig
    at com.mchange.v2.c3p0.cfg.C3P0Config.findLibraryMultiPropertiesConfig(C3P0Config.java:157)
    at com.mchange.v2.c3p0.cfg.C3P0Config.<clinit>(C3P0Config.java:143)
    at com.mchange.v2.c3p0.impl.PoolBackedDataSourceBase.<init>(PoolBackedDataSourceBase.java:54)
    at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.<init>(AbstractPoolBackedDataSource.java:74)
    at com.mchange.v2.c3p0.AbstractComboPooledDataSource.<init>(AbstractComboPooledDataSource.java:142)
    at com.mchange.v2.c3p0.AbstractComboPooledDataSource.<init>(AbstractComboPooledDataSource.java:138)
    at com.mchange.v2.c3p0.ComboPooledDataSource.<init>(ComboPooledDataSource.java:47)
    at anywheresoftware.b4j.object.ConnectionPool.Initialize(ConnectionPool.java:24)
    at rm.rmtunnel.main._appstart(main.java:92)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:93)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:84)
    at rm.rmtunnel.main.main(main.java:29)
Caused by: java.lang.ClassNotFoundException: com.mchange.v2.cfg.MConfig
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    ... 16 more
This does not appear in debug mode!!!
Is there any configuration I have to do?
 
Last edited:
Upvote 0
Top