baztian / jaydebeapi

JayDeBeApi module allows you to connect from Python code to databases using Java JDBC. It provides a Python DB-API v2.0 to that database.
GNU Lesser General Public License v3.0
365 stars 148 forks source link

Error jaydebeapi.connect #218

Open ronaldoapsilva opened 2 years ago

ronaldoapsilva commented 2 years ago

Sometime When I try to connect to db using the block of code below, it crashs the application, How can I handle it without exit the application? Since I am already using try block try: with jaydebeapi.connect( 'com.ibm.db2.jcc.DB2Driver', connection_string, [conn_prm['UID'], conn_prm['PWD']], jars=DB2JCC4, ) as conn: with conn.cursor() as curs: curs.execute(sql_string) column_names = [column[0] for column in curs.description] results = curs.fetchall() data = [dict(zip(column_names, row)) for row in results] except Exception as err: data = {'STATUS': f'jaydebeapi error = {str(err.args)}'} I got the error below on terminal

resize LOA size(0) should not be smaller than minimum LOA size(76800). 01:16:35.288 0x1a4600 j9mm.141 * ** ASSERTION FAILED ** at MemoryPoolLargeObjects.cpp:334: ((false)) JVMDUMP039I Processing dump event "traceassert", detail "" at 2022/06/17 22:16:35 - please wait. JVMDUMP032I JVM requested System dump using 'C:\project_path\core.20220617.221635.17216.0001.dmp' in response to an event JVMDUMP010I System dump written to C:\project_path\core.20220617.221635.17216.0001.dmp JVMDUMP032I JVM requested Java dump using 'C:\project_path\javacore.20220617.221635.17216.0002.txt' in response to an event JVMDUMP010I Java dump written to C:\project_path\javacore.20220617.221635.17216.0002.txt JVMDUMP032I JVM requested Snap dump using 'C:\project_path\Snap.20220617.221635.17216.0003.trc' in response to an event JVMDUMP010I Snap dump written to C:\project_path\Snap.20220617.221635.17216.0003.trc JVMDUMP013I Processed dump event "traceassert", detail "". Also the files below are created on project path core.20220617.221635.17216.0001.dmp javacore.20220617.221635.17216.0002.txt Snap.20220617.221635.17216.0003.trc